@flowselections/floriday-klanten-module 1.0.11 → 1.0.13

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 (43) hide show
  1. package/dist-lib/components/klanten/DiscountsTab.d.ts +4 -0
  2. package/dist-lib/components/klanten/DiscountsTab.d.ts.map +1 -0
  3. package/dist-lib/components/klanten/DiscountsTab.js +92 -0
  4. package/dist-lib/components/klanten/GroupedKlantDetail.d.ts.map +1 -1
  5. package/dist-lib/components/klanten/GroupedKlantDetail.js +5 -2
  6. package/dist-lib/components/klanten/KlantDetail.d.ts.map +1 -1
  7. package/dist-lib/components/klanten/KlantDetail.js +3 -2
  8. package/dist-lib/components/klanten/KlantenOverzicht.d.ts.map +1 -1
  9. package/dist-lib/components/klanten/KlantenOverzicht.js +83 -23
  10. package/dist-lib/components/klanten/LocalDiscountFormDialog.d.ts +10 -0
  11. package/dist-lib/components/klanten/LocalDiscountFormDialog.d.ts.map +1 -0
  12. package/dist-lib/components/klanten/LocalDiscountFormDialog.js +107 -0
  13. package/dist-lib/components/klanten/LocalDiscountsTab.d.ts +4 -0
  14. package/dist-lib/components/klanten/LocalDiscountsTab.d.ts.map +1 -0
  15. package/dist-lib/components/klanten/LocalDiscountsTab.js +101 -0
  16. package/dist-lib/integrations/supabase/auth-middleware.d.ts +1788 -107
  17. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
  18. package/dist-lib/integrations/supabase/client.d.ts +1788 -107
  19. package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
  20. package/dist-lib/integrations/supabase/client.server.d.ts +1788 -107
  21. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
  22. package/dist-lib/integrations/supabase/types.d.ts +1819 -104
  23. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  24. package/dist-lib/lib/accounting.functions.d.ts +5362 -319
  25. package/dist-lib/lib/accounting.functions.d.ts.map +1 -1
  26. package/dist-lib/lib/customer-analytics.functions.d.ts +1788 -107
  27. package/dist-lib/lib/customer-analytics.functions.d.ts.map +1 -1
  28. package/dist-lib/lib/customers.functions.d.ts +11767 -0
  29. package/dist-lib/lib/customers.functions.d.ts.map +1 -1
  30. package/dist-lib/lib/delivery-locations.functions.d.ts +6724 -0
  31. package/dist-lib/lib/delivery-locations.functions.d.ts.map +1 -1
  32. package/dist-lib/lib/external-customers.functions.d.ts +6724 -0
  33. package/dist-lib/lib/external-customers.functions.d.ts.map +1 -1
  34. package/dist-lib/lib/floriday-discounts.functions.d.ts +21974 -0
  35. package/dist-lib/lib/floriday-discounts.functions.d.ts.map +1 -0
  36. package/dist-lib/lib/floriday-discounts.functions.js +83 -0
  37. package/dist-lib/lib/local-discounts.functions.d.ts +76898 -0
  38. package/dist-lib/lib/local-discounts.functions.d.ts.map +1 -0
  39. package/dist-lib/lib/local-discounts.functions.js +185 -0
  40. package/dist-lib/lib/overdue-invoices.functions.d.ts +10984 -0
  41. package/dist-lib/lib/overdue-invoices.functions.d.ts.map +1 -0
  42. package/dist-lib/lib/overdue-invoices.functions.js +72 -0
  43. package/package.json +1 -1
@@ -5,10 +5,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
5
5
  afhandeling_settings: {
6
6
  Row: {
7
7
  created_at: string;
8
+ extra_pick_days_with_stickers: number;
8
9
  id: string;
9
10
  max_workdays_earlier_pick: number;
10
11
  pick_days_before_transport: number;
11
12
  pick_distribution_enabled: boolean;
13
+ pick_weekdays: number[];
12
14
  signup_mail_enabled: boolean;
13
15
  signup_mail_lead_minutes: number;
14
16
  signup_mail_purpose: string;
@@ -18,10 +20,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
18
20
  };
19
21
  Insert: {
20
22
  created_at?: string;
23
+ extra_pick_days_with_stickers?: number;
21
24
  id?: string;
22
25
  max_workdays_earlier_pick?: number;
23
26
  pick_days_before_transport?: number;
24
27
  pick_distribution_enabled?: boolean;
28
+ pick_weekdays?: number[];
25
29
  signup_mail_enabled?: boolean;
26
30
  signup_mail_lead_minutes?: number;
27
31
  signup_mail_purpose?: string;
@@ -31,10 +35,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
31
35
  };
32
36
  Update: {
33
37
  created_at?: string;
38
+ extra_pick_days_with_stickers?: number;
34
39
  id?: string;
35
40
  max_workdays_earlier_pick?: number;
36
41
  pick_days_before_transport?: number;
37
42
  pick_distribution_enabled?: boolean;
43
+ pick_weekdays?: number[];
38
44
  signup_mail_enabled?: boolean;
39
45
  signup_mail_lead_minutes?: number;
40
46
  signup_mail_purpose?: string;
@@ -446,6 +452,48 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
446
452
  referencedColumns: ["id"];
447
453
  }];
448
454
  };
455
+ carrier_signup_dispatch_runs: {
456
+ Row: {
457
+ detail: import("./types").Json | null;
458
+ error: string | null;
459
+ finished_at: string | null;
460
+ groups: number;
461
+ id: string;
462
+ ok: boolean;
463
+ reason: string | null;
464
+ sent: number;
465
+ skipped: import("./types").Json;
466
+ started_at: string;
467
+ unassigned: import("./types").Json;
468
+ };
469
+ Insert: {
470
+ detail?: import("./types").Json | null;
471
+ error?: string | null;
472
+ finished_at?: string | null;
473
+ groups?: number;
474
+ id?: string;
475
+ ok?: boolean;
476
+ reason?: string | null;
477
+ sent?: number;
478
+ skipped?: import("./types").Json;
479
+ started_at?: string;
480
+ unassigned?: import("./types").Json;
481
+ };
482
+ Update: {
483
+ detail?: import("./types").Json | null;
484
+ error?: string | null;
485
+ finished_at?: string | null;
486
+ groups?: number;
487
+ id?: string;
488
+ ok?: boolean;
489
+ reason?: string | null;
490
+ sent?: number;
491
+ skipped?: import("./types").Json;
492
+ started_at?: string;
493
+ unassigned?: import("./types").Json;
494
+ };
495
+ Relationships: [];
496
+ };
449
497
  carrier_signup_dispatches: {
450
498
  Row: {
451
499
  carrier_id: string;
@@ -497,6 +545,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
497
545
  contact_person: string | null;
498
546
  created_at: string;
499
547
  delivery_days: number | null;
548
+ delivery_weekdays: number[];
500
549
  email: string | null;
501
550
  id: string;
502
551
  is_default: boolean;
@@ -504,6 +553,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
504
553
  notes: string | null;
505
554
  phone: string | null;
506
555
  pickup_moments: import("./types").Json;
556
+ pickup_weekdays: number[];
507
557
  service_cities: string[];
508
558
  service_countries: string[];
509
559
  service_provinces: string[];
@@ -519,6 +569,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
519
569
  contact_person?: string | null;
520
570
  created_at?: string;
521
571
  delivery_days?: number | null;
572
+ delivery_weekdays?: number[];
522
573
  email?: string | null;
523
574
  id?: string;
524
575
  is_default?: boolean;
@@ -526,6 +577,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
526
577
  notes?: string | null;
527
578
  phone?: string | null;
528
579
  pickup_moments?: import("./types").Json;
580
+ pickup_weekdays?: number[];
529
581
  service_cities?: string[];
530
582
  service_countries?: string[];
531
583
  service_provinces?: string[];
@@ -541,6 +593,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
541
593
  contact_person?: string | null;
542
594
  created_at?: string;
543
595
  delivery_days?: number | null;
596
+ delivery_weekdays?: number[];
544
597
  email?: string | null;
545
598
  id?: string;
546
599
  is_default?: boolean;
@@ -548,6 +601,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
548
601
  notes?: string | null;
549
602
  phone?: string | null;
550
603
  pickup_moments?: import("./types").Json;
604
+ pickup_weekdays?: number[];
551
605
  service_cities?: string[];
552
606
  service_countries?: string[];
553
607
  service_provinces?: string[];
@@ -560,6 +614,180 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
560
614
  };
561
615
  Relationships: [];
562
616
  };
