@flowselections/floriday-afhandeling-module 1.0.10 → 1.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/dist-lib/components/afhandeling/ControleLijstPrint.d.ts +7 -0
  2. package/dist-lib/components/afhandeling/ControleLijstPrint.d.ts.map +1 -0
  3. package/dist-lib/components/afhandeling/ControleLijstPrint.js +67 -0
  4. package/dist-lib/components/afhandeling/ControlePage.d.ts +2 -0
  5. package/dist-lib/components/afhandeling/ControlePage.d.ts.map +1 -0
  6. package/dist-lib/components/afhandeling/ControlePage.js +456 -0
  7. package/dist-lib/components/afhandeling/DagDetailDialog.d.ts.map +1 -1
  8. package/dist-lib/components/afhandeling/DagDetailDialog.js +9 -5
  9. package/dist-lib/components/afhandeling/VervoerderForm.d.ts.map +1 -1
  10. package/dist-lib/components/afhandeling/VervoerderForm.js +10 -1
  11. package/dist-lib/components/afhandeling/VervoerdersPage.d.ts.map +1 -1
  12. package/dist-lib/components/afhandeling/VervoerdersPage.js +3 -2
  13. package/dist-lib/components/afhandeling/WeekAgendaView.d.ts.map +1 -1
  14. package/dist-lib/components/afhandeling/WeekAgendaView.js +15 -5
  15. package/dist-lib/components/afhandeling/WeekdayPicker.d.ts +12 -0
  16. package/dist-lib/components/afhandeling/WeekdayPicker.d.ts.map +1 -0
  17. package/dist-lib/components/afhandeling/WeekdayPicker.js +30 -0
  18. package/dist-lib/components/pickstation/PakbonTemplate.d.ts +1 -0
  19. package/dist-lib/components/pickstation/PakbonTemplate.d.ts.map +1 -1
  20. package/dist-lib/components/pickstation/PakbonTemplate.js +31 -8
  21. package/dist-lib/components/settings/AfhandelingSettingsCard.d.ts.map +1 -1
  22. package/dist-lib/components/settings/AfhandelingSettingsCard.js +9 -2
  23. package/dist-lib/components/ui/responsive-dialog.d.ts +20 -0
  24. package/dist-lib/components/ui/responsive-dialog.d.ts.map +1 -0
  25. package/dist-lib/components/ui/responsive-dialog.js +44 -0
  26. package/dist-lib/hooks/useOrderPlanning.d.ts.map +1 -1
  27. package/dist-lib/hooks/useOrderPlanning.js +17 -6
  28. package/dist-lib/index.d.ts +1 -0
  29. package/dist-lib/index.d.ts.map +1 -1
  30. package/dist-lib/index.js +4 -2
  31. package/dist-lib/integrations/supabase/auth-middleware.d.ts +629 -3
  32. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
  33. package/dist-lib/integrations/supabase/client.d.ts +629 -3
  34. package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
  35. package/dist-lib/integrations/supabase/client.server.d.ts +629 -3
  36. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
  37. package/dist-lib/integrations/supabase/types.d.ts +639 -3
  38. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  39. package/dist-lib/lib/afhandelingSettings.functions.d.ts +1318 -62
  40. package/dist-lib/lib/afhandelingSettings.functions.d.ts.map +1 -1
  41. package/dist-lib/lib/afhandelingSettings.functions.js +16 -1
  42. package/dist-lib/lib/carrierMatch.server.d.ts +27 -0
  43. package/dist-lib/lib/carrierMatch.server.d.ts.map +1 -0
  44. package/dist-lib/lib/carrierMatch.server.js +75 -0
  45. package/dist-lib/lib/carriers.functions.d.ts +3151 -15
  46. package/dist-lib/lib/carriers.functions.d.ts.map +1 -1
  47. package/dist-lib/lib/carriers.functions.js +17 -2
  48. package/dist-lib/lib/cartAssignments.functions.d.ts +3145 -15
  49. package/dist-lib/lib/cartAssignments.functions.d.ts.map +1 -1
  50. package/dist-lib/lib/cartControl.functions.d.ts +99259 -0
  51. package/dist-lib/lib/cartControl.functions.d.ts.map +1 -0
  52. package/dist-lib/lib/cartControl.functions.js +489 -0
  53. package/dist-lib/lib/cartRescheduling.d.ts +30 -0
  54. package/dist-lib/lib/cartRescheduling.d.ts.map +1 -0
  55. package/dist-lib/lib/cartRescheduling.js +71 -0
  56. package/dist-lib/lib/floriday.functions.d.ts +629 -3
  57. package/dist-lib/lib/floriday.functions.d.ts.map +1 -1
  58. package/dist-lib/lib/pickstationI18n.d.ts +8 -0
  59. package/dist-lib/lib/pickstationI18n.d.ts.map +1 -1
  60. package/dist-lib/lib/pickstationI18n.js +48 -0
  61. package/dist-lib/lib/pickstationOrders.server.d.ts +1 -0
  62. package/dist-lib/lib/pickstationOrders.server.d.ts.map +1 -1
  63. package/dist-lib/lib/pickstationOrders.server.js +94 -7
  64. package/dist-lib/lib/pickstationTypes.d.ts +12 -0
  65. package/dist-lib/lib/pickstationTypes.d.ts.map +1 -1
  66. package/dist-lib/lib/planning.d.ts +23 -0
  67. package/dist-lib/lib/planning.d.ts.map +1 -1
  68. package/dist-lib/lib/planning.js +66 -6
  69. package/package.json +1 -1
@@ -21,6 +21,7 @@ export declare const listCartOverrides: import("@tanstack/start-client-core").Op
21
21
  max_workdays_earlier_pick: number;
22
22
  pick_days_before_transport: number;
23
23
  pick_distribution_enabled: boolean;
24
+ pick_weekdays: number[];
24
25
  signup_mail_enabled: boolean;
25
26
  signup_mail_lead_minutes: number;
26
27
  signup_mail_purpose: string;
@@ -34,6 +35,7 @@ export declare const listCartOverrides: import("@tanstack/start-client-core").Op
34
35
  max_workdays_earlier_pick?: number;
35
36
  pick_days_before_transport?: number;
36
37
  pick_distribution_enabled?: boolean;
38
+ pick_weekdays?: number[];
37
39
  signup_mail_enabled?: boolean;
38
40
  signup_mail_lead_minutes?: number;
39
41
  signup_mail_purpose?: string;
@@ -47,6 +49,7 @@ export declare const listCartOverrides: import("@tanstack/start-client-core").Op
47
49
  max_workdays_earlier_pick?: number;
48
50
  pick_days_before_transport?: number;
49
51
  pick_distribution_enabled?: boolean;
52
+ pick_weekdays?: number[];
50
53
  signup_mail_enabled?: boolean;
51
54
  signup_mail_lead_minutes?: number;
52
55
  signup_mail_purpose?: string;
@@ -458,6 +461,48 @@ export declare const listCartOverrides: import("@tanstack/start-client-core").Op
458
461
  referencedColumns: ["id"];
459
462
  }];
460
463
  };
464
+ carrier_signup_dispatch_runs: {
465
+ Row: {
466
+ detail: import("../integrations/supabase/types").Json | null;
467
+ error: string | null;
468
+ finished_at: string | null;
469
+ groups: number;
470
+ id: string;
471
+ ok: boolean;
472
+ reason: string | null;
473
+ sent: number;
474
+ skipped: import("../integrations/supabase/types").Json;
475
+ started_at: string;
476
+ unassigned: import("../integrations/supabase/types").Json;
477
+ };
478
+ Insert: {
479
+ detail?: import("../integrations/supabase/types").Json | null;
480
+ error?: string | null;
481
+ finished_at?: string | null;
482
+ groups?: number;
483
+ id?: string;
484
+ ok?: boolean;
485
+ reason?: string | null;
486
+ sent?: number;
487
+ skipped?: import("../integrations/supabase/types").Json;
488
+ started_at?: string;
489
+ unassigned?: import("../integrations/supabase/types").Json;
490
+ };
491
+ Update: {
492
+ detail?: import("../integrations/supabase/types").Json | null;
493
+ error?: string | null;
494
+ finished_at?: string | null;
495
+ groups?: number;
496
+ id?: string;
497
+ ok?: boolean;
498
+ reason?: string | null;
499
+ sent?: number;
500
+ skipped?: import("../integrations/supabase/types").Json;
501
+ started_at?: string;
502
+ unassigned?: import("../integrations/supabase/types").Json;
503
+ };
504
+ Relationships: [];
505
+ };
461
506
  carrier_signup_dispatches: {
462
507
  Row: {
463
508
  carrier_id: string;
@@ -509,6 +554,7 @@ export declare const listCartOverrides: import("@tanstack/start-client-core").Op
509
554
  contact_person: string | null;
510
555
  created_at: string;
511
556
  delivery_days: number | null;
557
+ delivery_weekdays: number[];
512
558
  email: string | null;
513
559
  id: string;
514
560
  is_default: boolean;
@@ -516,6 +562,7 @@ export declare const listCartOverrides: import("@tanstack/start-client-core").Op
516
562
  notes: string | null;
517
563
  phone: string | null;
518
564
  pickup_moments: import("../integrations/supabase/types").Json;
565
+ pickup_weekdays: number[];
519
566
  service_cities: string[];
520
567
  service_countries: string[];
521
568
  service_provinces: string[];
@@ -531,6 +578,7 @@ export declare const listCartOverrides: import("@tanstack/start-client-core").Op
531
578
  contact_person?: string | null;
532
579
  created_at?: string;
533
580
  delivery_days?: number | null;
581
+ delivery_weekdays?: number[];
534
582
  email?: string | null;
535
583
  id?: string;
536
584
  is_default?: boolean;
@@ -538,6 +586,7 @@ export declare const listCartOverrides: import("@tanstack/start-client-core").Op
538
586
  notes?: string | null;
539
587
  phone?: string | null;
540
588
  pickup_moments?: import("../integrations/supabase/types").Json;
589
+ pickup_weekdays?: number[];
541
590
  service_cities?: string[];
542
591
  service_countries?: string[];
543
592
  service_provinces?: string[];
@@ -553,6 +602,7 @@ export declare const listCartOverrides: import("@tanstack/start-client-core").Op
553
602
  contact_person?: string | null;
554
603
  created_at?: string;
555
604
  delivery_days?: number | null;
605
+ delivery_weekdays?: number[];
556
606
  email?: string | null;
557
607
  id?: string;
558
608
  is_default?: boolean;
@@ -560,6 +610,7 @@ export declare const listCartOverrides: import("@tanstack/start-client-core").Op
560
610
  notes?: string | null;
561
611
  phone?: string | null;
562
612
  pickup_moments?: import("../integrations/supabase/types").Json;
613
+ pickup_weekdays?: number[];
563
614
  service_cities?: string[];
564
615
  service_countries?: string[];
565
616
  service_provinces?: string[];
@@ -572,6 +623,177 @@ export declare const listCartOverrides: import("@tanstack/start-client-core").Op
572
623
  };
573
624
  Relationships: [];
574
625
  };
626
+ cart_control_draft: {
627
+ Row: {
628
+ cart_states: import("../integrations/supabase/types").Json;
629
+ checked_keys: import("../integrations/supabase/types").Json;
630
+ draft_date: string;
631
+ form_state: import("../integrations/supabase/types").Json;
632
+ notes: string;
633
+ updated_at: string;
634
+ user_id: string;
635
+ };
636
+ Insert: {
637
+ cart_states?: import("../integrations/supabase/types").Json;
638
+ checked_keys?: import("../integrations/supabase/types").Json;
639
+ draft_date: string;
640
+ form_state?: import("../integrations/supabase/types").Json;
641
+ notes?: string;
642
+ updated_at?: string;
643
+ user_id: string;
644
+ };
645
+ Update: {
646
+ cart_states?: import("../integrations/supabase/types").Json;
647
+ checked_keys?: import("../integrations/supabase/types").Json;
648
+ draft_date?: string;
649
+ form_state?: import("../integrations/supabase/types").Json;
650
+ notes?: string;
651
+ updated_at?: string;
652
+ user_id?: string;
653
+ };
654
+ Relationships: [];
655
+ };
656
+ cart_control_items: {
657
+ Row: {
658
+ action: string;
659
+ block_reason: string | null;
660
+ carrier_name: string | null;
661
+ cart_index: number;
662
+ cart_number_id: string | null;
663
+ cart_number_label: string | null;
664
+ created_at: string;
665
+ customer_name: string | null;
666
+ delivery_date: string | null;
667
+ id: string;
668
+ new_pick_date: string | null;
669
+ order_id: string;
670
+ order_number: string | null;
671
+ order_source: string;
672
+ pickup_date: string | null;
673
+ session_id: string;
674
+ };
675
+ Insert: {
676
+ action: string;
677
+ block_reason?: string | null;
678
+ carrier_name?: string | null;
679
+ cart_index: number;
680
+ cart_number_id?: string | null;
681
+ cart_number_label?: string | null;
682
+ created_at?: string;
683
+ customer_name?: string | null;
684
+ delivery_date?: string | null;
685
+ id?: string;
686
+ new_pick_date?: string | null;
687
+ order_id: string;
688
+ order_number?: string | null;
689
+ order_source: string;
690
+ pickup_date?: string | null;
691
+ session_id: string;
692
+ };
693
+ Update: {
694
+ action?: string;
695
+ block_reason?: string | null;
696
+ carrier_name?: string | null;
697
+ cart_index?: number;
698
+ cart_number_id?: string | null;
699
+ cart_number_label?: string | null;
700
+ created_at?: string;
701
+ customer_name?: string | null;
702
+ delivery_date?: string | null;
703
+ id?: string;
704
+ new_pick_date?: string | null;
705
+ order_id?: string;
706
+ order_number?: string | null;
707
+ order_source?: string;
708
+ pickup_date?: string | null;
709
+ session_id?: string;
710
+ };
711
+ Relationships: [{
712
+ foreignKeyName: "cart_control_items_session_id_fkey";
713
+ columns: ["session_id"];
714
+ isOneToOne: false;
715
+ referencedRelation: "cart_control_sessions";
716
+ referencedColumns: ["id"];
717
+ }];
718
+ };
719
+ cart_control_sessions: {
720
+ Row: {
721
+ blocked_count: number;
722
+ checked_count: number;
723
+ control_date: string;
724
+ created_at: string;
725
+ id: string;
726
+ notes: string | null;
727
+ performed_at: string;
728
+ rescheduled_count: number;
729
+ total_carts: number;
730
+ updated_at: string;
731
+ user_id: string;
732
+ };
733
+ Insert: {
734
+ blocked_count?: number;
735
+ checked_count?: number;
736
+ control_date?: string;
737
+ created_at?: string;
738
+ id?: string;
739
+ notes?: string | null;
740
+ performed_at?: string;
741
+ rescheduled_count?: number;
742
+ total_carts?: number;
743
+ updated_at?: string;
744
+ user_id: string;
745
+ };
746
+ Update: {
747
+ blocked_count?: number;
748
+ checked_count?: number;
749
+ control_date?: string;
750
+ created_at?: string;
751
+ id?: string;
752
+ notes?: string | null;
753
+ performed_at?: string;
754
+ rescheduled_count?: number;
755
+ total_carts?: number;
756
+ updated_at?: string;
757
+ user_id?: string;
758
+ };
759
+ Relationships: [];
760
+ };
761
+ cart_numbers: {
762
+ Row: {
763
+ assigned_at: string;
764
+ cart_index: number;
765
+ cart_number: string;
766
+ day_seq: number;
767
+ id: string;
768
+ order_id: string;
769
+ order_source: string;
770
+ pick_date: string;
771
+ status: string;
772
+ };
773
+ Insert: {
774
+ assigned_at?: string;
775
+ cart_index: number;
776
+ cart_number: string;
777
+ day_seq: number;
778
+ id?: string;
779
+ order_id: string;
780
+ order_source: string;
781
+ pick_date: string;
782
+ status?: string;
783
+ };
784
+ Update: {
785
+ assigned_at?: string;
786
+ cart_index?: number;
787
+ cart_number?: string;
788
+ day_seq?: number;
789
+ id?: string;
790
+ order_id?: string;
791
+ order_source?: string;
792
+ pick_date?: string;
793
+ status?: string;
794
+ };
795
+ Relationships: [];
796
+ };
575
797
  cart_pick_overrides: {
576
798
  Row: {
577
799
  cart_index: number;
@@ -1244,6 +1466,54 @@ export declare const listCartOverrides: import("@tanstack/start-client-core").Op
1244
1466
  referencedColumns: ["id"];
1245
1467
  }];
1246
1468
  };
