@flowselections/floriday-verkoop-module 1.0.42 → 1.0.44

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 (66) hide show
  1. package/dist-lib/components/verkoop/SalesOrdersTable.d.ts +5 -2
  2. package/dist-lib/components/verkoop/SalesOrdersTable.d.ts.map +1 -1
  3. package/dist-lib/components/verkoop/SalesOrdersTable.js +27 -13
  4. package/dist-lib/components/verkoop/VerkoopOrdersPage.d.ts.map +1 -1
  5. package/dist-lib/components/verkoop/VerkoopOrdersPage.js +114 -35
  6. package/dist-lib/integrations/supabase/auth-middleware.d.ts +571 -12
  7. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
  8. package/dist-lib/integrations/supabase/client.d.ts +571 -12
  9. package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
  10. package/dist-lib/integrations/supabase/client.server.d.ts +571 -12
  11. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
  12. package/dist-lib/integrations/supabase/types.d.ts +594 -13
  13. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  14. package/dist-lib/integrations/supabase/types.js +3 -0
  15. package/dist-lib/lib/cart-lock.functions.d.ts +571 -12
  16. package/dist-lib/lib/cart-lock.functions.d.ts.map +1 -1
  17. package/dist-lib/lib/cart-planning-settings.functions.d.ts +6281 -132
  18. package/dist-lib/lib/cart-planning-settings.functions.d.ts.map +1 -1
  19. package/dist-lib/lib/cart-replan.functions.d.ts +1713 -36
  20. package/dist-lib/lib/cart-replan.functions.d.ts.map +1 -1
  21. package/dist-lib/lib/create-order.functions.d.ts +31355 -193
  22. package/dist-lib/lib/create-order.functions.d.ts.map +1 -1
  23. package/dist-lib/lib/create-order.functions.js +18 -1
  24. package/dist-lib/lib/floriday-auto-fulfillment.functions.d.ts +1713 -36
  25. package/dist-lib/lib/floriday-auto-fulfillment.functions.d.ts.map +1 -1
  26. package/dist-lib/lib/floriday-logistic-labels.functions.d.ts +571 -12
  27. package/dist-lib/lib/floriday-logistic-labels.functions.d.ts.map +1 -1
  28. package/dist-lib/lib/floriday-mirror.functions.d.ts +571 -12
  29. package/dist-lib/lib/floriday-mirror.functions.d.ts.map +1 -1
  30. package/dist-lib/lib/floriday-mirror.functions.js +6 -1
  31. package/dist-lib/lib/floriday-public.functions.d.ts +3997 -84
  32. package/dist-lib/lib/floriday-public.functions.d.ts.map +1 -1
  33. package/dist-lib/lib/floriday-writes.functions.d.ts +2855 -60
  34. package/dist-lib/lib/floriday-writes.functions.d.ts.map +1 -1
  35. package/dist-lib/lib/invoice-timing.functions.d.ts +2284 -48
  36. package/dist-lib/lib/invoice-timing.functions.d.ts.map +1 -1
  37. package/dist-lib/lib/invoice-timing.server.d.ts.map +1 -1
  38. package/dist-lib/lib/invoice-timing.server.js +1 -0
  39. package/dist-lib/lib/load-carriers.functions.d.ts +571 -12
  40. package/dist-lib/lib/load-carriers.functions.d.ts.map +1 -1
  41. package/dist-lib/lib/logistics-engine.functions.d.ts +2855 -60
  42. package/dist-lib/lib/logistics-engine.functions.d.ts.map +1 -1
  43. package/dist-lib/lib/logistics-stock.functions.d.ts +1142 -24
  44. package/dist-lib/lib/logistics-stock.functions.d.ts.map +1 -1
  45. package/dist-lib/lib/order-addresses.functions.d.ts +571 -12
  46. package/dist-lib/lib/order-addresses.functions.d.ts.map +1 -1
  47. package/dist-lib/lib/order-buffers.functions.d.ts +1713 -36
  48. package/dist-lib/lib/order-buffers.functions.d.ts.map +1 -1
  49. package/dist-lib/lib/order-cancel.server.d.ts +24 -0
  50. package/dist-lib/lib/order-cancel.server.d.ts.map +1 -0
  51. package/dist-lib/lib/order-cancel.server.js +130 -0
  52. package/dist-lib/lib/order-carrier.functions.d.ts +1142 -24
  53. package/dist-lib/lib/order-carrier.functions.d.ts.map +1 -1
  54. package/dist-lib/lib/order-pickup.functions.d.ts +1142 -24
  55. package/dist-lib/lib/order-pickup.functions.d.ts.map +1 -1
  56. package/dist-lib/lib/order-shipments.functions.d.ts +2284 -48
  57. package/dist-lib/lib/order-shipments.functions.d.ts.map +1 -1
  58. package/dist-lib/lib/salesorders-list.functions.d.ts +571 -12
  59. package/dist-lib/lib/salesorders-list.functions.d.ts.map +1 -1
  60. package/dist-lib/lib/salesorders-list.server.d.ts.map +1 -1
  61. package/dist-lib/lib/salesorders-list.server.js +4 -60
  62. package/dist-lib/lib/salesorders.functions.d.ts +2855 -60
  63. package/dist-lib/lib/salesorders.functions.d.ts.map +1 -1
  64. package/dist-lib/lib/tradeitems.functions.d.ts +571 -12
  65. package/dist-lib/lib/tradeitems.functions.d.ts.map +1 -1
  66. package/package.json +1 -1
@@ -5080,6 +5080,42 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
5080
5080
  };
5081
5081
  Relationships: [];
5082
5082
  };
5083
+ facturen: {
5084
+ Row: {
5085
+ bedrag_incl_btw: number;
5086
+ created_at: string;
5087
+ datum: string;
5088
+ factuurnummer: string;
5089
+ id: string;
5090
+ klantnaam: string;
5091
+ status: string;
5092
+ updated_at: string;
5093
+ user_id: string;
5094
+ };
5095
+ Insert: {
5096
+ bedrag_incl_btw: number;
5097
+ created_at?: string;
5098
+ datum?: string;
5099
+ factuurnummer: string;
5100
+ id?: string;
5101
+ klantnaam: string;
5102
+ status?: string;
5103
+ updated_at?: string;
5104
+ user_id?: string;
5105
+ };
5106
+ Update: {
5107
+ bedrag_incl_btw?: number;
5108
+ created_at?: string;
5109
+ datum?: string;
5110
+ factuurnummer?: string;
5111
+ id?: string;
5112
+ klantnaam?: string;
5113
+ status?: string;
5114
+ updated_at?: string;
5115
+ user_id?: string;
5116
+ };
5117
+ Relationships: [];
5118
+ };
5083
5119
  floricode_connection_settings: {
5084
5120
  Row: {
5085
5121
  catalog_key: string | null;
@@ -7804,6 +7840,258 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
7804
7840
  };
7805
7841
  Relationships: [];
7806
7842
  };