617
+ cart_control_draft: {
618
+ Row: {
619
+ cart_states: import("./types").Json;
620
+ checked_keys: import("./types").Json;
621
+ draft_date: string;
622
+ form_state: import("./types").Json;
623
+ notes: string;
624
+ updated_at: string;
625
+ user_id: string;
626
+ };
627
+ Insert: {
628
+ cart_states?: import("./types").Json;
629
+ checked_keys?: import("./types").Json;
630
+ draft_date: string;
631
+ form_state?: import("./types").Json;
632
+ notes?: string;
633
+ updated_at?: string;
634
+ user_id: string;
635
+ };
636
+ Update: {
637
+ cart_states?: import("./types").Json;
638
+ checked_keys?: import("./types").Json;
639
+ draft_date?: string;
640
+ form_state?: import("./types").Json;
641
+ notes?: string;
642
+ updated_at?: string;
643
+ user_id?: string;
644
+ };
645
+ Relationships: [];
646
+ };
647
+ cart_control_items: {
648
+ Row: {
649
+ action: string;
650
+ block_reason: string | null;
651
+ carrier_name: string | null;
652
+ cart_index: number;
653
+ cart_number_id: string | null;
654
+ cart_number_label: string | null;
655
+ created_at: string;
656
+ customer_name: string | null;
657
+ delivery_date: string | null;
658
+ id: string;
659
+ new_pick_date: string | null;
660
+ order_id: string;
661
+ order_number: string | null;
662
+ order_source: string;
663
+ pickup_date: string | null;
664
+ session_id: string;
665
+ };
666
+ Insert: {
667
+ action: string;
668
+ block_reason?: string | null;
669
+ carrier_name?: string | null;
670
+ cart_index: number;
671
+ cart_number_id?: string | null;
672
+ cart_number_label?: string | null;
673
+ created_at?: string;
674
+ customer_name?: string | null;
675
+ delivery_date?: string | null;
676
+ id?: string;
677
+ new_pick_date?: string | null;
678
+ order_id: string;
679
+ order_number?: string | null;
680
+ order_source: string;
681
+ pickup_date?: string | null;
682
+ session_id: string;
683
+ };
684
+ Update: {
685
+ action?: string;
686
+ block_reason?: string | null;
687
+ carrier_name?: string | null;
688
+ cart_index?: number;
689
+ cart_number_id?: string | null;
690
+ cart_number_label?: string | null;
691
+ created_at?: string;
692
+ customer_name?: string | null;
693
+ delivery_date?: string | null;
694
+ id?: string;
695
+ new_pick_date?: string | null;
696
+ order_id?: string;
697
+ order_number?: string | null;
698
+ order_source?: string;
699
+ pickup_date?: string | null;
700
+ session_id?: string;
701
+ };
702
+ Relationships: [{
703
+ foreignKeyName: "cart_control_items_session_id_fkey";
704
+ columns: ["session_id"];
705
+ isOneToOne: false;
706
+ referencedRelation: "cart_control_sessions";
707
+ referencedColumns: ["id"];
708
+ }];
709
+ };
710
+ cart_control_sessions: {
711
+ Row: {
712
+ blocked_count: number;
713
+ checked_count: number;
714
+ control_date: string;
715
+ created_at: string;
716
+ id: string;
717
+ notes: string | null;
718
+ performed_at: string;
719
+ rescheduled_count: number;
720
+ stock_consumed_at: string | null;
721
+ total_carts: number;
722
+ updated_at: string;
723
+ user_id: string;
724
+ };
725
+ Insert: {
726
+ blocked_count?: number;
727
+ checked_count?: number;
728
+ control_date?: string;
729
+ created_at?: string;
730
+ id?: string;
731
+ notes?: string | null;
732
+ performed_at?: string;
733
+ rescheduled_count?: number;
734
+ stock_consumed_at?: string | null;
735
+ total_carts?: number;
736
+ updated_at?: string;
737
+ user_id: string;
738
+ };
739
+ Update: {
740
+ blocked_count?: number;
741
+ checked_count?: number;
742
+ control_date?: string;
743
+ created_at?: string;
744
+ id?: string;
745
+ notes?: string | null;
746
+ performed_at?: string;
747
+ rescheduled_count?: number;
748
+ stock_consumed_at?: string | null;
749
+ total_carts?: number;
750
+ updated_at?: string;
751
+ user_id?: string;
752
+ };
753
+ Relationships: [];
754
+ };
755
+ cart_numbers: {
756
+ Row: {
757
+ assigned_at: string;
758
+ cart_index: number;
759
+ cart_number: string;
760
+ day_seq: number;
761
+ id: string;
762
+ order_id: string;
763
+ order_source: string;
764
+ pick_date: string;
765
+ status: string;
766
+ };
767
+ Insert: {
768
+ assigned_at?: string;
769
+ cart_index: number;
770
+ cart_number: string;
771
+ day_seq: number;
772
+ id?: string;
773
+ order_id: string;
774
+ order_source: string;
775
+ pick_date: string;
776
+ status?: string;
777
+ };
778
+ Update: {
779
+ assigned_at?: string;
780
+ cart_index?: number;
781
+ cart_number?: string;
782
+ day_seq?: number;
783
+ id?: string;
784
+ order_id?: string;
785
+ order_source?: string;
786
+ pick_date?: string;
787
+ status?: string;
788
+ };
789
+ Relationships: [];
790
+ };
563
791
  cart_pick_overrides: {
564
792
  Row: {
565
793
  cart_index: number;
@@ -599,6 +827,36 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
599
827
  };
600
828
  Relationships: [];
601
829
  };
830
+ cart_replan_queue: {
831
+ Row: {
832
+ attempts: number;
833
+ last_error: string | null;
834
+ order_id: string;
835
+ processed_at: string | null;
836
+ requested_at: string;
837
+ };
838
+ Insert: {
839
+ attempts?: number;
840
+ last_error?: string | null;
841
+ order_id: string;
842
+ processed_at?: string | null;
843
+ requested_at?: string;
844
+ };
845
+ Update: {
846
+ attempts?: number;
847
+ last_error?: string | null;
848
+ order_id?: string;
849
+ processed_at?: string | null;
850
+ requested_at?: string;
851
+ };
852
+ Relationships: [{
853
+ foreignKeyName: "cart_replan_queue_order_id_fkey";
854
+ columns: ["order_id"];
855
+ isOneToOne: true;
856
+ referencedRelation: "orders";
857
+ referencedColumns: ["id"];
858
+ }];
859
+ };
602
860
  collections: {
603
861
  Row: {
604
862
  created_at: string;
@@ -1232,6 +1490,54 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
1232
1490
  referencedColumns: ["id"];
1233
1491
  }];
1234
1492
  };
1493
+ dashboard_critical_alerts: {
1494
+ Row: {
1495
+ alert_key: string;
1496
+ alert_type: string;
1497
+ created_at: string;
1498
+ description: string | null;
1499
+ id: string;
1500
+ metadata: import("./types").Json | null;
1501
+ priority: string;
1502
+ raised_at: string;
1503
+ related_cart_ids: string[] | null;
1504
+ resolved_at: string | null;
1505
+ title: string;
1506
+ updated_at: string;
1507
+ user_id: string;
1508
+ };
1509
+ Insert: {
1510
+ alert_key: string;
1511
+ alert_type: string;
1512
+ created_at?: string;
1513
+ description?: string | null;
1514
+ id?: string;
1515
+ metadata?: import("./types").Json | null;
1516
+ priority?: string;
1517
+ raised_at?: string;
1518
+ related_cart_ids?: string[] | null;
1519
+ resolved_at?: string | null;
1520
+ title: string;
1521
+ updated_at?: string;
1522
+ user_id: string;
1523
+ };
1524
+ Update: {
1525
+ alert_key?: string;
1526
+ alert_type?: string;
1527
+ created_at?: string;
1528
+ description?: string | null;
1529
+ id?: string;
1530
+ metadata?: import("./types").Json | null;
1531
+ priority?: string;
1532
+ raised_at?: string;
1533
+ related_cart_ids?: string[] | null;
1534
+ resolved_at?: string | null;
1535
+ title?: string;
1536
+ updated_at?: string;
1537
+ user_id?: string;
1538
+ };
1539
+ Relationships: [];
1540
+ };
1235
1541
  dashboard_daily_reports: {
1236
1542
  Row: {
1237
1543
  created_at: string;
@@ -2676,34 +2982,52 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
2676
2982
  Row: {
2677
2983
  catalog_key: string | null;
2678
2984
  catalog_url: string;
2985
+ client_id: string | null;
2986
+ client_secret_ciphertext: string | null;
2987
+ client_secret_last4: string | null;
2679
2988
  created_at: string;
2680
2989
  id: number;
2681
2990
  last_meta: import("./types").Json | null;
2682
2991
  last_test_at: string | null;
2683
2992
  last_test_error: string | null;
2684
2993
  last_test_ok: boolean | null;
2994
+ last_token_test_at: string | null;
2995
+ last_token_test_error: string | null;
2996
+ last_token_test_ok: boolean | null;
2685
2997
  updated_at: string;
2686
2998
  };
2687
2999
  Insert: {
2688
3000
  catalog_key?: string | null;
2689
3001
  catalog_url?: string;
3002
+ client_id?: string | null;
3003
+ client_secret_ciphertext?: string | null;
3004
+ client_secret_last4?: string | null;
2690
3005
  created_at?: string;
2691
3006
  id?: number;
2692
3007
  last_meta?: import("./types").Json | null;
2693
3008
  last_test_at?: string | null;
2694
3009
  last_test_error?: string | null;
2695
3010
  last_test_ok?: boolean | null;
3011
+ last_token_test_at?: string | null;
3012
+ last_token_test_error?: string | null;
3013
+ last_token_test_ok?: boolean | null;
2696
3014
  updated_at?: string;
2697
3015
  };
2698
3016
  Update: {
2699
3017
  catalog_key?: string | null;
2700
3018
  catalog_url?: string;
3019
+ client_id?: string | null;
3020
+ client_secret_ciphertext?: string | null;
3021
+ client_secret_last4?: string | null;
2701
3022
  created_at?: string;
2702
3023
  id?: number;
2703
3024
  last_meta?: import("./types").Json | null;
2704
3025
  last_test_at?: string | null;
2705
3026
  last_test_error?: string | null;
2706
3027
  last_test_ok?: boolean | null;
3028
+ last_token_test_at?: string | null;
3029
+ last_token_test_error?: string | null;
3030
+ last_token_test_ok?: boolean | null;
2707
3031
  updated_at?: string;
2708
3032
  };
2709
3033
  Relationships: [];
@@ -2734,6 +3058,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
2734
3058
  };
2735
3059
  floricode_sync_state: {
2736
3060
  Row: {
3061
+ cursor_skip: number;
2737
3062
  error_message: string | null;
2738
3063
  last_change_date_time: string | null;
2739
3064
  last_sequence_number: number;
@@ -2743,6 +3068,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
2743
3068
  updated_at: string;
2744
3069
  };
2745
3070
  Insert: {
3071
+ cursor_skip?: number;
2746
3072
  error_message?: string | null;
2747
3073
  last_change_date_time?: string | null;
2748
3074
  last_sequence_number?: number;
@@ -2752,6 +3078,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
2752
3078
  updated_at?: string;
2753
3079
  };
2754
3080
  Update: {
3081
+ cursor_skip?: number;
2755
3082
  error_message?: string | null;
2756
3083
  last_change_date_time?: string | null;
2757
3084
  last_sequence_number?: number;
@@ -3347,6 +3674,51 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
3347
3674
  referencedColumns: ["id"];
3348
3675
  }];
3349
3676
  };
3677
+ floriday_continuous_stock_queue: {
3678
+ Row: {
3679
+ attempts: number;
3680
+ connection_id: string;
3681
+ created_at: string;
3682
+ gateway_attempt_id: string | null;
3683
+ id: string;
3684
+ last_error: string | null;
3685
+ number_of_pieces: number;
3686
+ sent_at: string | null;
3687
+ status: string;
3688
+ trade_item_id: string;
3689
+ updated_at: string;
3690
+ user_id: string;
3691
+ };
3692
+ Insert: {
3693
+ attempts?: number;
3694
+ connection_id: string;
3695
+ created_at?: string;
3696
+ gateway_attempt_id?: string | null;
3697
+ id?: string;
3698
+ last_error?: string | null;
3699
+ number_of_pieces?: number;
3700
+ sent_at?: string | null;
3701
+ status?: string;
3702
+ trade_item_id: string;
3703
+ updated_at?: string;
3704
+ user_id: string;
3705
+ };
3706
+ Update: {
3707
+ attempts?: number;
3708
+ connection_id?: string;
3709
+ created_at?: string;
3710
+ gateway_attempt_id?: string | null;
3711
+ id?: string;
3712
+ last_error?: string | null;
3713
+ number_of_pieces?: number;
3714
+ sent_at?: string | null;
3715
+ status?: string;
3716
+ trade_item_id?: string;
3717
+ updated_at?: string;
3718
+ user_id?: string;
3719
+ };
3720
+ Relationships: [];
3721
+ };
3350
3722
  floriday_contract_trade_item_groups_cache: {
3351
3723
  Row: {
3352
3724
  connection_id: string;
@@ -4415,51 +4787,105 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
4415
4787
  referencedColumns: ["id"];
4416
4788
  }];
