@flowselections/floriday-verkoop-module 1.0.10 → 1.0.12

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 (37) hide show
  1. package/dist-lib/components/verkoop/AnalyticsCards.d.ts +1 -1
  2. package/dist-lib/components/verkoop/AnalyticsCards.d.ts.map +1 -1
  3. package/dist-lib/components/verkoop/AnalyticsCards.js +1 -7
  4. package/dist-lib/components/verkoop/CreateOrderPage.d.ts.map +1 -1
  5. package/dist-lib/components/verkoop/CreateOrderPage.js +217 -189
  6. package/dist-lib/components/verkoop/SalesOrderDetailView.d.ts.map +1 -1
  7. package/dist-lib/components/verkoop/SalesOrderDetailView.js +1 -1
  8. package/dist-lib/components/verkoop/SalesOrdersTable.d.ts.map +1 -1
  9. package/dist-lib/components/verkoop/SalesOrdersTable.js +19 -40
  10. package/dist-lib/components/verkoop/SearchableSelect.d.ts +19 -0
  11. package/dist-lib/components/verkoop/SearchableSelect.d.ts.map +1 -0
  12. package/dist-lib/components/verkoop/SearchableSelect.js +21 -0
  13. package/dist-lib/integrations/supabase/auth-middleware.d.ts +1486 -35
  14. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
  15. package/dist-lib/integrations/supabase/client.d.ts +1486 -35
  16. package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
  17. package/dist-lib/integrations/supabase/client.server.d.ts +1486 -35
  18. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
  19. package/dist-lib/integrations/supabase/types.d.ts +1515 -34
  20. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  21. package/dist-lib/lib/create-order.functions.d.ts +75223 -0
  22. package/dist-lib/lib/create-order.functions.d.ts.map +1 -0
  23. package/dist-lib/lib/create-order.functions.js +188 -0
  24. package/dist-lib/lib/floriday-public.functions.d.ts +10157 -0
  25. package/dist-lib/lib/floriday-public.functions.d.ts.map +1 -1
  26. package/dist-lib/lib/floriday-writes.functions.d.ts +7255 -0
  27. package/dist-lib/lib/floriday-writes.functions.d.ts.map +1 -1
  28. package/dist-lib/lib/salesorders-mapping.d.ts +4 -0
  29. package/dist-lib/lib/salesorders-mapping.d.ts.map +1 -1
  30. package/dist-lib/lib/salesorders-mapping.js +14 -3
  31. package/dist-lib/lib/salesorders.functions.d.ts +4614 -261
  32. package/dist-lib/lib/salesorders.functions.d.ts.map +1 -1
  33. package/dist-lib/lib/tradeitems.functions.d.ts +1486 -35
  34. package/dist-lib/lib/tradeitems.functions.d.ts.map +1 -1
  35. package/dist-lib/lib/useSalesOrdersQuery.d.ts.map +1 -1
  36. package/dist-lib/lib/useSalesOrdersQuery.js +166 -26
  37. package/package.json +1 -1
@@ -13,6 +13,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
13
13
  max_workdays_earlier_pick: number;
14
14
  pick_days_before_transport: number;
15
15
  pick_distribution_enabled: boolean;
16
+ pick_weekdays: number[];
16
17
  signup_mail_enabled: boolean;
17
18
  signup_mail_lead_minutes: number;
18
19
  signup_mail_purpose: string;
@@ -26,6 +27,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
26
27
  max_workdays_earlier_pick?: number;
27
28
  pick_days_before_transport?: number;
28
29
  pick_distribution_enabled?: boolean;
30
+ pick_weekdays?: number[];
29
31
  signup_mail_enabled?: boolean;
30
32
  signup_mail_lead_minutes?: number;
31
33
  signup_mail_purpose?: string;
@@ -39,6 +41,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
39
41
  max_workdays_earlier_pick?: number;
40
42
  pick_days_before_transport?: number;
41
43
  pick_distribution_enabled?: boolean;
44
+ pick_weekdays?: number[];
42
45
  signup_mail_enabled?: boolean;
43
46
  signup_mail_lead_minutes?: number;
44
47
  signup_mail_purpose?: string;
@@ -450,6 +453,48 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
450
453
  referencedColumns: ["id"];
451
454
  }];
452
455
  };
456
+ carrier_signup_dispatch_runs: {
457
+ Row: {
458
+ detail: import("../integrations/supabase/types").Json | null;
459
+ error: string | null;
460
+ finished_at: string | null;
461
+ groups: number;
462
+ id: string;
463
+ ok: boolean;
464
+ reason: string | null;
465
+ sent: number;
466
+ skipped: import("../integrations/supabase/types").Json;
467
+ started_at: string;
468
+ unassigned: import("../integrations/supabase/types").Json;
469
+ };
470
+ Insert: {
471
+ detail?: import("../integrations/supabase/types").Json | null;
472
+ error?: string | null;
473
+ finished_at?: string | null;
474
+ groups?: number;
475
+ id?: string;
476
+ ok?: boolean;
477
+ reason?: string | null;
478
+ sent?: number;
479
+ skipped?: import("../integrations/supabase/types").Json;
480
+ started_at?: string;
481
+ unassigned?: import("../integrations/supabase/types").Json;
482
+ };
483
+ Update: {
484
+ detail?: import("../integrations/supabase/types").Json | null;
485
+ error?: string | null;
486
+ finished_at?: string | null;
487
+ groups?: number;
488
+ id?: string;
489
+ ok?: boolean;
490
+ reason?: string | null;
491
+ sent?: number;
492
+ skipped?: import("../integrations/supabase/types").Json;
493
+ started_at?: string;
494
+ unassigned?: import("../integrations/supabase/types").Json;
495
+ };
496
+ Relationships: [];
497
+ };
453
498
  carrier_signup_dispatches: {
454
499
  Row: {
455
500
  carrier_id: string;
@@ -501,6 +546,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
501
546
  contact_person: string | null;
502
547
  created_at: string;
503
548
  delivery_days: number | null;
549
+ delivery_weekdays: number[];
504
550
  email: string | null;
505
551
  id: string;
506
552
  is_default: boolean;
@@ -508,6 +554,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
508
554
  notes: string | null;
509
555
  phone: string | null;
510
556
  pickup_moments: import("../integrations/supabase/types").Json;
557
+ pickup_weekdays: number[];
511
558
  service_cities: string[];
512
559
  service_countries: string[];
513
560
  service_provinces: string[];
@@ -523,6 +570,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
523
570
  contact_person?: string | null;
524
571
  created_at?: string;
525
572
  delivery_days?: number | null;
573
+ delivery_weekdays?: number[];
526
574
  email?: string | null;
527
575
  id?: string;
528
576
  is_default?: boolean;
@@ -530,6 +578,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
530
578
  notes?: string | null;
531
579
  phone?: string | null;
532
580
  pickup_moments?: import("../integrations/supabase/types").Json;
581
+ pickup_weekdays?: number[];
533
582
  service_cities?: string[];
534
583
  service_countries?: string[];
535
584
  service_provinces?: string[];
@@ -545,6 +594,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
545
594
  contact_person?: string | null;
546
595
  created_at?: string;
547
596
  delivery_days?: number | null;
597
+ delivery_weekdays?: number[];
548
598
  email?: string | null;
549
599
  id?: string;
550
600
  is_default?: boolean;
@@ -552,6 +602,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
552
602
  notes?: string | null;
553
603
  phone?: string | null;
554
604
  pickup_moments?: import("../integrations/supabase/types").Json;
605
+ pickup_weekdays?: number[];
555
606
  service_cities?: string[];
556
607
  service_countries?: string[];
557
608
  service_provinces?: string[];
@@ -564,6 +615,180 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
564
615
  };
565
616
  Relationships: [];
566
617
  };