7843
+ itk_offerte_events: {
7844
+ Row: {
7845
+ created_at: string;
7846
+ event_type: string;
7847
+ id: string;
7848
+ metadata: import("../integrations/supabase/types").Json;
7849
+ offerte_id: string;
7850
+ omschrijving: string | null;
7851
+ user_id: string | null;
7852
+ };
7853
+ Insert: {
7854
+ created_at?: string;
7855
+ event_type: string;
7856
+ id?: string;
7857
+ metadata?: import("../integrations/supabase/types").Json;
7858
+ offerte_id: string;
7859
+ omschrijving?: string | null;
7860
+ user_id?: string | null;
7861
+ };
7862
+ Update: {
7863
+ created_at?: string;
7864
+ event_type?: string;
7865
+ id?: string;
7866
+ metadata?: import("../integrations/supabase/types").Json;
7867
+ offerte_id?: string;
7868
+ omschrijving?: string | null;
7869
+ user_id?: string | null;
7870
+ };
7871
+ Relationships: [{
7872
+ foreignKeyName: "itk_offerte_events_offerte_id_fkey";
7873
+ columns: ["offerte_id"];
7874
+ isOneToOne: false;
7875
+ referencedRelation: "itk_offertes";
7876
+ referencedColumns: ["id"];
7877
+ }];
7878
+ };
7879
+ itk_offerte_regels: {
7880
+ Row: {
7881
+ created_at: string;
7882
+ id: string;
7883
+ line_total_cents: number;
7884
+ offerte_id: string;
7885
+ omschrijving: string;
7886
+ package_id: string | null;
7887
+ quantity: number;
7888
+ sort_order: number;
7889
+ source: string;
7890
+ unit_price_cents: number;
7891
+ updated_at: string;
7892
+ };
7893
+ Insert: {
7894
+ created_at?: string;
7895
+ id?: string;
7896
+ line_total_cents?: number;
7897
+ offerte_id: string;
7898
+ omschrijving?: string;
7899
+ package_id?: string | null;
7900
+ quantity?: number;
7901
+ sort_order?: number;
7902
+ source?: string;
7903
+ unit_price_cents?: number;
7904
+ updated_at?: string;
7905
+ };
7906
+ Update: {
7907
+ created_at?: string;
7908
+ id?: string;
7909
+ line_total_cents?: number;
7910
+ offerte_id?: string;
7911
+ omschrijving?: string;
7912
+ package_id?: string | null;
7913
+ quantity?: number;
7914
+ sort_order?: number;
7915
+ source?: string;
7916
+ unit_price_cents?: number;
7917
+ updated_at?: string;
7918
+ };
7919
+ Relationships: [{
7920
+ foreignKeyName: "itk_offerte_regels_offerte_id_fkey";
7921
+ columns: ["offerte_id"];
7922
+ isOneToOne: false;
7923
+ referencedRelation: "itk_offertes";
7924
+ referencedColumns: ["id"];
7925
+ }, {
7926
+ foreignKeyName: "itk_offerte_regels_package_id_fkey";
7927
+ columns: ["package_id"];
7928
+ isOneToOne: false;
7929
+ referencedRelation: "werkbon_packages";
7930
+ referencedColumns: ["id"];
7931
+ }];
7932
+ };
7933
+ itk_offerte_settings: {
7934
+ Row: {
7935
+ auto_convert_binnen_mandaat: boolean;
7936
+ created_at: string;
7937
+ default_geldigheid_dagen: number;
7938
+ default_vat_rate: number;
7939
+ id: string;
7940
+ singleton: boolean;
7941
+ updated_at: string;
7942
+ };
7943
+ Insert: {
7944
+ auto_convert_binnen_mandaat?: boolean;
7945
+ created_at?: string;
7946
+ default_geldigheid_dagen?: number;
7947
+ default_vat_rate?: number;
7948
+ id?: string;
7949
+ singleton?: boolean;
7950
+ updated_at?: string;
7951
+ };
7952
+ Update: {
7953
+ auto_convert_binnen_mandaat?: boolean;
7954
+ created_at?: string;
7955
+ default_geldigheid_dagen?: number;
7956
+ default_vat_rate?: number;
7957
+ id?: string;
7958
+ singleton?: boolean;
7959
+ updated_at?: string;
7960
+ };
7961
+ Relationships: [];
7962
+ };
7963
+ itk_offertes: {
7964
+ Row: {
7965
+ ai_generated: boolean;
7966
+ approved_at: string | null;
7967
+ binnen_mandaat: boolean;
7968
+ contact_id: string | null;
7969
+ converted_at: string | null;
7970
+ created_at: string;
7971
+ created_by: string | null;
7972
+ customer_id: string | null;
7973
+ follow_up_werkbon_id: string | null;
7974
+ id: string;
7975
+ jaar: number;
7976
+ mandaat_restant_cents: number;
7977
+ notities: string | null;
7978
+ offerte_number: string | null;
7979
+ omschrijving: string;
7980
+ rejected_at: string | null;
7981
+ sent_at: string | null;
7982
+ source_number: string | null;
7983
+ source_ref: string | null;
7984
+ source_type: string;
7985
+ status: string;
7986
+ subtotal_cents: number;
7987
+ total_cents: number;
7988
+ updated_at: string;
7989
+ valid_until: string | null;
7990
+ vat_cents: number;
7991
+ vat_rate: number;
7992
+ viewed_at: string | null;
7993
+ volgnummer: number | null;
7994
+ werkbon_id: string | null;
7995
+ work_location_id: string | null;
7996
+ };
7997
+ Insert: {
7998
+ ai_generated?: boolean;
7999
+ approved_at?: string | null;
8000
+ binnen_mandaat?: boolean;
8001
+ contact_id?: string | null;
8002
+ converted_at?: string | null;
8003
+ created_at?: string;
8004
+ created_by?: string | null;
8005
+ customer_id?: string | null;
8006
+ follow_up_werkbon_id?: string | null;
8007
+ id?: string;
8008
+ jaar?: number;
8009
+ mandaat_restant_cents?: number;
8010
+ notities?: string | null;
8011
+ offerte_number?: string | null;
8012
+ omschrijving?: string;
8013
+ rejected_at?: string | null;
8014
+ sent_at?: string | null;
8015
+ source_number?: string | null;
8016
+ source_ref?: string | null;
8017
+ source_type?: string;
8018
+ status?: string;
8019
+ subtotal_cents?: number;
8020
+ total_cents?: number;
8021
+ updated_at?: string;
8022
+ valid_until?: string | null;
8023
+ vat_cents?: number;
8024
+ vat_rate?: number;
8025
+ viewed_at?: string | null;
8026
+ volgnummer?: number | null;
8027
+ werkbon_id?: string | null;
8028
+ work_location_id?: string | null;
8029
+ };
8030
+ Update: {
8031
+ ai_generated?: boolean;
8032
+ approved_at?: string | null;
8033
+ binnen_mandaat?: boolean;
8034
+ contact_id?: string | null;
8035
+ converted_at?: string | null;
8036
+ created_at?: string;
8037
+ created_by?: string | null;
8038
+ customer_id?: string | null;
8039
+ follow_up_werkbon_id?: string | null;
8040
+ id?: string;
8041
+ jaar?: number;
8042
+ mandaat_restant_cents?: number;
8043
+ notities?: string | null;
8044
+ offerte_number?: string | null;
8045
+ omschrijving?: string;
8046
+ rejected_at?: string | null;
8047
+ sent_at?: string | null;
8048
+ source_number?: string | null;
8049
+ source_ref?: string | null;
8050
+ source_type?: string;
8051
+ status?: string;
8052
+ subtotal_cents?: number;
8053
+ total_cents?: number;
8054
+ updated_at?: string;
8055
+ valid_until?: string | null;
8056
+ vat_cents?: number;
8057
+ vat_rate?: number;
8058
+ viewed_at?: string | null;
8059
+ volgnummer?: number | null;
8060
+ werkbon_id?: string | null;
8061
+ work_location_id?: string | null;
8062
+ };
8063
+ Relationships: [{
8064
+ foreignKeyName: "itk_offertes_contact_id_fkey";
8065
+ columns: ["contact_id"];
8066
+ isOneToOne: false;
8067
+ referencedRelation: "itk_contact_persons";
8068
+ referencedColumns: ["id"];
8069
+ }, {
8070
+ foreignKeyName: "itk_offertes_customer_id_fkey";
8071
+ columns: ["customer_id"];
8072
+ isOneToOne: false;
8073
+ referencedRelation: "itk_customers";
8074
+ referencedColumns: ["id"];
8075
+ }, {
8076
+ foreignKeyName: "itk_offertes_follow_up_werkbon_id_fkey";
8077
+ columns: ["follow_up_werkbon_id"];
8078
+ isOneToOne: false;
8079
+ referencedRelation: "werkbonnen";
8080
+ referencedColumns: ["id"];
8081
+ }, {
8082
+ foreignKeyName: "itk_offertes_werkbon_id_fkey";
8083
+ columns: ["werkbon_id"];
8084
+ isOneToOne: false;
8085
+ referencedRelation: "werkbonnen";
8086
+ referencedColumns: ["id"];
8087
+ }, {
8088
+ foreignKeyName: "itk_offertes_work_location_id_fkey";
8089
+ columns: ["work_location_id"];
8090
+ isOneToOne: false;
8091
+ referencedRelation: "itk_work_locations";
8092
+ referencedColumns: ["id"];
8093
+ }];
8094
+ };
7807
8095
  itk_work_locations: {
7808
8096
  Row: {
7809
8097
  city: string | null;
@@ -10177,6 +10465,63 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
10177
10465
  referencedColumns: ["id"];
10178
10466
  }];
10179
10467
  };