4417
4789
  };
4418
- imap_accounts: {
4790
+ flow_role_assignments: {
4419
4791
  Row: {
4420
4792
  created_at: string;
4421
- email: string | null;
4422
- host: string;
4423
4793
  id: string;
4424
- is_active: boolean;
4425
- last_test_error: string | null;
4426
- last_test_ok: boolean | null;
4427
- last_tested_at: string | null;
4428
- name: string;
4429
- password: string | null;
4430
- password_secret_name: string | null;
4431
- port: number;
4432
- updated_at: string;
4433
- use_tls: boolean;
4434
- username: string;
4794
+ role_id: string;
4795
+ user_id: string;
4435
4796
  };
4436
4797
  Insert: {
4437
4798
  created_at?: string;
4438
- email?: string | null;
4439
- host: string;
4440
4799
  id?: string;
4441
- is_active?: boolean;
4442
- last_test_error?: string | null;
4443
- last_test_ok?: boolean | null;
4444
- last_tested_at?: string | null;
4445
- name: string;
4446
- password?: string | null;
4447
- password_secret_name?: string | null;
4448
- port?: number;
4449
- updated_at?: string;
4450
- use_tls?: boolean;
4451
- username: string;
4800
+ role_id: string;
4801
+ user_id: string;
4452
4802
  };
4453
4803
  Update: {
4454
4804
  created_at?: string;
4455
- email?: string | null;
4456
- host?: string;
4457
4805
  id?: string;
4458
- is_active?: boolean;
4459
- last_test_error?: string | null;
4460
- last_test_ok?: boolean | null;
4461
- last_tested_at?: string | null;
4462
- name?: string;
4806
+ role_id?: string;
4807
+ user_id?: string;
4808
+ };
4809
+ Relationships: [{
4810
+ foreignKeyName: "flow_role_assignments_role_id_fkey";
4811
+ columns: ["role_id"];
4812
+ isOneToOne: false;
4813
+ referencedRelation: "flow_roles";
4814
+ referencedColumns: ["id"];
4815
+ }];
4816
+ };
4817
+ flow_roles: {
4818
+ Row: {
4819
+ created_at: string;
4820
+ description: string | null;
4821
+ id: string;
4822
+ module_access: string[];
4823
+ name: string;
4824
+ updated_at: string;
4825
+ };
4826
+ Insert: {
4827
+ created_at?: string;
4828
+ description?: string | null;
4829
+ id?: string;
4830
+ module_access?: string[];
4831
+ name: string;
4832
+ updated_at?: string;
4833
+ };
4834
+ Update: {
4835
+ created_at?: string;
4836
+ description?: string | null;
4837
+ id?: string;
4838
+ module_access?: string[];
4839
+ name?: string;
4840
+ updated_at?: string;
4841
+ };
4842
+ Relationships: [];
4843
+ };
4844
+ imap_accounts: {
4845
+ Row: {
4846
+ created_at: string;
4847
+ email: string | null;
4848
+ host: string;
4849
+ id: string;
4850
+ is_active: boolean;
4851
+ last_test_error: string | null;
4852
+ last_test_ok: boolean | null;
4853
+ last_tested_at: string | null;
4854
+ name: string;
4855
+ password: string | null;
4856
+ password_secret_name: string | null;
4857
+ port: number;
4858
+ updated_at: string;
4859
+ use_tls: boolean;
4860
+ username: string;
4861
+ };
4862
+ Insert: {
4863
+ created_at?: string;
4864
+ email?: string | null;
4865
+ host: string;
4866
+ id?: string;
4867
+ is_active?: boolean;
4868
+ last_test_error?: string | null;
4869
+ last_test_ok?: boolean | null;
4870
+ last_tested_at?: string | null;
4871
+ name: string;
4872
+ password?: string | null;
4873
+ password_secret_name?: string | null;
4874
+ port?: number;
4875
+ updated_at?: string;
4876
+ use_tls?: boolean;
4877
+ username: string;
4878
+ };
4879
+ Update: {
4880
+ created_at?: string;
4881
+ email?: string | null;
4882
+ host?: string;
4883
+ id?: string;
4884
+ is_active?: boolean;
4885
+ last_test_error?: string | null;
4886
+ last_test_ok?: boolean | null;
4887
+ last_tested_at?: string | null;
4888
+ name?: string;
4463
4889
  password?: string | null;
4464
4890
  password_secret_name?: string | null;
4465
4891
  port?: number;
@@ -4736,6 +5162,204 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
4736
5162
  };
4737
5163
  Relationships: [];
4738
5164
  };
5165
+ local_customer_agreements: {
5166
+ Row: {
5167
+ base_price: number | null;
5168
+ created_at: string;
5169
+ currency: string;
5170
+ customer_id: string;
5171
+ id: string;
5172
+ min_quantity: number;
5173
+ net_price: number;
5174
+ notes: string | null;
5175
+ product_category_id: string | null;
5176
+ product_id: string | null;
5177
+ updated_at: string;
5178
+ valid_from: string | null;
5179
+ valid_until: string | null;
5180
+ };
5181
+ Insert: {
5182
+ base_price?: number | null;
5183
+ created_at?: string;
5184
+ currency?: string;
5185
+ customer_id: string;
5186
+ id?: string;
5187
+ min_quantity?: number;
5188
+ net_price: number;
5189
+ notes?: string | null;
5190
+ product_category_id?: string | null;
5191
+ product_id?: string | null;
5192
+ updated_at?: string;
5193
+ valid_from?: string | null;
5194
+ valid_until?: string | null;
5195
+ };
5196
+ Update: {
5197
+ base_price?: number | null;
5198
+ created_at?: string;
5199
+ currency?: string;
5200
+ customer_id?: string;
5201
+ id?: string;
5202
+ min_quantity?: number;
5203
+ net_price?: number;
5204
+ notes?: string | null;
5205
+ product_category_id?: string | null;
5206
+ product_id?: string | null;
5207
+ updated_at?: string;
5208
+ valid_from?: string | null;
5209
+ valid_until?: string | null;
5210
+ };
5211
+ Relationships: [{
5212
+ foreignKeyName: "local_customer_agreements_customer_id_fkey";
5213
+ columns: ["customer_id"];
5214
+ isOneToOne: false;
5215
+ referencedRelation: "customers";
5216
+ referencedColumns: ["id"];
5217
+ }, {
5218
+ foreignKeyName: "local_customer_agreements_product_category_id_fkey";
5219
+ columns: ["product_category_id"];
5220
+ isOneToOne: false;
5221
+ referencedRelation: "product_categories";
5222
+ referencedColumns: ["id"];
5223
+ }, {
5224
+ foreignKeyName: "local_customer_agreements_product_id_fkey";
5225
+ columns: ["product_id"];
5226
+ isOneToOne: false;
5227
+ referencedRelation: "products";
5228
+ referencedColumns: ["id"];
5229
+ }];
5230
+ };
5231
+ local_customer_price_groups: {
5232
+ Row: {
5233
+ created_at: string;
5234
+ currency: string;
5235
+ customer_id: string;
5236
+ discount_type: string;
5237
+ discount_value: number;
5238
+ id: string;
5239
+ min_quantity: number;
5240
+ notes: string | null;
5241
+ product_category_id: string | null;
5242
+ product_id: string | null;
5243
+ updated_at: string;
5244
+ valid_from: string | null;
5245
+ valid_until: string | null;
5246
+ };
5247
+ Insert: {
5248
+ created_at?: string;
5249
+ currency?: string;
5250
+ customer_id: string;
5251
+ discount_type: string;
5252
+ discount_value: number;
5253
+ id?: string;
5254
+ min_quantity?: number;
5255
+ notes?: string | null;
5256
+ product_category_id?: string | null;
5257
+ product_id?: string | null;
5258
+ updated_at?: string;
5259
+ valid_from?: string | null;
5260
+ valid_until?: string | null;
5261
+ };
5262
+ Update: {
5263
+ created_at?: string;
5264
+ currency?: string;
5265
+ customer_id?: string;
5266
+ discount_type?: string;
5267
+ discount_value?: number;
5268
+ id?: string;
5269
+ min_quantity?: number;
5270
+ notes?: string | null;
5271
+ product_category_id?: string | null;
5272
+ product_id?: string | null;
5273
+ updated_at?: string;
5274
+ valid_from?: string | null;
5275
+ valid_until?: string | null;
5276
+ };
5277
+ Relationships: [{
5278
+ foreignKeyName: "local_customer_price_groups_customer_id_fkey";
5279
+ columns: ["customer_id"];
5280
+ isOneToOne: false;
5281
+ referencedRelation: "customers";
5282
+ referencedColumns: ["id"];
5283
+ }, {
5284
+ foreignKeyName: "local_customer_price_groups_product_category_id_fkey";
5285
+ columns: ["product_category_id"];
5286
+ isOneToOne: false;
5287
+ referencedRelation: "product_categories";
5288
+ referencedColumns: ["id"];
5289
+ }, {
5290
+ foreignKeyName: "local_customer_price_groups_product_id_fkey";
5291
+ columns: ["product_id"];
5292
+ isOneToOne: false;
5293
+ referencedRelation: "products";
5294
+ referencedColumns: ["id"];
5295
+ }];
5296
+ };
5297
+ local_customer_sales_strategies: {
5298
+ Row: {
5299
+ created_at: string;
5300
+ currency: string;
5301
+ customer_id: string;
5302
+ discount_type: string;
5303
+ discount_value: number;
5304
+ id: string;
5305
+ min_quantity: number;
5306
+ notes: string | null;
5307
+ product_category_id: string | null;
5308
+ product_id: string | null;
5309
+ updated_at: string;
5310
+ valid_from: string | null;
5311
+ valid_until: string | null;
5312
+ };
5313
+ Insert: {
5314
+ created_at?: string;
5315
+ currency?: string;
5316
+ customer_id: string;
5317
+ discount_type: string;
5318
+ discount_value: number;
5319
+ id?: string;
5320
+ min_quantity?: number;
5321
+ notes?: string | null;
5322
+ product_category_id?: string | null;
5323
+ product_id?: string | null;
5324
+ updated_at?: string;
5325
+ valid_from?: string | null;
5326
+ valid_until?: string | null;
5327
+ };
5328
+ Update: {
5329
+ created_at?: string;
5330
+ currency?: string;
5331
+ customer_id?: string;
5332
+ discount_type?: string;
5333
+ discount_value?: number;
5334
+ id?: string;
5335
+ min_quantity?: number;
5336
+ notes?: string | null;
5337
+ product_category_id?: string | null;
5338
+ product_id?: string | null;
5339
+ updated_at?: string;
5340
+ valid_from?: string | null;
5341
+ valid_until?: string | null;
5342
+ };
5343
+ Relationships: [{
5344
+ foreignKeyName: "local_customer_sales_strategies_customer_id_fkey";
5345
+ columns: ["customer_id"];
5346
+ isOneToOne: false;
5347
+ referencedRelation: "customers";
5348
+ referencedColumns: ["id"];
5349
+ }, {
5350
+ foreignKeyName: "local_customer_sales_strategies_product_category_id_fkey";
5351
+ columns: ["product_category_id"];
5352
+ isOneToOne: false;
5353
+ referencedRelation: "product_categories";
5354
+ referencedColumns: ["id"];
5355
+ }, {
5356
+ foreignKeyName: "local_customer_sales_strategies_product_id_fkey";
5357
+ columns: ["product_id"];
5358
+ isOneToOne: false;
5359
+ referencedRelation: "products";
5360
+ referencedColumns: ["id"];
5361
+ }];
5362
+ };
4739
5363
  locations: {
4740
5364
  Row: {
4741
5365
  created_at: string;
@@ -4848,6 +5472,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
4848
5472
  matched_customer_id: string | null;
4849
5473
  message_id: string;
4850
5474
  notes: string | null;
5475
+ order_number: string | null;
4851
5476
  parsed_payload: import("./types").Json | null;
4852
5477
  reviewed_at: string | null;
4853
5478
  reviewed_by: string | null;
@@ -4863,6 +5488,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
4863
5488
  matched_customer_id?: string | null;
4864
5489
  message_id: string;
4865
5490
  notes?: string | null;
5491
+ order_number?: string | null;
4866
5492
  parsed_payload?: import("./types").Json | null;
4867
5493
  reviewed_at?: string | null;
4868
5494
  reviewed_by?: string | null;
@@ -4878,6 +5504,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
4878
5504
  matched_customer_id?: string | null;
4879
5505
  message_id?: string;
4880
5506
  notes?: string | null;
5507
+ order_number?: string | null;
4881
5508
  parsed_payload?: import("./types").Json | null;
4882
5509
  reviewed_at?: string | null;
4883
5510
  reviewed_by?: string | null;
@@ -5051,110 +5678,464 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
5051
5678
  referencedColumns: ["id"];
5052
5679
  }];
5053
5680
  };