1469
+ dashboard_critical_alerts: {
1470
+ Row: {
1471
+ alert_key: string;
1472
+ alert_type: string;
1473
+ created_at: string;
1474
+ description: string | null;
1475
+ id: string;
1476
+ metadata: import("../integrations/supabase/types").Json | null;
1477
+ priority: string;
1478
+ raised_at: string;
1479
+ related_cart_ids: string[] | null;
1480
+ resolved_at: string | null;
1481
+ title: string;
1482
+ updated_at: string;
1483
+ user_id: string;
1484
+ };
1485
+ Insert: {
1486
+ alert_key: string;
1487
+ alert_type: string;
1488
+ created_at?: string;
1489
+ description?: string | null;
1490
+ id?: string;
1491
+ metadata?: import("../integrations/supabase/types").Json | null;
1492
+ priority?: string;
1493
+ raised_at?: string;
1494
+ related_cart_ids?: string[] | null;
1495
+ resolved_at?: string | null;
1496
+ title: string;
1497
+ updated_at?: string;
1498
+ user_id: string;
1499
+ };
1500
+ Update: {
1501
+ alert_key?: string;
1502
+ alert_type?: string;
1503
+ created_at?: string;
1504
+ description?: string | null;
1505
+ id?: string;
1506
+ metadata?: import("../integrations/supabase/types").Json | null;
1507
+ priority?: string;
1508
+ raised_at?: string;
1509
+ related_cart_ids?: string[] | null;
1510
+ resolved_at?: string | null;
1511
+ title?: string;
1512
+ updated_at?: string;
1513
+ user_id?: string;
1514
+ };
1515
+ Relationships: [];
1516
+ };
1247
1517
  dashboard_daily_reports: {
1248
1518
  Row: {
1249
1519
  created_at: string;
@@ -2746,6 +3016,7 @@ export declare const listCartOverrides: import("@tanstack/start-client-core").Op
2746
3016
  };
2747
3017
  floricode_sync_state: {
2748
3018
  Row: {
3019
+ cursor_skip: number;
2749
3020
  error_message: string | null;
2750
3021
  last_change_date_time: string | null;
2751
3022
  last_sequence_number: number;
@@ -2755,6 +3026,7 @@ export declare const listCartOverrides: import("@tanstack/start-client-core").Op
2755
3026
  updated_at: string;
2756
3027
  };
2757
3028
  Insert: {
3029
+ cursor_skip?: number;
2758
3030
  error_message?: string | null;
2759
3031
  last_change_date_time?: string | null;
2760
3032
  last_sequence_number?: number;
@@ -2764,6 +3036,7 @@ export declare const listCartOverrides: import("@tanstack/start-client-core").Op
2764
3036
  updated_at?: string;
2765
3037
  };
2766
3038
  Update: {
3039
+ cursor_skip?: number;
2767
3040
  error_message?: string | null;
2768
3041
  last_change_date_time?: string | null;
2769
3042
  last_sequence_number?: number;
@@ -5111,6 +5384,93 @@ export declare const listCartOverrides: import("@tanstack/start-client-core").Op
5111
5384
  };
5112
5385
  Relationships: [];
5113
5386
  };
5387
+ manufacture_product_components: {
5388
+ Row: {
5389
+ component_type: string;
5390
+ created_at: string;
5391
+ id: string;
5392
+ manufacture_product_id: string;
5393
+ product_group_id: string | null;
5394
+ quantity: number;
5395
+ trade_item_id: string | null;
5396
+ unit: string;
5397
+ };
5398
+ Insert: {
5399
+ component_type: string;
5400
+ created_at?: string;
5401
+ id?: string;
5402
+ manufacture_product_id: string;
5403
+ product_group_id?: string | null;
5404
+ quantity?: number;
5405
+ trade_item_id?: string | null;
5406
+ unit?: string;
5407
+ };
5408
+ Update: {
5409
+ component_type?: string;
5410
+ created_at?: string;
5411
+ id?: string;
5412
+ manufacture_product_id?: string;
5413
+ product_group_id?: string | null;
5414
+ quantity?: number;
5415
+ trade_item_id?: string | null;
5416
+ unit?: string;
5417
+ };
5418
+ Relationships: [{
5419
+ foreignKeyName: "manufacture_product_components_manufacture_product_id_fkey";
5420
+ columns: ["manufacture_product_id"];
5421
+ isOneToOne: false;
5422
+ referencedRelation: "manufacture_product_possible_stock_view";
5423
+ referencedColumns: ["manufacture_product_id"];
5424
+ }, {
5425
+ foreignKeyName: "manufacture_product_components_manufacture_product_id_fkey";
5426
+ columns: ["manufacture_product_id"];
5427
+ isOneToOne: false;
5428
+ referencedRelation: "manufacture_products";
5429
+ referencedColumns: ["id"];
5430
+ }, {
5431
+ foreignKeyName: "manufacture_product_components_product_group_id_fkey";
5432
+ columns: ["product_group_id"];
5433
+ isOneToOne: false;
5434
+ referencedRelation: "product_groups";
5435
+ referencedColumns: ["id"];
5436
+ }];
5437
+ };
5438
+ manufacture_products: {
5439
+ Row: {
5440
+ created_at: string;
5441
+ description: string | null;
5442
+ id: string;
5443
+ is_active: boolean;
5444
+ name: string;
5445
+ produced_stock: number;
5446
+ product_code: string;
5447
+ tenant_id: string;
5448
+ updated_at: string;
5449
+ };
5450
+ Insert: {
5451
+ created_at?: string;
5452
+ description?: string | null;
5453
+ id?: string;
5454
+ is_active?: boolean;
5455
+ name: string;
5456
+ produced_stock?: number;
5457
+ product_code: string;
5458
+ tenant_id: string;
5459
+ updated_at?: string;
5460
+ };
5461
+ Update: {
5462
+ created_at?: string;
5463
+ description?: string | null;
5464
+ id?: string;
5465
+ is_active?: boolean;
5466
+ name?: string;
5467
+ produced_stock?: number;
5468
+ product_code?: string;
5469
+ tenant_id?: string;
5470
+ updated_at?: string;
5471
+ };
5472
+ Relationships: [];
5473
+ };
5114
5474
  monteurs: {
5115
5475
  Row: {
5116
5476
  avatar_url: string | null;
@@ -6071,6 +6431,66 @@ export declare const listCartOverrides: import("@tanstack/start-client-core").Op
6071
6431
  };
6072
6432
  Relationships: [];
6073
6433
  };
6434
+ product_group_items: {
6435
+ Row: {
6436
+ created_at: string;
6437
+ id: string;
6438
+ product_group_id: string;
6439
+ quantity: number;
6440
+ trade_item_id: string;
6441
+ };
6442
+ Insert: {
6443
+ created_at?: string;
6444
+ id?: string;
6445
+ product_group_id: string;
6446
+ quantity?: number;
6447
+ trade_item_id: string;
6448
+ };
6449
+ Update: {
6450
+ created_at?: string;
6451
+ id?: string;
6452
+ product_group_id?: string;
6453
+ quantity?: number;
6454
+ trade_item_id?: string;
6455
+ };
6456
+ Relationships: [{
6457
+ foreignKeyName: "product_group_items_product_group_id_fkey";
6458
+ columns: ["product_group_id"];
6459
+ isOneToOne: false;
6460
+ referencedRelation: "product_groups";
6461
+ referencedColumns: ["id"];
6462
+ }];
6463
+ };
6464
+ product_groups: {
6465
+ Row: {
6466
+ created_at: string;
6467
+ description: string | null;
6468
+ id: string;
6469
+ is_active: boolean;
6470
+ name: string;
6471
+ tenant_id: string;
6472
+ updated_at: string;
6473
+ };
6474
+ Insert: {
6475
+ created_at?: string;
6476
+ description?: string | null;
6477
+ id?: string;
6478
+ is_active?: boolean;
6479
+ name: string;
6480
+ tenant_id: string;
6481
+ updated_at?: string;
6482
+ };
6483
+ Update: {
6484
+ created_at?: string;
6485
+ description?: string | null;
6486
+ id?: string;
6487
+ is_active?: boolean;
6488
+ name?: string;
6489
+ tenant_id?: string;
6490
+ updated_at?: string;
6491
+ };
6492
+ Relationships: [];
6493
+ };
6074
6494
  products: {
6075
6495
  Row: {
6076
6496
  barcode: string | null;
@@ -7210,7 +7630,13 @@ export declare const listCartOverrides: import("@tanstack/start-client-core").Op
7210
7630
  connection_id: string | null;
7211
7631
  created_at: string;
7212
7632
  data: import("../integrations/supabase/types").Json;
7633
+ floriday_id: string | null;
7634
+ floriday_link_error: string | null;
7635
+ floriday_link_status: string;
7213
7636
  id: string;
7637
+ last_floriday_sync_at: string | null;
7638
+ missing_required_fields: string[];
7639
+ source: string;
7214
7640
  updated_at: string;
7215
7641
  user_id: string;
7216
7642
  };
@@ -7218,7 +7644,13 @@ export declare const listCartOverrides: import("@tanstack/start-client-core").Op
7218
7644
  connection_id?: string | null;
7219
7645
  created_at?: string;
7220
7646
  data?: import("../integrations/supabase/types").Json;
7647
+ floriday_id?: string | null;
7648
+ floriday_link_error?: string | null;
7649
+ floriday_link_status?: string;
7221
7650
  id?: string;
7651
+ last_floriday_sync_at?: string | null;
7652
+ missing_required_fields?: string[];
7653
+ source?: string;
7222
7654
  updated_at?: string;
7223
7655
  user_id: string;
7224
7656
  };
@@ -7226,7 +7658,55 @@ export declare const listCartOverrides: import("@tanstack/start-client-core").Op
7226
7658
  connection_id?: string | null;
7227
7659
  created_at?: string;
7228
7660
  data?: import("../integrations/supabase/types").Json;
7661
+ floriday_id?: string | null;
7662
+ floriday_link_error?: string | null;
7663
+ floriday_link_status?: string;
7229
7664
  id?: string;
7665
+ last_floriday_sync_at?: string | null;
7666
+ missing_required_fields?: string[];
7667
+ source?: string;
7668
+ updated_at?: string;
7669
+ user_id?: string;
7670
+ };
7671
+ Relationships: [];
7672
+ };
7673
+ trade_item_stock: {
7674
+ Row: {
7675
+ connection_id: string;
7676
+ created_at: string;
7677
+ id: string;
7678
+ incoming_stock: number;
7679
+ minimum_stock: number;
7680
+ notes: string | null;
7681
+ physical_stock: number;
7682
+ reserved_stock: number;
7683
+ trade_item_key: string;
7684
+ updated_at: string;
7685
+ user_id: string;
7686
+ };
7687
+ Insert: {
7688
+ connection_id: string;
7689
+ created_at?: string;
7690
+ id?: string;
7691
+ incoming_stock?: number;
7692
+ minimum_stock?: number;
7693
+ notes?: string | null;
7694
+ physical_stock?: number;
7695
+ reserved_stock?: number;
7696
+ trade_item_key: string;
7697
+ updated_at?: string;
7698
+ user_id: string;
7699
+ };
7700
+ Update: {
7701
+ connection_id?: string;
7702
+ created_at?: string;
7703
+ id?: string;
7704
+ incoming_stock?: number;
7705
+ minimum_stock?: number;
7706
+ notes?: string | null;
7707
+ physical_stock?: number;
7708
+ reserved_stock?: number;
7709
+ trade_item_key?: string;
7230
7710
  updated_at?: string;
7231
7711
  user_id?: string;
7232
7712
  };
@@ -7576,6 +8056,7 @@ export declare const listCartOverrides: import("@tanstack/start-client-core").Op
7576
8056
  };
7577
8057
  twinfield_invoice_sync_logs: {
7578
8058
  Row: {
8059
+ action_type: string | null;
7579
8060
  created_at: string;
7580
8061
  details: import("../integrations/supabase/types").Json | null;
7581
8062
  duration_ms: number | null;
@@ -7588,6 +8069,7 @@ export declare const listCartOverrides: import("@tanstack/start-client-core").Op
7588
8069
  user_id: string;
7589
8070
  };
7590
8071
  Insert: {
8072
+ action_type?: string | null;
7591
8073
  created_at?: string;
7592
8074
  details?: import("../integrations/supabase/types").Json | null;
7593
8075
  duration_ms?: number | null;
@@ -7600,6 +8082,7 @@ export declare const listCartOverrides: import("@tanstack/start-client-core").Op
7600
8082
  user_id: string;
7601
8083
  };
7602
8084
  Update: {
8085
+ action_type?: string | null;
7603
8086
  created_at?: string;
7604
8087
  details?: import("../integrations/supabase/types").Json | null;
7605
8088
  duration_ms?: number | null;
@@ -7835,6 +8318,57 @@ export declare const listCartOverrides: import("@tanstack/start-client-core").Op
7835
8318
  referencedColumns: ["id"];
7836
8319
  }];
7837
8320
  };
8321
+ twinfield_request_metrics: {
8322
+ Row: {
8323
+ bucket_hour: string;
8324
+ connection_id: string;
8325
+ error_count: number;
8326
+ rate_limited_count: number;
8327
+ request_count: number;
8328
+ updated_at: string;
8329
+ };
8330
+ Insert: {
8331
+ bucket_hour: string;
8332
+ connection_id: string;
8333
+ error_count?: number;
8334
+ rate_limited_count?: number;
8335
+ request_count?: number;
8336
+ updated_at?: string;
8337
+ };
8338
+ Update: {
8339
+ bucket_hour?: string;
8340
+ connection_id?: string;
8341
+ error_count?: number;
8342
+ rate_limited_count?: number;
8343
+ request_count?: number;
8344
+ updated_at?: string;
8345
+ };
8346
+ Relationships: [];
8347
+ };
8348
+ twinfield_session_cache: {
8349
+ Row: {
8350
+ cluster: string;
8351
+ created_at: string;
8352
+ expires_at: string;
8353
+ session_id: string;
8354
+ user_id: string;
8355
+ };
8356
+ Insert: {
8357
+ cluster: string;
8358
+ created_at?: string;
8359
+ expires_at: string;
8360
+ session_id: string;
8361
+ user_id: string;
8362
+ };
8363
+ Update: {
8364
+ cluster?: string;
8365
+ created_at?: string;
8366
+ expires_at?: string;
8367
+ session_id?: string;
8368
+ user_id?: string;
8369
+ };
8370
+ Relationships: [];
8371
+ };
7838
8372
  twinfield_settings: {
7839
8373
  Row: {
7840
8374
  active_environment: string;
@@ -8416,6 +8950,35 @@ export declare const listCartOverrides: import("@tanstack/start-client-core").Op
8416
8950
  };
8417
8951
  Relationships: [];
8418
8952
  };
8953
+ manufacture_product_possible_stock_view: {
8954
+ Row: {
8955
+ component_count: number | null;
8956
+ manufacture_product_id: string | null;
8957
+ possible_stock: number | null;
8958
+ };
8959
+ Relationships: [];
8960
+ };
8961
+ product_group_stock_view: {
8962
+ Row: {
8963
+ item_count: number | null;
8964
+ product_group_id: string | null;
8965
+ total_stock: number | null;
8966
+ };
8967
+ Relationships: [{
8968
+ foreignKeyName: "product_group_items_product_group_id_fkey";
8969
+ columns: ["product_group_id"];
8970
+ isOneToOne: false;
8971
+ referencedRelation: "product_groups";
8972
+ referencedColumns: ["id"];
8973
+ }];
8974
+ };
8975
+ trade_item_stock_view: {
8976
+ Row: {
8977
+ stock: number | null;
8978
+ trade_item_id: string | null;
8979
+ };
8980
+ Relationships: [];
8981
+ };
8419
8982
  v_external_customers_exact: {
8420
8983
  Row: {
8421
8984
  account_number: string | null;
@@ -8671,6 +9234,20 @@ export declare const listCartOverrides: import("@tanstack/start-client-core").Op
8671
9234
  };
8672
9235
  Returns: number;
8673
9236
  };
9237
+ assign_cart_numbers: {
9238
+ Args: {
9239
+ p_carts: import("../integrations/supabase/types").Json;
9240
+ };
9241
+ Returns: {
9242
+ cart_index: number;
9243
+ cart_number: string;
9244
+ day_seq: number;
9245
+ order_id: string;
9246
+ order_source: string;
9247
+ pick_date: string;
9248
+ status: string;
9249
+ }[];
9250
+ };
8674
9251
  assign_floriday_order_numbers: {
8675
9252
  Args: {
8676
9253
  p_ids: string[];
@@ -8690,10 +9267,37 @@ export declare const listCartOverrides: import("@tanstack/start-client-core").Op
8690
9267
  Args: never;
8691
9268
  Returns: number;
8692
9269
  };
9270
+ control_get_todays_carts: {
9271
+ Args: never;
9272
+ Returns: {
9273
+ cart_index: number;
9274
+ cart_number: string;
9275
+ cart_number_id: string;
9276
+ order_id: string;
9277
+ order_source: string;
9278
+ pick_date: string;
9279
+ status: string;
9280
+ }[];
9281
+ };
9282
+ count_distinct_regulatory_products: {
9283
+ Args: never;
9284
+ Returns: number;
9285
+ };
8693
9286
  current_monteur_id: {
8694
9287
  Args: never;
8695
9288
  Returns: string;
8696
9289
  };
9290
+ dashboard_alert_counts: {
9291
+ Args: never;
9292
+ Returns: import("../integrations/supabase/types").Json;
9293
+ };
9294
+ dashboard_alert_rows: {
9295
+ Args: {
9296
+ check_id: string;
9297
+ row_limit?: number;
9298
+ };
9299
+ Returns: import("../integrations/supabase/types").Json;
9300
+ };
8697
9301
  dashboard_list_public_schema: {
8698
9302
  Args: never;
8699
9303
  Returns: {
@@ -8774,6 +9378,13 @@ export declare const listCartOverrides: import("@tanstack/start-client-core").Op
8774
9378
  };
8775
9379
  Returns: boolean;
8776
9380
  };
9381
+ format_cart_number: {
9382
+ Args: {
9383
+ p_pick_date: string;
9384
+ p_seq: number;
9385
+ };
9386
+ Returns: string;
9387
+ };
8777
9388
  get_active_floriday_connection_public: {
8778
9389
  Args: never;
8779
9390
  Returns: {
@@ -8978,14 +9589,29 @@ export declare const listCartOverrides: import("@tanstack/start-client-core").Op
8978
9589
  };
8979
9590
  Returns: undefined;
8980
9591
  };
9592
+ pickstation_set_cart_status: {
9593
+ Args: {
9594
+ p_cart_index: number;
9595
+ p_order_id: string;
9596
+ p_order_source: string;
9597
+ p_status: string;
9598
+ };
9599
+ Returns: undefined;
9600
+ };
8981
9601
  refresh_floricode_derived_code_lists: {
8982
9602
  Args: never;
8983
9603
  Returns: {
8984
- out_environment: string;
8985
- out_list_name: string;
8986
- out_row_count: number;
9604
+ environment: string;
9605
+ list_name: string;
9606
+ row_count: number;
8987
9607
  }[];
8988
9608
  };
9609
+ refresh_floricode_derived_for_product: {
9610
+ Args: {
9611
+ p_product_code: string;
9612
+ };
9613
+ Returns: number;
9614
+ };
8989
9615
  reset_floriday_sync_cursor: {
8990
9616
  Args: {
8991
9617
  p_connection_id: string;
@@ -9315,6 +9941,7 @@ export declare const moveCart: import("@tanstack/start-client-core").RequiredFet
9315
9941
  max_workdays_earlier_pick: number;
9316
9942
  pick_days_before_transport: number;
9317
9943
  pick_distribution_enabled: boolean;
9944
+ pick_weekdays: number[];
9318
9945
  signup_mail_enabled: boolean;
9319
9946
  signup_mail_lead_minutes: number;
9320
9947
  signup_mail_purpose: string;
@@ -9328,6 +9955,7 @@ export declare const moveCart: import("@tanstack/start-client-core").RequiredFet
9328
9955
  max_workdays_earlier_pick?: number;
9329
9956
  pick_days_before_transport?: number;
9330
9957
  pick_distribution_enabled?: boolean;
9958
+ pick_weekdays?: number[];
9331
9959
  signup_mail_enabled?: boolean;
9332
9960
  signup_mail_lead_minutes?: number;
9333
9961
  signup_mail_purpose?: string;
@@ -9341,6 +9969,7 @@ export declare const moveCart: import("@tanstack/start-client-core").RequiredFet
9341
9969
  max_workdays_earlier_pick?: number;
9342
9970
  pick_days_before_transport?: number;
9343
9971
  pick_distribution_enabled?: boolean;
9972
+ pick_weekdays?: number[];
9344
9973
  signup_mail_enabled?: boolean;
9345
9974
  signup_mail_lead_minutes?: number;
9346
9975
  signup_mail_purpose?: string;
@@ -9752,6 +10381,48 @@ export declare const moveCart: import("@tanstack/start-client-core").RequiredFet
9752
10381
  referencedColumns: ["id"];
9753
10382
  }];
9754
10383
  };
10384
+ carrier_signup_dispatch_runs: {
10385
+ Row: {
10386
+ detail: import("../integrations/supabase/types").Json | null;
10387
+ error: string | null;
10388
+ finished_at: string | null;
10389
+ groups: number;
10390
+ id: string;
10391
+ ok: boolean;
10392
+ reason: string | null;
10393
+ sent: number;
10394
+ skipped: import("../integrations/supabase/types").Json;
10395
+ started_at: string;
10396
+ unassigned: import("../integrations/supabase/types").Json;
10397
+ };
10398
+ Insert: {
10399
+ detail?: import("../integrations/supabase/types").Json | null;
10400
+ error?: string | null;
10401
+ finished_at?: string | null;
10402
+ groups?: number;
10403
+ id?: string;
10404
+ ok?: boolean;
10405
+ reason?: string | null;
10406
+ sent?: number;
10407
+ skipped?: import("../integrations/supabase/types").Json;
10408
+ started_at?: string;
10409
+ unassigned?: import("../integrations/supabase/types").Json;
10410
+ };
10411
+ Update: {
10412
+ detail?: import("../integrations/supabase/types").Json | null;
10413
+ error?: string | null;
10414
+ finished_at?: string | null;
10415
+ groups?: number;
10416
+ id?: string;
10417
+ ok?: boolean;
10418
+ reason?: string | null;
10419
+ sent?: number;
10420
+ skipped?: import("../integrations/supabase/types").Json;
10421
+ started_at?: string;
10422
+ unassigned?: import("../integrations/supabase/types").Json;
10423
+ };
10424
+ Relationships: [];
10425
+ };
9755
10426
  carrier_signup_dispatches: {
9756
10427
  Row: {
9757
10428
  carrier_id: string;
@@ -9803,6 +10474,7 @@ export declare const moveCart: import("@tanstack/start-client-core").RequiredFet
9803
10474
  contact_person: string | null;
9804
10475
  created_at: string;
9805
10476
  delivery_days: number | null;
10477
+ delivery_weekdays: number[];
9806
10478
  email: string | null;
9807
10479
  id: string;
9808
10480
  is_default: boolean;
@@ -9810,6 +10482,7 @@ export declare const moveCart: import("@tanstack/start-client-core").RequiredFet
9810
10482
  notes: string | null;
9811
10483
  phone: string | null;
9812
10484
  pickup_moments: import("../integrations/supabase/types").Json;
10485
+ pickup_weekdays: number[];
9813
10486
  service_cities: string[];
9814
10487
  service_countries: string[];
9815
10488
  service_provinces: string[];
@@ -9825,6 +10498,7 @@ export declare const moveCart: import("@tanstack/start-client-core").RequiredFet
9825
10498
  contact_person?: string | null;
9826
10499
  created_at?: string;
9827
10500
  delivery_days?: number | null;
10501
+ delivery_weekdays?: number[];
9828
10502
  email?: string | null;
9829
10503
  id?: string;
9830
10504
  is_default?: boolean;
@@ -9832,6 +10506,7 @@ export declare const moveCart: import("@tanstack/start-client-core").RequiredFet
9832
10506
  notes?: string | null;
9833
10507
  phone?: string | null;
9834
10508
  pickup_moments?: import("../integrations/supabase/types").Json;
10509
+ pickup_weekdays?: number[];
9835
10510
  service_cities?: string[];
9836
10511
  service_countries?: string[];
9837
10512
  service_provinces?: string[];
@@ -9847,6 +10522,7 @@ export declare const moveCart: import("@tanstack/start-client-core").RequiredFet
9847
10522
  contact_person?: string | null;
9848
10523
  created_at?: string;
9849
10524
  delivery_days?: number | null;
10525
+ delivery_weekdays?: number[];
9850
10526
  email?: string | null;
9851
10527
  id?: string;
9852
10528
  is_default?: boolean;
@@ -9854,6 +10530,7 @@ export declare const moveCart: import("@tanstack/start-client-core").RequiredFet
9854
10530
  notes?: string | null;
9855
10531
  phone?: string | null;
9856
10532
  pickup_moments?: import("../integrations/supabase/types").Json;
10533
+ pickup_weekdays?: number[];
9857
10534
  service_cities?: string[];
9858
10535
  service_countries?: string[];
9859
10536
  service_provinces?: string[];
@@ -9866,6 +10543,177 @@ export declare const moveCart: import("@tanstack/start-client-core").RequiredFet
9866
10543
  };
9867
10544
  Relationships: [];
9868
10545
  };