10468
+ medewerker_details: {
10469
+ Row: {
10470
+ color: string | null;
10471
+ created_at: string;
10472
+ hours_fri: number | null;
10473
+ hours_mon: number | null;
10474
+ hours_thu: number | null;
10475
+ hours_tue: number | null;
10476
+ hours_wed: number | null;
10477
+ id: string;
10478
+ is_active: boolean;
10479
+ leave_balance_hours: number;
10480
+ persnr: string | null;
10481
+ phone: string | null;
10482
+ profile_id: string;
10483
+ updated_at: string;
10484
+ };
10485
+ Insert: {
10486
+ color?: string | null;
10487
+ created_at?: string;
10488
+ hours_fri?: number | null;
10489
+ hours_mon?: number | null;
10490
+ hours_thu?: number | null;
10491
+ hours_tue?: number | null;
10492
+ hours_wed?: number | null;
10493
+ id?: string;
10494
+ is_active?: boolean;
10495
+ leave_balance_hours?: number;
10496
+ persnr?: string | null;
10497
+ phone?: string | null;
10498
+ profile_id: string;
10499
+ updated_at?: string;
10500
+ };
10501
+ Update: {
10502
+ color?: string | null;
10503
+ created_at?: string;
10504
+ hours_fri?: number | null;
10505
+ hours_mon?: number | null;
10506
+ hours_thu?: number | null;
10507
+ hours_tue?: number | null;
10508
+ hours_wed?: number | null;
10509
+ id?: string;
10510
+ is_active?: boolean;
10511
+ leave_balance_hours?: number;
10512
+ persnr?: string | null;
10513
+ phone?: string | null;
10514
+ profile_id?: string;
10515
+ updated_at?: string;
10516
+ };
10517
+ Relationships: [{
10518
+ foreignKeyName: "medewerker_details_profile_id_fkey";
10519
+ columns: ["profile_id"];
10520
+ isOneToOne: true;
10521
+ referencedRelation: "profiles";
10522
+ referencedColumns: ["id"];
10523
+ }];
10524
+ };
10180
10525
  module_features: {
10181
10526
  Row: {
10182
10527
  created_at: string;
@@ -11470,6 +11815,8 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
11470
11815
  orders: {
11471
11816
  Row: {
11472
11817
  buffer_id: string | null;
11818
+ cancel_reason: string | null;
11819
+ cancelled_at: string | null;
11473
11820
  created_at: string;
11474
11821
  custom_fields: import("../integrations/supabase/types").Json;
11475
11822
  customer_id: string | null;
@@ -11492,6 +11839,8 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
11492
11839
  };
11493
11840
  Insert: {
11494
11841
  buffer_id?: string | null;
11842
+ cancel_reason?: string | null;
11843
+ cancelled_at?: string | null;
11495
11844
  created_at?: string;
11496
11845
  custom_fields?: import("../integrations/supabase/types").Json;
11497
11846
  customer_id?: string | null;
@@ -11514,6 +11863,8 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
11514
11863
  };
11515
11864
  Update: {
11516
11865
  buffer_id?: string | null;
11866
+ cancel_reason?: string | null;
11867
+ cancelled_at?: string | null;
11517
11868
  created_at?: string;
11518
11869
  custom_fields?: import("../integrations/supabase/types").Json;
11519
11870
  customer_id?: string | null;
@@ -13576,6 +13927,66 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
13576
13927
  };
13577
13928
  Relationships: [];
13578
13929
  };
13930
+ profile_modules: {
13931
+ Row: {
13932
+ created_at: string;
13933
+ id: string;
13934
+ module_id: string;
13935
+ profile_id: string;
13936
+ };
13937
+ Insert: {
13938
+ created_at?: string;
13939
+ id?: string;
13940
+ module_id: string;
13941
+ profile_id: string;
13942
+ };
13943
+ Update: {
13944
+ created_at?: string;
13945
+ id?: string;
13946
+ module_id?: string;
13947
+ profile_id?: string;
13948
+ };
13949
+ Relationships: [{
13950
+ foreignKeyName: "profile_modules_profile_id_fkey";
13951
+ columns: ["profile_id"];
13952
+ isOneToOne: false;
13953
+ referencedRelation: "profiles_org";
13954
+ referencedColumns: ["id"];
13955
+ }];
13956
+ };
13957
+ profile_roles: {
13958
+ Row: {
13959
+ created_at: string;
13960
+ id: string;
13961
+ profile_id: string;
13962
+ role_id: string;
13963
+ };
13964
+ Insert: {
13965
+ created_at?: string;
13966
+ id?: string;
13967
+ profile_id: string;
13968
+ role_id: string;
13969
+ };
13970
+ Update: {
13971
+ created_at?: string;
13972
+ id?: string;
13973
+ profile_id?: string;
13974
+ role_id?: string;
13975
+ };
13976
+ Relationships: [{
13977
+ foreignKeyName: "profile_roles_profile_id_fkey";
13978
+ columns: ["profile_id"];
13979
+ isOneToOne: false;
13980
+ referencedRelation: "profiles_org";
13981
+ referencedColumns: ["id"];
13982
+ }, {
13983
+ foreignKeyName: "profile_roles_role_id_fkey";
13984
+ columns: ["role_id"];
13985
+ isOneToOne: false;
13986
+ referencedRelation: "roles";
13987
+ referencedColumns: ["id"];
13988
+ }];
13989
+ };
13579
13990
  profiles: {
13580
13991
  Row: {
13581
13992
  address: string | null;
@@ -13621,6 +14032,39 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
13621
14032
  referencedColumns: ["id"];
13622
14033
  }];
13623
14034
  };
14035
+ profiles_org: {
14036
+ Row: {
14037
+ created_at: string;
14038
+ id: string;
14039
+ is_default: boolean;
14040
+ name: string;
14041
+ tenant_id: string | null;
14042
+ updated_at: string;
14043
+ };
14044
+ Insert: {
14045
+ created_at?: string;
14046
+ id?: string;
14047
+ is_default?: boolean;
14048
+ name: string;
14049
+ tenant_id?: string | null;
14050
+ updated_at?: string;
14051
+ };
14052
+ Update: {
14053
+ created_at?: string;
14054
+ id?: string;
14055
+ is_default?: boolean;
14056
+ name?: string;
14057
+ tenant_id?: string | null;
14058
+ updated_at?: string;
14059
+ };
14060
+ Relationships: [{
14061
+ foreignKeyName: "profiles_org_tenant_id_fkey";
14062
+ columns: ["tenant_id"];
14063
+ isOneToOne: false;
14064
+ referencedRelation: "tenants";
14065
+ referencedColumns: ["id"];
14066
+ }];
14067
+ };
13624
14068
  projects: {
13625
14069
  Row: {
13626
14070
  contact_name: string | null;
@@ -14795,6 +15239,7 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
14795
15239
  type: string;
14796
15240
  updated_at: string;
14797
15241
  vereist_medewerker: boolean;
15242
+ werkplek: string | null;
14798
15243
  };
14799
15244
  Insert: {
14800
15245
  actief?: boolean;
@@ -14808,6 +15253,7 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
14808
15253
  type?: string;
14809
15254
  updated_at?: string;
14810
15255
  vereist_medewerker?: boolean;
15256
+ werkplek?: string | null;
14811
15257
  };
14812
15258
  Update: {
14813
15259
  actief?: boolean;
@@ -14821,9 +15267,46 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
14821
15267
  type?: string;
14822
15268
  updated_at?: string;
14823
15269
  vereist_medewerker?: boolean;
15270
+ werkplek?: string | null;
14824
15271
  };
14825
15272
  Relationships: [];
14826
15273
  };
15274
+ sick_periods: {
15275
+ Row: {
15276
+ created_at: string;
15277
+ employee_id: string;
15278
+ end_date: string | null;
15279
+ id: string;
15280
+ notes: string | null;
15281
+ start_date: string;
15282
+ updated_at: string;
15283
+ };
15284
+ Insert: {
15285
+ created_at?: string;
15286
+ employee_id: string;
15287
+ end_date?: string | null;
15288
+ id?: string;
15289
+ notes?: string | null;
15290
+ start_date: string;
15291
+ updated_at?: string;
15292
+ };
15293
+ Update: {
15294
+ created_at?: string;
15295
+ employee_id?: string;
15296
+ end_date?: string | null;
15297
+ id?: string;
15298
+ notes?: string | null;
15299
+ start_date?: string;
15300
+ updated_at?: string;
15301
+ };
15302
+ Relationships: [{
15303
+ foreignKeyName: "sick_periods_employee_id_fkey";
15304
+ columns: ["employee_id"];
15305
+ isOneToOne: false;
15306
+ referencedRelation: "profiles";
15307
+ referencedColumns: ["id"];
15308
+ }];
15309
+ };
14827
15310
  sidebar_config: {
14828
15311
  Row: {
14829
15312
  id: string;
@@ -19508,6 +19991,13 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
19508
19991
  };
19509
19992
  Returns: string;
19510
19993
  };
19994
+ employee_day_hours: {
19995
+ Args: {
19996
+ _day: string;
19997
+ _employee_id: string;
19998
+ };
19999
+ Returns: number;
20000
+ };
19511
20001
  enqueue_cart_replan_if_unlocked: {
19512
20002
  Args: {
19513
20003
  p_order_id: string;
@@ -19861,6 +20351,19 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
19861
20351
  Args: never;
19862
20352
  Returns: boolean;
19863
20353
  };
20354
+ itk_offerte_naar_werkbon: {
20355
+ Args: {
20356
+ _offerte_id: string;
20357
+ };
20358
+ Returns: string;
20359
+ };
20360
+ itk_offerte_restant_mandaat: {
20361
+ Args: {
20362
+ _exclude_offerte_id?: string;
20363
+ _werkbon_id: string;
20364
+ };
20365
+ Returns: number;
20366
+ };
19864
20367
  jwt_has_role: {
19865
20368
  Args: {
19866
20369
  _role: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
@@ -19871,9 +20374,19 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
19871
20374
  Args: never;
19872
20375
  Returns: {
19873
20376
  avatar_url: string;
20377
+ color: string;
19874
20378
  display_name: string;
19875
20379
  email: string;
20380
+ hours_fri: number;
20381
+ hours_mon: number;
20382
+ hours_thu: number;
20383
+ hours_tue: number;
20384
+ hours_wed: number;
19876
20385
  id: string;
20386
+ is_active: boolean;
20387
+ leave_balance_hours: number;
20388
+ persnr: string;
20389
+ phone: string;
19877
20390
  roles: string[];
19878
20391
  }[];
19879
20392
  };
@@ -20200,17 +20713,6 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
20200
20713
  Returns: string;
20201
20714
  };
20202
20715
  logistics_emit_event: {
20203
- Args: {
20204
- p_event_type: string;
20205
- p_idempotency_key?: string;
20206
- p_order_ref: string;
20207
- p_payload?: import("../integrations/supabase/types").Json;
20208
- p_shadow?: boolean;
20209
- p_source_module: string;
20210
- p_strategy_id?: string;
20211
- };
20212
- Returns: import("../integrations/supabase/types").Json;
20213
- } | {
20214
20716
  Args: {
20215
20717
  p_event_type: string;
20216
20718
  p_idempotency_key?: string;
@@ -21055,6 +21557,37 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
21055
21557
  };
21056
21558
  Returns: undefined;
21057
21559
  };
21560
+ quote_create_from_source: {
21561
+ Args: {
21562
+ _payload?: import("../integrations/supabase/types").Json;
21563
+ _source_id: string;
21564
+ _source_type: string;
21565
+ };
21566
+ Returns: string;
21567
+ };
21568
+ quote_get_billable_lines: {
21569
+ Args: {
21570
+ _quotation_id: string;
21571
+ };
21572
+ Returns: import("../integrations/supabase/types").Json;
21573
+ };
21574
+ quote_get_summary: {
21575
+ Args: {
21576
+ _quotation_id: string;
21577
+ };
21578
+ Returns: import("../integrations/supabase/types").Json;
21579
+ };
21580
+ quote_list_packages: {
21581
+ Args: never;
21582
+ Returns: import("../integrations/supabase/types").Json;
21583
+ };
21584
+ quote_list_sources: {
21585
+ Args: {
21586
+ _limit?: number;
21587
+ _source_type?: string;
21588
+ };
21589
+ Returns: import("../integrations/supabase/types").Json;
21590
+ };
21058
21591
  recompute_all_reserved_stock: {
21059
21592
  Args: never;
21060
21593
  Returns: undefined;
@@ -21590,6 +22123,12 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
21590
22123
  };
21591
22124
  Returns: undefined;
21592
22125
  };
22126
+ sync_sick_time_off: {
22127
+ Args: {
22128
+ _period_id: string;
22129
+ };
22130
+ Returns: number;
22131
+ };
21593
22132
  trade_item_stock_duplicates: {
21594
22133
  Args: never;
21595
22134
  Returns: {
@@ -21663,11 +22202,31 @@ export declare const replanOrderCarts: import("@tanstack/start-client-core").Opt
21663
22202
  Args: never;
21664
22203
  Returns: string;
21665
22204
  };
22205
+ wo_create_from_source: {
22206
+ Args: {
22207
+ _payload?: import("../integrations/supabase/types").Json;
22208
+ _source_id: string;
22209
+ _source_type: string;
22210
+ };
22211
+ Returns: string;
22212
+ };
22213
+ wo_get_billable_lines: {
22214
+ Args: {
22215
+ _work_order_id: string;
22216
+ };
22217
+ Returns: import("../integrations/supabase/types").Json;
22218
+ };
22219
+ wo_get_summary: {
22220
+ Args: {
22221
+ _work_order_id: string;
22222
+ };
22223
+ Returns: import("../integrations/supabase/types").Json;
22224
+ };
21666
22225
  };
21667
22226
  Enums: {
21668
22227
  ai_import_status: "nieuw" | "verwerken" | "bevestigen" | "klaar" | "mislukt";
21669
22228
  app_role: "admin" | "planner" | "monteur" | "administratie" | "ai_admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie";
21670
- doc_layout_type: "pakbon" | "factuur" | "offerte" | "orderbevestiging" | "etiket" | "verzendlabel" | "productlabel" | "barcode_label" | "magazijnlijst" | "controlelijst" | "transportdocument" | "vrij" | "sticker" | "productiebon";
22229
+ doc_layout_type: "pakbon" | "factuur" | "offerte" | "orderbevestiging" | "etiket" | "verzendlabel" | "productlabel" | "barcode_label" | "magazijnlijst" | "controlelijst" | "transportdocument" | "vrij" | "sticker" | "productiebon" | "veilingbon" | "afleverbrief" | "veilingbrief";
21671
22230
  doc_orientation: "portrait" | "landscape";
21672
22231
  exact_env: "staging" | "live";
21673
22232
  exact_push_status: "pending" | "sent" | "error";
@@ -26752,6 +27311,42 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
26752
27311
  };
26753
27312
  Relationships: [];
26754
27313
  };