618
+ cart_control_draft: {
619
+ Row: {
620
+ cart_states: import("../integrations/supabase/types").Json;
621
+ checked_keys: import("../integrations/supabase/types").Json;
622
+ draft_date: string;
623
+ form_state: import("../integrations/supabase/types").Json;
624
+ notes: string;
625
+ updated_at: string;
626
+ user_id: string;
627
+ };
628
+ Insert: {
629
+ cart_states?: import("../integrations/supabase/types").Json;
630
+ checked_keys?: import("../integrations/supabase/types").Json;
631
+ draft_date: string;
632
+ form_state?: import("../integrations/supabase/types").Json;
633
+ notes?: string;
634
+ updated_at?: string;
635
+ user_id: string;
636
+ };
637
+ Update: {
638
+ cart_states?: import("../integrations/supabase/types").Json;
639
+ checked_keys?: import("../integrations/supabase/types").Json;
640
+ draft_date?: string;
641
+ form_state?: import("../integrations/supabase/types").Json;
642
+ notes?: string;
643
+ updated_at?: string;
644
+ user_id?: string;
645
+ };
646
+ Relationships: [];
647
+ };
648
+ cart_control_items: {
649
+ Row: {
650
+ action: string;
651
+ block_reason: string | null;
652
+ carrier_name: string | null;
653
+ cart_index: number;
654
+ cart_number_id: string | null;
655
+ cart_number_label: string | null;
656
+ created_at: string;
657
+ customer_name: string | null;
658
+ delivery_date: string | null;
659
+ id: string;
660
+ new_pick_date: string | null;
661
+ order_id: string;
662
+ order_number: string | null;
663
+ order_source: string;
664
+ pickup_date: string | null;
665
+ session_id: string;
666
+ };
667
+ Insert: {
668
+ action: string;
669
+ block_reason?: string | null;
670
+ carrier_name?: string | null;
671
+ cart_index: number;
672
+ cart_number_id?: string | null;
673
+ cart_number_label?: string | null;
674
+ created_at?: string;
675
+ customer_name?: string | null;
676
+ delivery_date?: string | null;
677
+ id?: string;
678
+ new_pick_date?: string | null;
679
+ order_id: string;
680
+ order_number?: string | null;
681
+ order_source: string;
682
+ pickup_date?: string | null;
683
+ session_id: string;
684
+ };
685
+ Update: {
686
+ action?: string;
687
+ block_reason?: string | null;
688
+ carrier_name?: string | null;
689
+ cart_index?: number;
690
+ cart_number_id?: string | null;
691
+ cart_number_label?: string | null;
692
+ created_at?: string;
693
+ customer_name?: string | null;
694
+ delivery_date?: string | null;
695
+ id?: string;
696
+ new_pick_date?: string | null;
697
+ order_id?: string;
698
+ order_number?: string | null;
699
+ order_source?: string;
700
+ pickup_date?: string | null;
701
+ session_id?: string;
702
+ };
703
+ Relationships: [{
704
+ foreignKeyName: "cart_control_items_session_id_fkey";
705
+ columns: ["session_id"];
706
+ isOneToOne: false;
707
+ referencedRelation: "cart_control_sessions";
708
+ referencedColumns: ["id"];
709
+ }];
710
+ };
711
+ cart_control_sessions: {
712
+ Row: {
713
+ blocked_count: number;
714
+ checked_count: number;
715
+ control_date: string;
716
+ created_at: string;
717
+ id: string;
718
+ notes: string | null;
719
+ performed_at: string;
720
+ rescheduled_count: number;
721
+ stock_consumed_at: string | null;
722
+ total_carts: number;
723
+ updated_at: string;
724
+ user_id: string;
725
+ };
726
+ Insert: {
727
+ blocked_count?: number;
728
+ checked_count?: number;
729
+ control_date?: string;
730
+ created_at?: string;
731
+ id?: string;
732
+ notes?: string | null;
733
+ performed_at?: string;
734
+ rescheduled_count?: number;
735
+ stock_consumed_at?: string | null;
736
+ total_carts?: number;
737
+ updated_at?: string;
738
+ user_id: string;
739
+ };
740
+ Update: {
741
+ blocked_count?: number;
742
+ checked_count?: number;
743
+ control_date?: string;
744
+ created_at?: string;
745
+ id?: string;
746
+ notes?: string | null;
747
+ performed_at?: string;
748
+ rescheduled_count?: number;
749
+ stock_consumed_at?: string | null;
750
+ total_carts?: number;
751
+ updated_at?: string;
752
+ user_id?: string;
753
+ };
754
+ Relationships: [];
755
+ };
756
+ cart_numbers: {
757
+ Row: {
758
+ assigned_at: string;
759
+ cart_index: number;
760
+ cart_number: string;
761
+ day_seq: number;
762
+ id: string;
763
+ order_id: string;
764
+ order_source: string;
765
+ pick_date: string;
766
+ status: string;
767
+ };
768
+ Insert: {
769
+ assigned_at?: string;
770
+ cart_index: number;
771
+ cart_number: string;
772
+ day_seq: number;
773
+ id?: string;
774
+ order_id: string;
775
+ order_source: string;
776
+ pick_date: string;
777
+ status?: string;
778
+ };
779
+ Update: {
780
+ assigned_at?: string;
781
+ cart_index?: number;
782
+ cart_number?: string;
783
+ day_seq?: number;
784
+ id?: string;
785
+ order_id?: string;
786
+ order_source?: string;
787
+ pick_date?: string;
788
+ status?: string;
789
+ };
790
+ Relationships: [];
791
+ };
567
792
  cart_pick_overrides: {
568
793
  Row: {
569
794
  cart_index: number;
@@ -1236,6 +1461,54 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
1236
1461
  referencedColumns: ["id"];
1237
1462
  }];
1238
1463
  };
1464
+ dashboard_critical_alerts: {
1465
+ Row: {
1466
+ alert_key: string;
1467
+ alert_type: string;
1468
+ created_at: string;
1469
+ description: string | null;
1470
+ id: string;
1471
+ metadata: import("../integrations/supabase/types").Json | null;
1472
+ priority: string;
1473
+ raised_at: string;
1474
+ related_cart_ids: string[] | null;
1475
+ resolved_at: string | null;
1476
+ title: string;
1477
+ updated_at: string;
1478
+ user_id: string;
1479
+ };
1480
+ Insert: {
1481
+ alert_key: string;
1482
+ alert_type: string;
1483
+ created_at?: string;
1484
+ description?: string | null;
1485
+ id?: string;
1486
+ metadata?: import("../integrations/supabase/types").Json | null;
1487
+ priority?: string;
1488
+ raised_at?: string;
1489
+ related_cart_ids?: string[] | null;
1490
+ resolved_at?: string | null;
1491
+ title: string;
1492
+ updated_at?: string;
1493
+ user_id: string;
1494
+ };
1495
+ Update: {
1496
+ alert_key?: string;
1497
+ alert_type?: string;
1498
+ created_at?: string;
1499
+ description?: string | null;
1500
+ id?: string;
1501
+ metadata?: import("../integrations/supabase/types").Json | null;
1502
+ priority?: string;
1503
+ raised_at?: string;
1504
+ related_cart_ids?: string[] | null;
1505
+ resolved_at?: string | null;
1506
+ title?: string;
1507
+ updated_at?: string;
1508
+ user_id?: string;
1509
+ };
1510
+ Relationships: [];
1511
+ };
1239
1512
  dashboard_daily_reports: {
1240
1513
  Row: {
1241
1514
  created_at: string;
@@ -2738,6 +3011,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
2738
3011
  };
2739
3012
  floricode_sync_state: {
2740
3013
  Row: {
3014
+ cursor_skip: number;
2741
3015
  error_message: string | null;
2742
3016
  last_change_date_time: string | null;
2743
3017
  last_sequence_number: number;
@@ -2747,6 +3021,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
2747
3021
  updated_at: string;
2748
3022
  };
2749
3023
  Insert: {
3024
+ cursor_skip?: number;
2750
3025
  error_message?: string | null;
2751
3026
  last_change_date_time?: string | null;
2752
3027
  last_sequence_number?: number;
@@ -2756,6 +3031,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
2756
3031
  updated_at?: string;
2757
3032
  };
2758
3033
  Update: {
3034
+ cursor_skip?: number;
2759
3035
  error_message?: string | null;
2760
3036
  last_change_date_time?: string | null;
2761
3037
  last_sequence_number?: number;
@@ -3351,6 +3627,51 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
3351
3627
  referencedColumns: ["id"];
3352
3628
  }];
3353
3629
  };