10546
+ cart_control_draft: {
10547
+ Row: {
10548
+ cart_states: import("../integrations/supabase/types").Json;
10549
+ checked_keys: import("../integrations/supabase/types").Json;
10550
+ draft_date: string;
10551
+ form_state: import("../integrations/supabase/types").Json;
10552
+ notes: string;
10553
+ updated_at: string;
10554
+ user_id: string;
10555
+ };
10556
+ Insert: {
10557
+ cart_states?: import("../integrations/supabase/types").Json;
10558
+ checked_keys?: import("../integrations/supabase/types").Json;
10559
+ draft_date: string;
10560
+ form_state?: import("../integrations/supabase/types").Json;
10561
+ notes?: string;
10562
+ updated_at?: string;
10563
+ user_id: string;
10564
+ };
10565
+ Update: {
10566
+ cart_states?: import("../integrations/supabase/types").Json;
10567
+ checked_keys?: import("../integrations/supabase/types").Json;
10568
+ draft_date?: string;
10569
+ form_state?: import("../integrations/supabase/types").Json;
10570
+ notes?: string;
10571
+ updated_at?: string;
10572
+ user_id?: string;
10573
+ };
10574
+ Relationships: [];
10575
+ };
10576
+ cart_control_items: {
10577
+ Row: {
10578
+ action: string;
10579
+ block_reason: string | null;
10580
+ carrier_name: string | null;
10581
+ cart_index: number;
10582
+ cart_number_id: string | null;
10583
+ cart_number_label: string | null;
10584
+ created_at: string;
10585
+ customer_name: string | null;
10586
+ delivery_date: string | null;
10587
+ id: string;
10588
+ new_pick_date: string | null;
10589
+ order_id: string;
10590
+ order_number: string | null;
10591
+ order_source: string;
10592
+ pickup_date: string | null;
10593
+ session_id: string;
10594
+ };
10595
+ Insert: {
10596
+ action: string;
10597
+ block_reason?: string | null;
10598
+ carrier_name?: string | null;
10599
+ cart_index: number;
10600
+ cart_number_id?: string | null;
10601
+ cart_number_label?: string | null;
10602
+ created_at?: string;
10603
+ customer_name?: string | null;
10604
+ delivery_date?: string | null;
10605
+ id?: string;
10606
+ new_pick_date?: string | null;
10607
+ order_id: string;
10608
+ order_number?: string | null;
10609
+ order_source: string;
10610
+ pickup_date?: string | null;
10611
+ session_id: string;
10612
+ };
10613
+ Update: {
10614
+ action?: string;
10615
+ block_reason?: string | null;
10616
+ carrier_name?: string | null;
10617
+ cart_index?: number;
10618
+ cart_number_id?: string | null;
10619
+ cart_number_label?: string | null;
10620
+ created_at?: string;
10621
+ customer_name?: string | null;
10622
+ delivery_date?: string | null;
10623
+ id?: string;
10624
+ new_pick_date?: string | null;
10625
+ order_id?: string;
10626
+ order_number?: string | null;
10627
+ order_source?: string;
10628
+ pickup_date?: string | null;
10629
+ session_id?: string;
10630
+ };
10631
+ Relationships: [{
10632
+ foreignKeyName: "cart_control_items_session_id_fkey";
10633
+ columns: ["session_id"];
10634
+ isOneToOne: false;
10635
+ referencedRelation: "cart_control_sessions";
10636
+ referencedColumns: ["id"];
10637
+ }];
10638
+ };
10639
+ cart_control_sessions: {
10640
+ Row: {
10641
+ blocked_count: number;
10642
+ checked_count: number;
10643
+ control_date: string;
10644
+ created_at: string;
10645
+ id: string;
10646
+ notes: string | null;
10647
+ performed_at: string;
10648
+ rescheduled_count: number;
10649
+ total_carts: number;
10650
+ updated_at: string;
10651
+ user_id: string;
10652
+ };
10653
+ Insert: {
10654
+ blocked_count?: number;
10655
+ checked_count?: number;
10656
+ control_date?: string;
10657
+ created_at?: string;
10658
+ id?: string;
10659
+ notes?: string | null;
10660
+ performed_at?: string;
10661
+ rescheduled_count?: number;
10662
+ total_carts?: number;
10663
+ updated_at?: string;
10664
+ user_id: string;
10665
+ };
10666
+ Update: {
10667
+ blocked_count?: number;
10668
+ checked_count?: number;
10669
+ control_date?: string;
10670
+ created_at?: string;
10671
+ id?: string;
10672
+ notes?: string | null;
10673
+ performed_at?: string;
10674
+ rescheduled_count?: number;
10675
+ total_carts?: number;
10676
+ updated_at?: string;
10677
+ user_id?: string;
10678
+ };
10679
+ Relationships: [];
10680
+ };
10681
+ cart_numbers: {
10682
+ Row: {
10683
+ assigned_at: string;
10684
+ cart_index: number;
10685
+ cart_number: string;
10686
+ day_seq: number;
10687
+ id: string;
10688
+ order_id: string;
10689
+ order_source: string;
10690
+ pick_date: string;
10691
+ status: string;
10692
+ };
10693
+ Insert: {
10694
+ assigned_at?: string;
10695
+ cart_index: number;
10696
+ cart_number: string;
10697
+ day_seq: number;
10698
+ id?: string;
10699
+ order_id: string;
10700
+ order_source: string;
10701
+ pick_date: string;
10702
+ status?: string;
10703
+ };
10704
+ Update: {
10705
+ assigned_at?: string;
10706
+ cart_index?: number;
10707
+ cart_number?: string;
10708
+ day_seq?: number;
10709
+ id?: string;
10710
+ order_id?: string;
10711
+ order_source?: string;
10712
+ pick_date?: string;
10713
+ status?: string;
10714
+ };
10715
+ Relationships: [];
10716
+ };
9869
10717
  cart_pick_overrides: {
9870
10718
  Row: {
9871
10719
  cart_index: number;
@@ -10538,6 +11386,54 @@ export declare const moveCart: import("@tanstack/start-client-core").RequiredFet
10538
11386
  referencedColumns: ["id"];
10539
11387
  }];
10540
11388
  };
11389
+ dashboard_critical_alerts: {
11390
+ Row: {
11391
+ alert_key: string;
11392
+ alert_type: string;
11393
+ created_at: string;
11394
+ description: string | null;
11395
+ id: string;
11396
+ metadata: import("../integrations/supabase/types").Json | null;
11397
+ priority: string;
11398
+ raised_at: string;
11399
+ related_cart_ids: string[] | null;
11400
+ resolved_at: string | null;
11401
+ title: string;
11402
+ updated_at: string;
11403
+ user_id: string;
11404
+ };
11405
+ Insert: {
11406
+ alert_key: string;
11407
+ alert_type: string;
11408
+ created_at?: string;
11409
+ description?: string | null;
11410
+ id?: string;
11411
+ metadata?: import("../integrations/supabase/types").Json | null;
11412
+ priority?: string;
11413
+ raised_at?: string;
11414
+ related_cart_ids?: string[] | null;
11415
+ resolved_at?: string | null;
11416
+ title: string;
11417
+ updated_at?: string;
11418
+ user_id: string;
11419
+ };
11420
+ Update: {
11421
+ alert_key?: string;
11422
+ alert_type?: string;
11423
+ created_at?: string;
11424
+ description?: string | null;
11425
+ id?: string;
11426
+ metadata?: import("../integrations/supabase/types").Json | null;
11427
+ priority?: string;
11428
+ raised_at?: string;
11429
+ related_cart_ids?: string[] | null;
11430
+ resolved_at?: string | null;
11431
+ title?: string;
11432
+ updated_at?: string;
11433
+ user_id?: string;
11434
+ };
11435
+ Relationships: [];
11436
+ };
10541
11437
  dashboard_daily_reports: {
10542
11438
  Row: {
10543
11439
  created_at: string;
@@ -12040,6 +12936,7 @@ export declare const moveCart: import("@tanstack/start-client-core").RequiredFet
12040
12936
  };
12041
12937
  floricode_sync_state: {
12042
12938
  Row: {
12939
+ cursor_skip: number;
12043
12940
  error_message: string | null;
12044
12941
  last_change_date_time: string | null;
12045
12942
  last_sequence_number: number;
@@ -12049,6 +12946,7 @@ export declare const moveCart: import("@tanstack/start-client-core").RequiredFet
12049
12946
  updated_at: string;
12050
12947
  };
12051
12948
  Insert: {
12949
+ cursor_skip?: number;
12052
12950
  error_message?: string | null;
12053
12951
  last_change_date_time?: string | null;
12054
12952
  last_sequence_number?: number;
@@ -12058,6 +12956,7 @@ export declare const moveCart: import("@tanstack/start-client-core").RequiredFet
12058
12956
  updated_at?: string;
12059
12957
  };
12060
12958
  Update: {
12959
+ cursor_skip?: number;
12061
12960
  error_message?: string | null;
12062
12961
  last_change_date_time?: string | null;
12063
12962
  last_sequence_number?: number;
@@ -14405,6 +15304,93 @@ export declare const moveCart: import("@tanstack/start-client-core").RequiredFet
14405
15304
  };
14406
15305
  Relationships: [];
14407
15306
  };
15307
+ manufacture_product_components: {
15308
+ Row: {
15309
+ component_type: string;
15310
+ created_at: string;
15311
+ id: string;
15312
+ manufacture_product_id: string;
15313
+ product_group_id: string | null;
15314
+ quantity: number;
15315
+ trade_item_id: string | null;
15316
+ unit: string;
15317
+ };
15318
+ Insert: {
15319
+ component_type: string;
15320
+ created_at?: string;
15321
+ id?: string;
15322
+ manufacture_product_id: string;
15323
+ product_group_id?: string | null;
15324
+ quantity?: number;
15325
+ trade_item_id?: string | null;
15326
+ unit?: string;
15327
+ };
15328
+ Update: {
15329
+ component_type?: string;
15330
+ created_at?: string;
15331
+ id?: string;
15332
+ manufacture_product_id?: string;
15333
+ product_group_id?: string | null;
15334
+ quantity?: number;
15335
+ trade_item_id?: string | null;
15336
+ unit?: string;
15337
+ };
15338
+ Relationships: [{
15339
+ foreignKeyName: "manufacture_product_components_manufacture_product_id_fkey";
15340
+ columns: ["manufacture_product_id"];
15341
+ isOneToOne: false;
15342
+ referencedRelation: "manufacture_product_possible_stock_view";
15343
+ referencedColumns: ["manufacture_product_id"];
15344
+ }, {
15345
+ foreignKeyName: "manufacture_product_components_manufacture_product_id_fkey";
15346
+ columns: ["manufacture_product_id"];
15347
+ isOneToOne: false;
15348
+ referencedRelation: "manufacture_products";
15349
+ referencedColumns: ["id"];
15350
+ }, {
15351
+ foreignKeyName: "manufacture_product_components_product_group_id_fkey";
15352
+ columns: ["product_group_id"];
15353
+ isOneToOne: false;
15354
+ referencedRelation: "product_groups";
15355
+ referencedColumns: ["id"];
15356
+ }];
15357
+ };
15358
+ manufacture_products: {
15359
+ Row: {
15360
+ created_at: string;
15361
+ description: string | null;
15362
+ id: string;
15363
+ is_active: boolean;
15364
+ name: string;
15365
+ produced_stock: number;
15366
+ product_code: string;
15367
+ tenant_id: string;
15368
+ updated_at: string;
15369
+ };
15370
+ Insert: {
15371
+ created_at?: string;
15372
+ description?: string | null;
15373
+ id?: string;
15374
+ is_active?: boolean;
15375
+ name: string;
15376
+ produced_stock?: number;
15377
+ product_code: string;
15378
+ tenant_id: string;
15379
+ updated_at?: string;
15380
+ };
15381
+ Update: {
15382
+ created_at?: string;
15383
+ description?: string | null;
15384
+ id?: string;
15385
+ is_active?: boolean;
15386
+ name?: string;
15387
+ produced_stock?: number;
15388
+ product_code?: string;
15389
+ tenant_id?: string;
15390
+ updated_at?: string;
15391
+ };
15392
+ Relationships: [];
15393
+ };
14408
15394
  monteurs: {
14409
15395
  Row: {
14410
15396
  avatar_url: string | null;
@@ -15365,6 +16351,66 @@ export declare const moveCart: import("@tanstack/start-client-core").RequiredFet
15365
16351
  };
15366
16352
  Relationships: [];
15367
16353
  };
16354
+ product_group_items: {
16355
+ Row: {
16356
+ created_at: string;
16357
+ id: string;
16358
+ product_group_id: string;
16359
+ quantity: number;
16360
+ trade_item_id: string;
16361
+ };
16362
+ Insert: {
16363
+ created_at?: string;
16364
+ id?: string;
16365
+ product_group_id: string;
16366
+ quantity?: number;
16367
+ trade_item_id: string;
16368
+ };
16369
+ Update: {
16370
+ created_at?: string;
16371
+ id?: string;
16372
+ product_group_id?: string;
16373
+ quantity?: number;
16374
+ trade_item_id?: string;
16375
+ };
16376
+ Relationships: [{
16377
+ foreignKeyName: "product_group_items_product_group_id_fkey";
16378
+ columns: ["product_group_id"];
16379
+ isOneToOne: false;
16380
+ referencedRelation: "product_groups";
16381
+ referencedColumns: ["id"];
16382
+ }];
16383
+ };
16384
+ product_groups: {
16385
+ Row: {
16386
+ created_at: string;
16387
+ description: string | null;
16388
+ id: string;
16389
+ is_active: boolean;
16390
+ name: string;
16391
+ tenant_id: string;
16392
+ updated_at: string;
16393
+ };
16394
+ Insert: {
16395
+ created_at?: string;
16396
+ description?: string | null;
16397
+ id?: string;
16398
+ is_active?: boolean;
16399
+ name: string;
16400
+ tenant_id: string;
16401
+ updated_at?: string;
16402
+ };
16403
+ Update: {
16404
+ created_at?: string;
16405
+ description?: string | null;
16406
+ id?: string;
16407
+ is_active?: boolean;
16408
+ name?: string;
16409
+ tenant_id?: string;
16410
+ updated_at?: string;
16411
+ };
16412
+ Relationships: [];
16413
+ };
15368
16414
  products: {
15369
16415
  Row: {
15370
16416
  barcode: string | null;
@@ -16504,7 +17550,13 @@ export declare const moveCart: import("@tanstack/start-client-core").RequiredFet
16504
17550
  connection_id: string | null;
16505
17551
  created_at: string;
16506
17552
  data: import("../integrations/supabase/types").Json;
17553
+ floriday_id: string | null;
17554
+ floriday_link_error: string | null;
17555
+ floriday_link_status: string;
16507
17556
  id: string;
17557
+ last_floriday_sync_at: string | null;
17558
+ missing_required_fields: string[];
17559
+ source: string;
16508
17560
  updated_at: string;
16509
17561
  user_id: string;
16510
17562
  };
@@ -16512,7 +17564,13 @@ export declare const moveCart: import("@tanstack/start-client-core").RequiredFet
16512
17564
  connection_id?: string | null;
16513
17565
  created_at?: string;
16514
17566
  data?: import("../integrations/supabase/types").Json;
17567
+ floriday_id?: string | null;
17568
+ floriday_link_error?: string | null;
17569
+ floriday_link_status?: string;
16515
17570
  id?: string;
17571
+ last_floriday_sync_at?: string | null;
17572
+ missing_required_fields?: string[];
17573
+ source?: string;
16516
17574
  updated_at?: string;
16517
17575
  user_id: string;
16518
17576
  };
@@ -16520,7 +17578,55 @@ export declare const moveCart: import("@tanstack/start-client-core").RequiredFet
16520
17578
  connection_id?: string | null;
16521
17579
  created_at?: string;
16522
17580
  data?: import("../integrations/supabase/types").Json;
17581
+ floriday_id?: string | null;
17582
+ floriday_link_error?: string | null;
17583
+ floriday_link_status?: string;
16523
17584
  id?: string;
17585
+ last_floriday_sync_at?: string | null;
17586
+ missing_required_fields?: string[];
17587
+ source?: string;
17588
+ updated_at?: string;
17589
+ user_id?: string;
17590
+ };
17591
+ Relationships: [];
17592
+ };
17593
+ trade_item_stock: {
17594
+ Row: {
17595
+ connection_id: string;
17596
+ created_at: string;
17597
+ id: string;
17598
+ incoming_stock: number;
17599
+ minimum_stock: number;
17600
+ notes: string | null;
17601
+ physical_stock: number;
17602
+ reserved_stock: number;
17603
+ trade_item_key: string;
17604
+ updated_at: string;
17605
+ user_id: string;
17606
+ };
17607
+ Insert: {
17608
+ connection_id: string;
17609
+ created_at?: string;
17610
+ id?: string;
17611
+ incoming_stock?: number;
17612
+ minimum_stock?: number;
17613
+ notes?: string | null;
17614
+ physical_stock?: number;
17615
+ reserved_stock?: number;
17616
+ trade_item_key: string;
17617
+ updated_at?: string;
17618
+ user_id: string;
17619
+ };
17620
+ Update: {
17621
+ connection_id?: string;
17622
+ created_at?: string;
17623
+ id?: string;
17624
+ incoming_stock?: number;
17625
+ minimum_stock?: number;
17626
+ notes?: string | null;
17627
+ physical_stock?: number;
17628
+ reserved_stock?: number;
17629
+ trade_item_key?: string;
16524
17630
  updated_at?: string;
16525
17631
  user_id?: string;
16526
17632
  };
@@ -16870,6 +17976,7 @@ export declare const moveCart: import("@tanstack/start-client-core").RequiredFet
16870
17976
  };
16871
17977
  twinfield_invoice_sync_logs: {
16872
17978
  Row: {
17979
+ action_type: string | null;
16873
17980
  created_at: string;
16874
17981
  details: import("../integrations/supabase/types").Json | null;
16875
17982
  duration_ms: number | null;
@@ -16882,6 +17989,7 @@ export declare const moveCart: import("@tanstack/start-client-core").RequiredFet
16882
17989
  user_id: string;
16883
17990
  };
16884
17991
  Insert: {
17992
+ action_type?: string | null;
16885
17993
  created_at?: string;
16886
17994
  details?: import("../integrations/supabase/types").Json | null;
16887
17995
  duration_ms?: number | null;
@@ -16894,6 +18002,7 @@ export declare const moveCart: import("@tanstack/start-client-core").RequiredFet
16894
18002
  user_id: string;
16895
18003
  };
16896
18004
  Update: {
18005
+ action_type?: string | null;
16897
18006
  created_at?: string;
16898
18007
  details?: import("../integrations/supabase/types").Json | null;
16899
18008
  duration_ms?: number | null;
@@ -17129,6 +18238,57 @@ export declare const moveCart: import("@tanstack/start-client-core").RequiredFet
17129
18238
  referencedColumns: ["id"];
17130
18239
  }];