27314
+ facturen: {
27315
+ Row: {
27316
+ bedrag_incl_btw: number;
27317
+ created_at: string;
27318
+ datum: string;
27319
+ factuurnummer: string;
27320
+ id: string;
27321
+ klantnaam: string;
27322
+ status: string;
27323
+ updated_at: string;
27324
+ user_id: string;
27325
+ };
27326
+ Insert: {
27327
+ bedrag_incl_btw: number;
27328
+ created_at?: string;
27329
+ datum?: string;
27330
+ factuurnummer: string;
27331
+ id?: string;
27332
+ klantnaam: string;
27333
+ status?: string;
27334
+ updated_at?: string;
27335
+ user_id?: string;
27336
+ };
27337
+ Update: {
27338
+ bedrag_incl_btw?: number;
27339
+ created_at?: string;
27340
+ datum?: string;
27341
+ factuurnummer?: string;
27342
+ id?: string;
27343
+ klantnaam?: string;
27344
+ status?: string;
27345
+ updated_at?: string;
27346
+ user_id?: string;
27347
+ };
27348
+ Relationships: [];
27349
+ };
26755
27350
  floricode_connection_settings: {
26756
27351
  Row: {
26757
27352
  catalog_key: string | null;
@@ -29476,6 +30071,258 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
29476
30071
  };
29477
30072
  Relationships: [];
29478
30073
  };
30074
+ itk_offerte_events: {
30075
+ Row: {
30076
+ created_at: string;
30077
+ event_type: string;
30078
+ id: string;
30079
+ metadata: import("../integrations/supabase/types").Json;
30080
+ offerte_id: string;
30081
+ omschrijving: string | null;
30082
+ user_id: string | null;
30083
+ };
30084
+ Insert: {
30085
+ created_at?: string;
30086
+ event_type: string;
30087
+ id?: string;
30088
+ metadata?: import("../integrations/supabase/types").Json;
30089
+ offerte_id: string;
30090
+ omschrijving?: string | null;
30091
+ user_id?: string | null;
30092
+ };
30093
+ Update: {
30094
+ created_at?: string;
30095
+ event_type?: string;
30096
+ id?: string;
30097
+ metadata?: import("../integrations/supabase/types").Json;
30098
+ offerte_id?: string;
30099
+ omschrijving?: string | null;
30100
+ user_id?: string | null;
30101
+ };
30102
+ Relationships: [{
30103
+ foreignKeyName: "itk_offerte_events_offerte_id_fkey";
30104
+ columns: ["offerte_id"];
30105
+ isOneToOne: false;
30106
+ referencedRelation: "itk_offertes";
30107
+ referencedColumns: ["id"];
30108
+ }];
30109
+ };
30110
+ itk_offerte_regels: {
30111
+ Row: {
30112
+ created_at: string;
30113
+ id: string;
30114
+ line_total_cents: number;
30115
+ offerte_id: string;
30116
+ omschrijving: string;
30117
+ package_id: string | null;
30118
+ quantity: number;
30119
+ sort_order: number;
30120
+ source: string;
30121
+ unit_price_cents: number;
30122
+ updated_at: string;
30123
+ };
30124
+ Insert: {
30125
+ created_at?: string;
30126
+ id?: string;
30127
+ line_total_cents?: number;
30128
+ offerte_id: string;
30129
+ omschrijving?: string;
30130
+ package_id?: string | null;
30131
+ quantity?: number;
30132
+ sort_order?: number;
30133
+ source?: string;
30134
+ unit_price_cents?: number;
30135
+ updated_at?: string;
30136
+ };
30137
+ Update: {
30138
+ created_at?: string;
30139
+ id?: string;
30140
+ line_total_cents?: number;
30141
+ offerte_id?: string;
30142
+ omschrijving?: string;
30143
+ package_id?: string | null;
30144
+ quantity?: number;
30145
+ sort_order?: number;
30146
+ source?: string;
30147
+ unit_price_cents?: number;
30148
+ updated_at?: string;
30149
+ };
30150
+ Relationships: [{
30151
+ foreignKeyName: "itk_offerte_regels_offerte_id_fkey";
30152
+ columns: ["offerte_id"];
30153
+ isOneToOne: false;
30154
+ referencedRelation: "itk_offertes";
30155
+ referencedColumns: ["id"];
30156
+ }, {
30157
+ foreignKeyName: "itk_offerte_regels_package_id_fkey";
30158
+ columns: ["package_id"];
30159
+ isOneToOne: false;
30160
+ referencedRelation: "werkbon_packages";
30161
+ referencedColumns: ["id"];
30162
+ }];
30163
+ };
30164
+ itk_offerte_settings: {
30165
+ Row: {
30166
+ auto_convert_binnen_mandaat: boolean;
30167
+ created_at: string;
30168
+ default_geldigheid_dagen: number;
30169
+ default_vat_rate: number;
30170
+ id: string;
30171
+ singleton: boolean;
30172
+ updated_at: string;
30173
+ };
30174
+ Insert: {
30175
+ auto_convert_binnen_mandaat?: boolean;
30176
+ created_at?: string;
30177
+ default_geldigheid_dagen?: number;
30178
+ default_vat_rate?: number;
30179
+ id?: string;
30180
+ singleton?: boolean;
30181
+ updated_at?: string;
30182
+ };
30183
+ Update: {
30184
+ auto_convert_binnen_mandaat?: boolean;
30185
+ created_at?: string;
30186
+ default_geldigheid_dagen?: number;
30187
+ default_vat_rate?: number;
30188
+ id?: string;
30189
+ singleton?: boolean;
30190
+ updated_at?: string;
30191
+ };
30192
+ Relationships: [];
30193
+ };
30194
+ itk_offertes: {
30195
+ Row: {
30196
+ ai_generated: boolean;
30197
+ approved_at: string | null;
30198
+ binnen_mandaat: boolean;
30199
+ contact_id: string | null;
30200
+ converted_at: string | null;
30201
+ created_at: string;
30202
+ created_by: string | null;
30203
+ customer_id: string | null;
30204
+ follow_up_werkbon_id: string | null;
30205
+ id: string;
30206
+ jaar: number;
30207
+ mandaat_restant_cents: number;
30208
+ notities: string | null;
30209
+ offerte_number: string | null;
30210
+ omschrijving: string;
30211
+ rejected_at: string | null;
30212
+ sent_at: string | null;
30213
+ source_number: string | null;
30214
+ source_ref: string | null;
30215
+ source_type: string;
30216
+ status: string;
30217
+ subtotal_cents: number;
30218
+ total_cents: number;
30219
+ updated_at: string;
30220
+ valid_until: string | null;
30221
+ vat_cents: number;
30222
+ vat_rate: number;
30223
+ viewed_at: string | null;
30224
+ volgnummer: number | null;
30225
+ werkbon_id: string | null;
30226
+ work_location_id: string | null;
30227
+ };
30228
+ Insert: {
30229
+ ai_generated?: boolean;
30230
+ approved_at?: string | null;
30231
+ binnen_mandaat?: boolean;
30232
+ contact_id?: string | null;
30233
+ converted_at?: string | null;
30234
+ created_at?: string;
30235
+ created_by?: string | null;
30236
+ customer_id?: string | null;
30237
+ follow_up_werkbon_id?: string | null;
30238
+ id?: string;
30239
+ jaar?: number;
30240
+ mandaat_restant_cents?: number;
30241
+ notities?: string | null;
30242
+ offerte_number?: string | null;
30243
+ omschrijving?: string;
30244
+ rejected_at?: string | null;
30245
+ sent_at?: string | null;
30246
+ source_number?: string | null;
30247
+ source_ref?: string | null;
30248
+ source_type?: string;
30249
+ status?: string;
30250
+ subtotal_cents?: number;
30251
+ total_cents?: number;
30252
+ updated_at?: string;
30253
+ valid_until?: string | null;
30254
+ vat_cents?: number;
30255
+ vat_rate?: number;
30256
+ viewed_at?: string | null;
30257
+ volgnummer?: number | null;
30258
+ werkbon_id?: string | null;
30259
+ work_location_id?: string | null;
30260
+ };
30261
+ Update: {
30262
+ ai_generated?: boolean;
30263
+ approved_at?: string | null;
30264
+ binnen_mandaat?: boolean;
30265
+ contact_id?: string | null;
30266
+ converted_at?: string | null;
30267
+ created_at?: string;
30268
+ created_by?: string | null;
30269
+ customer_id?: string | null;
30270
+ follow_up_werkbon_id?: string | null;
30271
+ id?: string;
30272
+ jaar?: number;
30273
+ mandaat_restant_cents?: number;
30274
+ notities?: string | null;
30275
+ offerte_number?: string | null;
30276
+ omschrijving?: string;
30277
+ rejected_at?: string | null;
30278
+ sent_at?: string | null;
30279
+ source_number?: string | null;
30280
+ source_ref?: string | null;
30281
+ source_type?: string;
30282
+ status?: string;
30283
+ subtotal_cents?: number;
30284
+ total_cents?: number;
30285
+ updated_at?: string;
30286
+ valid_until?: string | null;
30287
+ vat_cents?: number;
30288
+ vat_rate?: number;
30289
+ viewed_at?: string | null;
30290
+ volgnummer?: number | null;
30291
+ werkbon_id?: string | null;
30292
+ work_location_id?: string | null;
30293
+ };
30294
+ Relationships: [{
30295
+ foreignKeyName: "itk_offertes_contact_id_fkey";
30296
+ columns: ["contact_id"];
30297
+ isOneToOne: false;
30298
+ referencedRelation: "itk_contact_persons";
30299
+ referencedColumns: ["id"];
30300
+ }, {
30301
+ foreignKeyName: "itk_offertes_customer_id_fkey";
30302
+ columns: ["customer_id"];
30303
+ isOneToOne: false;
30304
+ referencedRelation: "itk_customers";
30305
+ referencedColumns: ["id"];
30306
+ }, {
30307
+ foreignKeyName: "itk_offertes_follow_up_werkbon_id_fkey";
30308
+ columns: ["follow_up_werkbon_id"];
30309
+ isOneToOne: false;
30310
+ referencedRelation: "werkbonnen";
30311
+ referencedColumns: ["id"];
30312
+ }, {
30313
+ foreignKeyName: "itk_offertes_werkbon_id_fkey";
30314
+ columns: ["werkbon_id"];
30315
+ isOneToOne: false;
30316
+ referencedRelation: "werkbonnen";
30317
+ referencedColumns: ["id"];
30318
+ }, {
30319
+ foreignKeyName: "itk_offertes_work_location_id_fkey";
30320
+ columns: ["work_location_id"];
30321
+ isOneToOne: false;
30322
+ referencedRelation: "itk_work_locations";
30323
+ referencedColumns: ["id"];
30324
+ }];
30325
+ };
29479
30326
  itk_work_locations: {
29480
30327
  Row: {
29481
30328
  city: string | null;
@@ -31849,6 +32696,63 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
31849
32696
  referencedColumns: ["id"];
31850
32697
  }];