5054
- mailbox_settings: {
5681
+ mailbox_settings: {
5682
+ Row: {
5683
+ created_at: string;
5684
+ folder: string;
5685
+ id: string;
5686
+ imap_host: string;
5687
+ imap_port: number;
5688
+ imap_use_tls: boolean;
5689
+ imap_username: string;
5690
+ last_error: string | null;
5691
+ last_polled_at: string | null;
5692
+ last_uid_seen: number;
5693
+ polling_enabled: boolean;
5694
+ singleton: boolean;
5695
+ updated_at: string;
5696
+ };
5697
+ Insert: {
5698
+ created_at?: string;
5699
+ folder?: string;
5700
+ id?: string;
5701
+ imap_host?: string;
5702
+ imap_port?: number;
5703
+ imap_use_tls?: boolean;
5704
+ imap_username?: string;
5705
+ last_error?: string | null;
5706
+ last_polled_at?: string | null;
5707
+ last_uid_seen?: number;
5708
+ polling_enabled?: boolean;
5709
+ singleton?: boolean;
5710
+ updated_at?: string;
5711
+ };
5712
+ Update: {
5713
+ created_at?: string;
5714
+ folder?: string;
5715
+ id?: string;
5716
+ imap_host?: string;
5717
+ imap_port?: number;
5718
+ imap_use_tls?: boolean;
5719
+ imap_username?: string;
5720
+ last_error?: string | null;
5721
+ last_polled_at?: string | null;
5722
+ last_uid_seen?: number;
5723
+ polling_enabled?: boolean;
5724
+ singleton?: boolean;
5725
+ updated_at?: string;
5726
+ };
5727
+ Relationships: [];
5728
+ };
5729
+ manufacture_product_components: {
5730
+ Row: {
5731
+ component_type: string;
5732
+ created_at: string;
5733
+ id: string;
5734
+ manufacture_product_id: string;
5735
+ product_group_id: string | null;
5736
+ quantity: number;
5737
+ trade_item_id: string | null;
5738
+ unit: string;
5739
+ };
5740
+ Insert: {
5741
+ component_type: string;
5742
+ created_at?: string;
5743
+ id?: string;
5744
+ manufacture_product_id: string;
5745
+ product_group_id?: string | null;
5746
+ quantity?: number;
5747
+ trade_item_id?: string | null;
5748
+ unit?: string;
5749
+ };
5750
+ Update: {
5751
+ component_type?: string;
5752
+ created_at?: string;
5753
+ id?: string;
5754
+ manufacture_product_id?: string;
5755
+ product_group_id?: string | null;
5756
+ quantity?: number;
5757
+ trade_item_id?: string | null;
5758
+ unit?: string;
5759
+ };
5760
+ Relationships: [{
5761
+ foreignKeyName: "manufacture_product_components_manufacture_product_id_fkey";
5762
+ columns: ["manufacture_product_id"];
5763
+ isOneToOne: false;
5764
+ referencedRelation: "manufacture_product_possible_stock_view";
5765
+ referencedColumns: ["manufacture_product_id"];
5766
+ }, {
5767
+ foreignKeyName: "manufacture_product_components_manufacture_product_id_fkey";
5768
+ columns: ["manufacture_product_id"];
5769
+ isOneToOne: false;
5770
+ referencedRelation: "manufacture_products";
5771
+ referencedColumns: ["id"];
5772
+ }, {
5773
+ foreignKeyName: "manufacture_product_components_product_group_id_fkey";
5774
+ columns: ["product_group_id"];
5775
+ isOneToOne: false;
5776
+ referencedRelation: "product_groups";
5777
+ referencedColumns: ["id"];
5778
+ }];
5779
+ };
5780
+ manufacture_products: {
5781
+ Row: {
5782
+ created_at: string;
5783
+ description: string | null;
5784
+ id: string;
5785
+ is_active: boolean;
5786
+ name: string;
5787
+ produced_stock: number;
5788
+ product_code: string;
5789
+ tenant_id: string;
5790
+ updated_at: string;
5791
+ };
5792
+ Insert: {
5793
+ created_at?: string;
5794
+ description?: string | null;
5795
+ id?: string;
5796
+ is_active?: boolean;
5797
+ name: string;
5798
+ produced_stock?: number;
5799
+ product_code: string;
5800
+ tenant_id: string;
5801
+ updated_at?: string;
5802
+ };
5803
+ Update: {
5804
+ created_at?: string;
5805
+ description?: string | null;
5806
+ id?: string;
5807
+ is_active?: boolean;
5808
+ name?: string;
5809
+ produced_stock?: number;
5810
+ product_code?: string;
5811
+ tenant_id?: string;
5812
+ updated_at?: string;
5813
+ };
5814
+ Relationships: [];
5815
+ };
5816
+ monteurs: {
5817
+ Row: {
5818
+ avatar_url: string | null;
5819
+ color: string | null;
5820
+ created_at: string;
5821
+ email: string | null;
5822
+ id: string;
5823
+ is_active: boolean;
5824
+ leave_balance_hours: number;
5825
+ name: string;
5826
+ persnr: number | null;
5827
+ phone: string | null;
5828
+ role: string;
5829
+ tenant_id: string;
5830
+ updated_at: string;
5831
+ user_id: string | null;
5832
+ };
5833
+ Insert: {
5834
+ avatar_url?: string | null;
5835
+ color?: string | null;
5836
+ created_at?: string;
5837
+ email?: string | null;
5838
+ id?: string;
5839
+ is_active?: boolean;
5840
+ leave_balance_hours?: number;
5841
+ name: string;
5842
+ persnr?: number | null;
5843
+ phone?: string | null;
5844
+ role?: string;
5845
+ tenant_id: string;
5846
+ updated_at?: string;
5847
+ user_id?: string | null;
5848
+ };
5849
+ Update: {
5850
+ avatar_url?: string | null;
5851
+ color?: string | null;
5852
+ created_at?: string;
5853
+ email?: string | null;
5854
+ id?: string;
5855
+ is_active?: boolean;
5856
+ leave_balance_hours?: number;
5857
+ name?: string;
5858
+ persnr?: number | null;
5859
+ phone?: string | null;
5860
+ role?: string;
5861
+ tenant_id?: string;
5862
+ updated_at?: string;
5863
+ user_id?: string | null;
5864
+ };
5865
+ Relationships: [{
5866
+ foreignKeyName: "monteurs_tenant_id_fkey";
5867
+ columns: ["tenant_id"];
5868
+ isOneToOne: false;
5869
+ referencedRelation: "tenants";
5870
+ referencedColumns: ["id"];
5871
+ }];
5872
+ };
5873
+ nmbrs_component_mapping: {
5874
+ Row: {
5875
+ created_at: string;
5876
+ id: string;
5877
+ source_kind: string;
5878
+ source_value: string | null;
5879
+ updated_at: string;
5880
+ wage_code: string;
5881
+ };
5882
+ Insert: {
5883
+ created_at?: string;
5884
+ id?: string;
5885
+ source_kind: string;
5886
+ source_value?: string | null;
5887
+ updated_at?: string;
5888
+ wage_code: string;
5889
+ };
5890
+ Update: {
5891
+ created_at?: string;
5892
+ id?: string;
5893
+ source_kind?: string;
5894
+ source_value?: string | null;
5895
+ updated_at?: string;
5896
+ wage_code?: string;
5897
+ };
5898
+ Relationships: [{
5899
+ foreignKeyName: "nmbrs_component_mapping_wage_code_fkey";
5900
+ columns: ["wage_code"];
5901
+ isOneToOne: false;
5902
+ referencedRelation: "nmbrs_wage_components";
5903
+ referencedColumns: ["code"];
5904
+ }];
5905
+ };
5906
+ nmbrs_employee_mapping: {
5907
+ Row: {
5908
+ active_from: string | null;
5909
+ active_to: string | null;
5910
+ contract_hours_per_week: number | null;
5911
+ created_at: string;
5912
+ hourly_wage: number | null;
5913
+ id: string;
5914
+ monteur_id: string;
5915
+ nmbrs_company_code: string | null;
5916
+ nmbrs_employee_number: string;
5917
+ updated_at: string;
5918
+ };
5919
+ Insert: {
5920
+ active_from?: string | null;
5921
+ active_to?: string | null;
5922
+ contract_hours_per_week?: number | null;
5923
+ created_at?: string;
5924
+ hourly_wage?: number | null;
5925
+ id?: string;
5926
+ monteur_id: string;
5927
+ nmbrs_company_code?: string | null;
5928
+ nmbrs_employee_number: string;
5929
+ updated_at?: string;
5930
+ };
5931
+ Update: {
5932
+ active_from?: string | null;
5933
+ active_to?: string | null;
5934
+ contract_hours_per_week?: number | null;
5935
+ created_at?: string;
5936
+ hourly_wage?: number | null;
5937
+ id?: string;
5938
+ monteur_id?: string;
5939
+ nmbrs_company_code?: string | null;
5940
+ nmbrs_employee_number?: string;
5941
+ updated_at?: string;
5942
+ };
5943
+ Relationships: [{
5944
+ foreignKeyName: "nmbrs_employee_mapping_monteur_id_fkey";
5945
+ columns: ["monteur_id"];
5946
+ isOneToOne: true;
5947
+ referencedRelation: "monteurs";
5948
+ referencedColumns: ["id"];
5949
+ }];
5950
+ };
5951
+ nmbrs_export_lines: {
5952
+ Row: {
5953
+ amount: number;
5954
+ created_at: string;
5955
+ entry_date: string;
5956
+ hours: number;
5957
+ id: string;
5958
+ monteur_id: string;
5959
+ nmbrs_employee_number: string | null;
5960
+ notes: string | null;
5961
+ run_id: string;
5962
+ source_kind: string | null;
5963
+ source_ref_id: string | null;
5964
+ updated_at: string;
5965
+ wage_code: string;
5966
+ };
5967
+ Insert: {
5968
+ amount?: number;
5969
+ created_at?: string;
5970
+ entry_date: string;
5971
+ hours?: number;
5972
+ id?: string;
5973
+ monteur_id: string;
5974
+ nmbrs_employee_number?: string | null;
5975
+ notes?: string | null;
5976
+ run_id: string;
5977
+ source_kind?: string | null;
5978
+ source_ref_id?: string | null;
5979
+ updated_at?: string;
5980
+ wage_code: string;
5981
+ };
5982
+ Update: {
5983
+ amount?: number;
5984
+ created_at?: string;
5985
+ entry_date?: string;
5986
+ hours?: number;
5987
+ id?: string;
5988
+ monteur_id?: string;
5989
+ nmbrs_employee_number?: string | null;
5990
+ notes?: string | null;
5991
+ run_id?: string;
5992
+ source_kind?: string | null;
5993
+ source_ref_id?: string | null;
5994
+ updated_at?: string;
5995
+ wage_code?: string;
5996
+ };
5997
+ Relationships: [{
5998
+ foreignKeyName: "nmbrs_export_lines_monteur_id_fkey";
5999
+ columns: ["monteur_id"];
6000
+ isOneToOne: false;
6001
+ referencedRelation: "monteurs";
6002
+ referencedColumns: ["id"];
6003
+ }, {
6004
+ foreignKeyName: "nmbrs_export_lines_run_id_fkey";
6005
+ columns: ["run_id"];
6006
+ isOneToOne: false;
6007
+ referencedRelation: "nmbrs_export_runs";
6008
+ referencedColumns: ["id"];
6009
+ }, {
6010
+ foreignKeyName: "nmbrs_export_lines_wage_code_fkey";
6011
+ columns: ["wage_code"];
6012
+ isOneToOne: false;
6013
+ referencedRelation: "nmbrs_wage_components";
6014
+ referencedColumns: ["code"];
6015
+ }];
6016
+ };
6017
+ nmbrs_export_runs: {
6018
+ Row: {
6019
+ created_at: string;
6020
+ file_name: string | null;
6021
+ generated_at: string;
6022
+ generated_by: string | null;
6023
+ id: string;
6024
+ notes: string | null;
6025
+ period_end: string;
6026
+ period_label: string;
6027
+ period_start: string;
6028
+ status: string;
6029
+ total_hours: number;
6030
+ total_lines: number;
6031
+ updated_at: string;
6032
+ };
6033
+ Insert: {
6034
+ created_at?: string;
6035
+ file_name?: string | null;
6036
+ generated_at?: string;
6037
+ generated_by?: string | null;
6038
+ id?: string;
6039
+ notes?: string | null;
6040
+ period_end: string;
6041
+ period_label: string;
6042
+ period_start: string;
6043
+ status?: string;
6044
+ total_hours?: number;
6045
+ total_lines?: number;
6046
+ updated_at?: string;
6047
+ };
6048
+ Update: {
6049
+ created_at?: string;
6050
+ file_name?: string | null;
6051
+ generated_at?: string;
6052
+ generated_by?: string | null;
6053
+ id?: string;
6054
+ notes?: string | null;
6055
+ period_end?: string;
6056
+ period_label?: string;
6057
+ period_start?: string;
6058
+ status?: string;
6059
+ total_hours?: number;
6060
+ total_lines?: number;
6061
+ updated_at?: string;
6062
+ };
6063
+ Relationships: [];
6064
+ };
6065
+ nmbrs_settings: {
5055
6066
  Row: {
5056
6067
  created_at: string;
5057
- folder: string;
5058
- id: string;
5059
- imap_host: string;
5060
- imap_port: number;
5061
- imap_use_tls: boolean;
5062
- imap_username: string;
5063
- last_error: string | null;
5064
- last_polled_at: string | null;
5065
- last_uid_seen: number;
5066
- polling_enabled: boolean;
5067
- singleton: boolean;
6068
+ default_company_code: string | null;
6069
+ id: boolean;
6070
+ include_travel: boolean;
6071
+ overtime_threshold_daily: number;
6072
+ overtime_threshold_weekly: number;
6073
+ period_type: string;
5068
6074
  updated_at: string;
6075
+ updated_by: string | null;
6076
+ week_start_day: number;
5069
6077
  };
5070
6078
  Insert: {
5071
6079
  created_at?: string;
5072
- folder?: string;
5073
- id?: string;
5074
- imap_host?: string;
5075
- imap_port?: number;
5076
- imap_use_tls?: boolean;
5077
- imap_username?: string;
5078
- last_error?: string | null;
5079
- last_polled_at?: string | null;
5080
- last_uid_seen?: number;
5081
- polling_enabled?: boolean;
5082
- singleton?: boolean;
6080
+ default_company_code?: string | null;
6081
+ id?: boolean;
6082
+ include_travel?: boolean;
6083
+ overtime_threshold_daily?: number;
6084
+ overtime_threshold_weekly?: number;
6085
+ period_type?: string;
5083
6086
  updated_at?: string;
6087
+ updated_by?: string | null;
6088
+ week_start_day?: number;
5084
6089
  };
5085
6090
  Update: {
5086
6091
  created_at?: string;
5087
- folder?: string;
5088
- id?: string;
5089
- imap_host?: string;
5090
- imap_port?: number;
5091
- imap_use_tls?: boolean;
5092
- imap_username?: string;
5093
- last_error?: string | null;
5094
- last_polled_at?: string | null;
5095
- last_uid_seen?: number;
5096
- polling_enabled?: boolean;
5097
- singleton?: boolean;
6092
+ default_company_code?: string | null;
6093
+ id?: boolean;
6094
+ include_travel?: boolean;
6095
+ overtime_threshold_daily?: number;
6096
+ overtime_threshold_weekly?: number;
6097
+ period_type?: string;
5098
6098
  updated_at?: string;
6099
+ updated_by?: string | null;
6100
+ week_start_day?: number;
5099
6101
  };
5100
6102
  Relationships: [];
5101
6103
  };
5102
- monteurs: {
6104
+ nmbrs_wage_components: {
5103
6105
  Row: {
5104
- avatar_url: string | null;
5105
- color: string | null;
6106
+ category: string;
6107
+ code: string;
5106
6108
  created_at: string;
5107
- email: string | null;
5108
6109
  id: string;
5109
6110
  is_active: boolean;
5110
- leave_balance_hours: number;
5111
- name: string;
5112
- persnr: number | null;
5113
- phone: string | null;
5114
- role: string;
5115
- tenant_id: string;
6111
+ label: string;
6112
+ sort_order: number;
6113
+ unit: string;
5116
6114
  updated_at: string;
5117
- user_id: string | null;
5118
6115
  };
5119
6116
  Insert: {
5120
- avatar_url?: string | null;
5121
- color?: string | null;
6117
+ category: string;
6118
+ code: string;
5122
6119
  created_at?: string;
5123
- email?: string | null;
5124
6120
  id?: string;
5125
6121
  is_active?: boolean;
5126
- leave_balance_hours?: number;
5127
- name: string;
5128
- persnr?: number | null;
5129
- phone?: string | null;
5130
- role?: string;
5131
- tenant_id: string;
6122
+ label: string;
6123
+ sort_order?: number;
6124
+ unit: string;
5132
6125
  updated_at?: string;
5133
- user_id?: string | null;
5134
6126
  };
5135
6127
  Update: {
5136
- avatar_url?: string | null;
5137
- color?: string | null;
6128
+ category?: string;
6129
+ code?: string;
5138
6130
  created_at?: string;
5139
- email?: string | null;
5140
6131
  id?: string;
5141
6132
  is_active?: boolean;
5142
- leave_balance_hours?: number;
5143
- name?: string;
5144
- persnr?: number | null;
5145
- phone?: string | null;
5146
- role?: string;
5147
- tenant_id?: string;
6133
+ label?: string;
6134
+ sort_order?: number;
6135
+ unit?: string;
5148
6136
  updated_at?: string;
5149
- user_id?: string | null;
5150
6137
  };
5151
- Relationships: [{
5152
- foreignKeyName: "monteurs_tenant_id_fkey";
5153
- columns: ["tenant_id"];
5154
- isOneToOne: false;
5155
- referencedRelation: "tenants";
5156
- referencedColumns: ["id"];
5157
- }];
6138
+ Relationships: [];
5158
6139
  };
5159
6140
  notifications: {
5160
6141
  Row: {
@@ -5380,6 +6361,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
5380
6361
  id: string;
5381
6362
  items: import("./types").Json;
5382
6363
  notes: string | null;
6364
+ order_number: string | null;
5383
6365
  recipient_id: string;
5384
6366
  total_amount: number;
5385
6367
  };
@@ -5393,6 +6375,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
5393
6375
  id?: string;
5394
6376
  items?: import("./types").Json;
5395
6377
  notes?: string | null;
6378
+ order_number?: string | null;
5396
6379
  recipient_id: string;
5397
6380
  total_amount?: number;
5398
6381
  };
@@ -5406,6 +6389,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
5406
6389
  id?: string;
5407
6390
  items?: import("./types").Json;
5408
6391
  notes?: string | null;
6392
+ order_number?: string | null;
5409
6393
  recipient_id?: string;
5410
6394
  total_amount?: number;
5411
6395
  };
@@ -5565,6 +6549,9 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
5565
6549
  crates_per_layer: number;
5566
6550
  created_at: string;
5567
6551
  id: string;
6552
+ layer_fraction: number;
6553
+ layer_share_pct: number;
6554
+ layers_per_cart: number;
5568
6555
  order_item_id: string | null;
5569
6556
  plants_per_crate: number;
5570
6557
  product_id: string | null;
@@ -5576,6 +6563,9 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
5576
6563
  crates_per_layer?: number;
5577
6564
  created_at?: string;
5578
6565
  id?: string;
6566
+ layer_fraction?: number;
6567
+ layer_share_pct?: number;
6568
+ layers_per_cart?: number;
5579
6569
  order_item_id?: string | null;
5580
6570
  plants_per_crate?: number;
5581
6571
  product_id?: string | null;
@@ -5587,6 +6577,9 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
5587
6577
  crates_per_layer?: number;
5588
6578
  created_at?: string;
5589
6579
  id?: string;
6580
+ layer_fraction?: number;
6581
+ layer_share_pct?: number;
6582
+ layers_per_cart?: number;
5590
6583
  order_item_id?: string | null;
5591
6584
  plants_per_crate?: number;
5592
6585
  product_id?: string | null;
@@ -5614,33 +6607,45 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
5614
6607
  };