17131
18240
  };
18241
+ twinfield_request_metrics: {
18242
+ Row: {
18243
+ bucket_hour: string;
18244
+ connection_id: string;
18245
+ error_count: number;
18246
+ rate_limited_count: number;
18247
+ request_count: number;
18248
+ updated_at: string;
18249
+ };
18250
+ Insert: {
18251
+ bucket_hour: string;
18252
+ connection_id: string;
18253
+ error_count?: number;
18254
+ rate_limited_count?: number;
18255
+ request_count?: number;
18256
+ updated_at?: string;
18257
+ };
18258
+ Update: {
18259
+ bucket_hour?: string;
18260
+ connection_id?: string;
18261
+ error_count?: number;
18262
+ rate_limited_count?: number;
18263
+ request_count?: number;
18264
+ updated_at?: string;
18265
+ };
18266
+ Relationships: [];
18267
+ };
18268
+ twinfield_session_cache: {
18269
+ Row: {
18270
+ cluster: string;
18271
+ created_at: string;
18272
+ expires_at: string;
18273
+ session_id: string;
18274
+ user_id: string;
18275
+ };
18276
+ Insert: {
18277
+ cluster: string;
18278
+ created_at?: string;
18279
+ expires_at: string;
18280
+ session_id: string;
18281
+ user_id: string;
18282
+ };
18283
+ Update: {
18284
+ cluster?: string;
18285
+ created_at?: string;
18286
+ expires_at?: string;
18287
+ session_id?: string;
18288
+ user_id?: string;
18289
+ };
18290
+ Relationships: [];
18291
+ };
17132
18292
  twinfield_settings: {
17133
18293
  Row: {
17134
18294
  active_environment: string;
@@ -17710,6 +18870,35 @@ export declare const moveCart: import("@tanstack/start-client-core").RequiredFet
17710
18870
  };
17711
18871
  Relationships: [];
17712
18872
  };
18873
+ manufacture_product_possible_stock_view: {
18874
+ Row: {
18875
+ component_count: number | null;
18876
+ manufacture_product_id: string | null;
18877
+ possible_stock: number | null;
18878
+ };
18879
+ Relationships: [];
18880
+ };
18881
+ product_group_stock_view: {
18882
+ Row: {
18883
+ item_count: number | null;
18884
+ product_group_id: string | null;
18885
+ total_stock: number | null;
18886
+ };
18887
+ Relationships: [{
18888
+ foreignKeyName: "product_group_items_product_group_id_fkey";
18889
+ columns: ["product_group_id"];
18890
+ isOneToOne: false;
18891
+ referencedRelation: "product_groups";
18892
+ referencedColumns: ["id"];
18893
+ }];
18894
+ };
18895
+ trade_item_stock_view: {
18896
+ Row: {
18897
+ stock: number | null;
18898
+ trade_item_id: string | null;
18899
+ };
18900
+ Relationships: [];
18901
+ };
17713
18902
  v_external_customers_exact: {
17714
18903
  Row: {
17715
18904
  account_number: string | null;
@@ -17965,6 +19154,20 @@ export declare const moveCart: import("@tanstack/start-client-core").RequiredFet
17965
19154
  };
17966
19155
  Returns: number;
17967
19156
  };
19157
+ assign_cart_numbers: {
19158
+ Args: {
19159
+ p_carts: import("../integrations/supabase/types").Json;
19160
+ };
19161
+ Returns: {
19162
+ cart_index: number;
19163
+ cart_number: string;
19164
+ day_seq: number;
19165
+ order_id: string;
19166
+ order_source: string;
19167
+ pick_date: string;
19168
+ status: string;
19169
+ }[];
19170
+ };
17968
19171
  assign_floriday_order_numbers: {
17969
19172
  Args: {
17970
19173
  p_ids: string[];
@@ -17984,10 +19187,37 @@ export declare const moveCart: import("@tanstack/start-client-core").RequiredFet
17984
19187
  Args: never;
17985
19188
  Returns: number;
17986
19189
  };
19190
+ control_get_todays_carts: {
19191
+ Args: never;
19192
+ Returns: {
19193
+ cart_index: number;
19194
+ cart_number: string;
19195
+ cart_number_id: string;
19196
+ order_id: string;
19197
+ order_source: string;
19198
+ pick_date: string;
19199
+ status: string;
19200
+ }[];
19201
+ };
19202
+ count_distinct_regulatory_products: {
19203
+ Args: never;
19204
+ Returns: number;
19205
+ };
17987
19206
  current_monteur_id: {
17988
19207
  Args: never;
17989
19208
  Returns: string;
17990
19209
  };
19210
+ dashboard_alert_counts: {
19211
+ Args: never;
19212
+ Returns: import("../integrations/supabase/types").Json;
19213
+ };
19214
+ dashboard_alert_rows: {
19215
+ Args: {
19216
+ check_id: string;
19217
+ row_limit?: number;
19218
+ };
19219
+ Returns: import("../integrations/supabase/types").Json;
19220
+ };
17991
19221
  dashboard_list_public_schema: {
17992
19222
  Args: never;
17993
19223
  Returns: {
@@ -18068,6 +19298,13 @@ export declare const moveCart: import("@tanstack/start-client-core").RequiredFet
18068
19298
  };
18069
19299
  Returns: boolean;
18070
19300
  };
19301
+ format_cart_number: {
19302
+ Args: {
19303
+ p_pick_date: string;
19304
+ p_seq: number;
19305
+ };
19306
+ Returns: string;
19307
+ };
18071
19308
  get_active_floriday_connection_public: {
18072
19309
  Args: never;
18073
19310
  Returns: {
@@ -18272,14 +19509,29 @@ export declare const moveCart: import("@tanstack/start-client-core").RequiredFet
18272
19509
  };
18273
19510
  Returns: undefined;
18274
19511
  };
19512
+ pickstation_set_cart_status: {
19513
+ Args: {
19514
+ p_cart_index: number;
19515
+ p_order_id: string;
19516
+ p_order_source: string;
19517
+ p_status: string;
19518
+ };
19519
+ Returns: undefined;
19520
+ };
18275
19521
  refresh_floricode_derived_code_lists: {
18276
19522
  Args: never;
18277
19523
  Returns: {
18278
- out_environment: string;
18279
- out_list_name: string;
18280
- out_row_count: number;
19524
+ environment: string;
19525
+ list_name: string;
19526
+ row_count: number;
18281
19527
  }[];
18282
19528
  };
19529
+ refresh_floricode_derived_for_product: {
19530
+ Args: {
19531
+ p_product_code: string;
19532
+ };
19533
+ Returns: number;
19534
+ };
18283
19535
  reset_floriday_sync_cursor: {
18284
19536
  Args: {
18285
19537
  p_connection_id: string;
@@ -18603,6 +19855,7 @@ export declare const resetCartOverride: import("@tanstack/start-client-core").Re
18603
19855
  max_workdays_earlier_pick: number;
18604
19856
  pick_days_before_transport: number;
18605
19857
  pick_distribution_enabled: boolean;
19858
+ pick_weekdays: number[];
18606
19859
  signup_mail_enabled: boolean;
18607
19860
  signup_mail_lead_minutes: number;
18608
19861
  signup_mail_purpose: string;
@@ -18616,6 +19869,7 @@ export declare const resetCartOverride: import("@tanstack/start-client-core").Re
18616
19869
  max_workdays_earlier_pick?: number;
18617
19870
  pick_days_before_transport?: number;
18618
19871
  pick_distribution_enabled?: boolean;
19872
+ pick_weekdays?: number[];
18619
19873
  signup_mail_enabled?: boolean;
18620
19874
  signup_mail_lead_minutes?: number;
18621
19875
  signup_mail_purpose?: string;
@@ -18629,6 +19883,7 @@ export declare const resetCartOverride: import("@tanstack/start-client-core").Re
18629
19883
  max_workdays_earlier_pick?: number;
18630
19884
  pick_days_before_transport?: number;
18631
19885
  pick_distribution_enabled?: boolean;
19886
+ pick_weekdays?: number[];
18632
19887
  signup_mail_enabled?: boolean;
18633
19888
  signup_mail_lead_minutes?: number;
18634
19889
  signup_mail_purpose?: string;
@@ -19040,6 +20295,48 @@ export declare const resetCartOverride: import("@tanstack/start-client-core").Re
19040
20295
  referencedColumns: ["id"];
19041
20296
  }];
19042
20297
  };
20298
+ carrier_signup_dispatch_runs: {
20299
+ Row: {
20300
+ detail: import("../integrations/supabase/types").Json | null;
20301
+ error: string | null;
20302
+ finished_at: string | null;
20303
+ groups: number;
20304
+ id: string;
20305
+ ok: boolean;
20306
+ reason: string | null;
20307
+ sent: number;
20308
+ skipped: import("../integrations/supabase/types").Json;
20309
+ started_at: string;
20310
+ unassigned: import("../integrations/supabase/types").Json;
20311
+ };
20312
+ Insert: {
20313
+ detail?: import("../integrations/supabase/types").Json | null;
20314
+ error?: string | null;
20315
+ finished_at?: string | null;
20316
+ groups?: number;
20317
+ id?: string;
20318
+ ok?: boolean;
20319
+ reason?: string | null;
20320
+ sent?: number;
20321
+ skipped?: import("../integrations/supabase/types").Json;
20322
+ started_at?: string;
20323
+ unassigned?: import("../integrations/supabase/types").Json;
20324
+ };
20325
+ Update: {
20326
+ detail?: import("../integrations/supabase/types").Json | null;
20327
+ error?: string | null;
20328
+ finished_at?: string | null;
20329
+ groups?: number;
20330
+ id?: string;
20331
+ ok?: boolean;
20332
+ reason?: string | null;
20333
+ sent?: number;
20334
+ skipped?: import("../integrations/supabase/types").Json;
20335
+ started_at?: string;
20336
+ unassigned?: import("../integrations/supabase/types").Json;
20337
+ };
20338
+ Relationships: [];
20339
+ };
19043
20340
  carrier_signup_dispatches: {
19044
20341
  Row: {
19045
20342
  carrier_id: string;
@@ -19091,6 +20388,7 @@ export declare const resetCartOverride: import("@tanstack/start-client-core").Re
19091
20388
  contact_person: string | null;
19092
20389
  created_at: string;
19093
20390
  delivery_days: number | null;
20391
+ delivery_weekdays: number[];
19094
20392
  email: string | null;
19095
20393
  id: string;
19096
20394
  is_default: boolean;
@@ -19098,6 +20396,7 @@ export declare const resetCartOverride: import("@tanstack/start-client-core").Re
19098
20396
  notes: string | null;
19099
20397
  phone: string | null;
19100
20398
  pickup_moments: import("../integrations/supabase/types").Json;
20399
+ pickup_weekdays: number[];
19101
20400
  service_cities: string[];
19102
20401
  service_countries: string[];
19103
20402
  service_provinces: string[];
@@ -19113,6 +20412,7 @@ export declare const resetCartOverride: import("@tanstack/start-client-core").Re
19113
20412
  contact_person?: string | null;
19114
20413
  created_at?: string;
19115
20414
  delivery_days?: number | null;
20415
+ delivery_weekdays?: number[];
19116
20416
  email?: string | null;
19117
20417
  id?: string;
19118
20418
  is_default?: boolean;
@@ -19120,6 +20420,7 @@ export declare const resetCartOverride: import("@tanstack/start-client-core").Re
19120
20420
  notes?: string | null;
19121
20421
  phone?: string | null;
19122
20422
  pickup_moments?: import("../integrations/supabase/types").Json;
20423
+ pickup_weekdays?: number[];
19123
20424
  service_cities?: string[];
19124
20425
  service_countries?: string[];
19125
20426
  service_provinces?: string[];
@@ -19135,6 +20436,7 @@ export declare const resetCartOverride: import("@tanstack/start-client-core").Re
19135
20436
  contact_person?: string | null;
19136
20437
  created_at?: string;
19137
20438
  delivery_days?: number | null;
20439
+ delivery_weekdays?: number[];
19138
20440
  email?: string | null;
19139
20441
  id?: string;
19140
20442
  is_default?: boolean;
@@ -19142,6 +20444,7 @@ export declare const resetCartOverride: import("@tanstack/start-client-core").Re
19142
20444
  notes?: string | null;
19143
20445
  phone?: string | null;
19144
20446
  pickup_moments?: import("../integrations/supabase/types").Json;
20447
+ pickup_weekdays?: number[];
19145
20448
  service_cities?: string[];
19146
20449
  service_countries?: string[];
19147
20450
  service_provinces?: string[];
@@ -19154,6 +20457,177 @@ export declare const resetCartOverride: import("@tanstack/start-client-core").Re
19154
20457
  };
19155
20458
  Relationships: [];
19156
20459
  };
20460
+ cart_control_draft: {
20461
+ Row: {
20462
+ cart_states: import("../integrations/supabase/types").Json;
20463
+ checked_keys: import("../integrations/supabase/types").Json;
20464
+ draft_date: string;
20465
+ form_state: import("../integrations/supabase/types").Json;
20466
+ notes: string;
20467
+ updated_at: string;
20468
+ user_id: string;
20469
+ };
20470
+ Insert: {
20471
+ cart_states?: import("../integrations/supabase/types").Json;
20472
+ checked_keys?: import("../integrations/supabase/types").Json;
20473
+ draft_date: string;
20474
+ form_state?: import("../integrations/supabase/types").Json;
20475
+ notes?: string;
20476
+ updated_at?: string;
20477
+ user_id: string;
20478
+ };
20479
+ Update: {
20480
+ cart_states?: import("../integrations/supabase/types").Json;
20481
+ checked_keys?: import("../integrations/supabase/types").Json;
20482
+ draft_date?: string;
20483
+ form_state?: import("../integrations/supabase/types").Json;
20484
+ notes?: string;
20485
+ updated_at?: string;
20486
+ user_id?: string;
20487
+ };
20488
+ Relationships: [];
20489
+ };
20490
+ cart_control_items: {
20491
+ Row: {
20492
+ action: string;
20493
+ block_reason: string | null;
20494
+ carrier_name: string | null;
20495
+ cart_index: number;
20496
+ cart_number_id: string | null;
20497
+ cart_number_label: string | null;
20498
+ created_at: string;
20499
+ customer_name: string | null;
20500
+ delivery_date: string | null;
20501
+ id: string;
20502
+ new_pick_date: string | null;
20503
+ order_id: string;
20504
+ order_number: string | null;
20505
+ order_source: string;
20506
+ pickup_date: string | null;
20507
+ session_id: string;
20508
+ };
20509
+ Insert: {
20510
+ action: string;
20511
+ block_reason?: string | null;
20512
+ carrier_name?: string | null;
20513
+ cart_index: number;
20514
+ cart_number_id?: string | null;
20515
+ cart_number_label?: string | null;
20516
+ created_at?: string;
20517
+ customer_name?: string | null;
20518
+ delivery_date?: string | null;
20519
+ id?: string;
20520
+ new_pick_date?: string | null;
20521
+ order_id: string;
20522
+ order_number?: string | null;
20523
+ order_source: string;
20524
+ pickup_date?: string | null;
20525
+ session_id: string;
20526
+ };
20527
+ Update: {
20528
+ action?: string;
20529
+ block_reason?: string | null;
20530
+ carrier_name?: string | null;
20531
+ cart_index?: number;
20532
+ cart_number_id?: string | null;
20533
+ cart_number_label?: string | null;
20534
+ created_at?: string;
20535
+ customer_name?: string | null;
20536
+ delivery_date?: string | null;
20537
+ id?: string;
20538
+ new_pick_date?: string | null;
20539
+ order_id?: string;
20540
+ order_number?: string | null;
20541
+ order_source?: string;
20542
+ pickup_date?: string | null;
20543
+ session_id?: string;
20544
+ };
20545
+ Relationships: [{
20546
+ foreignKeyName: "cart_control_items_session_id_fkey";
20547
+ columns: ["session_id"];
20548
+ isOneToOne: false;
20549
+ referencedRelation: "cart_control_sessions";
20550
+ referencedColumns: ["id"];
20551
+ }];
20552
+ };
20553
+ cart_control_sessions: {
20554
+ Row: {
20555
+ blocked_count: number;
20556
+ checked_count: number;
20557
+ control_date: string;
20558
+ created_at: string;
20559
+ id: string;
20560
+ notes: string | null;
20561
+ performed_at: string;
20562
+ rescheduled_count: number;
20563
+ total_carts: number;
20564
+ updated_at: string;
20565
+ user_id: string;
20566
+ };
20567
+ Insert: {
20568
+ blocked_count?: number;
20569
+ checked_count?: number;
20570
+ control_date?: string;
20571
+ created_at?: string;
20572
+ id?: string;
20573
+ notes?: string | null;
20574
+ performed_at?: string;
20575
+ rescheduled_count?: number;
20576
+ total_carts?: number;
20577
+ updated_at?: string;
20578
+ user_id: string;
20579
+ };
20580
+ Update: {
20581
+ blocked_count?: number;
20582
+ checked_count?: number;
20583
+ control_date?: string;
20584
+ created_at?: string;
20585
+ id?: string;
20586
+ notes?: string | null;
20587
+ performed_at?: string;
20588
+ rescheduled_count?: number;
20589
+ total_carts?: number;
20590
+ updated_at?: string;
20591
+ user_id?: string;
20592
+ };
20593
+ Relationships: [];
20594
+ };
20595
+ cart_numbers: {
20596
+ Row: {
20597
+ assigned_at: string;
20598
+ cart_index: number;
20599
+ cart_number: string;
20600
+ day_seq: number;
20601
+ id: string;
20602
+ order_id: string;
20603
+ order_source: string;
20604
+ pick_date: string;
20605
+ status: string;
20606
+ };
20607
+ Insert: {
20608
+ assigned_at?: string;
20609
+ cart_index: number;
20610
+ cart_number: string;
20611
+ day_seq: number;
20612
+ id?: string;
20613
+ order_id: string;
20614
+ order_source: string;
20615
+ pick_date: string;
20616
+ status?: string;
20617
+ };
20618
+ Update: {
20619
+ assigned_at?: string;
20620
+ cart_index?: number;
20621
+ cart_number?: string;
20622
+ day_seq?: number;
20623
+ id?: string;
20624
+ order_id?: string;
20625
+ order_source?: string;
20626
+ pick_date?: string;
20627
+ status?: string;
20628
+ };
20629
+ Relationships: [];
20630
+ };
19157
20631
  cart_pick_overrides: {
19158
20632
  Row: {
19159
20633
  cart_index: number;
@@ -19826,6 +21300,54 @@ export declare const resetCartOverride: import("@tanstack/start-client-core").Re
19826
21300
  referencedColumns: ["id"];
19827
21301
  }];
19828
21302
  };