31851
32698
  };
32699
+ medewerker_details: {
32700
+ Row: {
32701
+ color: string | null;
32702
+ created_at: string;
32703
+ hours_fri: number | null;
32704
+ hours_mon: number | null;
32705
+ hours_thu: number | null;
32706
+ hours_tue: number | null;
32707
+ hours_wed: number | null;
32708
+ id: string;
32709
+ is_active: boolean;
32710
+ leave_balance_hours: number;
32711
+ persnr: string | null;
32712
+ phone: string | null;
32713
+ profile_id: string;
32714
+ updated_at: string;
32715
+ };
32716
+ Insert: {
32717
+ color?: string | null;
32718
+ created_at?: string;
32719
+ hours_fri?: number | null;
32720
+ hours_mon?: number | null;
32721
+ hours_thu?: number | null;
32722
+ hours_tue?: number | null;
32723
+ hours_wed?: number | null;
32724
+ id?: string;
32725
+ is_active?: boolean;
32726
+ leave_balance_hours?: number;
32727
+ persnr?: string | null;
32728
+ phone?: string | null;
32729
+ profile_id: string;
32730
+ updated_at?: string;
32731
+ };
32732
+ Update: {
32733
+ color?: string | null;
32734
+ created_at?: string;
32735
+ hours_fri?: number | null;
32736
+ hours_mon?: number | null;
32737
+ hours_thu?: number | null;
32738
+ hours_tue?: number | null;
32739
+ hours_wed?: number | null;
32740
+ id?: string;
32741
+ is_active?: boolean;
32742
+ leave_balance_hours?: number;
32743
+ persnr?: string | null;
32744
+ phone?: string | null;
32745
+ profile_id?: string;
32746
+ updated_at?: string;
32747
+ };
32748
+ Relationships: [{
32749
+ foreignKeyName: "medewerker_details_profile_id_fkey";
32750
+ columns: ["profile_id"];
32751
+ isOneToOne: true;
32752
+ referencedRelation: "profiles";
32753
+ referencedColumns: ["id"];
32754
+ }];
32755
+ };
31852
32756
  module_features: {
31853
32757
  Row: {
31854
32758
  created_at: string;
@@ -33142,6 +34046,8 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
33142
34046
  orders: {
33143
34047
  Row: {
33144
34048
  buffer_id: string | null;
34049
+ cancel_reason: string | null;
34050
+ cancelled_at: string | null;
33145
34051
  created_at: string;
33146
34052
  custom_fields: import("../integrations/supabase/types").Json;
33147
34053
  customer_id: string | null;
@@ -33164,6 +34070,8 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
33164
34070
  };
33165
34071
  Insert: {
33166
34072
  buffer_id?: string | null;
34073
+ cancel_reason?: string | null;
34074
+ cancelled_at?: string | null;
33167
34075
  created_at?: string;
33168
34076
  custom_fields?: import("../integrations/supabase/types").Json;
33169
34077
  customer_id?: string | null;
@@ -33186,6 +34094,8 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
33186
34094
  };
33187
34095
  Update: {
33188
34096
  buffer_id?: string | null;
34097
+ cancel_reason?: string | null;
34098
+ cancelled_at?: string | null;
33189
34099
  created_at?: string;
33190
34100
  custom_fields?: import("../integrations/supabase/types").Json;
33191
34101
  customer_id?: string | null;
@@ -35248,6 +36158,66 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
35248
36158
  };
35249
36159
  Relationships: [];
35250
36160
  };
36161
+ profile_modules: {
36162
+ Row: {
36163
+ created_at: string;
36164
+ id: string;
36165
+ module_id: string;
36166
+ profile_id: string;
36167
+ };
36168
+ Insert: {
36169
+ created_at?: string;
36170
+ id?: string;
36171
+ module_id: string;
36172
+ profile_id: string;
36173
+ };
36174
+ Update: {
36175
+ created_at?: string;
36176
+ id?: string;
36177
+ module_id?: string;
36178
+ profile_id?: string;
36179
+ };
36180
+ Relationships: [{
36181
+ foreignKeyName: "profile_modules_profile_id_fkey";
36182
+ columns: ["profile_id"];
36183
+ isOneToOne: false;
36184
+ referencedRelation: "profiles_org";
36185
+ referencedColumns: ["id"];
36186
+ }];
36187
+ };
36188
+ profile_roles: {
36189
+ Row: {
36190
+ created_at: string;
36191
+ id: string;
36192
+ profile_id: string;
36193
+ role_id: string;
36194
+ };
36195
+ Insert: {
36196
+ created_at?: string;
36197
+ id?: string;
36198
+ profile_id: string;
36199
+ role_id: string;
36200
+ };
36201
+ Update: {
36202
+ created_at?: string;
36203
+ id?: string;
36204
+ profile_id?: string;
36205
+ role_id?: string;
36206
+ };
36207
+ Relationships: [{
36208
+ foreignKeyName: "profile_roles_profile_id_fkey";
36209
+ columns: ["profile_id"];
36210
+ isOneToOne: false;
36211
+ referencedRelation: "profiles_org";
36212
+ referencedColumns: ["id"];
36213
+ }, {
36214
+ foreignKeyName: "profile_roles_role_id_fkey";
36215
+ columns: ["role_id"];
36216
+ isOneToOne: false;
36217
+ referencedRelation: "roles";
36218
+ referencedColumns: ["id"];
36219
+ }];
36220
+ };
35251
36221
  profiles: {
35252
36222
  Row: {
35253
36223
  address: string | null;
@@ -35293,6 +36263,39 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
35293
36263
  referencedColumns: ["id"];
35294
36264
  }];
35295
36265
  };
36266
+ profiles_org: {
36267
+ Row: {
36268
+ created_at: string;
36269
+ id: string;
36270
+ is_default: boolean;
36271
+ name: string;
36272
+ tenant_id: string | null;
36273
+ updated_at: string;
36274
+ };
36275
+ Insert: {
36276
+ created_at?: string;
36277
+ id?: string;
36278
+ is_default?: boolean;
36279
+ name: string;
36280
+ tenant_id?: string | null;
36281
+ updated_at?: string;
36282
+ };
36283
+ Update: {
36284
+ created_at?: string;
36285
+ id?: string;
36286
+ is_default?: boolean;
36287
+ name?: string;
36288
+ tenant_id?: string | null;
36289
+ updated_at?: string;
36290
+ };
36291
+ Relationships: [{
36292
+ foreignKeyName: "profiles_org_tenant_id_fkey";
36293
+ columns: ["tenant_id"];
36294
+ isOneToOne: false;
36295
+ referencedRelation: "tenants";
36296
+ referencedColumns: ["id"];
36297
+ }];
36298
+ };
35296
36299
  projects: {
35297
36300
  Row: {
35298
36301
  contact_name: string | null;
@@ -36467,6 +37470,7 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
36467
37470
  type: string;
36468
37471
  updated_at: string;
36469
37472
  vereist_medewerker: boolean;
37473
+ werkplek: string | null;
36470
37474
  };
36471
37475
  Insert: {
36472
37476
  actief?: boolean;
@@ -36480,6 +37484,7 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
36480
37484
  type?: string;
36481
37485
  updated_at?: string;
36482
37486
  vereist_medewerker?: boolean;
37487
+ werkplek?: string | null;
36483
37488
  };
36484
37489
  Update: {
36485
37490
  actief?: boolean;
@@ -36493,9 +37498,46 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
36493
37498
  type?: string;
36494
37499
  updated_at?: string;
36495
37500
  vereist_medewerker?: boolean;
37501
+ werkplek?: string | null;
36496
37502
  };
36497
37503
  Relationships: [];
36498
37504
  };
37505
+ sick_periods: {
37506
+ Row: {
37507
+ created_at: string;
37508
+ employee_id: string;
37509
+ end_date: string | null;
37510
+ id: string;
37511
+ notes: string | null;
37512
+ start_date: string;
37513
+ updated_at: string;
37514
+ };
37515
+ Insert: {
37516
+ created_at?: string;
37517
+ employee_id: string;
37518
+ end_date?: string | null;
37519
+ id?: string;
37520
+ notes?: string | null;
37521
+ start_date: string;
37522
+ updated_at?: string;
37523
+ };
37524
+ Update: {
37525
+ created_at?: string;
37526
+ employee_id?: string;
37527
+ end_date?: string | null;
37528
+ id?: string;
37529
+ notes?: string | null;
37530
+ start_date?: string;
37531
+ updated_at?: string;
37532
+ };
37533
+ Relationships: [{
37534
+ foreignKeyName: "sick_periods_employee_id_fkey";
37535
+ columns: ["employee_id"];
37536
+ isOneToOne: false;
37537
+ referencedRelation: "profiles";
37538
+ referencedColumns: ["id"];
37539
+ }];
37540
+ };
36499
37541
  sidebar_config: {
36500
37542
  Row: {
36501
37543
  id: string;
@@ -41180,6 +42222,13 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
41180
42222
  };
41181
42223
  Returns: string;
41182
42224
  };
42225
+ employee_day_hours: {
42226
+ Args: {
42227
+ _day: string;
42228
+ _employee_id: string;
42229
+ };
42230
+ Returns: number;
42231
+ };
41183
42232
  enqueue_cart_replan_if_unlocked: {
41184
42233
  Args: {
41185
42234
  p_order_id: string;
@@ -41533,6 +42582,19 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
41533
42582
  Args: never;
41534
42583
  Returns: boolean;
41535
42584
  };
42585
+ itk_offerte_naar_werkbon: {
42586
+ Args: {
42587
+ _offerte_id: string;
42588
+ };
42589
+ Returns: string;
42590
+ };
42591
+ itk_offerte_restant_mandaat: {
42592
+ Args: {
42593
+ _exclude_offerte_id?: string;
42594
+ _werkbon_id: string;
42595
+ };
42596
+ Returns: number;
42597
+ };
41536
42598
  jwt_has_role: {
41537
42599
  Args: {
41538
42600
  _role: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
@@ -41543,9 +42605,19 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
41543
42605
  Args: never;
41544
42606
  Returns: {
41545
42607
  avatar_url: string;
42608
+ color: string;
41546
42609
  display_name: string;
41547
42610
  email: string;
42611
+ hours_fri: number;
42612
+ hours_mon: number;
42613
+ hours_thu: number;
42614
+ hours_tue: number;
42615
+ hours_wed: number;
41548
42616
  id: string;
42617
+ is_active: boolean;
42618
+ leave_balance_hours: number;
42619
+ persnr: string;
42620
+ phone: string;
41549
42621
  roles: string[];
41550
42622
  }[];
41551
42623
  };
@@ -41872,17 +42944,6 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
41872
42944
  Returns: string;
41873
42945
  };
41874
42946
  logistics_emit_event: {
41875
- Args: {
41876
- p_event_type: string;
41877
- p_idempotency_key?: string;
41878
- p_order_ref: string;
41879
- p_payload?: import("../integrations/supabase/types").Json;
41880
- p_shadow?: boolean;
41881
- p_source_module: string;
41882
- p_strategy_id?: string;
41883
- };
41884
- Returns: import("../integrations/supabase/types").Json;
41885
- } | {
41886
42947
  Args: {
41887
42948
  p_event_type: string;
41888
42949
  p_idempotency_key?: string;
@@ -42727,6 +43788,37 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
42727
43788
  };
42728
43789
  Returns: undefined;
42729
43790
  };
43791
+ quote_create_from_source: {
43792
+ Args: {
43793
+ _payload?: import("../integrations/supabase/types").Json;
43794
+ _source_id: string;
43795
+ _source_type: string;
43796
+ };
43797
+ Returns: string;
43798
+ };
43799
+ quote_get_billable_lines: {
43800
+ Args: {
43801
+ _quotation_id: string;
43802
+ };
43803
+ Returns: import("../integrations/supabase/types").Json;
43804
+ };
43805
+ quote_get_summary: {
43806
+ Args: {
43807
+ _quotation_id: string;
43808
+ };
43809
+ Returns: import("../integrations/supabase/types").Json;
43810
+ };
43811
+ quote_list_packages: {
43812
+ Args: never;
43813
+ Returns: import("../integrations/supabase/types").Json;
43814
+ };
43815
+ quote_list_sources: {
43816
+ Args: {
43817
+ _limit?: number;
43818
+ _source_type?: string;
43819
+ };
43820
+ Returns: import("../integrations/supabase/types").Json;
43821
+ };
42730
43822
  recompute_all_reserved_stock: {
42731
43823
  Args: never;
42732
43824
  Returns: undefined;
@@ -43262,6 +44354,12 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
43262
44354
  };
43263
44355
  Returns: undefined;
43264
44356
  };
44357
+ sync_sick_time_off: {
44358
+ Args: {
44359
+ _period_id: string;
44360
+ };
44361
+ Returns: number;
44362
+ };
43265
44363
  trade_item_stock_duplicates: {
43266
44364
  Args: never;
43267
44365
  Returns: {
@@ -43335,11 +44433,31 @@ export declare const listOrderCarts: import("@tanstack/start-client-core").Optio
43335
44433
  Args: never;
43336
44434
  Returns: string;
43337
44435
  };
44436
+ wo_create_from_source: {
44437
+ Args: {
44438
+ _payload?: import("../integrations/supabase/types").Json;
44439
+ _source_id: string;
44440
+ _source_type: string;
44441
+ };
44442
+ Returns: string;
44443
+ };
44444
+ wo_get_billable_lines: {
44445
+ Args: {
44446
+ _work_order_id: string;
44447
+ };
44448
+ Returns: import("../integrations/supabase/types").Json;
44449
+ };
44450
+ wo_get_summary: {
44451
+ Args: {
44452
+ _work_order_id: string;
44453
+ };
44454
+ Returns: import("../integrations/supabase/types").Json;
44455
+ };
43338
44456
  };
43339
44457
  Enums: {
43340
44458
  ai_import_status: "nieuw" | "verwerken" | "bevestigen" | "klaar" | "mislukt";
43341
44459
  app_role: "admin" | "planner" | "monteur" | "administratie" | "ai_admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie";
43342
- doc_layout_type: "pakbon" | "factuur" | "offerte" | "orderbevestiging" | "etiket" | "verzendlabel" | "productlabel" | "barcode_label" | "magazijnlijst" | "controlelijst" | "transportdocument" | "vrij" | "sticker" | "productiebon";
44460
+ doc_layout_type: "pakbon" | "factuur" | "offerte" | "orderbevestiging" | "etiket" | "verzendlabel" | "productlabel" | "barcode_label" | "magazijnlijst" | "controlelijst" | "transportdocument" | "vrij" | "sticker" | "productiebon" | "veilingbon" | "afleverbrief" | "veilingbrief";
43343
44461
  doc_orientation: "portrait" | "landscape";
43344
44462
  exact_env: "staging" | "live";
43345
44463
  exact_push_status: "pending" | "sent" | "error";
@@ -48432,6 +49550,42 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
48432
49550
  };
48433
49551
  Relationships: [];
48434
49552
  };