3630
+ floriday_continuous_stock_queue: {
3631
+ Row: {
3632
+ attempts: number;
3633
+ connection_id: string;
3634
+ created_at: string;
3635
+ gateway_attempt_id: string | null;
3636
+ id: string;
3637
+ last_error: string | null;
3638
+ number_of_pieces: number;
3639
+ sent_at: string | null;
3640
+ status: string;
3641
+ trade_item_id: string;
3642
+ updated_at: string;
3643
+ user_id: string;
3644
+ };
3645
+ Insert: {
3646
+ attempts?: number;
3647
+ connection_id: string;
3648
+ created_at?: string;
3649
+ gateway_attempt_id?: string | null;
3650
+ id?: string;
3651
+ last_error?: string | null;
3652
+ number_of_pieces?: number;
3653
+ sent_at?: string | null;
3654
+ status?: string;
3655
+ trade_item_id: string;
3656
+ updated_at?: string;
3657
+ user_id: string;
3658
+ };
3659
+ Update: {
3660
+ attempts?: number;
3661
+ connection_id?: string;
3662
+ created_at?: string;
3663
+ gateway_attempt_id?: string | null;
3664
+ id?: string;
3665
+ last_error?: string | null;
3666
+ number_of_pieces?: number;
3667
+ sent_at?: string | null;
3668
+ status?: string;
3669
+ trade_item_id?: string;
3670
+ updated_at?: string;
3671
+ user_id?: string;
3672
+ };
3673
+ Relationships: [];
3674
+ };
3354
3675
  floriday_contract_trade_item_groups_cache: {
3355
3676
  Row: {
3356
3677
  connection_id: string;
@@ -4740,53 +5061,251 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
4740
5061
  };
4741
5062
  Relationships: [];
4742
5063
  };