5615
6608
  order_carts: {
5616
6609
  Row: {
6610
+ algorithm_version: number;
5617
6611
  cart_number: number;
5618
6612
  created_at: string;
5619
6613
  id: string;
5620
6614
  is_auto: boolean;
5621
6615
  is_complete: boolean;
5622
6616
  notes: string | null;
6617
+ occupancy_pct: number;
5623
6618
  order_id: string;
6619
+ source: string;
6620
+ total_layers_used: number;
5624
6621
  updated_at: string;
5625
6622
  };
5626
6623
  Insert: {
6624
+ algorithm_version?: number;
5627
6625
  cart_number: number;
5628
6626
  created_at?: string;
5629
6627
  id?: string;
5630
6628
  is_auto?: boolean;
5631
6629
  is_complete?: boolean;
5632
6630
  notes?: string | null;
6631
+ occupancy_pct?: number;
5633
6632
  order_id: string;
6633
+ source?: string;
6634
+ total_layers_used?: number;
5634
6635
  updated_at?: string;
5635
6636
  };
5636
6637
  Update: {
6638
+ algorithm_version?: number;
5637
6639
  cart_number?: number;
5638
6640
  created_at?: string;
5639
6641
  id?: string;
5640
6642
  is_auto?: boolean;
5641
6643
  is_complete?: boolean;
5642
6644
  notes?: string | null;
6645
+ occupancy_pct?: number;
5643
6646
  order_id?: string;
6647
+ source?: string;
6648
+ total_layers_used?: number;
5644
6649
  updated_at?: string;
5645
6650
  };
5646
6651
  Relationships: [{
@@ -6059,6 +7064,66 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
6059
7064
  };
6060
7065
  Relationships: [];
6061
7066
  };
7067
+ product_group_items: {
7068
+ Row: {
7069
+ created_at: string;
7070
+ id: string;
7071
+ product_group_id: string;
7072
+ quantity: number;
7073
+ trade_item_id: string;
7074
+ };
7075
+ Insert: {
7076
+ created_at?: string;
7077
+ id?: string;
7078
+ product_group_id: string;
7079
+ quantity?: number;
7080
+ trade_item_id: string;
7081
+ };
7082
+ Update: {
7083
+ created_at?: string;
7084
+ id?: string;
7085
+ product_group_id?: string;
7086
+ quantity?: number;
7087
+ trade_item_id?: string;
7088
+ };
7089
+ Relationships: [{
7090
+ foreignKeyName: "product_group_items_product_group_id_fkey";
7091
+ columns: ["product_group_id"];
7092
+ isOneToOne: false;
7093
+ referencedRelation: "product_groups";
7094
+ referencedColumns: ["id"];
7095
+ }];
7096
+ };
7097
+ product_groups: {
7098
+ Row: {
7099
+ created_at: string;
7100
+ description: string | null;
7101
+ id: string;
7102
+ is_active: boolean;
7103
+ name: string;
7104
+ tenant_id: string;
7105
+ updated_at: string;
7106
+ };
7107
+ Insert: {
7108
+ created_at?: string;
7109
+ description?: string | null;
7110
+ id?: string;
7111
+ is_active?: boolean;
7112
+ name: string;
7113
+ tenant_id: string;
7114
+ updated_at?: string;
7115
+ };
7116
+ Update: {
7117
+ created_at?: string;
7118
+ description?: string | null;
7119
+ id?: string;
7120
+ is_active?: boolean;
7121
+ name?: string;
7122
+ tenant_id?: string;
7123
+ updated_at?: string;
7124
+ };
7125
+ Relationships: [];
7126
+ };
6062
7127
  products: {
6063
7128
  Row: {
6064
7129
  barcode: string | null;
@@ -6078,6 +7143,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
6078
7143
  purchase_price: number | null;
6079
7144
  quantity: number;
6080
7145
  sale_price: number | null;
7146
+ trade_item_key: string | null;
6081
7147
  unit: string;
6082
7148
  updated_at: string;
6083
7149
  weight: string | null;
@@ -6100,6 +7166,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
6100
7166
  purchase_price?: number | null;
6101
7167
  quantity?: number;
6102
7168
  sale_price?: number | null;
7169
+ trade_item_key?: string | null;
6103
7170
  unit?: string;
6104
7171
  updated_at?: string;
6105
7172
  weight?: string | null;
@@ -6122,6 +7189,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
6122
7189
  purchase_price?: number | null;
6123
7190
  quantity?: number;
6124
7191
  sale_price?: number | null;
7192
+ trade_item_key?: string | null;
6125
7193
  unit?: string;
6126
7194
  updated_at?: string;
6127
7195
  weight?: string | null;
@@ -6134,6 +7202,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
6134
7202
  display_name: string | null;
6135
7203
  email: string | null;
6136
7204
  id: string;
7205
+ is_superadmin: boolean;
6137
7206
  notification_preferences: import("./types").Json;
6138
7207
  tenant_id: string | null;
6139
7208
  updated_at: string;
@@ -6143,6 +7212,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
6143
7212
  display_name?: string | null;
6144
7213
  email?: string | null;
6145
7214
  id: string;
7215
+ is_superadmin?: boolean;
6146
7216
  notification_preferences?: import("./types").Json;
6147
7217
  tenant_id?: string | null;
6148
7218
  updated_at?: string;
@@ -6152,6 +7222,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
6152
7222
  display_name?: string | null;
6153
7223
  email?: string | null;
6154
7224
  id?: string;
7225
+ is_superadmin?: boolean;
6155
7226
  notification_preferences?: import("./types").Json;
6156
7227
  tenant_id?: string | null;
6157
7228
  updated_at?: string;
@@ -6941,6 +8012,120 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
6941
8012
  };
6942
8013
  Relationships: [];
6943
8014
  };
8015
+ sidebar_config: {
8016
+ Row: {
8017
+ id: string;
8018
+ module_order: string[];
8019
+ updated_at: string;
8020
+ };
8021
+ Insert: {
8022
+ id?: string;
8023
+ module_order?: string[];
8024
+ updated_at?: string;
8025
+ };
8026
+ Update: {
8027
+ id?: string;
8028
+ module_order?: string[];
8029
+ updated_at?: string;
8030
+ };
8031
+ Relationships: [];
8032
+ };
8033
+ stock_import_runs: {
8034
+ Row: {
8035
+ connection_id: string | null;
8036
+ created_at: string;
8037
+ created_rows: number;
8038
+ errors: import("./types").Json;
8039
+ filename: string | null;
8040
+ id: string;
8041
+ mutations: import("./types").Json;
8042
+ skipped_rows: number;
8043
+ total_rows: number;
8044
+ updated_rows: number;
8045
+ user_id: string;
8046
+ };
8047
+ Insert: {
8048
+ connection_id?: string | null;
8049
+ created_at?: string;
8050
+ created_rows?: number;
8051
+ errors?: import("./types").Json;
8052
+ filename?: string | null;
8053
+ id?: string;
8054
+ mutations?: import("./types").Json;
8055
+ skipped_rows?: number;
8056
+ total_rows?: number;
8057
+ updated_rows?: number;
8058
+ user_id: string;
8059
+ };
8060
+ Update: {
8061
+ connection_id?: string | null;
8062
+ created_at?: string;
8063
+ created_rows?: number;
8064
+ errors?: import("./types").Json;
8065
+ filename?: string | null;
8066
+ id?: string;
8067
+ mutations?: import("./types").Json;
8068
+ skipped_rows?: number;
8069
+ total_rows?: number;
8070
+ updated_rows?: number;
8071
+ user_id?: string;
8072
+ };
8073
+ Relationships: [];
8074
+ };
8075
+ stock_mutation_log: {
8076
+ Row: {
8077
+ connection_id: string | null;
8078
+ created_at: string;
8079
+ created_by: string | null;
8080
+ id: string;
8081
+ mutation_type: string;
8082
+ order_id: string | null;
8083
+ order_item_id: string | null;
8084
+ order_source: string | null;
8085
+ physical_after: number | null;
8086
+ physical_before: number | null;
8087
+ qty_delta: number;
8088
+ reason: string | null;
8089
+ reserved_after: number | null;
8090
+ reserved_before: number | null;
8091
+ trade_item_key: string | null;
8092
+ };
8093
+ Insert: {
8094
+ connection_id?: string | null;
8095
+ created_at?: string;
8096
+ created_by?: string | null;
8097
+ id?: string;
8098
+ mutation_type: string;
8099
+ order_id?: string | null;
8100
+ order_item_id?: string | null;
8101
+ order_source?: string | null;
8102
+ physical_after?: number | null;
8103
+ physical_before?: number | null;
8104
+ qty_delta: number;
8105
+ reason?: string | null;
8106
+ reserved_after?: number | null;
8107
+ reserved_before?: number | null;
8108
+ trade_item_key?: string | null;
8109
+ };
8110
+ Update: {
8111
+ connection_id?: string | null;
8112
+ created_at?: string;
8113
+ created_by?: string | null;
8114
+ id?: string;
8115
+ mutation_type?: string;
8116
+ order_id?: string | null;
8117
+ order_item_id?: string | null;
8118
+ order_source?: string | null;
8119
+ physical_after?: number | null;
8120
+ physical_before?: number | null;
8121
+ qty_delta?: number;
8122
+ reason?: string | null;
8123
+ reserved_after?: number | null;
8124
+ reserved_before?: number | null;
8125
+ trade_item_key?: string | null;
8126
+ };
8127
+ Relationships: [];
8128
+ };
6944
8129
  supplier_products: {
6945
8130
  Row: {
6946
8131
  article_number: string | null;
@@ -7198,7 +8383,13 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7198
8383
  connection_id: string | null;
7199
8384
  created_at: string;
7200
8385
  data: import("./types").Json;
8386
+ floriday_id: string | null;
8387
+ floriday_link_error: string | null;
8388
+ floriday_link_status: string;
7201
8389
  id: string;
8390
+ last_floriday_sync_at: string | null;
8391
+ missing_required_fields: string[];
8392
+ source: string;
7202
8393
  updated_at: string;
7203
8394
  user_id: string;
7204
8395
  };
@@ -7206,15 +8397,69 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7206
8397
  connection_id?: string | null;
7207
8398
  created_at?: string;
7208
8399
  data?: import("./types").Json;
8400
+ floriday_id?: string | null;
8401
+ floriday_link_error?: string | null;
8402
+ floriday_link_status?: string;
7209
8403
  id?: string;
8404
+ last_floriday_sync_at?: string | null;
8405
+ missing_required_fields?: string[];
8406
+ source?: string;
7210
8407
  updated_at?: string;
7211
8408
  user_id: string;
7212
8409
  };
7213
8410
  Update: {
7214
8411
  connection_id?: string | null;
7215
8412
  created_at?: string;
7216
- data?: import("./types").Json;
8413
+ data?: import("./types").Json;
8414
+ floriday_id?: string | null;
8415
+ floriday_link_error?: string | null;
8416
+ floriday_link_status?: string;
8417
+ id?: string;
8418
+ last_floriday_sync_at?: string | null;
8419
+ missing_required_fields?: string[];
8420
+ source?: string;
8421
+ updated_at?: string;
8422
+ user_id?: string;
8423
+ };
8424
+ Relationships: [];
8425
+ };
8426
+ trade_item_stock: {
8427
+ Row: {
8428
+ connection_id: string;
8429
+ created_at: string;
8430
+ id: string;
8431
+ incoming_stock: number;
8432
+ minimum_stock: number;
8433
+ notes: string | null;
8434
+ physical_stock: number;
8435
+ reserved_stock: number;
8436
+ trade_item_key: string;
8437
+ updated_at: string;
8438
+ user_id: string;
8439
+ };
8440
+ Insert: {
8441
+ connection_id: string;
8442
+ created_at?: string;
8443
+ id?: string;
8444
+ incoming_stock?: number;
8445
+ minimum_stock?: number;
8446
+ notes?: string | null;
8447
+ physical_stock?: number;
8448
+ reserved_stock?: number;
8449
+ trade_item_key: string;
8450
+ updated_at?: string;
8451
+ user_id: string;
8452
+ };
8453
+ Update: {
8454
+ connection_id?: string;
8455
+ created_at?: string;
7217
8456
  id?: string;
8457
+ incoming_stock?: number;
8458
+ minimum_stock?: number;
8459
+ notes?: string | null;
8460
+ physical_stock?: number;
8461
+ reserved_stock?: number;
8462
+ trade_item_key?: string;
7218
8463
  updated_at?: string;
7219
8464
  user_id?: string;
7220
8465
  };
@@ -7539,6 +8784,10 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7539
8784
  default_invoice_type: string;
7540
8785
  default_payment_term_days: number;
7541
8786
  default_vat_code: string;
8787
+ invoice_enabled_ao: boolean;
8788
+ invoice_enabled_fo: boolean;
8789
+ invoice_enabled_ho: boolean;
8790
+ invoice_enabled_mo: boolean;
7542
8791
  updated_at: string;
7543
8792
  user_id: string;
7544
8793
  };