49553
+ facturen: {
49554
+ Row: {
49555
+ bedrag_incl_btw: number;
49556
+ created_at: string;
49557
+ datum: string;
49558
+ factuurnummer: string;
49559
+ id: string;
49560
+ klantnaam: string;
49561
+ status: string;
49562
+ updated_at: string;
49563
+ user_id: string;
49564
+ };
49565
+ Insert: {
49566
+ bedrag_incl_btw: number;
49567
+ created_at?: string;
49568
+ datum?: string;
49569
+ factuurnummer: string;
49570
+ id?: string;
49571
+ klantnaam: string;
49572
+ status?: string;
49573
+ updated_at?: string;
49574
+ user_id?: string;
49575
+ };
49576
+ Update: {
49577
+ bedrag_incl_btw?: number;
49578
+ created_at?: string;
49579
+ datum?: string;
49580
+ factuurnummer?: string;
49581
+ id?: string;
49582
+ klantnaam?: string;
49583
+ status?: string;
49584
+ updated_at?: string;
49585
+ user_id?: string;
49586
+ };
49587
+ Relationships: [];
49588
+ };
48435
49589
  floricode_connection_settings: {
48436
49590
  Row: {
48437
49591
  catalog_key: string | null;
@@ -51156,6 +52310,258 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
51156
52310
  };
51157
52311
  Relationships: [];
51158
52312
  };