4743
- locations: {
5064
+ local_customer_agreements: {
4744
5065
  Row: {
5066
+ base_price: number | null;
4745
5067
  created_at: string;
5068
+ currency: string;
5069
+ customer_id: string;
4746
5070
  id: string;
4747
- name: string;
4748
- sort_order: number;
5071
+ min_quantity: number;
5072
+ net_price: number;
5073
+ notes: string | null;
5074
+ product_category_id: string | null;
5075
+ product_id: string | null;
4749
5076
  updated_at: string;
5077
+ valid_from: string | null;
5078
+ valid_until: string | null;
4750
5079
  };
4751
5080
  Insert: {
5081
+ base_price?: number | null;
4752
5082
  created_at?: string;
5083
+ currency?: string;
5084
+ customer_id: string;
4753
5085
  id?: string;
4754
- name: string;
4755
- sort_order?: number;
5086
+ min_quantity?: number;
5087
+ net_price: number;
5088
+ notes?: string | null;
5089
+ product_category_id?: string | null;
5090
+ product_id?: string | null;
4756
5091
  updated_at?: string;
5092
+ valid_from?: string | null;
5093
+ valid_until?: string | null;
4757
5094
  };
4758
5095
  Update: {
5096
+ base_price?: number | null;
4759
5097
  created_at?: string;
5098
+ currency?: string;
5099
+ customer_id?: string;
4760
5100
  id?: string;
4761
- name?: string;
4762
- sort_order?: number;
5101
+ min_quantity?: number;
5102
+ net_price?: number;
5103
+ notes?: string | null;
5104
+ product_category_id?: string | null;
5105
+ product_id?: string | null;
4763
5106
  updated_at?: string;
5107
+ valid_from?: string | null;
5108
+ valid_until?: string | null;
4764
5109
  };
4765
- Relationships: [];
5110
+ Relationships: [{
5111
+ foreignKeyName: "local_customer_agreements_customer_id_fkey";
5112
+ columns: ["customer_id"];
5113
+ isOneToOne: false;
5114
+ referencedRelation: "customers";
5115
+ referencedColumns: ["id"];
5116
+ }, {
5117
+ foreignKeyName: "local_customer_agreements_product_category_id_fkey";
5118
+ columns: ["product_category_id"];
5119
+ isOneToOne: false;
5120
+ referencedRelation: "product_categories";
5121
+ referencedColumns: ["id"];
5122
+ }, {
5123
+ foreignKeyName: "local_customer_agreements_product_id_fkey";
5124
+ columns: ["product_id"];
5125
+ isOneToOne: false;
5126
+ referencedRelation: "products";
5127
+ referencedColumns: ["id"];
5128
+ }];
4766
5129
  };
4767
- mailbox_messages: {
5130
+ local_customer_price_groups: {
4768
5131
  Row: {
4769
- body_html: string | null;
4770
- body_text: string | null;
4771
- connection_id: string | null;
4772
5132
  created_at: string;
4773
- error_message: string | null;
4774
- external_id: string | null;
4775
- from_email: string | null;
4776
- from_name: string | null;
5133
+ currency: string;
5134
+ customer_id: string;
5135
+ discount_type: string;
5136
+ discount_value: number;
4777
5137
  id: string;
4778
- message_id: string | null;
4779
- profile_id: string | null;
4780
- raw_size: number | null;
4781
- received_at: string | null;
4782
- status: string;
4783
- subject: string | null;
4784
- uid: number | null;
5138
+ min_quantity: number;
5139
+ notes: string | null;
5140
+ product_category_id: string | null;
5141
+ product_id: string | null;
4785
5142
  updated_at: string;
5143
+ valid_from: string | null;
5144
+ valid_until: string | null;
4786
5145
  };
4787
5146
  Insert: {
4788
- body_html?: string | null;
4789
- body_text?: string | null;
5147
+ created_at?: string;
5148
+ currency?: string;
5149
+ customer_id: string;
5150
+ discount_type: string;
5151
+ discount_value: number;
5152
+ id?: string;
5153
+ min_quantity?: number;
5154
+ notes?: string | null;
5155
+ product_category_id?: string | null;
5156
+ product_id?: string | null;
5157
+ updated_at?: string;
5158
+ valid_from?: string | null;
5159
+ valid_until?: string | null;
5160
+ };
5161
+ Update: {
5162
+ created_at?: string;
5163
+ currency?: string;
5164
+ customer_id?: string;
5165
+ discount_type?: string;
5166
+ discount_value?: number;
5167
+ id?: string;
5168
+ min_quantity?: number;
5169
+ notes?: string | null;
5170
+ product_category_id?: string | null;
5171
+ product_id?: string | null;
5172
+ updated_at?: string;
5173
+ valid_from?: string | null;
5174
+ valid_until?: string | null;
5175
+ };
5176
+ Relationships: [{
5177
+ foreignKeyName: "local_customer_price_groups_customer_id_fkey";
5178
+ columns: ["customer_id"];
5179
+ isOneToOne: false;
5180
+ referencedRelation: "customers";
5181
+ referencedColumns: ["id"];
5182
+ }, {
5183
+ foreignKeyName: "local_customer_price_groups_product_category_id_fkey";
5184
+ columns: ["product_category_id"];
5185
+ isOneToOne: false;
5186
+ referencedRelation: "product_categories";
5187
+ referencedColumns: ["id"];
5188
+ }, {
5189
+ foreignKeyName: "local_customer_price_groups_product_id_fkey";
5190
+ columns: ["product_id"];
5191
+ isOneToOne: false;
5192
+ referencedRelation: "products";
5193
+ referencedColumns: ["id"];
5194
+ }];
5195
+ };
5196
+ local_customer_sales_strategies: {
5197
+ Row: {
5198
+ created_at: string;
5199
+ currency: string;
5200
+ customer_id: string;
5201
+ discount_type: string;
5202
+ discount_value: number;
5203
+ id: string;
5204
+ min_quantity: number;
5205
+ notes: string | null;
5206
+ product_category_id: string | null;
5207
+ product_id: string | null;
5208
+ updated_at: string;
5209
+ valid_from: string | null;
5210
+ valid_until: string | null;
5211
+ };
5212
+ Insert: {
5213
+ created_at?: string;
5214
+ currency?: string;
5215
+ customer_id: string;
5216
+ discount_type: string;
5217
+ discount_value: number;
5218
+ id?: string;
5219
+ min_quantity?: number;
5220
+ notes?: string | null;
5221
+ product_category_id?: string | null;
5222
+ product_id?: string | null;
5223
+ updated_at?: string;
5224
+ valid_from?: string | null;
5225
+ valid_until?: string | null;
5226
+ };
5227
+ Update: {
5228
+ created_at?: string;
5229
+ currency?: string;
5230
+ customer_id?: string;
5231
+ discount_type?: string;
5232
+ discount_value?: number;
5233
+ id?: string;
5234
+ min_quantity?: number;
5235
+ notes?: string | null;
5236
+ product_category_id?: string | null;
5237
+ product_id?: string | null;
5238
+ updated_at?: string;
5239
+ valid_from?: string | null;
5240
+ valid_until?: string | null;
5241
+ };
5242
+ Relationships: [{
5243
+ foreignKeyName: "local_customer_sales_strategies_customer_id_fkey";
5244
+ columns: ["customer_id"];
5245
+ isOneToOne: false;
5246
+ referencedRelation: "customers";
5247
+ referencedColumns: ["id"];
5248
+ }, {
5249
+ foreignKeyName: "local_customer_sales_strategies_product_category_id_fkey";
5250
+ columns: ["product_category_id"];
5251
+ isOneToOne: false;
5252
+ referencedRelation: "product_categories";
5253
+ referencedColumns: ["id"];
5254
+ }, {
5255
+ foreignKeyName: "local_customer_sales_strategies_product_id_fkey";
5256
+ columns: ["product_id"];
5257
+ isOneToOne: false;
5258
+ referencedRelation: "products";
5259
+ referencedColumns: ["id"];
5260
+ }];
5261
+ };
5262
+ locations: {
5263
+ Row: {
5264
+ created_at: string;
5265
+ id: string;
5266
+ name: string;
5267
+ sort_order: number;
5268
+ updated_at: string;
5269
+ };
5270
+ Insert: {
5271
+ created_at?: string;
5272
+ id?: string;
5273
+ name: string;
5274
+ sort_order?: number;
5275
+ updated_at?: string;
5276
+ };
5277
+ Update: {
5278
+ created_at?: string;
5279
+ id?: string;
5280
+ name?: string;
5281
+ sort_order?: number;
5282
+ updated_at?: string;
5283
+ };
5284
+ Relationships: [];
5285
+ };
5286
+ mailbox_messages: {
5287
+ Row: {
5288
+ body_html: string | null;
5289
+ body_text: string | null;
5290
+ connection_id: string | null;
5291
+ created_at: string;
5292
+ error_message: string | null;
5293
+ external_id: string | null;
5294
+ from_email: string | null;
5295
+ from_name: string | null;
5296
+ id: string;
5297
+ message_id: string | null;
5298
+ profile_id: string | null;
5299
+ raw_size: number | null;
5300
+ received_at: string | null;
5301
+ status: string;
5302
+ subject: string | null;
5303
+ uid: number | null;
5304
+ updated_at: string;
5305
+ };
5306
+ Insert: {
5307
+ body_html?: string | null;
5308
+ body_text?: string | null;
4790
5309
  connection_id?: string | null;
4791
5310
  created_at?: string;
4792
5311
  error_message?: string | null;
@@ -5103,6 +5622,93 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
5103
5622
  };
5104
5623
  Relationships: [];
5105
5624
  };
5625
+ manufacture_product_components: {
5626
+ Row: {
5627
+ component_type: string;
5628
+ created_at: string;
5629
+ id: string;
5630
+ manufacture_product_id: string;
5631
+ product_group_id: string | null;
5632
+ quantity: number;
5633
+ trade_item_id: string | null;
5634
+ unit: string;
5635
+ };
5636
+ Insert: {
5637
+ component_type: string;
5638
+ created_at?: string;
5639
+ id?: string;
5640
+ manufacture_product_id: string;
5641
+ product_group_id?: string | null;
5642
+ quantity?: number;
5643
+ trade_item_id?: string | null;
5644
+ unit?: string;
5645
+ };
5646
+ Update: {
5647
+ component_type?: string;
5648
+ created_at?: string;
5649
+ id?: string;
5650
+ manufacture_product_id?: string;
5651
+ product_group_id?: string | null;
5652
+ quantity?: number;
5653
+ trade_item_id?: string | null;
5654
+ unit?: string;
5655
+ };
5656
+ Relationships: [{
5657
+ foreignKeyName: "manufacture_product_components_manufacture_product_id_fkey";
5658
+ columns: ["manufacture_product_id"];
5659
+ isOneToOne: false;
5660
+ referencedRelation: "manufacture_product_possible_stock_view";
5661
+ referencedColumns: ["manufacture_product_id"];
5662
+ }, {
5663
+ foreignKeyName: "manufacture_product_components_manufacture_product_id_fkey";
5664
+ columns: ["manufacture_product_id"];
5665
+ isOneToOne: false;
5666
+ referencedRelation: "manufacture_products";
5667
+ referencedColumns: ["id"];
5668
+ }, {
5669
+ foreignKeyName: "manufacture_product_components_product_group_id_fkey";
5670
+ columns: ["product_group_id"];
5671
+ isOneToOne: false;
5672
+ referencedRelation: "product_groups";
5673
+ referencedColumns: ["id"];
5674
+ }];
5675
+ };
5676
+ manufacture_products: {
5677
+ Row: {
5678
+ created_at: string;
5679
+ description: string | null;
5680
+ id: string;
5681
+ is_active: boolean;
5682
+ name: string;
5683
+ produced_stock: number;
5684
+ product_code: string;
5685
+ tenant_id: string;
5686
+ updated_at: string;
5687
+ };
5688
+ Insert: {
5689
+ created_at?: string;
5690
+ description?: string | null;
5691
+ id?: string;
5692
+ is_active?: boolean;
5693
+ name: string;
5694
+ produced_stock?: number;
5695
+ product_code: string;
5696
+ tenant_id: string;
5697
+ updated_at?: string;
5698
+ };
5699
+ Update: {
5700
+ created_at?: string;
5701
+ description?: string | null;
5702
+ id?: string;
5703
+ is_active?: boolean;
5704
+ name?: string;
5705
+ produced_stock?: number;
5706
+ product_code?: string;
5707
+ tenant_id?: string;
5708
+ updated_at?: string;
5709
+ };
5710
+ Relationships: [];
5711
+ };
5106
5712
  monteurs: {
5107
5713
  Row: {
5108
5714
  avatar_url: string | null;
@@ -5160,6 +5766,273 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
5160
5766
  referencedColumns: ["id"];
5161
5767
  }];
5162
5768
  };
5769
+ nmbrs_component_mapping: {
5770
+ Row: {
5771
+ created_at: string;
5772
+ id: string;
5773
+ source_kind: string;
5774
+ source_value: string | null;
5775
+ updated_at: string;
5776
+ wage_code: string;
5777
+ };
5778
+ Insert: {
5779
+ created_at?: string;
5780
+ id?: string;
5781
+ source_kind: string;
5782
+ source_value?: string | null;
5783
+ updated_at?: string;
5784
+ wage_code: string;
5785
+ };
5786
+ Update: {
5787
+ created_at?: string;
5788
+ id?: string;
5789
+ source_kind?: string;
5790
+ source_value?: string | null;
5791
+ updated_at?: string;
5792
+ wage_code?: string;
5793
+ };
5794
+ Relationships: [{
5795
+ foreignKeyName: "nmbrs_component_mapping_wage_code_fkey";
5796
+ columns: ["wage_code"];
5797
+ isOneToOne: false;
5798
+ referencedRelation: "nmbrs_wage_components";
5799
+ referencedColumns: ["code"];
5800
+ }];
5801
+ };
5802
+ nmbrs_employee_mapping: {
5803
+ Row: {
5804
+ active_from: string | null;
5805
+ active_to: string | null;
5806
+ contract_hours_per_week: number | null;
5807
+ created_at: string;
5808
+ hourly_wage: number | null;
5809
+ id: string;
5810
+ monteur_id: string;
5811
+ nmbrs_company_code: string | null;
5812
+ nmbrs_employee_number: string;
5813
+ updated_at: string;
5814
+ };
5815
+ Insert: {
5816
+ active_from?: string | null;
5817
+ active_to?: string | null;
5818
+ contract_hours_per_week?: number | null;
5819
+ created_at?: string;
5820
+ hourly_wage?: number | null;
5821
+ id?: string;
5822
+ monteur_id: string;
5823
+ nmbrs_company_code?: string | null;
5824
+ nmbrs_employee_number: string;
5825
+ updated_at?: string;
5826
+ };
5827
+ Update: {
5828
+ active_from?: string | null;
5829
+ active_to?: string | null;
5830
+ contract_hours_per_week?: number | null;
5831
+ created_at?: string;
5832
+ hourly_wage?: number | null;
5833
+ id?: string;
5834
+ monteur_id?: string;
5835
+ nmbrs_company_code?: string | null;
5836
+ nmbrs_employee_number?: string;
5837
+ updated_at?: string;
5838
+ };
5839
+ Relationships: [{
5840
+ foreignKeyName: "nmbrs_employee_mapping_monteur_id_fkey";
5841
+ columns: ["monteur_id"];
5842
+ isOneToOne: true;
5843
+ referencedRelation: "monteurs";
5844
+ referencedColumns: ["id"];
5845
+ }];
5846
+ };
5847
+ nmbrs_export_lines: {
5848
+ Row: {
5849
+ amount: number;
5850
+ created_at: string;
5851
+ entry_date: string;
5852
+ hours: number;
5853
+ id: string;
5854
+ monteur_id: string;
5855
+ nmbrs_employee_number: string | null;
5856
+ notes: string | null;
5857
+ run_id: string;
5858
+ source_kind: string | null;
5859
+ source_ref_id: string | null;
5860
+ updated_at: string;
5861
+ wage_code: string;
5862
+ };
5863
+ Insert: {
5864
+ amount?: number;
5865
+ created_at?: string;
5866
+ entry_date: string;
5867
+ hours?: number;
5868
+ id?: string;
5869
+ monteur_id: string;
5870
+ nmbrs_employee_number?: string | null;
5871
+ notes?: string | null;
5872
+ run_id: string;
5873
+ source_kind?: string | null;
5874
+ source_ref_id?: string | null;
5875
+ updated_at?: string;
5876
+ wage_code: string;
5877
+ };
5878
+ Update: {
5879
+ amount?: number;
5880
+ created_at?: string;
5881
+ entry_date?: string;
5882
+ hours?: number;
5883
+ id?: string;
5884
+ monteur_id?: string;
5885
+ nmbrs_employee_number?: string | null;
5886
+ notes?: string | null;
5887
+ run_id?: string;
5888
+ source_kind?: string | null;
5889
+ source_ref_id?: string | null;
5890
+ updated_at?: string;
5891
+ wage_code?: string;
5892
+ };
5893
+ Relationships: [{
5894
+ foreignKeyName: "nmbrs_export_lines_monteur_id_fkey";
5895
+ columns: ["monteur_id"];
5896
+ isOneToOne: false;
5897
+ referencedRelation: "monteurs";
5898
+ referencedColumns: ["id"];
5899
+ }, {
5900
+ foreignKeyName: "nmbrs_export_lines_run_id_fkey";
5901
+ columns: ["run_id"];
5902
+ isOneToOne: false;
5903
+ referencedRelation: "nmbrs_export_runs";
5904
+ referencedColumns: ["id"];
5905
+ }, {
5906
+ foreignKeyName: "nmbrs_export_lines_wage_code_fkey";
5907
+ columns: ["wage_code"];
5908
+ isOneToOne: false;
5909
+ referencedRelation: "nmbrs_wage_components";
5910
+ referencedColumns: ["code"];
5911
+ }];
5912
+ };
5913
+ nmbrs_export_runs: {
5914
+ Row: {
5915
+ created_at: string;
5916
+ file_name: string | null;
5917
+ generated_at: string;
5918
+ generated_by: string | null;
5919
+ id: string;
5920
+ notes: string | null;
5921
+ period_end: string;
5922
+ period_label: string;
5923
+ period_start: string;
5924
+ status: string;
5925
+ total_hours: number;
5926
+ total_lines: number;
5927
+ updated_at: string;
5928
+ };
5929
+ Insert: {
5930
+ created_at?: string;
5931
+ file_name?: string | null;
5932
+ generated_at?: string;
5933
+ generated_by?: string | null;
5934
+ id?: string;
5935
+ notes?: string | null;
5936
+ period_end: string;
5937
+ period_label: string;
5938
+ period_start: string;
5939
+ status?: string;
5940
+ total_hours?: number;
5941
+ total_lines?: number;
5942
+ updated_at?: string;
5943
+ };
5944
+ Update: {
5945
+ created_at?: string;
5946
+ file_name?: string | null;
5947
+ generated_at?: string;
5948
+ generated_by?: string | null;
5949
+ id?: string;
5950
+ notes?: string | null;
5951
+ period_end?: string;
5952
+ period_label?: string;
5953
+ period_start?: string;
5954
+ status?: string;
5955
+ total_hours?: number;
5956
+ total_lines?: number;
5957
+ updated_at?: string;
5958
+ };
5959
+ Relationships: [];
5960
+ };
5961
+ nmbrs_settings: {
5962
+ Row: {
5963
+ created_at: string;
5964
+ default_company_code: string | null;
5965
+ id: boolean;
5966
+ include_travel: boolean;
5967
+ overtime_threshold_daily: number;
5968
+ overtime_threshold_weekly: number;
5969
+ period_type: string;
5970
+ updated_at: string;
5971
+ updated_by: string | null;
5972
+ week_start_day: number;
5973
+ };
5974
+ Insert: {
5975
+ created_at?: string;
5976
+ default_company_code?: string | null;
5977
+ id?: boolean;
5978
+ include_travel?: boolean;
5979
+ overtime_threshold_daily?: number;
5980
+ overtime_threshold_weekly?: number;
5981
+ period_type?: string;
5982
+ updated_at?: string;
5983
+ updated_by?: string | null;
5984
+ week_start_day?: number;
5985
+ };
5986
+ Update: {
5987
+ created_at?: string;
5988
+ default_company_code?: string | null;
5989
+ id?: boolean;
5990
+ include_travel?: boolean;
5991
+ overtime_threshold_daily?: number;
5992
+ overtime_threshold_weekly?: number;
5993
+ period_type?: string;
5994
+ updated_at?: string;
5995
+ updated_by?: string | null;
5996
+ week_start_day?: number;
5997
+ };
5998
+ Relationships: [];
5999
+ };
6000
+ nmbrs_wage_components: {
6001
+ Row: {
6002
+ category: string;
6003
+ code: string;
6004
+ created_at: string;
6005
+ id: string;
6006
+ is_active: boolean;
6007
+ label: string;
6008
+ sort_order: number;
6009
+ unit: string;
6010
+ updated_at: string;
6011
+ };
6012
+ Insert: {
6013
+ category: string;
6014
+ code: string;
6015
+ created_at?: string;
6016
+ id?: string;
6017
+ is_active?: boolean;
6018
+ label: string;
6019
+ sort_order?: number;
6020
+ unit: string;
6021
+ updated_at?: string;
6022
+ };
6023
+ Update: {
6024
+ category?: string;
6025
+ code?: string;
6026
+ created_at?: string;
6027
+ id?: string;
6028
+ is_active?: boolean;
6029
+ label?: string;
6030
+ sort_order?: number;
6031
+ unit?: string;
6032
+ updated_at?: string;
6033
+ };
6034
+ Relationships: [];
6035
+ };
5163
6036
  notifications: {
5164
6037
  Row: {
5165
6038
  created_at: string;
@@ -6063,6 +6936,66 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
6063
6936
  };
6064
6937
  Relationships: [];
6065
6938
  };
6939
+ product_group_items: {
6940
+ Row: {
6941
+ created_at: string;
6942
+ id: string;
6943
+ product_group_id: string;
6944
+ quantity: number;
6945
+ trade_item_id: string;
6946
+ };
6947
+ Insert: {
6948
+ created_at?: string;
6949
+ id?: string;
6950
+ product_group_id: string;
6951
+ quantity?: number;
6952
+ trade_item_id: string;
6953
+ };
6954
+ Update: {
6955
+ created_at?: string;
6956
+ id?: string;
6957
+ product_group_id?: string;
6958
+ quantity?: number;
6959
+ trade_item_id?: string;
6960
+ };
6961
+ Relationships: [{
6962
+ foreignKeyName: "product_group_items_product_group_id_fkey";
6963
+ columns: ["product_group_id"];
6964
+ isOneToOne: false;
6965
+ referencedRelation: "product_groups";
6966
+ referencedColumns: ["id"];
6967
+ }];
6968
+ };
6969
+ product_groups: {
6970
+ Row: {
6971
+ created_at: string;
6972
+ description: string | null;
6973
+ id: string;
6974
+ is_active: boolean;
6975
+ name: string;
6976
+ tenant_id: string;
6977
+ updated_at: string;
6978
+ };
6979
+ Insert: {
6980
+ created_at?: string;
6981
+ description?: string | null;
6982
+ id?: string;
6983
+ is_active?: boolean;
6984
+ name: string;
6985
+ tenant_id: string;
6986
+ updated_at?: string;
6987
+ };
6988
+ Update: {
6989
+ created_at?: string;
6990
+ description?: string | null;
6991
+ id?: string;
6992
+ is_active?: boolean;
6993
+ name?: string;
6994
+ tenant_id?: string;
6995
+ updated_at?: string;
6996
+ };
6997
+ Relationships: [];
6998
+ };
6066
6999
  products: {
6067
7000
  Row: {
6068
7001
  barcode: string | null;
@@ -6082,6 +7015,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
6082
7015
  purchase_price: number | null;
6083
7016
  quantity: number;
6084
7017
  sale_price: number | null;
7018
+ trade_item_key: string | null;
6085
7019
  unit: string;
6086
7020
  updated_at: string;
6087
7021
  weight: string | null;
@@ -6104,6 +7038,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
6104
7038
  purchase_price?: number | null;
6105
7039
  quantity?: number;
6106
7040
  sale_price?: number | null;
7041
+ trade_item_key?: string | null;
6107
7042
  unit?: string;
6108
7043
  updated_at?: string;
6109
7044
  weight?: string | null;
@@ -6126,6 +7061,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
6126
7061
  purchase_price?: number | null;
6127
7062
  quantity?: number;
6128
7063
  sale_price?: number | null;
7064
+ trade_item_key?: string | null;
6129
7065
  unit?: string;
6130
7066
  updated_at?: string;
6131
7067
  weight?: string | null;
@@ -6928,20 +7864,116 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
6928
7864
  description?: string | null;
6929
7865
  hourly_rate?: number;
6930
7866
  id?: string;
6931
- image_url?: string | null;
6932
- is_active?: boolean;
6933
- name: string;
7867
+ image_url?: string | null;
7868
+ is_active?: boolean;
7869
+ name: string;
7870
+ };
7871
+ Update: {
7872
+ capacity?: number;
7873
+ color_code?: string | null;
7874
+ created_at?: string;
7875
+ description?: string | null;
7876
+ hourly_rate?: number;
7877
+ id?: string;
7878
+ image_url?: string | null;
7879
+ is_active?: boolean;
7880
+ name?: string;
7881
+ };
7882
+ Relationships: [];
7883
+ };
7884
+ stock_import_runs: {
7885
+ Row: {
7886
+ connection_id: string | null;
7887
+ created_at: string;
7888
+ created_rows: number;
7889
+ errors: import("../integrations/supabase/types").Json;
7890
+ filename: string | null;
7891
+ id: string;
7892
+ mutations: import("../integrations/supabase/types").Json;
7893
+ skipped_rows: number;
7894
+ total_rows: number;
7895
+ updated_rows: number;
7896
+ user_id: string;
7897
+ };
7898
+ Insert: {
7899
+ connection_id?: string | null;
7900
+ created_at?: string;
7901
+ created_rows?: number;
7902
+ errors?: import("../integrations/supabase/types").Json;
7903
+ filename?: string | null;
7904
+ id?: string;
7905
+ mutations?: import("../integrations/supabase/types").Json;
7906
+ skipped_rows?: number;
7907
+ total_rows?: number;
7908
+ updated_rows?: number;
7909
+ user_id: string;
7910
+ };
7911
+ Update: {
7912
+ connection_id?: string | null;
7913
+ created_at?: string;
7914
+ created_rows?: number;
7915
+ errors?: import("../integrations/supabase/types").Json;
7916
+ filename?: string | null;
7917
+ id?: string;
7918
+ mutations?: import("../integrations/supabase/types").Json;
7919
+ skipped_rows?: number;
7920
+ total_rows?: number;
7921
+ updated_rows?: number;
7922
+ user_id?: string;
7923
+ };
7924
+ Relationships: [];
7925
+ };
7926
+ stock_mutation_log: {
7927
+ Row: {
7928
+ connection_id: string | null;
7929
+ created_at: string;
7930
+ created_by: string | null;
7931
+ id: string;
7932
+ mutation_type: string;
7933
+ order_id: string | null;
7934
+ order_item_id: string | null;
7935
+ order_source: string | null;
7936
+ physical_after: number | null;
7937
+ physical_before: number | null;
7938
+ qty_delta: number;
7939
+ reason: string | null;
7940
+ reserved_after: number | null;
7941
+ reserved_before: number | null;
7942
+ trade_item_key: string;
7943
+ };
7944
+ Insert: {
7945
+ connection_id?: string | null;
7946
+ created_at?: string;
7947
+ created_by?: string | null;
7948
+ id?: string;
7949
+ mutation_type: string;
7950
+ order_id?: string | null;
7951
+ order_item_id?: string | null;
7952
+ order_source?: string | null;
7953
+ physical_after?: number | null;
7954
+ physical_before?: number | null;
7955
+ qty_delta: number;
7956
+ reason?: string | null;
7957
+ reserved_after?: number | null;
7958
+ reserved_before?: number | null;
7959
+ trade_item_key: string;
6934
7960
  };
6935
7961
  Update: {
6936
- capacity?: number;
6937
- color_code?: string | null;
7962
+ connection_id?: string | null;
6938
7963
  created_at?: string;
6939
- description?: string | null;
6940
- hourly_rate?: number;
7964
+ created_by?: string | null;
6941
7965
  id?: string;
6942
- image_url?: string | null;
6943
- is_active?: boolean;
6944
- name?: string;
7966
+ mutation_type?: string;
7967
+ order_id?: string | null;
7968
+ order_item_id?: string | null;
7969
+ order_source?: string | null;
7970
+ physical_after?: number | null;
7971
+ physical_before?: number | null;
7972
+ qty_delta?: number;
7973
+ reason?: string | null;
7974
+ reserved_after?: number | null;
7975
+ reserved_before?: number | null;
7976
+ trade_item_key?: string;
6945
7977
  };
6946
7978
  Relationships: [];
6947
7979
  };
@@ -7202,7 +8234,13 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
7202
8234
  connection_id: string | null;
7203
8235
  created_at: string;
7204
8236
  data: import("../integrations/supabase/types").Json;
8237
+ floriday_id: string | null;
8238
+ floriday_link_error: string | null;
8239
+ floriday_link_status: string;
7205
8240
  id: string;
8241
+ last_floriday_sync_at: string | null;
8242
+ missing_required_fields: string[];
8243
+ source: string;
7206
8244
  updated_at: string;
7207
8245
  user_id: string;
7208
8246
  };