@@ -7548,6 +8797,10 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7548
8797
  default_invoice_type?: string;
7549
8798
  default_payment_term_days?: number;
7550
8799
  default_vat_code?: string;
8800
+ invoice_enabled_ao?: boolean;
8801
+ invoice_enabled_fo?: boolean;
8802
+ invoice_enabled_ho?: boolean;
8803
+ invoice_enabled_mo?: boolean;
7551
8804
  updated_at?: string;
7552
8805
  user_id: string;
7553
8806
  };
@@ -7557,6 +8810,10 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7557
8810
  default_invoice_type?: string;
7558
8811
  default_payment_term_days?: number;
7559
8812
  default_vat_code?: string;
8813
+ invoice_enabled_ao?: boolean;
8814
+ invoice_enabled_fo?: boolean;
8815
+ invoice_enabled_ho?: boolean;
8816
+ invoice_enabled_mo?: boolean;
7560
8817
  updated_at?: string;
7561
8818
  user_id?: string;
7562
8819
  };
@@ -7564,6 +8821,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7564
8821
  };
7565
8822
  twinfield_invoice_sync_logs: {
7566
8823
  Row: {
8824
+ action_type: string | null;
7567
8825
  created_at: string;
7568
8826
  details: import("./types").Json | null;
7569
8827
  duration_ms: number | null;
@@ -7576,6 +8834,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7576
8834
  user_id: string;
7577
8835
  };
7578
8836
  Insert: {
8837
+ action_type?: string | null;
7579
8838
  created_at?: string;
7580
8839
  details?: import("./types").Json | null;
7581
8840
  duration_ms?: number | null;
@@ -7588,6 +8847,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7588
8847
  user_id: string;
7589
8848
  };
7590
8849
  Update: {
8850
+ action_type?: string | null;
7591
8851
  created_at?: string;
7592
8852
  details?: import("./types").Json | null;
7593
8853
  duration_ms?: number | null;
@@ -7823,6 +9083,57 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7823
9083
  referencedColumns: ["id"];
7824
9084
  }];