52313
+ itk_offerte_events: {
52314
+ Row: {
52315
+ created_at: string;
52316
+ event_type: string;
52317
+ id: string;
52318
+ metadata: import("../integrations/supabase/types").Json;
52319
+ offerte_id: string;
52320
+ omschrijving: string | null;
52321
+ user_id: string | null;
52322
+ };
52323
+ Insert: {
52324
+ created_at?: string;
52325
+ event_type: string;
52326
+ id?: string;
52327
+ metadata?: import("../integrations/supabase/types").Json;
52328
+ offerte_id: string;
52329
+ omschrijving?: string | null;
52330
+ user_id?: string | null;
52331
+ };
52332
+ Update: {
52333
+ created_at?: string;
52334
+ event_type?: string;
52335
+ id?: string;
52336
+ metadata?: import("../integrations/supabase/types").Json;
52337
+ offerte_id?: string;
52338
+ omschrijving?: string | null;
52339
+ user_id?: string | null;
52340
+ };
52341
+ Relationships: [{
52342
+ foreignKeyName: "itk_offerte_events_offerte_id_fkey";
52343
+ columns: ["offerte_id"];
52344
+ isOneToOne: false;
52345
+ referencedRelation: "itk_offertes";
52346
+ referencedColumns: ["id"];
52347
+ }];
52348
+ };
52349
+ itk_offerte_regels: {
52350
+ Row: {
52351
+ created_at: string;
52352
+ id: string;
52353
+ line_total_cents: number;
52354
+ offerte_id: string;
52355
+ omschrijving: string;
52356
+ package_id: string | null;
52357
+ quantity: number;
52358
+ sort_order: number;
52359
+ source: string;
52360
+ unit_price_cents: number;
52361
+ updated_at: string;
52362
+ };
52363
+ Insert: {
52364
+ created_at?: string;
52365
+ id?: string;
52366
+ line_total_cents?: number;
52367
+ offerte_id: string;
52368
+ omschrijving?: string;
52369
+ package_id?: string | null;
52370
+ quantity?: number;
52371
+ sort_order?: number;
52372
+ source?: string;
52373
+ unit_price_cents?: number;
52374
+ updated_at?: string;
52375
+ };
52376
+ Update: {
52377
+ created_at?: string;
52378
+ id?: string;
52379
+ line_total_cents?: number;
52380
+ offerte_id?: string;
52381
+ omschrijving?: string;
52382
+ package_id?: string | null;
52383
+ quantity?: number;
52384
+ sort_order?: number;
52385
+ source?: string;
52386
+ unit_price_cents?: number;
52387
+ updated_at?: string;
52388
+ };
52389
+ Relationships: [{
52390
+ foreignKeyName: "itk_offerte_regels_offerte_id_fkey";
52391
+ columns: ["offerte_id"];
52392
+ isOneToOne: false;
52393
+ referencedRelation: "itk_offertes";
52394
+ referencedColumns: ["id"];
52395
+ }, {
52396
+ foreignKeyName: "itk_offerte_regels_package_id_fkey";
52397
+ columns: ["package_id"];
52398
+ isOneToOne: false;
52399
+ referencedRelation: "werkbon_packages";
52400
+ referencedColumns: ["id"];
52401
+ }];
52402
+ };
52403
+ itk_offerte_settings: {
52404
+ Row: {
52405
+ auto_convert_binnen_mandaat: boolean;
52406
+ created_at: string;
52407
+ default_geldigheid_dagen: number;
52408
+ default_vat_rate: number;
52409
+ id: string;
52410
+ singleton: boolean;
52411
+ updated_at: string;
52412
+ };
52413
+ Insert: {
52414
+ auto_convert_binnen_mandaat?: boolean;
52415
+ created_at?: string;
52416
+ default_geldigheid_dagen?: number;
52417
+ default_vat_rate?: number;
52418
+ id?: string;
52419
+ singleton?: boolean;
52420
+ updated_at?: string;
52421
+ };
52422
+ Update: {
52423
+ auto_convert_binnen_mandaat?: boolean;
52424
+ created_at?: string;
52425
+ default_geldigheid_dagen?: number;
52426
+ default_vat_rate?: number;
52427
+ id?: string;
52428
+ singleton?: boolean;
52429
+ updated_at?: string;
52430
+ };
52431
+ Relationships: [];
52432
+ };
52433
+ itk_offertes: {
52434
+ Row: {
52435
+ ai_generated: boolean;
52436
+ approved_at: string | null;
52437
+ binnen_mandaat: boolean;
52438
+ contact_id: string | null;
52439
+ converted_at: string | null;
52440
+ created_at: string;
52441
+ created_by: string | null;
52442
+ customer_id: string | null;
52443
+ follow_up_werkbon_id: string | null;
52444
+ id: string;
52445
+ jaar: number;
52446
+ mandaat_restant_cents: number;
52447
+ notities: string | null;
52448
+ offerte_number: string | null;
52449
+ omschrijving: string;
52450
+ rejected_at: string | null;
52451
+ sent_at: string | null;
52452
+ source_number: string | null;
52453
+ source_ref: string | null;
52454
+ source_type: string;
52455
+ status: string;
52456
+ subtotal_cents: number;
52457
+ total_cents: number;
52458
+ updated_at: string;
52459
+ valid_until: string | null;
52460
+ vat_cents: number;
52461
+ vat_rate: number;
52462
+ viewed_at: string | null;
52463
+ volgnummer: number | null;
52464
+ werkbon_id: string | null;
52465
+ work_location_id: string | null;
52466
+ };
52467
+ Insert: {
52468
+ ai_generated?: boolean;
52469
+ approved_at?: string | null;
52470
+ binnen_mandaat?: boolean;
52471
+ contact_id?: string | null;
52472
+ converted_at?: string | null;
52473
+ created_at?: string;
52474
+ created_by?: string | null;
52475
+ customer_id?: string | null;
52476
+ follow_up_werkbon_id?: string | null;
52477
+ id?: string;
52478
+ jaar?: number;
52479
+ mandaat_restant_cents?: number;
52480
+ notities?: string | null;
52481
+ offerte_number?: string | null;
52482
+ omschrijving?: string;
52483
+ rejected_at?: string | null;
52484
+ sent_at?: string | null;
52485
+ source_number?: string | null;
52486
+ source_ref?: string | null;
52487
+ source_type?: string;
52488
+ status?: string;
52489
+ subtotal_cents?: number;
52490
+ total_cents?: number;
52491
+ updated_at?: string;
52492
+ valid_until?: string | null;
52493
+ vat_cents?: number;
52494
+ vat_rate?: number;
52495
+ viewed_at?: string | null;
52496
+ volgnummer?: number | null;
52497
+ werkbon_id?: string | null;
52498
+ work_location_id?: string | null;
52499
+ };
52500
+ Update: {
52501
+ ai_generated?: boolean;
52502
+ approved_at?: string | null;
52503
+ binnen_mandaat?: boolean;
52504
+ contact_id?: string | null;
52505
+ converted_at?: string | null;
52506
+ created_at?: string;
52507
+ created_by?: string | null;
52508
+ customer_id?: string | null;
52509
+ follow_up_werkbon_id?: string | null;
52510
+ id?: string;
52511
+ jaar?: number;
52512
+ mandaat_restant_cents?: number;
52513
+ notities?: string | null;
52514
+ offerte_number?: string | null;
52515
+ omschrijving?: string;
52516
+ rejected_at?: string | null;
52517
+ sent_at?: string | null;
52518
+ source_number?: string | null;
52519
+ source_ref?: string | null;
52520
+ source_type?: string;
52521
+ status?: string;
52522
+ subtotal_cents?: number;
52523
+ total_cents?: number;
52524
+ updated_at?: string;
52525
+ valid_until?: string | null;
52526
+ vat_cents?: number;
52527
+ vat_rate?: number;
52528
+ viewed_at?: string | null;
52529
+ volgnummer?: number | null;
52530
+ werkbon_id?: string | null;
52531
+ work_location_id?: string | null;
52532
+ };
52533
+ Relationships: [{
52534
+ foreignKeyName: "itk_offertes_contact_id_fkey";
52535
+ columns: ["contact_id"];
52536
+ isOneToOne: false;
52537
+ referencedRelation: "itk_contact_persons";
52538
+ referencedColumns: ["id"];
52539
+ }, {
52540
+ foreignKeyName: "itk_offertes_customer_id_fkey";
52541
+ columns: ["customer_id"];
52542
+ isOneToOne: false;
52543
+ referencedRelation: "itk_customers";
52544
+ referencedColumns: ["id"];
52545
+ }, {
52546
+ foreignKeyName: "itk_offertes_follow_up_werkbon_id_fkey";
52547
+ columns: ["follow_up_werkbon_id"];
52548
+ isOneToOne: false;
52549
+ referencedRelation: "werkbonnen";
52550
+ referencedColumns: ["id"];
52551
+ }, {
52552
+ foreignKeyName: "itk_offertes_werkbon_id_fkey";
52553
+ columns: ["werkbon_id"];
52554
+ isOneToOne: false;
52555
+ referencedRelation: "werkbonnen";
52556
+ referencedColumns: ["id"];
52557
+ }, {
52558
+ foreignKeyName: "itk_offertes_work_location_id_fkey";
52559
+ columns: ["work_location_id"];
52560
+ isOneToOne: false;
52561
+ referencedRelation: "itk_work_locations";
52562
+ referencedColumns: ["id"];
52563
+ }];
52564
+ };
51159
52565
  itk_work_locations: {
51160
52566
  Row: {
51161
52567
  city: string | null;
@@ -53529,6 +54935,63 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
53529
54935
  referencedColumns: ["id"];
53530
54936
  }];
53531
54937
  };