@@ -7210,7 +8248,13 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
7210
8248
  connection_id?: string | null;
7211
8249
  created_at?: string;
7212
8250
  data?: import("../integrations/supabase/types").Json;
8251
+ floriday_id?: string | null;
8252
+ floriday_link_error?: string | null;
8253
+ floriday_link_status?: string;
7213
8254
  id?: string;
8255
+ last_floriday_sync_at?: string | null;
8256
+ missing_required_fields?: string[];
8257
+ source?: string;
7214
8258
  updated_at?: string;
7215
8259
  user_id: string;
7216
8260
  };
@@ -7218,7 +8262,55 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
7218
8262
  connection_id?: string | null;
7219
8263
  created_at?: string;
7220
8264
  data?: import("../integrations/supabase/types").Json;
8265
+ floriday_id?: string | null;
8266
+ floriday_link_error?: string | null;
8267
+ floriday_link_status?: string;
8268
+ id?: string;
8269
+ last_floriday_sync_at?: string | null;
8270
+ missing_required_fields?: string[];
8271
+ source?: string;
8272
+ updated_at?: string;
8273
+ user_id?: string;
8274
+ };
8275
+ Relationships: [];
8276
+ };
8277
+ trade_item_stock: {
8278
+ Row: {
8279
+ connection_id: string;
8280
+ created_at: string;
8281
+ id: string;
8282
+ incoming_stock: number;
8283
+ minimum_stock: number;
8284
+ notes: string | null;
8285
+ physical_stock: number;
8286
+ reserved_stock: number;
8287
+ trade_item_key: string;
8288
+ updated_at: string;
8289
+ user_id: string;
8290
+ };
8291
+ Insert: {
8292
+ connection_id: string;
8293
+ created_at?: string;
8294
+ id?: string;
8295
+ incoming_stock?: number;
8296
+ minimum_stock?: number;
8297
+ notes?: string | null;
8298
+ physical_stock?: number;
8299
+ reserved_stock?: number;
8300
+ trade_item_key: string;
8301
+ updated_at?: string;
8302
+ user_id: string;
8303
+ };
8304
+ Update: {
8305
+ connection_id?: string;
8306
+ created_at?: string;
7221
8307
  id?: string;
8308
+ incoming_stock?: number;
8309
+ minimum_stock?: number;
8310
+ notes?: string | null;
8311
+ physical_stock?: number;
8312
+ reserved_stock?: number;
8313
+ trade_item_key?: string;
7222
8314
  updated_at?: string;
7223
8315
  user_id?: string;
7224
8316
  };
@@ -7568,6 +8660,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
7568
8660
  };