7825
9085
  };
9086
+ twinfield_request_metrics: {
9087
+ Row: {
9088
+ bucket_hour: string;
9089
+ connection_id: string;
9090
+ error_count: number;
9091
+ rate_limited_count: number;
9092
+ request_count: number;
9093
+ updated_at: string;
9094
+ };
9095
+ Insert: {
9096
+ bucket_hour: string;
9097
+ connection_id: string;
9098
+ error_count?: number;
9099
+ rate_limited_count?: number;
9100
+ request_count?: number;
9101
+ updated_at?: string;
9102
+ };
9103
+ Update: {
9104
+ bucket_hour?: string;
9105
+ connection_id?: string;
9106
+ error_count?: number;
9107
+ rate_limited_count?: number;
9108
+ request_count?: number;
9109
+ updated_at?: string;
9110
+ };
9111
+ Relationships: [];
9112
+ };
9113
+ twinfield_session_cache: {
9114
+ Row: {
9115
+ cluster: string;
9116
+ created_at: string;
9117
+ expires_at: string;
9118
+ session_id: string;
9119
+ user_id: string;
9120
+ };
9121
+ Insert: {
9122
+ cluster: string;
9123
+ created_at?: string;
9124
+ expires_at: string;
9125
+ session_id: string;
9126
+ user_id: string;
9127
+ };
9128
+ Update: {
9129
+ cluster?: string;
9130
+ created_at?: string;
9131
+ expires_at?: string;
9132
+ session_id?: string;
9133
+ user_id?: string;
9134
+ };
9135
+ Relationships: [];
9136
+ };
7826
9137
  twinfield_settings: {
7827
9138
  Row: {
7828
9139
  active_environment: string;
@@ -8404,6 +9715,73 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
8404
9715
  };
8405
9716
  Relationships: [];
8406
9717
  };
9718
+ floriday_customer_discounts: {
9719
+ Row: {
9720
+ base_price: number | null;
9721
+ buyer_organization_id: string | null;
9722
+ currency: string | null;
9723
+ discount_type: string | null;
9724
+ discount_value: number | null;
9725
+ min_quantity: number | null;
9726
+ net_price: number | null;
9727
+ product_group_id: string | null;
9728
+ raw: import("./types").Json | null;
9729
+ source: string | null;
9730
+ source_id: string | null;
9731
+ trade_item_id: string | null;
9732
+ valid_from: string | null;
9733
+ valid_until: string | null;
9734
+ };
9735
+ Relationships: [];
9736
+ };
9737
+ local_customer_discounts: {
9738
+ Row: {
9739
+ base_price: number | null;
9740
+ currency: string | null;
9741
+ customer_id: string | null;
9742
+ discount_type: string | null;
9743
+ discount_value: number | null;
9744
+ min_quantity: number | null;
9745
+ net_price: number | null;
9746
+ product_category_id: string | null;
9747
+ product_id: string | null;
9748
+ product_name: string | null;
9749
+ source: string | null;
9750
+ source_id: string | null;
9751
+ valid_from: string | null;
9752
+ valid_until: string | null;
9753
+ };
9754
+ Relationships: [];
9755
+ };
9756
+ manufacture_product_possible_stock_view: {
9757
+ Row: {
9758
+ component_count: number | null;
9759
+ manufacture_product_id: string | null;
9760
+ possible_stock: number | null;
9761
+ };
9762
+ Relationships: [];
9763
+ };
9764
+ product_group_stock_view: {
9765
+ Row: {
9766
+ item_count: number | null;
9767
+ product_group_id: string | null;
9768
+ total_stock: number | null;
9769
+ };
9770
+ Relationships: [{
9771
+ foreignKeyName: "product_group_items_product_group_id_fkey";
9772
+ columns: ["product_group_id"];
9773
+ isOneToOne: false;
9774
+ referencedRelation: "product_groups";
9775
+ referencedColumns: ["id"];
9776
+ }];
9777
+ };
9778
+ trade_item_stock_view: {
9779
+ Row: {
9780
+ stock: number | null;
9781
+ trade_item_id: string | null;
9782
+ };
9783
+ Relationships: [];
9784
+ };
8407
9785
  v_external_customers_exact: {
8408
9786
  Row: {
8409
9787
  account_number: string | null;
@@ -8659,6 +10037,68 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
8659
10037
  };
8660
10038
  Returns: number;
8661
10039
  };
10040
+ afh_city_code: {
10041
+ Args: {
10042
+ _city: string;
10043
+ _country: string;
10044
+ };
10045
+ Returns: string;
10046
+ };
10047
+ afh_normalize_country: {
10048
+ Args: {
10049
+ _raw: string;
10050
+ };
10051
+ Returns: string;
10052
+ };
10053
+ afh_normalize_nl_province: {
10054
+ Args: {
10055
+ _raw: string;
10056
+ };
10057
+ Returns: string;
10058
+ };
10059
+ afh_subtract_workdays: {
10060
+ Args: {
10061
+ _date: string;
10062
+ _days: number;
10063
+ };
10064
+ Returns: string;
10065
+ };
10066
+ apply_stock_consumption: {
10067
+ Args: {
10068
+ p_order_id: string;
10069
+ p_order_item_id: string;
10070
+ p_qty: number;
10071
+ p_reason: string;
10072
+ p_source: string;
10073
+ p_trade_item_key: string;
10074
+ };
10075
+ Returns: undefined;
10076
+ };
10077
+ apply_stock_reservation: {
10078
+ Args: {
10079
+ p_order_id: string;
10080
+ p_order_item_id: string;
10081
+ p_qty: number;
10082
+ p_reason: string;
10083
+ p_source: string;
10084
+ p_trade_item_key: string;
10085
+ };
10086
+ Returns: undefined;
10087
+ };
10088
+ assign_cart_numbers: {
10089
+ Args: {
10090
+ p_carts: import("./types").Json;
10091
+ };
10092
+ Returns: {
10093
+ cart_index: number;
10094
+ cart_number: string;
10095
+ day_seq: number;
10096
+ order_id: string;
10097
+ order_source: string;
10098
+ pick_date: string;
10099
+ status: string;
10100
+ }[];
10101
+ };
8662
10102
  assign_floriday_order_numbers: {
8663
10103
  Args: {
8664
10104
  p_ids: string[];
@@ -8668,20 +10108,81 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
8668
10108
  order_number: string;
8669
10109
  }[];
8670
10110
  };