21303
+ dashboard_critical_alerts: {
21304
+ Row: {
21305
+ alert_key: string;
21306
+ alert_type: string;
21307
+ created_at: string;
21308
+ description: string | null;
21309
+ id: string;
21310
+ metadata: import("../integrations/supabase/types").Json | null;
21311
+ priority: string;
21312
+ raised_at: string;
21313
+ related_cart_ids: string[] | null;
21314
+ resolved_at: string | null;
21315
+ title: string;
21316
+ updated_at: string;
21317
+ user_id: string;
21318
+ };
21319
+ Insert: {
21320
+ alert_key: string;
21321
+ alert_type: string;
21322
+ created_at?: string;
21323
+ description?: string | null;
21324
+ id?: string;
21325
+ metadata?: import("../integrations/supabase/types").Json | null;
21326
+ priority?: string;
21327
+ raised_at?: string;
21328
+ related_cart_ids?: string[] | null;
21329
+ resolved_at?: string | null;
21330
+ title: string;
21331
+ updated_at?: string;
21332
+ user_id: string;
21333
+ };
21334
+ Update: {
21335
+ alert_key?: string;
21336
+ alert_type?: string;
21337
+ created_at?: string;
21338
+ description?: string | null;
21339
+ id?: string;
21340
+ metadata?: import("../integrations/supabase/types").Json | null;
21341
+ priority?: string;
21342
+ raised_at?: string;
21343
+ related_cart_ids?: string[] | null;
21344
+ resolved_at?: string | null;
21345
+ title?: string;
21346
+ updated_at?: string;
21347
+ user_id?: string;
21348
+ };
21349
+ Relationships: [];
21350
+ };
19829
21351
  dashboard_daily_reports: {
19830
21352
  Row: {
19831
21353
  created_at: string;
@@ -21328,6 +22850,7 @@ export declare const resetCartOverride: import("@tanstack/start-client-core").Re
21328
22850
  };
21329
22851
  floricode_sync_state: {
21330
22852
  Row: {
22853
+ cursor_skip: number;
21331
22854
  error_message: string | null;
21332
22855
  last_change_date_time: string | null;
21333
22856
  last_sequence_number: number;
@@ -21337,6 +22860,7 @@ export declare const resetCartOverride: import("@tanstack/start-client-core").Re
21337
22860
  updated_at: string;
21338
22861
  };
21339
22862
  Insert: {
22863
+ cursor_skip?: number;
21340
22864
  error_message?: string | null;
21341
22865
  last_change_date_time?: string | null;
21342
22866
  last_sequence_number?: number;
@@ -21346,6 +22870,7 @@ export declare const resetCartOverride: import("@tanstack/start-client-core").Re
21346
22870
  updated_at?: string;
21347
22871
  };
21348
22872
  Update: {
22873
+ cursor_skip?: number;
21349
22874
  error_message?: string | null;
21350
22875
  last_change_date_time?: string | null;
21351
22876
  last_sequence_number?: number;
@@ -23693,6 +25218,93 @@ export declare const resetCartOverride: import("@tanstack/start-client-core").Re
23693
25218
  };
23694
25219
  Relationships: [];
23695
25220
  };
25221
+ manufacture_product_components: {
25222
+ Row: {
25223
+ component_type: string;
25224
+ created_at: string;
25225
+ id: string;
25226
+ manufacture_product_id: string;
25227
+ product_group_id: string | null;
25228
+ quantity: number;
25229
+ trade_item_id: string | null;
25230
+ unit: string;
25231
+ };
25232
+ Insert: {
25233
+ component_type: string;
25234
+ created_at?: string;
25235
+ id?: string;
25236
+ manufacture_product_id: string;
25237
+ product_group_id?: string | null;
25238
+ quantity?: number;
25239
+ trade_item_id?: string | null;
25240
+ unit?: string;
25241
+ };
25242
+ Update: {
25243
+ component_type?: string;
25244
+ created_at?: string;
25245
+ id?: string;
25246
+ manufacture_product_id?: string;
25247
+ product_group_id?: string | null;
25248
+ quantity?: number;
25249
+ trade_item_id?: string | null;
25250
+ unit?: string;
25251
+ };
25252
+ Relationships: [{
25253
+ foreignKeyName: "manufacture_product_components_manufacture_product_id_fkey";
25254
+ columns: ["manufacture_product_id"];
25255
+ isOneToOne: false;
25256
+ referencedRelation: "manufacture_product_possible_stock_view";
25257
+ referencedColumns: ["manufacture_product_id"];
25258
+ }, {
25259
+ foreignKeyName: "manufacture_product_components_manufacture_product_id_fkey";
25260
+ columns: ["manufacture_product_id"];
25261
+ isOneToOne: false;
25262
+ referencedRelation: "manufacture_products";
25263
+ referencedColumns: ["id"];
25264
+ }, {
25265
+ foreignKeyName: "manufacture_product_components_product_group_id_fkey";
25266
+ columns: ["product_group_id"];
25267
+ isOneToOne: false;
25268
+ referencedRelation: "product_groups";
25269
+ referencedColumns: ["id"];
25270
+ }];
25271
+ };
25272
+ manufacture_products: {
25273
+ Row: {
25274
+ created_at: string;
25275
+ description: string | null;
25276
+ id: string;
25277
+ is_active: boolean;
25278
+ name: string;
25279
+ produced_stock: number;
25280
+ product_code: string;
25281
+ tenant_id: string;
25282
+ updated_at: string;
25283
+ };
25284
+ Insert: {
25285
+ created_at?: string;
25286
+ description?: string | null;
25287
+ id?: string;
25288
+ is_active?: boolean;
25289
+ name: string;
25290
+ produced_stock?: number;
25291
+ product_code: string;
25292
+ tenant_id: string;
25293
+ updated_at?: string;
25294
+ };
25295
+ Update: {
25296
+ created_at?: string;
25297
+ description?: string | null;
25298
+ id?: string;
25299
+ is_active?: boolean;
25300
+ name?: string;
25301
+ produced_stock?: number;
25302
+ product_code?: string;
25303
+ tenant_id?: string;
25304
+ updated_at?: string;
25305
+ };
25306
+ Relationships: [];
25307
+ };
23696
25308
  monteurs: {
23697
25309
  Row: {
23698
25310
  avatar_url: string | null;
@@ -24653,6 +26265,66 @@ export declare const resetCartOverride: import("@tanstack/start-client-core").Re
24653
26265
  };
24654
26266
  Relationships: [];
24655
26267
  };
26268
+ product_group_items: {
26269
+ Row: {
26270
+ created_at: string;
26271
+ id: string;
26272
+ product_group_id: string;
26273
+ quantity: number;
26274
+ trade_item_id: string;
26275
+ };
26276
+ Insert: {
26277
+ created_at?: string;
26278
+ id?: string;
26279
+ product_group_id: string;
26280
+ quantity?: number;
26281
+ trade_item_id: string;
26282
+ };
26283
+ Update: {
26284
+ created_at?: string;
26285
+ id?: string;
26286
+ product_group_id?: string;
26287
+ quantity?: number;
26288
+ trade_item_id?: string;
26289
+ };
26290
+ Relationships: [{
26291
+ foreignKeyName: "product_group_items_product_group_id_fkey";
26292
+ columns: ["product_group_id"];
26293
+ isOneToOne: false;
26294
+ referencedRelation: "product_groups";
26295
+ referencedColumns: ["id"];
26296
+ }];
26297
+ };
26298
+ product_groups: {
26299
+ Row: {
26300
+ created_at: string;
26301
+ description: string | null;
26302
+ id: string;
26303
+ is_active: boolean;
26304
+ name: string;
26305
+ tenant_id: string;
26306
+ updated_at: string;
26307
+ };
26308
+ Insert: {
26309
+ created_at?: string;
26310
+ description?: string | null;
26311
+ id?: string;
26312
+ is_active?: boolean;
26313
+ name: string;
26314
+ tenant_id: string;
26315
+ updated_at?: string;
26316
+ };
26317
+ Update: {
26318
+ created_at?: string;
26319
+ description?: string | null;
26320
+ id?: string;
26321
+ is_active?: boolean;
26322
+ name?: string;
26323
+ tenant_id?: string;
26324
+ updated_at?: string;
26325
+ };
26326
+ Relationships: [];
26327
+ };
24656
26328
  products: {
24657
26329
  Row: {
24658
26330
  barcode: string | null;
@@ -25792,7 +27464,13 @@ export declare const resetCartOverride: import("@tanstack/start-client-core").Re
25792
27464
  connection_id: string | null;
25793
27465
  created_at: string;
25794
27466
  data: import("../integrations/supabase/types").Json;
27467
+ floriday_id: string | null;
27468
+ floriday_link_error: string | null;
27469
+ floriday_link_status: string;
25795
27470
  id: string;
27471
+ last_floriday_sync_at: string | null;
27472
+ missing_required_fields: string[];
27473
+ source: string;
25796
27474
  updated_at: string;
25797
27475
  user_id: string;
25798
27476
  };
@@ -25800,7 +27478,13 @@ export declare const resetCartOverride: import("@tanstack/start-client-core").Re
25800
27478
  connection_id?: string | null;
25801
27479
  created_at?: string;
25802
27480
  data?: import("../integrations/supabase/types").Json;
27481
+ floriday_id?: string | null;
27482
+ floriday_link_error?: string | null;
27483
+ floriday_link_status?: string;
25803
27484
  id?: string;
27485
+ last_floriday_sync_at?: string | null;
27486
+ missing_required_fields?: string[];
27487
+ source?: string;
25804
27488
  updated_at?: string;
25805
27489
  user_id: string;
25806
27490
  };
@@ -25808,7 +27492,55 @@ export declare const resetCartOverride: import("@tanstack/start-client-core").Re
25808
27492
  connection_id?: string | null;
25809
27493
  created_at?: string;
25810
27494
  data?: import("../integrations/supabase/types").Json;
27495
+ floriday_id?: string | null;
27496
+ floriday_link_error?: string | null;
27497
+ floriday_link_status?: string;
27498
+ id?: string;
27499
+ last_floriday_sync_at?: string | null;
27500
+ missing_required_fields?: string[];
27501
+ source?: string;
27502
+ updated_at?: string;
27503
+ user_id?: string;
27504
+ };
27505
+ Relationships: [];
27506
+ };
27507
+ trade_item_stock: {
27508
+ Row: {
27509
+ connection_id: string;
27510
+ created_at: string;
27511
+ id: string;
27512
+ incoming_stock: number;
27513
+ minimum_stock: number;
27514
+ notes: string | null;
27515
+ physical_stock: number;
27516
+ reserved_stock: number;
27517
+ trade_item_key: string;
27518
+ updated_at: string;
27519
+ user_id: string;
27520
+ };
27521
+ Insert: {
27522
+ connection_id: string;
27523
+ created_at?: string;
25811
27524
  id?: string;
27525
+ incoming_stock?: number;
27526
+ minimum_stock?: number;
27527
+ notes?: string | null;
27528
+ physical_stock?: number;
27529
+ reserved_stock?: number;
27530
+ trade_item_key: string;
27531
+ updated_at?: string;
27532
+ user_id: string;
27533
+ };
27534
+ Update: {
27535
+ connection_id?: string;
27536
+ created_at?: string;
27537
+ id?: string;
27538
+ incoming_stock?: number;
27539
+ minimum_stock?: number;
27540
+ notes?: string | null;
27541
+ physical_stock?: number;
27542
+ reserved_stock?: number;
27543
+ trade_item_key?: string;
25812
27544
  updated_at?: string;
25813
27545
  user_id?: string;
25814
27546
  };
@@ -26158,6 +27890,7 @@ export declare const resetCartOverride: import("@tanstack/start-client-core").Re
26158
27890
  };
26159
27891
  twinfield_invoice_sync_logs: {
26160
27892
  Row: {
27893
+ action_type: string | null;
26161
27894
  created_at: string;
26162
27895
  details: import("../integrations/supabase/types").Json | null;
26163
27896
  duration_ms: number | null;
@@ -26170,6 +27903,7 @@ export declare const resetCartOverride: import("@tanstack/start-client-core").Re
26170
27903
  user_id: string;
26171
27904
  };
26172
27905
  Insert: {
27906
+ action_type?: string | null;
26173
27907
  created_at?: string;
26174
27908
  details?: import("../integrations/supabase/types").Json | null;
26175
27909
  duration_ms?: number | null;
@@ -26182,6 +27916,7 @@ export declare const resetCartOverride: import("@tanstack/start-client-core").Re
26182
27916
  user_id: string;
26183
27917
  };
26184
27918
  Update: {
27919
+ action_type?: string | null;
26185
27920
  created_at?: string;
26186
27921
  details?: import("../integrations/supabase/types").Json | null;
26187
27922
  duration_ms?: number | null;
@@ -26417,6 +28152,57 @@ export declare const resetCartOverride: import("@tanstack/start-client-core").Re
26417
28152
  referencedColumns: ["id"];
26418
28153
  }];
26419
28154
  };
28155
+ twinfield_request_metrics: {
28156
+ Row: {
28157
+ bucket_hour: string;
28158
+ connection_id: string;
28159
+ error_count: number;
28160
+ rate_limited_count: number;
28161
+ request_count: number;
28162
+ updated_at: string;
28163
+ };
28164
+ Insert: {
28165
+ bucket_hour: string;
28166
+ connection_id: string;
28167
+ error_count?: number;
28168
+ rate_limited_count?: number;
28169
+ request_count?: number;
28170
+ updated_at?: string;
28171
+ };
28172
+ Update: {
28173
+ bucket_hour?: string;
28174
+ connection_id?: string;
28175
+ error_count?: number;
28176
+ rate_limited_count?: number;
28177
+ request_count?: number;
28178
+ updated_at?: string;
28179
+ };
28180
+ Relationships: [];
28181
+ };
28182
+ twinfield_session_cache: {
28183
+ Row: {
28184
+ cluster: string;
28185
+ created_at: string;
28186
+ expires_at: string;
28187
+ session_id: string;
28188
+ user_id: string;
28189
+ };
28190
+ Insert: {
28191
+ cluster: string;
28192
+ created_at?: string;
28193
+ expires_at: string;
28194
+ session_id: string;
28195
+ user_id: string;
28196
+ };
28197
+ Update: {
28198
+ cluster?: string;
28199
+ created_at?: string;
28200
+ expires_at?: string;
28201
+ session_id?: string;
28202
+ user_id?: string;
28203
+ };
28204
+ Relationships: [];
28205
+ };
26420
28206
  twinfield_settings: {
26421
28207
  Row: {
26422
28208
  active_environment: string;
@@ -26998,6 +28784,35 @@ export declare const resetCartOverride: import("@tanstack/start-client-core").Re
26998
28784
  };
26999
28785
  Relationships: [];
27000
28786
  };
28787
+ manufacture_product_possible_stock_view: {
28788
+ Row: {
28789
+ component_count: number | null;
28790
+ manufacture_product_id: string | null;
28791
+ possible_stock: number | null;
28792
+ };
28793
+ Relationships: [];
28794
+ };
28795
+ product_group_stock_view: {
28796
+ Row: {
28797
+ item_count: number | null;
28798
+ product_group_id: string | null;
28799
+ total_stock: number | null;
28800
+ };
28801
+ Relationships: [{
28802
+ foreignKeyName: "product_group_items_product_group_id_fkey";
28803
+ columns: ["product_group_id"];
28804
+ isOneToOne: false;
28805
+ referencedRelation: "product_groups";
28806
+ referencedColumns: ["id"];
28807
+ }];
28808
+ };
28809
+ trade_item_stock_view: {
28810
+ Row: {
28811
+ stock: number | null;
28812
+ trade_item_id: string | null;
28813
+ };
28814
+ Relationships: [];
28815
+ };
27001
28816
  v_external_customers_exact: {
27002
28817
  Row: {
27003
28818
  account_number: string | null;
@@ -27253,6 +29068,20 @@ export declare const resetCartOverride: import("@tanstack/start-client-core").Re
27253
29068
  };
27254
29069
  Returns: number;
27255
29070
  };