7569
8661
  twinfield_invoice_sync_logs: {
7570
8662
  Row: {
8663
+ action_type: string | null;
7571
8664
  created_at: string;
7572
8665
  details: import("../integrations/supabase/types").Json | null;
7573
8666
  duration_ms: number | null;
@@ -7580,6 +8673,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
7580
8673
  user_id: string;
7581
8674
  };
7582
8675
  Insert: {
8676
+ action_type?: string | null;
7583
8677
  created_at?: string;
7584
8678
  details?: import("../integrations/supabase/types").Json | null;
7585
8679
  duration_ms?: number | null;
@@ -7592,6 +8686,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
7592
8686
  user_id: string;
7593
8687
  };
7594
8688
  Update: {
8689
+ action_type?: string | null;
7595
8690
  created_at?: string;
7596
8691
  details?: import("../integrations/supabase/types").Json | null;
7597
8692
  duration_ms?: number | null;
@@ -7827,6 +8922,57 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
7827
8922
  referencedColumns: ["id"];
7828
8923
  }];
7829
8924
  };
8925
+ twinfield_request_metrics: {
8926
+ Row: {
8927
+ bucket_hour: string;
8928
+ connection_id: string;
8929
+ error_count: number;
8930
+ rate_limited_count: number;
8931
+ request_count: number;
8932
+ updated_at: string;
8933
+ };
8934
+ Insert: {
8935
+ bucket_hour: string;
8936
+ connection_id: string;
8937
+ error_count?: number;
8938
+ rate_limited_count?: number;
8939
+ request_count?: number;
8940
+ updated_at?: string;
8941
+ };
8942
+ Update: {
8943
+ bucket_hour?: string;
8944
+ connection_id?: string;
8945
+ error_count?: number;
8946
+ rate_limited_count?: number;
8947
+ request_count?: number;
8948
+ updated_at?: string;
8949
+ };
8950
+ Relationships: [];
8951
+ };
8952
+ twinfield_session_cache: {
8953
+ Row: {
8954
+ cluster: string;
8955
+ created_at: string;
8956
+ expires_at: string;
8957
+ session_id: string;
8958
+ user_id: string;
8959
+ };
8960
+ Insert: {
8961
+ cluster: string;
8962
+ created_at?: string;
8963
+ expires_at: string;
8964
+ session_id: string;
8965
+ user_id: string;
8966
+ };
8967
+ Update: {
8968
+ cluster?: string;
8969
+ created_at?: string;
8970
+ expires_at?: string;
8971
+ session_id?: string;
8972
+ user_id?: string;
8973
+ };
8974
+ Relationships: [];
8975
+ };
7830
8976
  twinfield_settings: {
7831
8977
  Row: {
7832
8978
  active_environment: string;
@@ -8408,6 +9554,73 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
8408
9554
  };
8409
9555
  Relationships: [];
8410
9556
  };