10111
+ autolink_product_to_floriday: {
10112
+ Args: {
10113
+ p_product_id: string;
10114
+ };
10115
+ Returns: string;
10116
+ };
10117
+ backfill_open_order_reservations: {
10118
+ Args: never;
10119
+ Returns: {
10120
+ processed_items: number;
10121
+ }[];
10122
+ };
8671
10123
  call_exact_route: {
8672
10124
  Args: {
8673
10125
  path: string;
8674
10126
  };
8675
10127
  Returns: number;
8676
10128
  };
10129
+ check_offer_product_available_stock: {
10130
+ Args: {
10131
+ p_campaign_product_id: string;
10132
+ p_code: string;
10133
+ p_needed_qty?: number;
10134
+ p_product_name?: string;
10135
+ };
10136
+ Returns: import("./types").Json;
10137
+ };
10138
+ check_trade_item_available_stock: {
10139
+ Args: {
10140
+ p_connection_id?: string;
10141
+ p_context?: string;
10142
+ p_needed_qty?: number;
10143
+ p_order_id?: string;
10144
+ p_order_item_id?: string;
10145
+ p_owner_id?: string;
10146
+ p_product_name?: string;
10147
+ p_trade_item_key: string;
10148
+ };
10149
+ Returns: import("./types").Json;
10150
+ };
8677
10151
  cleanup_old_bookings: {
8678
10152
  Args: never;
8679
10153
  Returns: number;
8680
10154
  };
10155
+ control_get_todays_carts: {
10156
+ Args: never;
10157
+ Returns: {
10158
+ cart_index: number;
10159
+ cart_number: string;
10160
+ cart_number_id: string;
10161
+ order_id: string;
10162
+ order_source: string;
10163
+ pick_date: string;
10164
+ status: string;
10165
+ }[];
10166
+ };
10167
+ count_distinct_regulatory_products: {
10168
+ Args: never;
10169
+ Returns: number;
10170
+ };
8681
10171
  current_monteur_id: {
8682
10172
  Args: never;
8683
10173
  Returns: string;
8684
10174
  };
10175
+ dashboard_alert_counts: {
10176
+ Args: never;
10177
+ Returns: import("./types").Json;
10178
+ };
10179
+ dashboard_alert_rows: {
10180
+ Args: {
10181
+ check_id: string;
10182
+ row_limit?: number;
10183
+ };
10184
+ Returns: import("./types").Json;
10185
+ };
8685
10186
  dashboard_list_public_schema: {
8686
10187
  Args: never;
8687
10188
  Returns: {
@@ -8690,6 +10191,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
8690
10191
  table_name: string;
8691
10192
  }[];
8692
10193
  };
10194
+ dispatch_carrier_signups_sql: {
10195
+ Args: {
10196
+ _catchup?: string;
10197
+ };
10198
+ Returns: import("./types").Json;
10199
+ };
8693
10200
  email_auth_decrypt: {
8694
10201
  Args: {
8695
10202
  cipher: string;
@@ -8725,6 +10232,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
8725
10232
  status: string;
8726
10233
  }[];
8727
10234
  };
10235
+ ensure_trade_item_stock_row: {
10236
+ Args: {
10237
+ p_key: string;
10238
+ };
10239
+ Returns: undefined;
10240
+ };
8728
10241
  ensure_user_tenant: {
8729
10242
  Args: never;
8730
10243
  Returns: string;
@@ -8762,6 +10275,38 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
8762
10275
  };
8763
10276
  Returns: boolean;
8764
10277
  };
10278
+ find_trade_item_key: {
10279
+ Args: {
10280
+ p_barcode: string;
10281
+ p_name: string;
10282
+ p_product_id: string;
10283
+ };
10284
+ Returns: string;
10285
+ };
10286
+ floriday_effective_price: {
10287
+ Args: {
10288
+ _buyer_id: string;
10289
+ _on_date?: string;
10290
+ _quantity?: number;
10291
+ _trade_item_id: string;
10292
+ };
10293
+ Returns: {
10294
+ base_price: number;
10295
+ currency: string;
10296
+ discount_type: string;
10297
+ discount_value: number;
10298
+ net_price: number;
10299
+ source: string;
10300
+ source_id: string;
10301
+ }[];
10302
+ };
10303
+ format_cart_number: {
10304
+ Args: {
10305
+ p_pick_date: string;
10306
+ p_seq: number;
10307
+ };
10308
+ Returns: string;
10309
+ };
8765
10310
  get_active_floriday_connection_public: {
8766
10311
  Args: never;
8767
10312
  Returns: {
@@ -8775,6 +10320,13 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
8775
10320
  preferred_warehouse_name: string;
8776
10321
  }[];
8777
10322
  };
10323
+ get_active_floriday_context: {
10324
+ Args: never;
10325
+ Returns: {
10326
+ connection_id: string;
10327
+ user_id: string;
10328
+ }[];
10329
+ };
8778
10330
  get_active_twinfield_public: {
8779
10331
  Args: never;
8780
10332
  Returns: {
@@ -8786,6 +10338,13 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
8786
10338
  office_code: string;
8787
10339
  }[];
8788
10340
  };
10341
+ get_floricode_record_counts: {
10342
+ Args: never;
10343
+ Returns: {
10344
+ count: number;
10345
+ resource: string;
10346
+ }[];
10347
+ };
8789
10348
  get_floriday_agreements_active: {
8790
10349
  Args: {
8791
10350
  p_on_date?: string;
@@ -8877,6 +10436,24 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
8877
10436
  };
8878
10437
  Returns: import("./types").Json;
8879
10438
  };
10439
+ get_offer_delivery_options: {
10440
+ Args: {
10441
+ p_code: string;
10442
+ };
10443
+ Returns: import("./types").Json;
10444
+ };
10445
+ get_offer_recipient_by_code: {
10446
+ Args: {
10447
+ p_code: string;
10448
+ };
10449
+ Returns: {
10450
+ campaign_id: string;
10451
+ clicked_at: string;
10452
+ customer_id: string;
10453
+ id: string;
10454
+ ordered_at: string;
10455
+ }[];
10456
+ };
8880
10457
  get_or_assign_floriday_order_number: {
8881
10458
  Args: {
8882
10459
  p_floriday_id: string;
@@ -8929,12 +10506,53 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
8929
10506
  Args: never;
8930
10507
  Returns: boolean;
8931
10508
  };
10509
+ is_superadmin: {
10510
+ Args: {
10511
+ _user_id: string;
10512
+ };
10513
+ Returns: boolean;
10514
+ };
10515
+ local_effective_price: {
10516
+ Args: {
10517
+ _customer_id: string;
10518
+ _on_date?: string;
10519
+ _product_id: string;
10520
+ _quantity?: number;
10521
+ };
10522
+ Returns: {
10523
+ currency: string;
10524
+ discount_type: string;
10525
+ discount_value: number;
10526
+ net_price: number;
10527
+ source: string;
10528
+ source_id: string;
10529
+ }[];
10530
+ };
10531
+ mark_offer_clicked: {
10532
+ Args: {
10533
+ p_code: string;
10534
+ };
10535
+ Returns: undefined;
10536
+ };
10537
+ mark_offer_ordered: {
10538
+ Args: {
10539
+ p_code: string;
10540
+ };
10541
+ Returns: undefined;
10542
+ };
8932
10543
  next_order_number: {
8933
10544
  Args: {
8934
10545
  p_prefix: string;
8935
10546
  };
8936
10547
  Returns: string;
8937
10548
  };
10549
+ next_order_number_for_date: {
10550
+ Args: {
10551
+ p_created_at?: string;
10552
+ p_prefix: string;
10553
+ };
10554
+ Returns: string;
10555
+ };
8938
10556
  next_work_order_number: {
8939
10557
  Args: {
8940
10558
  p_parent_work_order_id?: string;
@@ -8942,16 +10560,41 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
8942
10560
  };
8943
10561
  Returns: string;
8944
10562
  };
10563
+ normalize_order_source: {
10564
+ Args: {
10565
+ p_src: string;
10566
+ };
10567
+ Returns: string;
10568
+ };
8945
10569
  normalize_vat: {
8946
10570
  Args: {
8947
10571
  v: string;
8948
10572
  };
8949
10573
  Returns: string;
8950
10574
  };
10575
+ offer_recipient_matches: {
10576
+ Args: {
10577
+ _campaign_id: string;
10578
+ _customer_id: string;
10579
+ _recipient_id: string;
10580
+ };
10581
+ Returns: boolean;
10582
+ };
10583
+ order_number_prefix: {
10584
+ Args: {
10585
+ p_custom_fields?: import("./types").Json;
10586
+ p_order_source: string;
10587
+ };
10588
+ Returns: string;
10589
+ };
8951
10590
  pickstation_get_orders_raw: {
8952
10591
  Args: never;
8953
10592
  Returns: import("./types").Json;
8954
10593
  };
10594
+ pickstation_get_planning_context: {
10595
+ Args: never;
10596
+ Returns: import("./types").Json;
10597
+ };
8955
10598
  pickstation_get_settings: {
8956
10599
  Args: never;
8957
10600
  Returns: import("./types").Json;
@@ -8966,6 +10609,26 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
8966
10609
  };
8967
10610
  Returns: undefined;
8968
10611
  };
10612
+ pickstation_set_cart_status: {
10613
+ Args: {
10614
+ p_cart_index: number;
10615
+ p_order_id: string;
10616
+ p_order_source: string;
10617
+ p_status: string;
10618
+ };
10619
+ Returns: undefined;
10620
+ };
10621
+ promote_trade_item_key: {
10622
+ Args: {
10623
+ p_new: string;
10624
+ p_old: string;
10625
+ };
10626
+ Returns: undefined;
10627
+ };
10628
+ refresh_external_customers_grouped: {
10629
+ Args: never;
10630
+ Returns: undefined;
10631
+ };
8969
10632
  refresh_floricode_derived_code_lists: {
8970
10633
  Args: never;
8971
10634
  Returns: {
@@ -8974,6 +10637,18 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
8974
10637
  row_count: number;
8975
10638
  }[];
8976
10639
  };
10640
+ refresh_floricode_derived_for_product: {
10641
+ Args: {
10642
+ p_product_code: string;
10643
+ };
10644
+ Returns: number;
10645
+ };
10646
+ refresh_floricode_derived_for_products: {
10647
+ Args: {
10648
+ _product_ids: string[];
10649
+ };
10650
+ Returns: number;
10651
+ };
8977
10652
  reset_floriday_sync_cursor: {
8978
10653
  Args: {
8979
10654
  p_connection_id: string;
@@ -8981,6 +10656,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
8981
10656
  };
8982
10657
  Returns: undefined;
8983
10658
  };
10659
+ resolve_product_id_for_item: {
10660
+ Args: {
10661
+ p_product_name: string;
10662
+ };
10663
+ Returns: string;
10664
+ };
8984
10665
  schedule_floriday_additional_services_sync: {
8985
10666
  Args: {
8986
10667
  p_apikey: string;