54938
+ medewerker_details: {
54939
+ Row: {
54940
+ color: string | null;
54941
+ created_at: string;
54942
+ hours_fri: number | null;
54943
+ hours_mon: number | null;
54944
+ hours_thu: number | null;
54945
+ hours_tue: number | null;
54946
+ hours_wed: number | null;
54947
+ id: string;
54948
+ is_active: boolean;
54949
+ leave_balance_hours: number;
54950
+ persnr: string | null;
54951
+ phone: string | null;
54952
+ profile_id: string;
54953
+ updated_at: string;
54954
+ };
54955
+ Insert: {
54956
+ color?: string | null;
54957
+ created_at?: string;
54958
+ hours_fri?: number | null;
54959
+ hours_mon?: number | null;
54960
+ hours_thu?: number | null;
54961
+ hours_tue?: number | null;
54962
+ hours_wed?: number | null;
54963
+ id?: string;
54964
+ is_active?: boolean;
54965
+ leave_balance_hours?: number;
54966
+ persnr?: string | null;
54967
+ phone?: string | null;
54968
+ profile_id: string;
54969
+ updated_at?: string;
54970
+ };
54971
+ Update: {
54972
+ color?: string | null;
54973
+ created_at?: string;
54974
+ hours_fri?: number | null;
54975
+ hours_mon?: number | null;
54976
+ hours_thu?: number | null;
54977
+ hours_tue?: number | null;
54978
+ hours_wed?: number | null;
54979
+ id?: string;
54980
+ is_active?: boolean;
54981
+ leave_balance_hours?: number;
54982
+ persnr?: string | null;
54983
+ phone?: string | null;
54984
+ profile_id?: string;
54985
+ updated_at?: string;
54986
+ };
54987
+ Relationships: [{
54988
+ foreignKeyName: "medewerker_details_profile_id_fkey";
54989
+ columns: ["profile_id"];
54990
+ isOneToOne: true;
54991
+ referencedRelation: "profiles";
54992
+ referencedColumns: ["id"];
54993
+ }];
54994
+ };
53532
54995
  module_features: {
53533
54996
  Row: {
53534
54997
  created_at: string;
@@ -54822,6 +56285,8 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
54822
56285
  orders: {
54823
56286
  Row: {
54824
56287
  buffer_id: string | null;
56288
+ cancel_reason: string | null;
56289
+ cancelled_at: string | null;
54825
56290
  created_at: string;
54826
56291
  custom_fields: import("../integrations/supabase/types").Json;
54827
56292
  customer_id: string | null;
@@ -54844,6 +56309,8 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
54844
56309
  };
54845
56310
  Insert: {
54846
56311
  buffer_id?: string | null;
56312
+ cancel_reason?: string | null;
56313
+ cancelled_at?: string | null;
54847
56314
  created_at?: string;
54848
56315
  custom_fields?: import("../integrations/supabase/types").Json;
54849
56316
  customer_id?: string | null;
@@ -54866,6 +56333,8 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
54866
56333
  };
54867
56334
  Update: {
54868
56335
  buffer_id?: string | null;
56336
+ cancel_reason?: string | null;
56337
+ cancelled_at?: string | null;
54869
56338
  created_at?: string;
54870
56339
  custom_fields?: import("../integrations/supabase/types").Json;
54871
56340
  customer_id?: string | null;
@@ -56928,6 +58397,66 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
56928
58397
  };
56929
58398
  Relationships: [];
56930
58399
  };
58400
+ profile_modules: {
58401
+ Row: {
58402
+ created_at: string;
58403
+ id: string;
58404
+ module_id: string;
58405
+ profile_id: string;
58406
+ };
58407
+ Insert: {
58408
+ created_at?: string;
58409
+ id?: string;
58410
+ module_id: string;
58411
+ profile_id: string;
58412
+ };
58413
+ Update: {
58414
+ created_at?: string;
58415
+ id?: string;
58416
+ module_id?: string;
58417
+ profile_id?: string;
58418
+ };
58419
+ Relationships: [{
58420
+ foreignKeyName: "profile_modules_profile_id_fkey";
58421
+ columns: ["profile_id"];
58422
+ isOneToOne: false;
58423
+ referencedRelation: "profiles_org";
58424
+ referencedColumns: ["id"];
58425
+ }];
58426
+ };
58427
+ profile_roles: {
58428
+ Row: {
58429
+ created_at: string;
58430
+ id: string;
58431
+ profile_id: string;
58432
+ role_id: string;
58433
+ };
58434
+ Insert: {
58435
+ created_at?: string;
58436
+ id?: string;
58437
+ profile_id: string;
58438
+ role_id: string;
58439
+ };
58440
+ Update: {
58441
+ created_at?: string;
58442
+ id?: string;
58443
+ profile_id?: string;
58444
+ role_id?: string;
58445
+ };
58446
+ Relationships: [{
58447
+ foreignKeyName: "profile_roles_profile_id_fkey";
58448
+ columns: ["profile_id"];
58449
+ isOneToOne: false;
58450
+ referencedRelation: "profiles_org";
58451
+ referencedColumns: ["id"];
58452
+ }, {
58453
+ foreignKeyName: "profile_roles_role_id_fkey";
58454
+ columns: ["role_id"];
58455
+ isOneToOne: false;
58456
+ referencedRelation: "roles";
58457
+ referencedColumns: ["id"];
58458
+ }];
58459
+ };
56931
58460
  profiles: {
56932
58461
  Row: {
56933
58462
  address: string | null;
@@ -56973,6 +58502,39 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
56973
58502
  referencedColumns: ["id"];
56974
58503
  }];
56975
58504
  };
58505
+ profiles_org: {
58506
+ Row: {
58507
+ created_at: string;
58508
+ id: string;
58509
+ is_default: boolean;
58510
+ name: string;
58511
+ tenant_id: string | null;
58512
+ updated_at: string;
58513
+ };
58514
+ Insert: {
58515
+ created_at?: string;
58516
+ id?: string;
58517
+ is_default?: boolean;
58518
+ name: string;
58519
+ tenant_id?: string | null;
58520
+ updated_at?: string;
58521
+ };
58522
+ Update: {
58523
+ created_at?: string;
58524
+ id?: string;
58525
+ is_default?: boolean;
58526
+ name?: string;
58527
+ tenant_id?: string | null;
58528
+ updated_at?: string;
58529
+ };
58530
+ Relationships: [{
58531
+ foreignKeyName: "profiles_org_tenant_id_fkey";
58532
+ columns: ["tenant_id"];
58533
+ isOneToOne: false;
58534
+ referencedRelation: "tenants";
58535
+ referencedColumns: ["id"];
58536
+ }];
58537
+ };
56976
58538
  projects: {
56977
58539
  Row: {
56978
58540
  contact_name: string | null;
@@ -58147,6 +59709,7 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
58147
59709
  type: string;
58148
59710
  updated_at: string;
58149
59711
  vereist_medewerker: boolean;
59712
+ werkplek: string | null;
58150
59713
  };
58151
59714
  Insert: {
58152
59715
  actief?: boolean;
@@ -58160,6 +59723,7 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
58160
59723
  type?: string;
58161
59724
  updated_at?: string;
58162
59725
  vereist_medewerker?: boolean;
59726
+ werkplek?: string | null;
58163
59727
  };
58164
59728
  Update: {
58165
59729
  actief?: boolean;
@@ -58173,9 +59737,46 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
58173
59737
  type?: string;
58174
59738
  updated_at?: string;
58175
59739
  vereist_medewerker?: boolean;
59740
+ werkplek?: string | null;
58176
59741
  };
58177
59742
  Relationships: [];
58178
59743
  };
59744
+ sick_periods: {
59745
+ Row: {
59746
+ created_at: string;
59747
+ employee_id: string;
59748
+ end_date: string | null;
59749
+ id: string;
59750
+ notes: string | null;
59751
+ start_date: string;
59752
+ updated_at: string;
59753
+ };
59754
+ Insert: {
59755
+ created_at?: string;
59756
+ employee_id: string;
59757
+ end_date?: string | null;
59758
+ id?: string;
59759
+ notes?: string | null;
59760
+ start_date: string;
59761
+ updated_at?: string;
59762
+ };
59763
+ Update: {
59764
+ created_at?: string;
59765
+ employee_id?: string;
59766
+ end_date?: string | null;
59767
+ id?: string;
59768
+ notes?: string | null;
59769
+ start_date?: string;
59770
+ updated_at?: string;
59771
+ };
59772
+ Relationships: [{
59773
+ foreignKeyName: "sick_periods_employee_id_fkey";
59774
+ columns: ["employee_id"];
59775
+ isOneToOne: false;
59776
+ referencedRelation: "profiles";
59777
+ referencedColumns: ["id"];
59778
+ }];
59779
+ };
58179
59780
  sidebar_config: {
58180
59781
  Row: {
58181
59782
  id: string;
@@ -62860,6 +64461,13 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
62860
64461
  };
62861
64462
  Returns: string;
62862
64463
  };
64464
+ employee_day_hours: {
64465
+ Args: {
64466
+ _day: string;
64467
+ _employee_id: string;
64468
+ };
64469
+ Returns: number;
64470
+ };
62863
64471
  enqueue_cart_replan_if_unlocked: {
62864
64472
  Args: {
62865
64473
  p_order_id: string;
@@ -63213,6 +64821,19 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
63213
64821
  Args: never;
63214
64822
  Returns: boolean;
63215
64823
  };
64824
+ itk_offerte_naar_werkbon: {
64825
+ Args: {
64826
+ _offerte_id: string;
64827
+ };
64828
+ Returns: string;
64829
+ };
64830
+ itk_offerte_restant_mandaat: {
64831
+ Args: {
64832
+ _exclude_offerte_id?: string;
64833
+ _werkbon_id: string;
64834
+ };
64835
+ Returns: number;
64836
+ };
63216
64837
  jwt_has_role: {
63217
64838
  Args: {
63218
64839
  _role: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
@@ -63223,9 +64844,19 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
63223
64844
  Args: never;
63224
64845
  Returns: {
63225
64846
  avatar_url: string;
64847
+ color: string;
63226
64848
  display_name: string;
63227
64849
  email: string;
64850
+ hours_fri: number;
64851
+ hours_mon: number;
64852
+ hours_thu: number;
64853
+ hours_tue: number;
64854
+ hours_wed: number;
63228
64855
  id: string;
64856
+ is_active: boolean;
64857
+ leave_balance_hours: number;
64858
+ persnr: string;
64859
+ phone: string;
63229
64860
  roles: string[];
63230
64861
  }[];
63231
64862
  };
@@ -63552,17 +65183,6 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
63552
65183
  Returns: string;
63553
65184
  };
63554
65185
  logistics_emit_event: {
63555
- Args: {
63556
- p_event_type: string;
63557
- p_idempotency_key?: string;
63558
- p_order_ref: string;
63559
- p_payload?: import("../integrations/supabase/types").Json;
63560
- p_shadow?: boolean;
63561
- p_source_module: string;
63562
- p_strategy_id?: string;
63563
- };
63564
- Returns: import("../integrations/supabase/types").Json;
63565
- } | {
63566
65186
  Args: {
63567
65187
  p_event_type: string;
63568
65188
  p_idempotency_key?: string;
@@ -64407,6 +66027,37 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
64407
66027
  };
64408
66028
  Returns: undefined;
64409
66029
  };
66030
+ quote_create_from_source: {
66031
+ Args: {
66032
+ _payload?: import("../integrations/supabase/types").Json;
66033
+ _source_id: string;
66034
+ _source_type: string;
66035
+ };
66036
+ Returns: string;
66037
+ };
66038
+ quote_get_billable_lines: {
66039
+ Args: {
66040
+ _quotation_id: string;
66041
+ };
66042
+ Returns: import("../integrations/supabase/types").Json;
66043
+ };
66044
+ quote_get_summary: {
66045
+ Args: {
66046
+ _quotation_id: string;
66047
+ };
66048
+ Returns: import("../integrations/supabase/types").Json;
66049
+ };
66050
+ quote_list_packages: {
66051
+ Args: never;
66052
+ Returns: import("../integrations/supabase/types").Json;
66053
+ };
66054
+ quote_list_sources: {
66055
+ Args: {
66056
+ _limit?: number;
66057
+ _source_type?: string;
66058
+ };
66059
+ Returns: import("../integrations/supabase/types").Json;
66060
+ };
64410
66061
  recompute_all_reserved_stock: {
64411
66062
  Args: never;
64412
66063
  Returns: undefined;
@@ -64942,6 +66593,12 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
64942
66593
  };
64943
66594
  Returns: undefined;
64944
66595
  };
66596
+ sync_sick_time_off: {
66597
+ Args: {
66598
+ _period_id: string;
66599
+ };
66600
+ Returns: number;
66601
+ };
64945
66602
  trade_item_stock_duplicates: {
64946
66603
  Args: never;
64947
66604
  Returns: {
@@ -65015,11 +66672,31 @@ export declare const replanBufferForOrder: import("@tanstack/start-client-core")
65015
66672
  Args: never;
65016
66673
  Returns: string;
65017
66674
  };
66675
+ wo_create_from_source: {
66676
+ Args: {
66677
+ _payload?: import("../integrations/supabase/types").Json;
66678
+ _source_id: string;
66679
+ _source_type: string;
66680
+ };
66681
+ Returns: string;
66682
+ };
66683
+ wo_get_billable_lines: {
66684
+ Args: {
66685
+ _work_order_id: string;
66686
+ };
66687
+ Returns: import("../integrations/supabase/types").Json;
66688
+ };
66689
+ wo_get_summary: {
66690
+ Args: {
66691
+ _work_order_id: string;
66692
+ };
66693
+ Returns: import("../integrations/supabase/types").Json;
66694
+ };
65018
66695
  };
65019
66696
  Enums: {
65020
66697
  ai_import_status: "nieuw" | "verwerken" | "bevestigen" | "klaar" | "mislukt";
65021
66698
  app_role: "admin" | "planner" | "monteur" | "administratie" | "ai_admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie";
65022
- doc_layout_type: "pakbon" | "factuur" | "offerte" | "orderbevestiging" | "etiket" | "verzendlabel" | "productlabel" | "barcode_label" | "magazijnlijst" | "controlelijst" | "transportdocument" | "vrij" | "sticker" | "productiebon";
66699
+ doc_layout_type: "pakbon" | "factuur" | "offerte" | "orderbevestiging" | "etiket" | "verzendlabel" | "productlabel" | "barcode_label" | "magazijnlijst" | "controlelijst" | "transportdocument" | "vrij" | "sticker" | "productiebon" | "veilingbon" | "afleverbrief" | "veilingbrief";
65023
66700
  doc_orientation: "portrait" | "landscape";
65024
66701
  exact_env: "staging" | "live";
65025
66702
  exact_push_status: "pending" | "sent" | "error";