@flowselections/floriday-authenticatie-module 1.0.14 → 1.0.16

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