9557
+ floriday_customer_discounts: {
9558
+ Row: {
9559
+ base_price: number | null;
9560
+ buyer_organization_id: string | null;
9561
+ currency: string | null;
9562
+ discount_type: string | null;
9563
+ discount_value: number | null;
9564
+ min_quantity: number | null;
9565
+ net_price: number | null;
9566
+ product_group_id: string | null;
9567
+ raw: import("../integrations/supabase/types").Json | null;
9568
+ source: string | null;
9569
+ source_id: string | null;
9570
+ trade_item_id: string | null;
9571
+ valid_from: string | null;
9572
+ valid_until: string | null;
9573
+ };
9574
+ Relationships: [];
9575
+ };
9576
+ local_customer_discounts: {
9577
+ Row: {
9578
+ base_price: number | null;
9579
+ currency: string | null;
9580
+ customer_id: string | null;
9581
+ discount_type: string | null;
9582
+ discount_value: number | null;
9583
+ min_quantity: number | null;
9584
+ net_price: number | null;
9585
+ product_category_id: string | null;
9586
+ product_id: string | null;
9587
+ product_name: string | null;
9588
+ source: string | null;
9589
+ source_id: string | null;
9590
+ valid_from: string | null;
9591
+ valid_until: string | null;
9592
+ };
9593
+ Relationships: [];
9594
+ };
9595
+ manufacture_product_possible_stock_view: {
9596
+ Row: {
9597
+ component_count: number | null;
9598
+ manufacture_product_id: string | null;
9599
+ possible_stock: number | null;
9600
+ };
9601
+ Relationships: [];
9602
+ };
9603
+ product_group_stock_view: {
9604
+ Row: {
9605
+ item_count: number | null;
9606
+ product_group_id: string | null;
9607
+ total_stock: number | null;
9608
+ };
9609
+ Relationships: [{
9610
+ foreignKeyName: "product_group_items_product_group_id_fkey";
9611
+ columns: ["product_group_id"];
9612
+ isOneToOne: false;
9613
+ referencedRelation: "product_groups";
9614
+ referencedColumns: ["id"];
9615
+ }];
9616
+ };
9617
+ trade_item_stock_view: {
9618
+ Row: {
9619
+ stock: number | null;
9620
+ trade_item_id: string | null;
9621
+ };
9622
+ Relationships: [];
9623
+ };
8411
9624
  v_external_customers_exact: {
8412
9625
  Row: {
8413
9626
  account_number: string | null;
@@ -8663,6 +9876,68 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
8663
9876
  };
8664
9877
  Returns: number;
8665
9878
  };
9879
+ afh_city_code: {
9880
+ Args: {
9881
+ _city: string;
9882
+ _country: string;
9883
+ };
9884
+ Returns: string;
9885
+ };
9886
+ afh_normalize_country: {
9887
+ Args: {
9888
+ _raw: string;
9889
+ };
9890
+ Returns: string;
9891
+ };
9892
+ afh_normalize_nl_province: {
9893
+ Args: {
9894
+ _raw: string;
9895
+ };
9896
+ Returns: string;
9897
+ };
9898
+ afh_subtract_workdays: {
9899
+ Args: {
9900
+ _date: string;
9901
+ _days: number;
9902
+ };
9903
+ Returns: string;
9904
+ };
9905
+ apply_stock_consumption: {
9906
+ Args: {
9907
+ p_order_id: string;
9908
+ p_order_item_id: string;
9909
+ p_qty: number;
9910
+ p_reason: string;
9911
+ p_source: string;
9912
+ p_trade_item_key: string;
9913
+ };
9914
+ Returns: undefined;
9915
+ };
9916
+ apply_stock_reservation: {
9917
+ Args: {
9918
+ p_order_id: string;
9919
+ p_order_item_id: string;
9920
+ p_qty: number;
9921
+ p_reason: string;
9922
+ p_source: string;
9923
+ p_trade_item_key: string;
9924
+ };
9925
+ Returns: undefined;
9926
+ };
9927
+ assign_cart_numbers: {
9928
+ Args: {
9929
+ p_carts: import("../integrations/supabase/types").Json;
9930
+ };
9931
+ Returns: {
9932
+ cart_index: number;
9933
+ cart_number: string;
9934
+ day_seq: number;
9935
+ order_id: string;
9936
+ order_source: string;
9937
+ pick_date: string;
9938
+ status: string;
9939
+ }[];
9940
+ };
8666
9941
  assign_floriday_order_numbers: {
8667
9942
  Args: {
8668
9943
  p_ids: string[];
@@ -8672,20 +9947,75 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
8672
9947
  order_number: string;
8673
9948
  }[];
8674
9949
  };
