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