29071
+ assign_cart_numbers: {
29072
+ Args: {
29073
+ p_carts: import("../integrations/supabase/types").Json;
29074
+ };
29075
+ Returns: {
29076
+ cart_index: number;
29077
+ cart_number: string;
29078
+ day_seq: number;
29079
+ order_id: string;
29080
+ order_source: string;
29081
+ pick_date: string;
29082
+ status: string;
29083
+ }[];
29084
+ };
27256
29085
  assign_floriday_order_numbers: {
27257
29086
  Args: {
27258
29087
  p_ids: string[];
@@ -27272,10 +29101,37 @@ export declare const resetCartOverride: import("@tanstack/start-client-core").Re
27272
29101
  Args: never;
27273
29102
  Returns: number;
27274
29103
  };
29104
+ control_get_todays_carts: {
29105
+ Args: never;
29106
+ Returns: {
29107
+ cart_index: number;
29108
+ cart_number: string;
29109
+ cart_number_id: string;
29110
+ order_id: string;
29111
+ order_source: string;
29112
+ pick_date: string;
29113
+ status: string;
29114
+ }[];
29115
+ };
29116
+ count_distinct_regulatory_products: {
29117
+ Args: never;
29118
+ Returns: number;
29119
+ };
27275
29120
  current_monteur_id: {
27276
29121
  Args: never;
27277
29122
  Returns: string;
27278
29123
  };
29124
+ dashboard_alert_counts: {
29125
+ Args: never;
29126
+ Returns: import("../integrations/supabase/types").Json;
29127
+ };
29128
+ dashboard_alert_rows: {
29129
+ Args: {
29130
+ check_id: string;
29131
+ row_limit?: number;
29132
+ };
29133
+ Returns: import("../integrations/supabase/types").Json;
29134
+ };
27279
29135
  dashboard_list_public_schema: {
27280
29136
  Args: never;
27281
29137
  Returns: {
@@ -27356,6 +29212,13 @@ export declare const resetCartOverride: import("@tanstack/start-client-core").Re
27356
29212
  };
27357
29213
  Returns: boolean;
27358
29214
  };
29215
+ format_cart_number: {
29216
+ Args: {
29217
+ p_pick_date: string;
29218
+ p_seq: number;
29219
+ };
29220
+ Returns: string;
29221
+ };
27359
29222
  get_active_floriday_connection_public: {
27360
29223
  Args: never;
27361
29224
  Returns: {
@@ -27560,14 +29423,29 @@ export declare const resetCartOverride: import("@tanstack/start-client-core").Re
27560
29423
  };
27561
29424
  Returns: undefined;
27562
29425
  };
29426
+ pickstation_set_cart_status: {
29427
+ Args: {
29428
+ p_cart_index: number;
29429
+ p_order_id: string;
29430
+ p_order_source: string;
29431
+ p_status: string;
29432
+ };
29433
+ Returns: undefined;
29434
+ };
27563
29435
  refresh_floricode_derived_code_lists: {
27564
29436
  Args: never;
27565
29437
  Returns: {
27566
- out_environment: string;
27567
- out_list_name: string;
27568
- out_row_count: number;
29438
+ environment: string;
29439
+ list_name: string;
29440
+ row_count: number;
27569
29441
  }[];
27570
29442
  };
29443
+ refresh_floricode_derived_for_product: {
29444
+ Args: {
29445
+ p_product_code: string;
29446
+ };
29447
+ Returns: number;
29448
+ };
27571
29449
  reset_floriday_sync_cursor: {
27572
29450
  Args: {
27573
29451
  p_connection_id: string;
@@ -27898,6 +29776,7 @@ export declare const resetAllCartOverrides: import("@tanstack/start-client-core"
27898
29776
  max_workdays_earlier_pick: number;
27899
29777
  pick_days_before_transport: number;
27900
29778
  pick_distribution_enabled: boolean;
29779
+ pick_weekdays: number[];
27901
29780
  signup_mail_enabled: boolean;
27902
29781
  signup_mail_lead_minutes: number;
27903
29782
  signup_mail_purpose: string;
@@ -27911,6 +29790,7 @@ export declare const resetAllCartOverrides: import("@tanstack/start-client-core"
27911
29790
  max_workdays_earlier_pick?: number;
27912
29791
  pick_days_before_transport?: number;
27913
29792
  pick_distribution_enabled?: boolean;
29793
+ pick_weekdays?: number[];
27914
29794
  signup_mail_enabled?: boolean;
27915
29795
  signup_mail_lead_minutes?: number;
27916
29796
  signup_mail_purpose?: string;
@@ -27924,6 +29804,7 @@ export declare const resetAllCartOverrides: import("@tanstack/start-client-core"
27924
29804
  max_workdays_earlier_pick?: number;
27925
29805
  pick_days_before_transport?: number;
27926
29806
  pick_distribution_enabled?: boolean;
29807
+ pick_weekdays?: number[];
27927
29808
  signup_mail_enabled?: boolean;
27928
29809
  signup_mail_lead_minutes?: number;
27929
29810
  signup_mail_purpose?: string;
@@ -28335,6 +30216,48 @@ export declare const resetAllCartOverrides: import("@tanstack/start-client-core"
28335
30216
  referencedColumns: ["id"];
28336
30217
  }];
28337
30218
  };
30219
+ carrier_signup_dispatch_runs: {
30220
+ Row: {
30221
+ detail: import("../integrations/supabase/types").Json | null;
30222
+ error: string | null;
30223
+ finished_at: string | null;
30224
+ groups: number;
30225
+ id: string;
30226
+ ok: boolean;
30227
+ reason: string | null;
30228
+ sent: number;
30229
+ skipped: import("../integrations/supabase/types").Json;
30230
+ started_at: string;
30231
+ unassigned: import("../integrations/supabase/types").Json;
30232
+ };
30233
+ Insert: {
30234
+ detail?: import("../integrations/supabase/types").Json | null;
30235
+ error?: string | null;
30236
+ finished_at?: string | null;
30237
+ groups?: number;
30238
+ id?: string;
30239
+ ok?: boolean;
30240
+ reason?: string | null;
30241
+ sent?: number;
30242
+ skipped?: import("../integrations/supabase/types").Json;
30243
+ started_at?: string;
30244
+ unassigned?: import("../integrations/supabase/types").Json;
30245
+ };
30246
+ Update: {
30247
+ detail?: import("../integrations/supabase/types").Json | null;
30248
+ error?: string | null;
30249
+ finished_at?: string | null;
30250
+ groups?: number;
30251
+ id?: string;
30252
+ ok?: boolean;
30253
+ reason?: string | null;
30254
+ sent?: number;
30255
+ skipped?: import("../integrations/supabase/types").Json;
30256
+ started_at?: string;
30257
+ unassigned?: import("../integrations/supabase/types").Json;
30258
+ };
30259
+ Relationships: [];
30260
+ };
28338
30261
  carrier_signup_dispatches: {
28339
30262
  Row: {
28340
30263
  carrier_id: string;
@@ -28386,6 +30309,7 @@ export declare const resetAllCartOverrides: import("@tanstack/start-client-core"
28386
30309
  contact_person: string | null;
28387
30310
  created_at: string;
28388
30311
  delivery_days: number | null;
30312
+ delivery_weekdays: number[];
28389
30313
  email: string | null;
28390
30314
  id: string;
28391
30315
  is_default: boolean;
@@ -28393,6 +30317,7 @@ export declare const resetAllCartOverrides: import("@tanstack/start-client-core"
28393
30317
  notes: string | null;
28394
30318
  phone: string | null;
28395
30319
  pickup_moments: import("../integrations/supabase/types").Json;
30320
+ pickup_weekdays: number[];
28396
30321
  service_cities: string[];
28397
30322
  service_countries: string[];
28398
30323
  service_provinces: string[];
@@ -28408,6 +30333,7 @@ export declare const resetAllCartOverrides: import("@tanstack/start-client-core"
28408
30333
  contact_person?: string | null;
28409
30334
  created_at?: string;
28410
30335
  delivery_days?: number | null;
30336
+ delivery_weekdays?: number[];
28411
30337
  email?: string | null;
28412
30338
  id?: string;
28413
30339
  is_default?: boolean;
@@ -28415,6 +30341,7 @@ export declare const resetAllCartOverrides: import("@tanstack/start-client-core"
28415
30341
  notes?: string | null;
28416
30342
  phone?: string | null;
28417
30343
  pickup_moments?: import("../integrations/supabase/types").Json;
30344
+ pickup_weekdays?: number[];
28418
30345
  service_cities?: string[];
28419
30346
  service_countries?: string[];
28420
30347
  service_provinces?: string[];
@@ -28430,6 +30357,7 @@ export declare const resetAllCartOverrides: import("@tanstack/start-client-core"
28430
30357
  contact_person?: string | null;
28431
30358
  created_at?: string;
28432
30359
  delivery_days?: number | null;
30360
+ delivery_weekdays?: number[];
28433
30361
  email?: string | null;
28434
30362
  id?: string;
28435
30363
  is_default?: boolean;
@@ -28437,6 +30365,7 @@ export declare const resetAllCartOverrides: import("@tanstack/start-client-core"
28437
30365
  notes?: string | null;
28438
30366
  phone?: string | null;
28439
30367
  pickup_moments?: import("../integrations/supabase/types").Json;
30368
+ pickup_weekdays?: number[];
28440
30369
  service_cities?: string[];
28441
30370
  service_countries?: string[];
28442
30371
  service_provinces?: string[];
@@ -28449,6 +30378,177 @@ export declare const resetAllCartOverrides: import("@tanstack/start-client-core"
28449
30378
  };
28450
30379
  Relationships: [];
28451
30380
  };
30381
+ cart_control_draft: {
30382
+ Row: {
30383
+ cart_states: import("../integrations/supabase/types").Json;
30384
+ checked_keys: import("../integrations/supabase/types").Json;
30385
+ draft_date: string;
30386
+ form_state: import("../integrations/supabase/types").Json;
30387
+ notes: string;
30388
+ updated_at: string;
30389
+ user_id: string;
30390
+ };
30391
+ Insert: {
30392
+ cart_states?: import("../integrations/supabase/types").Json;
30393
+ checked_keys?: import("../integrations/supabase/types").Json;
30394
+ draft_date: string;
30395
+ form_state?: import("../integrations/supabase/types").Json;
30396
+ notes?: string;
30397
+ updated_at?: string;
30398
+ user_id: string;
30399
+ };
30400
+ Update: {
30401
+ cart_states?: import("../integrations/supabase/types").Json;
30402
+ checked_keys?: import("../integrations/supabase/types").Json;
30403
+ draft_date?: string;
30404
+ form_state?: import("../integrations/supabase/types").Json;
30405
+ notes?: string;
30406
+ updated_at?: string;
30407
+ user_id?: string;
30408
+ };
30409
+ Relationships: [];
30410
+ };
30411
+ cart_control_items: {
30412
+ Row: {
30413
+ action: string;
30414
+ block_reason: string | null;
30415
+ carrier_name: string | null;
30416
+ cart_index: number;
30417
+ cart_number_id: string | null;
30418
+ cart_number_label: string | null;
30419
+ created_at: string;
30420
+ customer_name: string | null;
30421
+ delivery_date: string | null;
30422
+ id: string;
30423
+ new_pick_date: string | null;
30424
+ order_id: string;
30425
+ order_number: string | null;
30426
+ order_source: string;
30427
+ pickup_date: string | null;
30428
+ session_id: string;
30429
+ };
30430
+ Insert: {
30431
+ action: string;
30432
+ block_reason?: string | null;
30433
+ carrier_name?: string | null;
30434
+ cart_index: number;
30435
+ cart_number_id?: string | null;
30436
+ cart_number_label?: string | null;
30437
+ created_at?: string;
30438
+ customer_name?: string | null;
30439
+ delivery_date?: string | null;
30440
+ id?: string;
30441
+ new_pick_date?: string | null;
30442
+ order_id: string;
30443
+ order_number?: string | null;
30444
+ order_source: string;
30445
+ pickup_date?: string | null;
30446
+ session_id: string;
30447
+ };
30448
+ Update: {
30449
+ action?: string;
30450
+ block_reason?: string | null;
30451
+ carrier_name?: string | null;
30452
+ cart_index?: number;
30453
+ cart_number_id?: string | null;
30454
+ cart_number_label?: string | null;
30455
+ created_at?: string;
30456
+ customer_name?: string | null;
30457
+ delivery_date?: string | null;
30458
+ id?: string;
30459
+ new_pick_date?: string | null;
30460
+ order_id?: string;
30461
+ order_number?: string | null;
30462
+ order_source?: string;
30463
+ pickup_date?: string | null;
30464
+ session_id?: string;
30465
+ };
30466
+ Relationships: [{
30467
+ foreignKeyName: "cart_control_items_session_id_fkey";
30468
+ columns: ["session_id"];
30469
+ isOneToOne: false;
30470
+ referencedRelation: "cart_control_sessions";
30471
+ referencedColumns: ["id"];
30472
+ }];
30473
+ };
30474
+ cart_control_sessions: {
30475
+ Row: {
30476
+ blocked_count: number;
30477
+ checked_count: number;
30478
+ control_date: string;
30479
+ created_at: string;
30480
+ id: string;
30481
+ notes: string | null;
30482
+ performed_at: string;
30483
+ rescheduled_count: number;
30484
+ total_carts: number;
30485
+ updated_at: string;
30486
+ user_id: string;
30487
+ };
30488
+ Insert: {
30489
+ blocked_count?: number;
30490
+ checked_count?: number;
30491
+ control_date?: string;
30492
+ created_at?: string;
30493
+ id?: string;
30494
+ notes?: string | null;
30495
+ performed_at?: string;
30496
+ rescheduled_count?: number;
30497
+ total_carts?: number;
30498
+ updated_at?: string;
30499
+ user_id: string;
30500
+ };
30501
+ Update: {
30502
+ blocked_count?: number;
30503
+ checked_count?: number;
30504
+ control_date?: string;
30505
+ created_at?: string;
30506
+ id?: string;
30507
+ notes?: string | null;
30508
+ performed_at?: string;
30509
+ rescheduled_count?: number;
30510
+ total_carts?: number;
30511
+ updated_at?: string;
30512
+ user_id?: string;
30513
+ };
30514
+ Relationships: [];
30515
+ };
30516
+ cart_numbers: {
30517
+ Row: {
30518
+ assigned_at: string;
30519
+ cart_index: number;
30520
+ cart_number: string;
30521
+ day_seq: number;
30522
+ id: string;
30523
+ order_id: string;
30524
+ order_source: string;
30525
+ pick_date: string;
30526
+ status: string;
30527
+ };
30528
+ Insert: {
30529
+ assigned_at?: string;
30530
+ cart_index: number;
30531
+ cart_number: string;
30532
+ day_seq: number;
30533
+ id?: string;
30534
+ order_id: string;
30535
+ order_source: string;
30536
+ pick_date: string;
30537
+ status?: string;
30538
+ };
30539
+ Update: {
30540
+ assigned_at?: string;
30541
+ cart_index?: number;
30542
+ cart_number?: string;
30543
+ day_seq?: number;
30544
+ id?: string;
30545
+ order_id?: string;
30546
+ order_source?: string;
30547
+ pick_date?: string;
30548
+ status?: string;
30549
+ };
30550
+ Relationships: [];
30551
+ };
28452
30552
  cart_pick_overrides: {
28453
30553
  Row: {
28454
30554
  cart_index: number;
@@ -29121,6 +31221,54 @@ export declare const resetAllCartOverrides: import("@tanstack/start-client-core"
29121
31221
  referencedColumns: ["id"];
29122
31222
  }];
29123
31223
  };
31224
+ dashboard_critical_alerts: {
31225
+ Row: {
31226
+ alert_key: string;
31227
+ alert_type: string;
31228
+ created_at: string;
31229
+ description: string | null;
31230
+ id: string;
31231
+ metadata: import("../integrations/supabase/types").Json | null;
31232
+ priority: string;
31233
+ raised_at: string;
31234
+ related_cart_ids: string[] | null;
31235
+ resolved_at: string | null;
31236
+ title: string;
31237
+ updated_at: string;
31238
+ user_id: string;
31239
+ };
31240
+ Insert: {
31241
+ alert_key: string;
31242
+ alert_type: string;
31243
+ created_at?: string;
31244
+ description?: string | null;
31245
+ id?: string;
31246
+ metadata?: import("../integrations/supabase/types").Json | null;
31247
+ priority?: string;
31248
+ raised_at?: string;
31249
+ related_cart_ids?: string[] | null;
31250
+ resolved_at?: string | null;
31251
+ title: string;
31252
+ updated_at?: string;
31253
+ user_id: string;
31254
+ };
31255
+ Update: {
31256
+ alert_key?: string;
31257
+ alert_type?: string;
31258
+ created_at?: string;
31259
+ description?: string | null;
31260
+ id?: string;
31261
+ metadata?: import("../integrations/supabase/types").Json | null;
31262
+ priority?: string;
31263
+ raised_at?: string;
31264
+ related_cart_ids?: string[] | null;
31265
+ resolved_at?: string | null;
31266
+ title?: string;
31267
+ updated_at?: string;
31268
+ user_id?: string;
31269
+ };
31270
+ Relationships: [];
31271
+ };
29124
31272
  dashboard_daily_reports: {
29125
31273
  Row: {
29126
31274
  created_at: string;
@@ -30623,6 +32771,7 @@ export declare const resetAllCartOverrides: import("@tanstack/start-client-core"
30623
32771
  };
30624
32772
  floricode_sync_state: {
30625
32773
  Row: {
32774
+ cursor_skip: number;
30626
32775
  error_message: string | null;
30627
32776
  last_change_date_time: string | null;
30628
32777
  last_sequence_number: number;
@@ -30632,6 +32781,7 @@ export declare const resetAllCartOverrides: import("@tanstack/start-client-core"
30632
32781
  updated_at: string;
30633
32782
  };
30634
32783
  Insert: {
32784
+ cursor_skip?: number;
30635
32785
  error_message?: string | null;
30636
32786
  last_change_date_time?: string | null;
30637
32787
  last_sequence_number?: number;
@@ -30641,6 +32791,7 @@ export declare const resetAllCartOverrides: import("@tanstack/start-client-core"
30641
32791
  updated_at?: string;
30642
32792
  };
30643
32793
  Update: {
32794
+ cursor_skip?: number;
30644
32795
  error_message?: string | null;
30645
32796
  last_change_date_time?: string | null;
30646
32797
  last_sequence_number?: number;
@@ -32988,6 +35139,93 @@ export declare const resetAllCartOverrides: import("@tanstack/start-client-core"
32988
35139
  };
32989
35140
  Relationships: [];
32990
35141
  };
35142
+ manufacture_product_components: {
35143
+ Row: {
35144
+ component_type: string;
35145
+ created_at: string;
35146
+ id: string;
35147
+ manufacture_product_id: string;
35148
+ product_group_id: string | null;
35149
+ quantity: number;
35150
+ trade_item_id: string | null;
35151
+ unit: string;
35152
+ };
35153
+ Insert: {
35154
+ component_type: string;
35155
+ created_at?: string;
35156
+ id?: string;
35157
+ manufacture_product_id: string;
35158
+ product_group_id?: string | null;
35159
+ quantity?: number;
35160
+ trade_item_id?: string | null;
35161
+ unit?: string;
35162
+ };
35163
+ Update: {
35164
+ component_type?: string;
35165
+ created_at?: string;
35166
+ id?: string;
35167
+ manufacture_product_id?: string;
35168
+ product_group_id?: string | null;
35169
+ quantity?: number;
35170
+ trade_item_id?: string | null;
35171
+ unit?: string;
35172
+ };
35173
+ Relationships: [{
35174
+ foreignKeyName: "manufacture_product_components_manufacture_product_id_fkey";
35175
+ columns: ["manufacture_product_id"];
35176
+ isOneToOne: false;
35177
+ referencedRelation: "manufacture_product_possible_stock_view";
35178
+ referencedColumns: ["manufacture_product_id"];
35179
+ }, {
35180
+ foreignKeyName: "manufacture_product_components_manufacture_product_id_fkey";
35181
+ columns: ["manufacture_product_id"];
35182
+ isOneToOne: false;
35183
+ referencedRelation: "manufacture_products";
35184
+ referencedColumns: ["id"];
35185
+ }, {
35186
+ foreignKeyName: "manufacture_product_components_product_group_id_fkey";
35187
+ columns: ["product_group_id"];
35188
+ isOneToOne: false;
35189
+ referencedRelation: "product_groups";
35190
+ referencedColumns: ["id"];
35191
+ }];
35192
+ };
35193
+ manufacture_products: {
35194
+ Row: {
35195
+ created_at: string;
35196
+ description: string | null;
35197
+ id: string;
35198
+ is_active: boolean;
35199
+ name: string;
35200
+ produced_stock: number;
35201
+ product_code: string;
35202
+ tenant_id: string;
35203
+ updated_at: string;
35204
+ };
35205
+ Insert: {
35206
+ created_at?: string;
35207
+ description?: string | null;
35208
+ id?: string;
35209
+ is_active?: boolean;
35210
+ name: string;
35211
+ produced_stock?: number;
35212
+ product_code: string;
35213
+ tenant_id: string;
35214
+ updated_at?: string;
35215
+ };
35216
+ Update: {
35217
+ created_at?: string;
35218
+ description?: string | null;
35219
+ id?: string;
35220
+ is_active?: boolean;
35221
+ name?: string;
35222
+ produced_stock?: number;
35223
+ product_code?: string;
35224
+ tenant_id?: string;
35225
+ updated_at?: string;
35226
+ };
35227
+ Relationships: [];
35228
+ };
32991
35229
  monteurs: {
32992
35230
  Row: {
32993
35231
  avatar_url: string | null;
@@ -33948,6 +36186,66 @@ export declare const resetAllCartOverrides: import("@tanstack/start-client-core"
33948
36186
  };
33949
36187
  Relationships: [];
33950
36188
  };
36189
+ product_group_items: {
36190
+ Row: {
36191
+ created_at: string;
36192
+ id: string;
36193
+ product_group_id: string;
36194
+ quantity: number;
36195
+ trade_item_id: string;
36196
+ };
36197
+ Insert: {
36198
+ created_at?: string;
36199
+ id?: string;
36200
+ product_group_id: string;
36201
+ quantity?: number;
36202
+ trade_item_id: string;
36203
+ };
36204
+ Update: {
36205
+ created_at?: string;
36206
+ id?: string;
36207
+ product_group_id?: string;
36208
+ quantity?: number;
36209
+ trade_item_id?: string;
36210
+ };
36211
+ Relationships: [{
36212
+ foreignKeyName: "product_group_items_product_group_id_fkey";
36213
+ columns: ["product_group_id"];
36214
+ isOneToOne: false;
36215
+ referencedRelation: "product_groups";
36216
+ referencedColumns: ["id"];
36217
+ }];
36218
+ };
36219
+ product_groups: {
36220
+ Row: {
36221
+ created_at: string;
36222
+ description: string | null;
36223
+ id: string;
36224
+ is_active: boolean;
36225
+ name: string;
36226
+ tenant_id: string;
36227
+ updated_at: string;
36228
+ };
36229
+ Insert: {
36230
+ created_at?: string;
36231
+ description?: string | null;
36232
+ id?: string;
36233
+ is_active?: boolean;
36234
+ name: string;
36235
+ tenant_id: string;
36236
+ updated_at?: string;
36237
+ };
36238
+ Update: {
36239
+ created_at?: string;
36240
+ description?: string | null;
36241
+ id?: string;
36242
+ is_active?: boolean;
36243
+ name?: string;
36244
+ tenant_id?: string;
36245
+ updated_at?: string;
36246
+ };
36247
+ Relationships: [];
36248
+ };
33951
36249
  products: {
33952
36250
  Row: {
33953
36251
  barcode: string | null;
@@ -35087,7 +37385,13 @@ export declare const resetAllCartOverrides: import("@tanstack/start-client-core"
35087
37385
  connection_id: string | null;
35088
37386
  created_at: string;
35089
37387
  data: import("../integrations/supabase/types").Json;
37388
+ floriday_id: string | null;
37389
+ floriday_link_error: string | null;
37390
+ floriday_link_status: string;
35090
37391
  id: string;
37392
+ last_floriday_sync_at: string | null;
37393
+ missing_required_fields: string[];
37394
+ source: string;
35091
37395
  updated_at: string;
35092
37396
  user_id: string;
35093
37397
  };
@@ -35095,7 +37399,13 @@ export declare const resetAllCartOverrides: import("@tanstack/start-client-core"
35095
37399
  connection_id?: string | null;
35096
37400
  created_at?: string;
35097
37401
  data?: import("../integrations/supabase/types").Json;
37402
+ floriday_id?: string | null;
37403
+ floriday_link_error?: string | null;
37404
+ floriday_link_status?: string;
35098
37405
  id?: string;
37406
+ last_floriday_sync_at?: string | null;
37407
+ missing_required_fields?: string[];
37408
+ source?: string;
35099
37409
  updated_at?: string;
35100
37410
  user_id: string;
35101
37411
  };
@@ -35103,7 +37413,55 @@ export declare const resetAllCartOverrides: import("@tanstack/start-client-core"
35103
37413
  connection_id?: string | null;
35104
37414
  created_at?: string;
35105
37415
  data?: import("../integrations/supabase/types").Json;
37416
+ floriday_id?: string | null;
37417
+ floriday_link_error?: string | null;
37418
+ floriday_link_status?: string;
35106
37419
  id?: string;
37420
+ last_floriday_sync_at?: string | null;
37421
+ missing_required_fields?: string[];
37422
+ source?: string;
37423
+ updated_at?: string;
37424
+ user_id?: string;
37425
+ };
37426
+ Relationships: [];
37427
+ };
37428
+ trade_item_stock: {
37429
+ Row: {
37430
+ connection_id: string;
37431
+ created_at: string;
37432
+ id: string;
37433
+ incoming_stock: number;
37434
+ minimum_stock: number;
37435
+ notes: string | null;
37436
+ physical_stock: number;
37437
+ reserved_stock: number;
37438
+ trade_item_key: string;
37439
+ updated_at: string;
37440
+ user_id: string;
37441
+ };
37442
+ Insert: {
37443
+ connection_id: string;
37444
+ created_at?: string;
37445
+ id?: string;
37446
+ incoming_stock?: number;
37447
+ minimum_stock?: number;
37448
+ notes?: string | null;
37449
+ physical_stock?: number;
37450
+ reserved_stock?: number;
37451
+ trade_item_key: string;
37452
+ updated_at?: string;
37453
+ user_id: string;
37454
+ };
37455
+ Update: {
37456
+ connection_id?: string;
37457
+ created_at?: string;
37458
+ id?: string;
37459
+ incoming_stock?: number;
37460
+ minimum_stock?: number;
37461
+ notes?: string | null;
37462
+ physical_stock?: number;
37463
+ reserved_stock?: number;
37464
+ trade_item_key?: string;
35107
37465
  updated_at?: string;
35108
37466
  user_id?: string;
35109
37467
  };
@@ -35453,6 +37811,7 @@ export declare const resetAllCartOverrides: import("@tanstack/start-client-core"
35453
37811
  };
35454
37812
  twinfield_invoice_sync_logs: {
35455
37813
  Row: {
37814
+ action_type: string | null;
35456
37815
  created_at: string;
35457
37816
  details: import("../integrations/supabase/types").Json | null;
35458
37817
  duration_ms: number | null;
@@ -35465,6 +37824,7 @@ export declare const resetAllCartOverrides: import("@tanstack/start-client-core"
35465
37824
  user_id: string;
35466
37825
  };
35467
37826
  Insert: {
37827
+ action_type?: string | null;
35468
37828
  created_at?: string;
35469
37829
  details?: import("../integrations/supabase/types").Json | null;
35470
37830
  duration_ms?: number | null;
@@ -35477,6 +37837,7 @@ export declare const resetAllCartOverrides: import("@tanstack/start-client-core"
35477
37837
  user_id: string;
35478
37838
  };
35479
37839
  Update: {
37840
+ action_type?: string | null;
35480
37841
  created_at?: string;
35481
37842
  details?: import("../integrations/supabase/types").Json | null;
35482
37843
  duration_ms?: number | null;
@@ -35712,6 +38073,57 @@ export declare const resetAllCartOverrides: import("@tanstack/start-client-core"
35712
38073
  referencedColumns: ["id"];
35713
38074
  }];
35714
38075
  };
38076
+ twinfield_request_metrics: {
38077
+ Row: {
38078
+ bucket_hour: string;
38079
+ connection_id: string;
38080
+ error_count: number;
38081
+ rate_limited_count: number;
38082
+ request_count: number;
38083
+ updated_at: string;
38084
+ };
38085
+ Insert: {
38086
+ bucket_hour: string;
38087
+ connection_id: string;
38088
+ error_count?: number;
38089
+ rate_limited_count?: number;
38090
+ request_count?: number;
38091
+ updated_at?: string;
38092
+ };
38093
+ Update: {
38094
+ bucket_hour?: string;
38095
+ connection_id?: string;
38096
+ error_count?: number;
38097
+ rate_limited_count?: number;
38098
+ request_count?: number;
38099
+ updated_at?: string;
38100
+ };
38101
+ Relationships: [];
38102
+ };
38103
+ twinfield_session_cache: {
38104
+ Row: {
38105
+ cluster: string;
38106
+ created_at: string;
38107
+ expires_at: string;
38108
+ session_id: string;
38109
+ user_id: string;
38110
+ };
38111
+ Insert: {
38112
+ cluster: string;
38113
+ created_at?: string;
38114
+ expires_at: string;
38115
+ session_id: string;
38116
+ user_id: string;
38117
+ };
38118
+ Update: {
38119
+ cluster?: string;
38120
+ created_at?: string;
38121
+ expires_at?: string;
38122
+ session_id?: string;
38123
+ user_id?: string;
38124
+ };
38125
+ Relationships: [];
38126
+ };
35715
38127
  twinfield_settings: {
35716
38128
  Row: {
35717
38129
  active_environment: string;
@@ -36293,6 +38705,35 @@ export declare const resetAllCartOverrides: import("@tanstack/start-client-core"
36293
38705
  };
36294
38706
  Relationships: [];
36295
38707
  };
38708
+ manufacture_product_possible_stock_view: {
38709
+ Row: {
38710
+ component_count: number | null;
38711
+ manufacture_product_id: string | null;
38712
+ possible_stock: number | null;
38713
+ };
38714
+ Relationships: [];
38715
+ };
38716
+ product_group_stock_view: {
38717
+ Row: {
38718
+ item_count: number | null;
38719
+ product_group_id: string | null;
38720
+ total_stock: number | null;
38721
+ };
38722
+ Relationships: [{
38723
+ foreignKeyName: "product_group_items_product_group_id_fkey";
38724
+ columns: ["product_group_id"];
38725
+ isOneToOne: false;
38726
+ referencedRelation: "product_groups";
38727
+ referencedColumns: ["id"];
38728
+ }];
38729
+ };
38730
+ trade_item_stock_view: {
38731
+ Row: {
38732
+ stock: number | null;
38733
+ trade_item_id: string | null;
38734
+ };
38735
+ Relationships: [];
38736
+ };
36296
38737
  v_external_customers_exact: {
36297
38738
  Row: {
36298
38739
  account_number: string | null;
@@ -36548,6 +38989,20 @@ export declare const resetAllCartOverrides: import("@tanstack/start-client-core"
36548
38989
  };
36549
38990
  Returns: number;
36550
38991
  };
38992
+ assign_cart_numbers: {
38993
+ Args: {
38994
+ p_carts: import("../integrations/supabase/types").Json;
38995
+ };
38996
+ Returns: {
38997
+ cart_index: number;
38998
+ cart_number: string;
38999
+ day_seq: number;
39000
+ order_id: string;
39001
+ order_source: string;
39002
+ pick_date: string;
39003
+ status: string;
39004
+ }[];
39005
+ };
36551
39006
  assign_floriday_order_numbers: {
36552
39007
  Args: {
36553
39008
  p_ids: string[];
@@ -36567,10 +39022,37 @@ export declare const resetAllCartOverrides: import("@tanstack/start-client-core"
36567
39022
  Args: never;
36568
39023
  Returns: number;
36569
39024
  };
39025
+ control_get_todays_carts: {
39026
+ Args: never;
39027
+ Returns: {
39028
+ cart_index: number;
39029
+ cart_number: string;
39030
+ cart_number_id: string;
39031
+ order_id: string;
39032
+ order_source: string;
39033
+ pick_date: string;
39034
+ status: string;
39035
+ }[];
39036
+ };
39037
+ count_distinct_regulatory_products: {
39038
+ Args: never;
39039
+ Returns: number;
39040
+ };
36570
39041
  current_monteur_id: {
36571
39042
  Args: never;
36572
39043
  Returns: string;
36573
39044
  };
39045
+ dashboard_alert_counts: {
39046
+ Args: never;
39047
+ Returns: import("../integrations/supabase/types").Json;
39048
+ };
39049
+ dashboard_alert_rows: {
39050
+ Args: {
39051
+ check_id: string;
39052
+ row_limit?: number;
39053
+ };
39054
+ Returns: import("../integrations/supabase/types").Json;
39055
+ };
36574
39056
  dashboard_list_public_schema: {
36575
39057
  Args: never;
36576
39058
  Returns: {
@@ -36651,6 +39133,13 @@ export declare const resetAllCartOverrides: import("@tanstack/start-client-core"
36651
39133
  };
36652
39134
  Returns: boolean;
36653
39135
  };
39136
+ format_cart_number: {
39137
+ Args: {
39138
+ p_pick_date: string;
39139
+ p_seq: number;
39140
+ };
39141
+ Returns: string;
39142
+ };
36654
39143
  get_active_floriday_connection_public: {
36655
39144
  Args: never;
36656
39145
  Returns: {
@@ -36855,14 +39344,29 @@ export declare const resetAllCartOverrides: import("@tanstack/start-client-core"
36855
39344
  };
36856
39345
  Returns: undefined;
36857
39346
  };
39347
+ pickstation_set_cart_status: {
39348
+ Args: {
39349
+ p_cart_index: number;
39350
+ p_order_id: string;
39351
+ p_order_source: string;
39352
+ p_status: string;
39353
+ };
39354
+ Returns: undefined;
39355
+ };
36858
39356
  refresh_floricode_derived_code_lists: {
36859
39357
  Args: never;
36860
39358
  Returns: {
36861
- out_environment: string;
36862
- out_list_name: string;
36863
- out_row_count: number;
39359
+ environment: string;
39360
+ list_name: string;
39361
+ row_count: number;
36864
39362
  }[];
36865
39363
  };
39364
+ refresh_floricode_derived_for_product: {
39365
+ Args: {
39366
+ p_product_code: string;
39367
+ };
39368
+ Returns: number;
39369
+ };
36866
39370
  reset_floriday_sync_cursor: {
36867
39371
  Args: {
36868
39372
  p_connection_id: string;
@@ -37193,6 +39697,7 @@ export declare const getOrderLines: import("@tanstack/start-client-core").Requir
37193
39697
  max_workdays_earlier_pick: number;
37194
39698
  pick_days_before_transport: number;
37195
39699
  pick_distribution_enabled: boolean;
39700
+ pick_weekdays: number[];
37196
39701
  signup_mail_enabled: boolean;
37197
39702
  signup_mail_lead_minutes: number;
37198
39703
  signup_mail_purpose: string;
@@ -37206,6 +39711,7 @@ export declare const getOrderLines: import("@tanstack/start-client-core").Requir
37206
39711
  max_workdays_earlier_pick?: number;
37207
39712
  pick_days_before_transport?: number;
37208
39713
  pick_distribution_enabled?: boolean;
39714
+ pick_weekdays?: number[];
37209
39715
  signup_mail_enabled?: boolean;
37210
39716
  signup_mail_lead_minutes?: number;
37211
39717
  signup_mail_purpose?: string;
@@ -37219,6 +39725,7 @@ export declare const getOrderLines: import("@tanstack/start-client-core").Requir
37219
39725
  max_workdays_earlier_pick?: number;
37220
39726
  pick_days_before_transport?: number;
37221
39727
  pick_distribution_enabled?: boolean;
39728
+ pick_weekdays?: number[];
37222
39729
  signup_mail_enabled?: boolean;
37223
39730
  signup_mail_lead_minutes?: number;
37224
39731
  signup_mail_purpose?: string;
@@ -37630,6 +40137,48 @@ export declare const getOrderLines: import("@tanstack/start-client-core").Requir
37630
40137
  referencedColumns: ["id"];
37631
40138
  }];
37632
40139
  };
40140
+ carrier_signup_dispatch_runs: {
40141
+ Row: {
40142
+ detail: import("../integrations/supabase/types").Json | null;
40143
+ error: string | null;
40144
+ finished_at: string | null;
40145
+ groups: number;
40146
+ id: string;
40147
+ ok: boolean;
40148
+ reason: string | null;
40149
+ sent: number;
40150
+ skipped: import("../integrations/supabase/types").Json;
40151
+ started_at: string;
40152
+ unassigned: import("../integrations/supabase/types").Json;
40153
+ };
40154
+ Insert: {
40155
+ detail?: import("../integrations/supabase/types").Json | null;
40156
+ error?: string | null;
40157
+ finished_at?: string | null;
40158
+ groups?: number;
40159
+ id?: string;
40160
+ ok?: boolean;
40161
+ reason?: string | null;
40162
+ sent?: number;
40163
+ skipped?: import("../integrations/supabase/types").Json;
40164
+ started_at?: string;
40165
+ unassigned?: import("../integrations/supabase/types").Json;
40166
+ };
40167
+ Update: {
40168
+ detail?: import("../integrations/supabase/types").Json | null;
40169
+ error?: string | null;
40170
+ finished_at?: string | null;
40171
+ groups?: number;
40172
+ id?: string;
40173
+ ok?: boolean;
40174
+ reason?: string | null;
40175
+ sent?: number;
40176
+ skipped?: import("../integrations/supabase/types").Json;
40177
+ started_at?: string;
40178
+ unassigned?: import("../integrations/supabase/types").Json;
40179
+ };
40180
+ Relationships: [];
40181
+ };
37633
40182
  carrier_signup_dispatches: {
37634
40183
  Row: {
37635
40184
  carrier_id: string;
@@ -37681,6 +40230,7 @@ export declare const getOrderLines: import("@tanstack/start-client-core").Requir
37681
40230
  contact_person: string | null;
37682
40231
  created_at: string;
37683
40232
  delivery_days: number | null;
40233
+ delivery_weekdays: number[];
37684
40234
  email: string | null;
37685
40235
  id: string;
37686
40236
  is_default: boolean;
@@ -37688,6 +40238,7 @@ export declare const getOrderLines: import("@tanstack/start-client-core").Requir
37688
40238
  notes: string | null;
37689
40239
  phone: string | null;
37690
40240
  pickup_moments: import("../integrations/supabase/types").Json;
40241
+ pickup_weekdays: number[];
37691
40242
  service_cities: string[];
37692
40243
  service_countries: string[];
37693
40244
  service_provinces: string[];
@@ -37703,6 +40254,7 @@ export declare const getOrderLines: import("@tanstack/start-client-core").Requir
37703
40254
  contact_person?: string | null;
37704
40255
  created_at?: string;
37705
40256
  delivery_days?: number | null;
40257
+ delivery_weekdays?: number[];
37706
40258
  email?: string | null;
37707
40259
  id?: string;
37708
40260
  is_default?: boolean;
@@ -37710,6 +40262,7 @@ export declare const getOrderLines: import("@tanstack/start-client-core").Requir
37710
40262
  notes?: string | null;
37711
40263
  phone?: string | null;
37712
40264
  pickup_moments?: import("../integrations/supabase/types").Json;
40265
+ pickup_weekdays?: number[];
37713
40266
  service_cities?: string[];
37714
40267
  service_countries?: string[];
37715
40268
  service_provinces?: string[];
@@ -37725,6 +40278,7 @@ export declare const getOrderLines: import("@tanstack/start-client-core").Requir
37725
40278
  contact_person?: string | null;
37726
40279
  created_at?: string;
37727
40280
  delivery_days?: number | null;
40281
+ delivery_weekdays?: number[];
37728
40282
  email?: string | null;
37729
40283
  id?: string;
37730
40284
  is_default?: boolean;
@@ -37732,6 +40286,7 @@ export declare const getOrderLines: import("@tanstack/start-client-core").Requir
37732
40286
  notes?: string | null;
37733
40287
  phone?: string | null;
37734
40288
  pickup_moments?: import("../integrations/supabase/types").Json;
40289
+ pickup_weekdays?: number[];
37735
40290
  service_cities?: string[];
37736
40291
  service_countries?: string[];
37737
40292
  service_provinces?: string[];
@@ -37744,6 +40299,177 @@ export declare const getOrderLines: import("@tanstack/start-client-core").Requir
37744
40299
  };
37745
40300
  Relationships: [];
37746
40301
  };
40302
+ cart_control_draft: {
40303
+ Row: {
40304
+ cart_states: import("../integrations/supabase/types").Json;
40305
+ checked_keys: import("../integrations/supabase/types").Json;
40306
+ draft_date: string;
40307
+ form_state: import("../integrations/supabase/types").Json;
40308
+ notes: string;
40309
+ updated_at: string;
40310
+ user_id: string;
40311
+ };
40312
+ Insert: {
40313
+ cart_states?: import("../integrations/supabase/types").Json;
40314
+ checked_keys?: import("../integrations/supabase/types").Json;
40315
+ draft_date: string;
40316
+ form_state?: import("../integrations/supabase/types").Json;
40317
+ notes?: string;
40318
+ updated_at?: string;
40319
+ user_id: string;
40320
+ };
40321
+ Update: {
40322
+ cart_states?: import("../integrations/supabase/types").Json;
40323
+ checked_keys?: import("../integrations/supabase/types").Json;
40324
+ draft_date?: string;
40325
+ form_state?: import("../integrations/supabase/types").Json;
40326
+ notes?: string;
40327
+ updated_at?: string;
40328
+ user_id?: string;
40329
+ };
40330
+ Relationships: [];
40331
+ };
40332
+ cart_control_items: {
40333
+ Row: {
40334
+ action: string;
40335
+ block_reason: string | null;
40336
+ carrier_name: string | null;
40337
+ cart_index: number;
40338
+ cart_number_id: string | null;
40339
+ cart_number_label: string | null;
40340
+ created_at: string;
40341
+ customer_name: string | null;
40342
+ delivery_date: string | null;
40343
+ id: string;
40344
+ new_pick_date: string | null;
40345
+ order_id: string;
40346
+ order_number: string | null;
40347
+ order_source: string;
40348
+ pickup_date: string | null;
40349
+ session_id: string;
40350
+ };
40351
+ Insert: {
40352
+ action: string;
40353
+ block_reason?: string | null;
40354
+ carrier_name?: string | null;
40355
+ cart_index: number;
40356
+ cart_number_id?: string | null;
40357
+ cart_number_label?: string | null;
40358
+ created_at?: string;
40359
+ customer_name?: string | null;
40360
+ delivery_date?: string | null;
40361
+ id?: string;
40362
+ new_pick_date?: string | null;
40363
+ order_id: string;
40364
+ order_number?: string | null;
40365
+ order_source: string;
40366
+ pickup_date?: string | null;
40367
+ session_id: string;
40368
+ };
40369
+ Update: {
40370
+ action?: string;
40371
+ block_reason?: string | null;
40372
+ carrier_name?: string | null;
40373
+ cart_index?: number;
40374
+ cart_number_id?: string | null;
40375
+ cart_number_label?: string | null;
40376
+ created_at?: string;
40377
+ customer_name?: string | null;
40378
+ delivery_date?: string | null;
40379
+ id?: string;
40380
+ new_pick_date?: string | null;
40381
+ order_id?: string;
40382
+ order_number?: string | null;
40383
+ order_source?: string;
40384
+ pickup_date?: string | null;
40385
+ session_id?: string;
40386
+ };
40387
+ Relationships: [{
40388
+ foreignKeyName: "cart_control_items_session_id_fkey";
40389
+ columns: ["session_id"];
40390
+ isOneToOne: false;
40391
+ referencedRelation: "cart_control_sessions";
40392
+ referencedColumns: ["id"];
40393
+ }];
40394
+ };
40395
+ cart_control_sessions: {
40396
+ Row: {
40397
+ blocked_count: number;
40398
+ checked_count: number;
40399
+ control_date: string;
40400
+ created_at: string;
40401
+ id: string;
40402
+ notes: string | null;
40403
+ performed_at: string;
40404
+ rescheduled_count: number;
40405
+ total_carts: number;
40406
+ updated_at: string;
40407
+ user_id: string;
40408
+ };
40409
+ Insert: {
40410
+ blocked_count?: number;
40411
+ checked_count?: number;
40412
+ control_date?: string;
40413
+ created_at?: string;
40414
+ id?: string;
40415
+ notes?: string | null;
40416
+ performed_at?: string;
40417
+ rescheduled_count?: number;
40418
+ total_carts?: number;
40419
+ updated_at?: string;
40420
+ user_id: string;
40421
+ };
40422
+ Update: {
40423
+ blocked_count?: number;
40424
+ checked_count?: number;
40425
+ control_date?: string;
40426
+ created_at?: string;
40427
+ id?: string;
40428
+ notes?: string | null;
40429
+ performed_at?: string;
40430
+ rescheduled_count?: number;
40431
+ total_carts?: number;
40432
+ updated_at?: string;
40433
+ user_id?: string;
40434
+ };
40435
+ Relationships: [];
40436
+ };
40437
+ cart_numbers: {
40438
+ Row: {
40439
+ assigned_at: string;
40440
+ cart_index: number;
40441
+ cart_number: string;
40442
+ day_seq: number;
40443
+ id: string;
40444
+ order_id: string;
40445
+ order_source: string;
40446
+ pick_date: string;
40447
+ status: string;
40448
+ };
40449
+ Insert: {
40450
+ assigned_at?: string;
40451
+ cart_index: number;
40452
+ cart_number: string;
40453
+ day_seq: number;
40454
+ id?: string;
40455
+ order_id: string;
40456
+ order_source: string;
40457
+ pick_date: string;
40458
+ status?: string;
40459
+ };
40460
+ Update: {
40461
+ assigned_at?: string;
40462
+ cart_index?: number;
40463
+ cart_number?: string;
40464
+ day_seq?: number;
40465
+ id?: string;
40466
+ order_id?: string;
40467
+ order_source?: string;
40468
+ pick_date?: string;
40469
+ status?: string;
40470
+ };
40471
+ Relationships: [];
40472
+ };
37747
40473
  cart_pick_overrides: {
37748
40474
  Row: {
37749
40475
  cart_index: number;
@@ -38416,6 +41142,54 @@ export declare const getOrderLines: import("@tanstack/start-client-core").Requir
38416
41142
  referencedColumns: ["id"];
38417
41143
  }];
38418
41144
  };
41145
+ dashboard_critical_alerts: {
41146
+ Row: {
41147
+ alert_key: string;
41148
+ alert_type: string;
41149
+ created_at: string;
41150
+ description: string | null;
41151
+ id: string;
41152
+ metadata: import("../integrations/supabase/types").Json | null;
41153
+ priority: string;
41154
+ raised_at: string;
41155
+ related_cart_ids: string[] | null;
41156
+ resolved_at: string | null;
41157
+ title: string;
41158
+ updated_at: string;
41159
+ user_id: string;
41160
+ };
41161
+ Insert: {
41162
+ alert_key: string;
41163
+ alert_type: string;
41164
+ created_at?: string;
41165
+ description?: string | null;
41166
+ id?: string;
41167
+ metadata?: import("../integrations/supabase/types").Json | null;
41168
+ priority?: string;
41169
+ raised_at?: string;
41170
+ related_cart_ids?: string[] | null;
41171
+ resolved_at?: string | null;
41172
+ title: string;
41173
+ updated_at?: string;
41174
+ user_id: string;
41175
+ };
41176
+ Update: {
41177
+ alert_key?: string;
41178
+ alert_type?: string;
41179
+ created_at?: string;
41180
+ description?: string | null;
41181
+ id?: string;
41182
+ metadata?: import("../integrations/supabase/types").Json | null;
41183
+ priority?: string;
41184
+ raised_at?: string;
41185
+ related_cart_ids?: string[] | null;
41186
+ resolved_at?: string | null;
41187
+ title?: string;
41188
+ updated_at?: string;
41189
+ user_id?: string;
41190
+ };
41191
+ Relationships: [];
41192
+ };
38419
41193
  dashboard_daily_reports: {
38420
41194
  Row: {
38421
41195
  created_at: string;
@@ -39918,6 +42692,7 @@ export declare const getOrderLines: import("@tanstack/start-client-core").Requir
39918
42692
  };
39919
42693
  floricode_sync_state: {
39920
42694
  Row: {
42695
+ cursor_skip: number;
39921
42696
  error_message: string | null;
39922
42697
  last_change_date_time: string | null;
39923
42698
  last_sequence_number: number;
@@ -39927,6 +42702,7 @@ export declare const getOrderLines: import("@tanstack/start-client-core").Requir
39927
42702
  updated_at: string;
39928
42703
  };
39929
42704
  Insert: {
42705
+ cursor_skip?: number;
39930
42706
  error_message?: string | null;
39931
42707
  last_change_date_time?: string | null;
39932
42708
  last_sequence_number?: number;
@@ -39936,6 +42712,7 @@ export declare const getOrderLines: import("@tanstack/start-client-core").Requir
39936
42712
  updated_at?: string;
39937
42713
  };
39938
42714
  Update: {
42715
+ cursor_skip?: number;
39939
42716
  error_message?: string | null;
39940
42717
  last_change_date_time?: string | null;
39941
42718
  last_sequence_number?: number;
@@ -42283,6 +45060,93 @@ export declare const getOrderLines: import("@tanstack/start-client-core").Requir
42283
45060
  };
42284
45061
  Relationships: [];
42285
45062
  };
45063
+ manufacture_product_components: {
45064
+ Row: {
45065
+ component_type: string;
45066
+ created_at: string;
45067
+ id: string;
45068
+ manufacture_product_id: string;
45069
+ product_group_id: string | null;
45070
+ quantity: number;
45071
+ trade_item_id: string | null;
45072
+ unit: string;
45073
+ };
45074
+ Insert: {
45075
+ component_type: string;
45076
+ created_at?: string;
45077
+ id?: string;
45078
+ manufacture_product_id: string;
45079
+ product_group_id?: string | null;
45080
+ quantity?: number;
45081
+ trade_item_id?: string | null;
45082
+ unit?: string;
45083
+ };
45084
+ Update: {
45085
+ component_type?: string;
45086
+ created_at?: string;
45087
+ id?: string;
45088
+ manufacture_product_id?: string;
45089
+ product_group_id?: string | null;
45090
+ quantity?: number;
45091
+ trade_item_id?: string | null;
45092
+ unit?: string;
45093
+ };
45094
+ Relationships: [{
45095
+ foreignKeyName: "manufacture_product_components_manufacture_product_id_fkey";
45096
+ columns: ["manufacture_product_id"];
45097
+ isOneToOne: false;
45098
+ referencedRelation: "manufacture_product_possible_stock_view";
45099
+ referencedColumns: ["manufacture_product_id"];
45100
+ }, {
45101
+ foreignKeyName: "manufacture_product_components_manufacture_product_id_fkey";
45102
+ columns: ["manufacture_product_id"];
45103
+ isOneToOne: false;
45104
+ referencedRelation: "manufacture_products";
45105
+ referencedColumns: ["id"];
45106
+ }, {
45107
+ foreignKeyName: "manufacture_product_components_product_group_id_fkey";
45108
+ columns: ["product_group_id"];
45109
+ isOneToOne: false;
45110
+ referencedRelation: "product_groups";
45111
+ referencedColumns: ["id"];
45112
+ }];
45113
+ };
45114
+ manufacture_products: {
45115
+ Row: {
45116
+ created_at: string;
45117
+ description: string | null;
45118
+ id: string;
45119
+ is_active: boolean;
45120
+ name: string;
45121
+ produced_stock: number;
45122
+ product_code: string;
45123
+ tenant_id: string;
45124
+ updated_at: string;
45125
+ };
45126
+ Insert: {
45127
+ created_at?: string;
45128
+ description?: string | null;
45129
+ id?: string;
45130
+ is_active?: boolean;
45131
+ name: string;
45132
+ produced_stock?: number;
45133
+ product_code: string;
45134
+ tenant_id: string;
45135
+ updated_at?: string;
45136
+ };
45137
+ Update: {
45138
+ created_at?: string;
45139
+ description?: string | null;
45140
+ id?: string;
45141
+ is_active?: boolean;
45142
+ name?: string;
45143
+ produced_stock?: number;
45144
+ product_code?: string;
45145
+ tenant_id?: string;
45146
+ updated_at?: string;
45147
+ };
45148
+ Relationships: [];
45149
+ };
42286
45150
  monteurs: {
42287
45151
  Row: {
42288
45152
  avatar_url: string | null;
@@ -43243,6 +46107,66 @@ export declare const getOrderLines: import("@tanstack/start-client-core").Requir
43243
46107
  };
43244
46108
  Relationships: [];
43245
46109
  };
46110
+ product_group_items: {
46111
+ Row: {
46112
+ created_at: string;
46113
+ id: string;
46114
+ product_group_id: string;
46115
+ quantity: number;
46116
+ trade_item_id: string;
46117
+ };
46118
+ Insert: {
46119
+ created_at?: string;
46120
+ id?: string;
46121
+ product_group_id: string;
46122
+ quantity?: number;
46123
+ trade_item_id: string;
46124
+ };
46125
+ Update: {
46126
+ created_at?: string;
46127
+ id?: string;
46128
+ product_group_id?: string;
46129
+ quantity?: number;
46130
+ trade_item_id?: string;
46131
+ };
46132
+ Relationships: [{
46133
+ foreignKeyName: "product_group_items_product_group_id_fkey";
46134
+ columns: ["product_group_id"];
46135
+ isOneToOne: false;
46136
+ referencedRelation: "product_groups";
46137
+ referencedColumns: ["id"];
46138
+ }];
46139
+ };
46140
+ product_groups: {
46141
+ Row: {
46142
+ created_at: string;
46143
+ description: string | null;
46144
+ id: string;
46145
+ is_active: boolean;
46146
+ name: string;
46147
+ tenant_id: string;
46148
+ updated_at: string;
46149
+ };
46150
+ Insert: {
46151
+ created_at?: string;
46152
+ description?: string | null;
46153
+ id?: string;
46154
+ is_active?: boolean;
46155
+ name: string;
46156
+ tenant_id: string;
46157
+ updated_at?: string;
46158
+ };
46159
+ Update: {
46160
+ created_at?: string;
46161
+ description?: string | null;
46162
+ id?: string;
46163
+ is_active?: boolean;
46164
+ name?: string;
46165
+ tenant_id?: string;
46166
+ updated_at?: string;
46167
+ };
46168
+ Relationships: [];
46169
+ };
43246
46170
  products: {
43247
46171
  Row: {
43248
46172
  barcode: string | null;
@@ -44382,7 +47306,13 @@ export declare const getOrderLines: import("@tanstack/start-client-core").Requir
44382
47306
  connection_id: string | null;
44383
47307
  created_at: string;
44384
47308
  data: import("../integrations/supabase/types").Json;
47309
+ floriday_id: string | null;
47310
+ floriday_link_error: string | null;
47311
+ floriday_link_status: string;
44385
47312
  id: string;
47313
+ last_floriday_sync_at: string | null;
47314
+ missing_required_fields: string[];
47315
+ source: string;
44386
47316
  updated_at: string;
44387
47317
  user_id: string;
44388
47318
  };
@@ -44390,7 +47320,13 @@ export declare const getOrderLines: import("@tanstack/start-client-core").Requir
44390
47320
  connection_id?: string | null;
44391
47321
  created_at?: string;
44392
47322
  data?: import("../integrations/supabase/types").Json;
47323
+ floriday_id?: string | null;
47324
+ floriday_link_error?: string | null;
47325
+ floriday_link_status?: string;
44393
47326
  id?: string;
47327
+ last_floriday_sync_at?: string | null;
47328
+ missing_required_fields?: string[];
47329
+ source?: string;
44394
47330
  updated_at?: string;
44395
47331
  user_id: string;
44396
47332
  };
@@ -44398,7 +47334,55 @@ export declare const getOrderLines: import("@tanstack/start-client-core").Requir
44398
47334
  connection_id?: string | null;
44399
47335
  created_at?: string;
44400
47336
  data?: import("../integrations/supabase/types").Json;
47337
+ floriday_id?: string | null;
47338
+ floriday_link_error?: string | null;
47339
+ floriday_link_status?: string;
47340
+ id?: string;
47341
+ last_floriday_sync_at?: string | null;
47342
+ missing_required_fields?: string[];
47343
+ source?: string;
47344
+ updated_at?: string;
47345
+ user_id?: string;
47346
+ };
47347
+ Relationships: [];
47348
+ };
47349
+ trade_item_stock: {
47350
+ Row: {
47351
+ connection_id: string;
47352
+ created_at: string;
47353
+ id: string;
47354
+ incoming_stock: number;
47355
+ minimum_stock: number;
47356
+ notes: string | null;
47357
+ physical_stock: number;
47358
+ reserved_stock: number;
47359
+ trade_item_key: string;
47360
+ updated_at: string;
47361
+ user_id: string;
47362
+ };
47363
+ Insert: {
47364
+ connection_id: string;
47365
+ created_at?: string;
47366
+ id?: string;
47367
+ incoming_stock?: number;
47368
+ minimum_stock?: number;
47369
+ notes?: string | null;
47370
+ physical_stock?: number;
47371
+ reserved_stock?: number;
47372
+ trade_item_key: string;
47373
+ updated_at?: string;
47374
+ user_id: string;
47375
+ };
47376
+ Update: {
47377
+ connection_id?: string;
47378
+ created_at?: string;
44401
47379
  id?: string;
47380
+ incoming_stock?: number;
47381
+ minimum_stock?: number;
47382
+ notes?: string | null;
47383
+ physical_stock?: number;
47384
+ reserved_stock?: number;
47385
+ trade_item_key?: string;
44402
47386
  updated_at?: string;
44403
47387
  user_id?: string;
44404
47388
  };
@@ -44748,6 +47732,7 @@ export declare const getOrderLines: import("@tanstack/start-client-core").Requir
44748
47732
  };
44749
47733
  twinfield_invoice_sync_logs: {
44750
47734
  Row: {
47735
+ action_type: string | null;
44751
47736
  created_at: string;
44752
47737
  details: import("../integrations/supabase/types").Json | null;
44753
47738
  duration_ms: number | null;
@@ -44760,6 +47745,7 @@ export declare const getOrderLines: import("@tanstack/start-client-core").Requir
44760
47745
  user_id: string;
44761
47746
  };
44762
47747
  Insert: {
47748
+ action_type?: string | null;
44763
47749
  created_at?: string;
44764
47750
  details?: import("../integrations/supabase/types").Json | null;
44765
47751
  duration_ms?: number | null;
@@ -44772,6 +47758,7 @@ export declare const getOrderLines: import("@tanstack/start-client-core").Requir
44772
47758
  user_id: string;
44773
47759
  };
44774
47760
  Update: {
47761
+ action_type?: string | null;
44775
47762
  created_at?: string;
44776
47763
  details?: import("../integrations/supabase/types").Json | null;
44777
47764
  duration_ms?: number | null;
@@ -45007,6 +47994,57 @@ export declare const getOrderLines: import("@tanstack/start-client-core").Requir
45007
47994
  referencedColumns: ["id"];
45008
47995
  }];
45009
47996
  };
47997
+ twinfield_request_metrics: {
47998
+ Row: {
47999
+ bucket_hour: string;
48000
+ connection_id: string;
48001
+ error_count: number;
48002
+ rate_limited_count: number;
48003
+ request_count: number;
48004
+ updated_at: string;
48005
+ };
48006
+ Insert: {
48007
+ bucket_hour: string;
48008
+ connection_id: string;
48009
+ error_count?: number;
48010
+ rate_limited_count?: number;
48011
+ request_count?: number;
48012
+ updated_at?: string;
48013
+ };
48014
+ Update: {
48015
+ bucket_hour?: string;
48016
+ connection_id?: string;
48017
+ error_count?: number;
48018
+ rate_limited_count?: number;
48019
+ request_count?: number;
48020
+ updated_at?: string;
48021
+ };
48022
+ Relationships: [];
48023
+ };
48024
+ twinfield_session_cache: {
48025
+ Row: {
48026
+ cluster: string;
48027
+ created_at: string;
48028
+ expires_at: string;
48029
+ session_id: string;
48030
+ user_id: string;
48031
+ };
48032
+ Insert: {
48033
+ cluster: string;
48034
+ created_at?: string;
48035
+ expires_at: string;
48036
+ session_id: string;
48037
+ user_id: string;
48038
+ };
48039
+ Update: {
48040
+ cluster?: string;
48041
+ created_at?: string;
48042
+ expires_at?: string;
48043
+ session_id?: string;
48044
+ user_id?: string;
48045
+ };
48046
+ Relationships: [];
48047
+ };
45010
48048
  twinfield_settings: {
45011
48049
  Row: {
45012
48050
  active_environment: string;
@@ -45588,6 +48626,35 @@ export declare const getOrderLines: import("@tanstack/start-client-core").Requir
45588
48626
  };
45589
48627
  Relationships: [];
45590
48628
  };
48629
+ manufacture_product_possible_stock_view: {
48630
+ Row: {
48631
+ component_count: number | null;
48632
+ manufacture_product_id: string | null;
48633
+ possible_stock: number | null;
48634
+ };
48635
+ Relationships: [];
48636
+ };
48637
+ product_group_stock_view: {
48638
+ Row: {
48639
+ item_count: number | null;
48640
+ product_group_id: string | null;
48641
+ total_stock: number | null;
48642
+ };
48643
+ Relationships: [{
48644
+ foreignKeyName: "product_group_items_product_group_id_fkey";
48645
+ columns: ["product_group_id"];
48646
+ isOneToOne: false;
48647
+ referencedRelation: "product_groups";
48648
+ referencedColumns: ["id"];
48649
+ }];
48650
+ };
48651
+ trade_item_stock_view: {
48652
+ Row: {
48653
+ stock: number | null;
48654
+ trade_item_id: string | null;
48655
+ };
48656
+ Relationships: [];
48657
+ };
45591
48658
  v_external_customers_exact: {
45592
48659
  Row: {
45593
48660
  account_number: string | null;
@@ -45843,6 +48910,20 @@ export declare const getOrderLines: import("@tanstack/start-client-core").Requir
45843
48910
  };
45844
48911
  Returns: number;
45845
48912
  };
48913
+ assign_cart_numbers: {
48914
+ Args: {
48915
+ p_carts: import("../integrations/supabase/types").Json;
48916
+ };
48917
+ Returns: {
48918
+ cart_index: number;
48919
+ cart_number: string;
48920
+ day_seq: number;
48921
+ order_id: string;
48922
+ order_source: string;
48923
+ pick_date: string;
48924
+ status: string;
48925
+ }[];
48926
+ };
45846
48927
  assign_floriday_order_numbers: {
45847
48928
  Args: {
45848
48929
  p_ids: string[];
@@ -45862,10 +48943,37 @@ export declare const getOrderLines: import("@tanstack/start-client-core").Requir
45862
48943
  Args: never;
45863
48944
  Returns: number;
45864
48945
  };
48946
+ control_get_todays_carts: {
48947
+ Args: never;
48948
+ Returns: {
48949
+ cart_index: number;
48950
+ cart_number: string;
48951
+ cart_number_id: string;
48952
+ order_id: string;
48953
+ order_source: string;
48954
+ pick_date: string;
48955
+ status: string;
48956
+ }[];
48957
+ };
48958
+ count_distinct_regulatory_products: {
48959
+ Args: never;
48960
+ Returns: number;
48961
+ };
45865
48962
  current_monteur_id: {
45866
48963
  Args: never;
45867
48964
  Returns: string;
45868
48965
  };
48966
+ dashboard_alert_counts: {
48967
+ Args: never;
48968
+ Returns: import("../integrations/supabase/types").Json;
48969
+ };
48970
+ dashboard_alert_rows: {
48971
+ Args: {
48972
+ check_id: string;
48973
+ row_limit?: number;
48974
+ };
48975
+ Returns: import("../integrations/supabase/types").Json;
48976
+ };
45869
48977
  dashboard_list_public_schema: {
45870
48978
  Args: never;
45871
48979
  Returns: {
@@ -45946,6 +49054,13 @@ export declare const getOrderLines: import("@tanstack/start-client-core").Requir
45946
49054
  };
45947
49055
  Returns: boolean;
45948
49056
  };
49057
+ format_cart_number: {
49058
+ Args: {
49059
+ p_pick_date: string;
49060
+ p_seq: number;
49061
+ };
49062
+ Returns: string;
49063
+ };
45949
49064
  get_active_floriday_connection_public: {
45950
49065
  Args: never;
45951
49066
  Returns: {
@@ -46150,14 +49265,29 @@ export declare const getOrderLines: import("@tanstack/start-client-core").Requir
46150
49265
  };
46151
49266
  Returns: undefined;
46152
49267
  };
49268
+ pickstation_set_cart_status: {
49269
+ Args: {
49270
+ p_cart_index: number;
49271
+ p_order_id: string;
49272
+ p_order_source: string;
49273
+ p_status: string;
49274
+ };
49275
+ Returns: undefined;
49276
+ };
46153
49277
  refresh_floricode_derived_code_lists: {
46154
49278
  Args: never;
46155
49279
  Returns: {
46156
- out_environment: string;
46157
- out_list_name: string;
46158
- out_row_count: number;
49280
+ environment: string;
49281
+ list_name: string;
49282
+ row_count: number;
46159
49283
  }[];
46160
49284
  };
49285
+ refresh_floricode_derived_for_product: {
49286
+ Args: {
49287
+ p_product_code: string;
49288
+ };
49289
+ Returns: number;
49290
+ };
46161
49291
  reset_floriday_sync_cursor: {
46162
49292
  Args: {
46163
49293
  p_connection_id: string;