9950
+ backfill_open_order_reservations: {
9951
+ Args: never;
9952
+ Returns: {
9953
+ processed_items: number;
9954
+ }[];
9955
+ };
8675
9956
  call_exact_route: {
8676
9957
  Args: {
8677
9958
  path: string;
8678
9959
  };
8679
9960
  Returns: number;
8680
9961
  };
9962
+ check_offer_product_available_stock: {
9963
+ Args: {
9964
+ p_campaign_product_id: string;
9965
+ p_code: string;
9966
+ p_needed_qty?: number;
9967
+ p_product_name?: string;
9968
+ };
9969
+ Returns: import("../integrations/supabase/types").Json;
9970
+ };
9971
+ check_trade_item_available_stock: {
9972
+ Args: {
9973
+ p_connection_id?: string;
9974
+ p_context?: string;
9975
+ p_needed_qty?: number;
9976
+ p_order_id?: string;
9977
+ p_order_item_id?: string;
9978
+ p_owner_id?: string;
9979
+ p_product_name?: string;
9980
+ p_trade_item_key: string;
9981
+ };
9982
+ Returns: import("../integrations/supabase/types").Json;
9983
+ };
8681
9984
  cleanup_old_bookings: {
8682
9985
  Args: never;
8683
9986
  Returns: number;
8684
9987
  };
9988
+ control_get_todays_carts: {
9989
+ Args: never;
9990
+ Returns: {
9991
+ cart_index: number;
9992
+ cart_number: string;
9993
+ cart_number_id: string;
9994
+ order_id: string;
9995
+ order_source: string;
9996
+ pick_date: string;
9997
+ status: string;
9998
+ }[];
9999
+ };
10000
+ count_distinct_regulatory_products: {
10001
+ Args: never;
10002
+ Returns: number;
10003
+ };
8685
10004
  current_monteur_id: {
8686
10005
  Args: never;
8687
10006
  Returns: string;
8688
10007
  };
10008
+ dashboard_alert_counts: {
10009
+ Args: never;
10010
+ Returns: import("../integrations/supabase/types").Json;
10011
+ };
10012
+ dashboard_alert_rows: {
10013
+ Args: {
10014
+ check_id: string;
10015
+ row_limit?: number;
10016
+ };
10017
+ Returns: import("../integrations/supabase/types").Json;
10018
+ };
8689
10019
  dashboard_list_public_schema: {
8690
10020
  Args: never;
8691
10021
  Returns: {
@@ -8694,6 +10024,12 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
8694
10024
  table_name: string;
8695
10025
  }[];
8696
10026
  };
10027
+ dispatch_carrier_signups_sql: {
10028
+ Args: {
10029
+ _catchup?: string;
10030
+ };
10031
+ Returns: import("../integrations/supabase/types").Json;
10032
+ };
8697
10033
  email_auth_decrypt: {
8698
10034
  Args: {
8699
10035
  cipher: string;
@@ -8729,6 +10065,12 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
8729
10065
  status: string;
8730
10066
  }[];
8731
10067
  };
10068
+ ensure_trade_item_stock_row: {
10069
+ Args: {
10070
+ p_key: string;
10071
+ };
10072
+ Returns: undefined;
10073
+ };
8732
10074
  ensure_user_tenant: {
8733
10075
  Args: never;
8734
10076
  Returns: string;
@@ -8766,6 +10108,38 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
8766
10108
  };
8767
10109
  Returns: boolean;
8768
10110
  };
10111
+ find_trade_item_key: {
10112
+ Args: {
10113
+ p_barcode: string;
10114
+ p_name: string;
10115
+ p_product_id: string;
10116
+ };
10117
+ Returns: string;
10118
+ };
10119
+ floriday_effective_price: {
10120
+ Args: {
10121
+ _buyer_id: string;
10122
+ _on_date?: string;
10123
+ _quantity?: number;
10124
+ _trade_item_id: string;
10125
+ };
10126
+ Returns: {
10127
+ base_price: number;
10128
+ currency: string;
10129
+ discount_type: string;
10130
+ discount_value: number;
10131
+ net_price: number;
10132
+ source: string;
10133
+ source_id: string;
10134
+ }[];
10135
+ };
10136
+ format_cart_number: {
10137
+ Args: {
10138
+ p_pick_date: string;
10139
+ p_seq: number;
10140
+ };
10141
+ Returns: string;
10142
+ };
8769
10143
  get_active_floriday_connection_public: {
8770
10144
  Args: never;
8771
10145
  Returns: {
@@ -8779,6 +10153,13 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
8779
10153
  preferred_warehouse_name: string;
8780
10154
  }[];
8781
10155
  };
10156
+ get_active_floriday_context: {
10157
+ Args: never;
10158
+ Returns: {
10159
+ connection_id: string;
10160
+ user_id: string;
10161
+ }[];
10162
+ };
8782
10163
  get_active_twinfield_public: {
8783
10164
  Args: never;
8784
10165
  Returns: {
@@ -8881,6 +10262,18 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
8881
10262
  };
8882
10263
  Returns: import("../integrations/supabase/types").Json;
8883
10264
  };
10265
+ get_offer_recipient_by_code: {
10266
+ Args: {
10267
+ p_code: string;
10268
+ };
10269
+ Returns: {
10270
+ campaign_id: string;
10271
+ clicked_at: string;
10272
+ customer_id: string;
10273
+ id: string;
10274
+ ordered_at: string;
10275
+ }[];
10276
+ };
8884
10277
  get_or_assign_floriday_order_number: {
8885
10278
  Args: {
8886
10279
  p_floriday_id: string;
@@ -8933,6 +10326,34 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
8933
10326
  Args: never;
8934
10327
  Returns: boolean;
8935
10328
  };
10329
+ local_effective_price: {
10330
+ Args: {
10331
+ _customer_id: string;
10332
+ _on_date?: string;
10333
+ _product_id: string;
10334
+ _quantity?: number;
10335
+ };
10336
+ Returns: {
10337
+ currency: string;
10338
+ discount_type: string;
10339
+ discount_value: number;
10340
+ net_price: number;
10341
+ source: string;
10342
+ source_id: string;
10343
+ }[];
10344
+ };
10345
+ mark_offer_clicked: {
10346
+ Args: {
10347
+ p_code: string;
10348
+ };
10349
+ Returns: undefined;
10350
+ };
10351
+ mark_offer_ordered: {
10352
+ Args: {
10353
+ p_code: string;
10354
+ };
10355
+ Returns: undefined;
10356
+ };
8936
10357
  next_order_number: {
8937
10358
  Args: {
8938
10359
  p_prefix: string;
@@ -8952,6 +10373,14 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
8952
10373
  };
8953
10374
  Returns: string;
8954
10375
  };
10376
+ offer_recipient_matches: {
10377
+ Args: {
10378
+ _campaign_id: string;
10379
+ _customer_id: string;
10380
+ _recipient_id: string;
10381
+ };
10382
+ Returns: boolean;
10383
+ };
8955
10384
  pickstation_get_orders_raw: {
8956
10385
  Args: never;
8957
10386
  Returns: import("../integrations/supabase/types").Json;
@@ -8970,6 +10399,22 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
8970
10399
  };
8971
10400
  Returns: undefined;
8972
10401
  };
10402
+ pickstation_set_cart_status: {
10403
+ Args: {
10404
+ p_cart_index: number;
10405
+ p_order_id: string;
10406
+ p_order_source: string;
10407
+ p_status: string;
10408
+ };
10409
+ Returns: undefined;
10410
+ };
10411
+ promote_trade_item_key: {
10412
+ Args: {
10413
+ p_new: string;
10414
+ p_old: string;
10415
+ };
10416
+ Returns: undefined;
10417
+ };
8973
10418
  refresh_floricode_derived_code_lists: {
8974
10419
  Args: never;
8975
10420
  Returns: {
@@ -8978,6 +10423,12 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
8978
10423
  row_count: number;
8979
10424
  }[];
8980
10425
  };
10426
+ refresh_floricode_derived_for_product: {
10427
+ Args: {
10428
+ p_product_code: string;
10429
+ };
10430
+ Returns: number;
10431
+ };
8981
10432
  reset_floriday_sync_cursor: {
8982
10433
  Args: {
8983
10434
  p_connection_id: string;