@flowselections/floriday-verkoop-module 1.0.9 → 1.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/dist-lib/components/verkoop/AnalyticsCards.d.ts +1 -1
  2. package/dist-lib/components/verkoop/AnalyticsCards.d.ts.map +1 -1
  3. package/dist-lib/components/verkoop/AnalyticsCards.js +1 -7
  4. package/dist-lib/components/verkoop/SalesOrderDetailView.d.ts.map +1 -1
  5. package/dist-lib/components/verkoop/SalesOrderDetailView.js +1 -1
  6. package/dist-lib/components/verkoop/SalesOrdersTable.d.ts.map +1 -1
  7. package/dist-lib/components/verkoop/SalesOrdersTable.js +19 -39
  8. package/dist-lib/integrations/supabase/auth-middleware.d.ts +781 -0
  9. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
  10. package/dist-lib/integrations/supabase/client.d.ts +781 -0
  11. package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
  12. package/dist-lib/integrations/supabase/client.server.d.ts +781 -0
  13. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
  14. package/dist-lib/integrations/supabase/types.d.ts +791 -0
  15. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  16. package/dist-lib/lib/floriday-gateway.server.d.ts.map +1 -1
  17. package/dist-lib/lib/floriday-gateway.server.js +12 -17
  18. package/dist-lib/lib/floriday-public.functions.d.ts +5587 -120
  19. package/dist-lib/lib/floriday-public.functions.d.ts.map +1 -1
  20. package/dist-lib/lib/floriday-writes.functions.d.ts +3965 -60
  21. package/dist-lib/lib/floriday-writes.functions.d.ts.map +1 -1
  22. package/dist-lib/lib/salesorders-mapping.d.ts +4 -0
  23. package/dist-lib/lib/salesorders-mapping.d.ts.map +1 -1
  24. package/dist-lib/lib/salesorders-mapping.js +14 -3
  25. package/dist-lib/lib/salesorders.functions.d.ts +2381 -38
  26. package/dist-lib/lib/salesorders.functions.d.ts.map +1 -1
  27. package/dist-lib/lib/tradeitems.functions.d.ts +781 -0
  28. package/dist-lib/lib/tradeitems.functions.d.ts.map +1 -1
  29. package/dist-lib/lib/useSalesOrdersQuery.d.ts.map +1 -1
  30. package/dist-lib/lib/useSalesOrdersQuery.js +157 -24
  31. package/package.json +2 -2
@@ -13,6 +13,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
13
13
  max_workdays_earlier_pick: number;
14
14
  pick_days_before_transport: number;
15
15
  pick_distribution_enabled: boolean;
16
+ pick_weekdays: number[];
16
17
  signup_mail_enabled: boolean;
17
18
  signup_mail_lead_minutes: number;
18
19
  signup_mail_purpose: string;
@@ -26,6 +27,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
26
27
  max_workdays_earlier_pick?: number;
27
28
  pick_days_before_transport?: number;
28
29
  pick_distribution_enabled?: boolean;
30
+ pick_weekdays?: number[];
29
31
  signup_mail_enabled?: boolean;
30
32
  signup_mail_lead_minutes?: number;
31
33
  signup_mail_purpose?: string;
@@ -39,6 +41,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
39
41
  max_workdays_earlier_pick?: number;
40
42
  pick_days_before_transport?: number;
41
43
  pick_distribution_enabled?: boolean;
44
+ pick_weekdays?: number[];
42
45
  signup_mail_enabled?: boolean;
43
46
  signup_mail_lead_minutes?: number;
44
47
  signup_mail_purpose?: string;
@@ -450,6 +453,48 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
450
453
  referencedColumns: ["id"];
451
454
  }];
452
455
  };
456
+ carrier_signup_dispatch_runs: {
457
+ Row: {
458
+ detail: import("../integrations/supabase/types").Json | null;
459
+ error: string | null;
460
+ finished_at: string | null;
461
+ groups: number;
462
+ id: string;
463
+ ok: boolean;
464
+ reason: string | null;
465
+ sent: number;
466
+ skipped: import("../integrations/supabase/types").Json;
467
+ started_at: string;
468
+ unassigned: import("../integrations/supabase/types").Json;
469
+ };
470
+ Insert: {
471
+ detail?: import("../integrations/supabase/types").Json | null;
472
+ error?: string | null;
473
+ finished_at?: string | null;
474
+ groups?: number;
475
+ id?: string;
476
+ ok?: boolean;
477
+ reason?: string | null;
478
+ sent?: number;
479
+ skipped?: import("../integrations/supabase/types").Json;
480
+ started_at?: string;
481
+ unassigned?: import("../integrations/supabase/types").Json;
482
+ };
483
+ Update: {
484
+ detail?: import("../integrations/supabase/types").Json | null;
485
+ error?: string | null;
486
+ finished_at?: string | null;
487
+ groups?: number;
488
+ id?: string;
489
+ ok?: boolean;
490
+ reason?: string | null;
491
+ sent?: number;
492
+ skipped?: import("../integrations/supabase/types").Json;
493
+ started_at?: string;
494
+ unassigned?: import("../integrations/supabase/types").Json;
495
+ };
496
+ Relationships: [];
497
+ };
453
498
  carrier_signup_dispatches: {
454
499
  Row: {
455
500
  carrier_id: string;
@@ -501,6 +546,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
501
546
  contact_person: string | null;
502
547
  created_at: string;
503
548
  delivery_days: number | null;
549
+ delivery_weekdays: number[];
504
550
  email: string | null;
505
551
  id: string;
506
552
  is_default: boolean;
@@ -508,6 +554,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
508
554
  notes: string | null;
509
555
  phone: string | null;
510
556
  pickup_moments: import("../integrations/supabase/types").Json;
557
+ pickup_weekdays: number[];
511
558
  service_cities: string[];
512
559
  service_countries: string[];
513
560
  service_provinces: string[];
@@ -523,6 +570,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
523
570
  contact_person?: string | null;
524
571
  created_at?: string;
525
572
  delivery_days?: number | null;
573
+ delivery_weekdays?: number[];
526
574
  email?: string | null;
527
575
  id?: string;
528
576
  is_default?: boolean;
@@ -530,6 +578,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
530
578
  notes?: string | null;
531
579
  phone?: string | null;
532
580
  pickup_moments?: import("../integrations/supabase/types").Json;
581
+ pickup_weekdays?: number[];
533
582
  service_cities?: string[];
534
583
  service_countries?: string[];
535
584
  service_provinces?: string[];
@@ -545,6 +594,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
545
594
  contact_person?: string | null;
546
595
  created_at?: string;
547
596
  delivery_days?: number | null;
597
+ delivery_weekdays?: number[];
548
598
  email?: string | null;
549
599
  id?: string;
550
600
  is_default?: boolean;
@@ -552,6 +602,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
552
602
  notes?: string | null;
553
603
  phone?: string | null;
554
604
  pickup_moments?: import("../integrations/supabase/types").Json;
605
+ pickup_weekdays?: number[];
555
606
  service_cities?: string[];
556
607
  service_countries?: string[];
557
608
  service_provinces?: string[];
@@ -564,6 +615,177 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
564
615
  };
565
616
  Relationships: [];
566
617
  };
618
+ cart_control_draft: {
619
+ Row: {
620
+ cart_states: import("../integrations/supabase/types").Json;
621
+ checked_keys: import("../integrations/supabase/types").Json;
622
+ draft_date: string;
623
+ form_state: import("../integrations/supabase/types").Json;
624
+ notes: string;
625
+ updated_at: string;
626
+ user_id: string;
627
+ };
628
+ Insert: {
629
+ cart_states?: import("../integrations/supabase/types").Json;
630
+ checked_keys?: import("../integrations/supabase/types").Json;
631
+ draft_date: string;
632
+ form_state?: import("../integrations/supabase/types").Json;
633
+ notes?: string;
634
+ updated_at?: string;
635
+ user_id: string;
636
+ };
637
+ Update: {
638
+ cart_states?: import("../integrations/supabase/types").Json;
639
+ checked_keys?: import("../integrations/supabase/types").Json;
640
+ draft_date?: string;
641
+ form_state?: import("../integrations/supabase/types").Json;
642
+ notes?: string;
643
+ updated_at?: string;
644
+ user_id?: string;
645
+ };
646
+ Relationships: [];
647
+ };
648
+ cart_control_items: {
649
+ Row: {
650
+ action: string;
651
+ block_reason: string | null;
652
+ carrier_name: string | null;
653
+ cart_index: number;
654
+ cart_number_id: string | null;
655
+ cart_number_label: string | null;
656
+ created_at: string;
657
+ customer_name: string | null;
658
+ delivery_date: string | null;
659
+ id: string;
660
+ new_pick_date: string | null;
661
+ order_id: string;
662
+ order_number: string | null;
663
+ order_source: string;
664
+ pickup_date: string | null;
665
+ session_id: string;
666
+ };
667
+ Insert: {
668
+ action: string;
669
+ block_reason?: string | null;
670
+ carrier_name?: string | null;
671
+ cart_index: number;
672
+ cart_number_id?: string | null;
673
+ cart_number_label?: string | null;
674
+ created_at?: string;
675
+ customer_name?: string | null;
676
+ delivery_date?: string | null;
677
+ id?: string;
678
+ new_pick_date?: string | null;
679
+ order_id: string;
680
+ order_number?: string | null;
681
+ order_source: string;
682
+ pickup_date?: string | null;
683
+ session_id: string;
684
+ };
685
+ Update: {
686
+ action?: string;
687
+ block_reason?: string | null;
688
+ carrier_name?: string | null;
689
+ cart_index?: number;
690
+ cart_number_id?: string | null;
691
+ cart_number_label?: string | null;
692
+ created_at?: string;
693
+ customer_name?: string | null;
694
+ delivery_date?: string | null;
695
+ id?: string;
696
+ new_pick_date?: string | null;
697
+ order_id?: string;
698
+ order_number?: string | null;
699
+ order_source?: string;
700
+ pickup_date?: string | null;
701
+ session_id?: string;
702
+ };
703
+ Relationships: [{
704
+ foreignKeyName: "cart_control_items_session_id_fkey";
705
+ columns: ["session_id"];
706
+ isOneToOne: false;
707
+ referencedRelation: "cart_control_sessions";
708
+ referencedColumns: ["id"];
709
+ }];
710
+ };
711
+ cart_control_sessions: {
712
+ Row: {
713
+ blocked_count: number;
714
+ checked_count: number;
715
+ control_date: string;
716
+ created_at: string;
717
+ id: string;
718
+ notes: string | null;
719
+ performed_at: string;
720
+ rescheduled_count: number;
721
+ total_carts: number;
722
+ updated_at: string;
723
+ user_id: string;
724
+ };
725
+ Insert: {
726
+ blocked_count?: number;
727
+ checked_count?: number;
728
+ control_date?: string;
729
+ created_at?: string;
730
+ id?: string;
731
+ notes?: string | null;
732
+ performed_at?: string;
733
+ rescheduled_count?: number;
734
+ total_carts?: number;
735
+ updated_at?: string;
736
+ user_id: string;
737
+ };
738
+ Update: {
739
+ blocked_count?: number;
740
+ checked_count?: number;
741
+ control_date?: string;
742
+ created_at?: string;
743
+ id?: string;
744
+ notes?: string | null;
745
+ performed_at?: string;
746
+ rescheduled_count?: number;
747
+ total_carts?: number;
748
+ updated_at?: string;
749
+ user_id?: string;
750
+ };
751
+ Relationships: [];
752
+ };
753
+ cart_numbers: {
754
+ Row: {
755
+ assigned_at: string;
756
+ cart_index: number;
757
+ cart_number: string;
758
+ day_seq: number;
759
+ id: string;
760
+ order_id: string;
761
+ order_source: string;
762
+ pick_date: string;
763
+ status: string;
764
+ };
765
+ Insert: {
766
+ assigned_at?: string;
767
+ cart_index: number;
768
+ cart_number: string;
769
+ day_seq: number;
770
+ id?: string;
771
+ order_id: string;
772
+ order_source: string;
773
+ pick_date: string;
774
+ status?: string;
775
+ };
776
+ Update: {
777
+ assigned_at?: string;
778
+ cart_index?: number;
779
+ cart_number?: string;
780
+ day_seq?: number;
781
+ id?: string;
782
+ order_id?: string;
783
+ order_source?: string;
784
+ pick_date?: string;
785
+ status?: string;
786
+ };
787
+ Relationships: [];
788
+ };
567
789
  cart_pick_overrides: {
568
790
  Row: {
569
791
  cart_index: number;
@@ -1236,6 +1458,54 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
1236
1458
  referencedColumns: ["id"];
1237
1459
  }];
1238
1460
  };
1461
+ dashboard_critical_alerts: {
1462
+ Row: {
1463
+ alert_key: string;
1464
+ alert_type: string;
1465
+ created_at: string;
1466
+ description: string | null;
1467
+ id: string;
1468
+ metadata: import("../integrations/supabase/types").Json | null;
1469
+ priority: string;
1470
+ raised_at: string;
1471
+ related_cart_ids: string[] | null;
1472
+ resolved_at: string | null;
1473
+ title: string;
1474
+ updated_at: string;
1475
+ user_id: string;
1476
+ };
1477
+ Insert: {
1478
+ alert_key: string;
1479
+ alert_type: string;
1480
+ created_at?: string;
1481
+ description?: string | null;
1482
+ id?: string;
1483
+ metadata?: import("../integrations/supabase/types").Json | null;
1484
+ priority?: string;
1485
+ raised_at?: string;
1486
+ related_cart_ids?: string[] | null;
1487
+ resolved_at?: string | null;
1488
+ title: string;
1489
+ updated_at?: string;
1490
+ user_id: string;
1491
+ };
1492
+ Update: {
1493
+ alert_key?: string;
1494
+ alert_type?: string;
1495
+ created_at?: string;
1496
+ description?: string | null;
1497
+ id?: string;
1498
+ metadata?: import("../integrations/supabase/types").Json | null;
1499
+ priority?: string;
1500
+ raised_at?: string;
1501
+ related_cart_ids?: string[] | null;
1502
+ resolved_at?: string | null;
1503
+ title?: string;
1504
+ updated_at?: string;
1505
+ user_id?: string;
1506
+ };
1507
+ Relationships: [];
1508
+ };
1239
1509
  dashboard_daily_reports: {
1240
1510
  Row: {
1241
1511
  created_at: string;
@@ -2646,6 +2916,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
2646
2916
  created_at: string;
2647
2917
  exact_article_id: string | null;
2648
2918
  id: string;
2919
+ image_url: string | null;
2649
2920
  is_active: boolean;
2650
2921
  name: string;
2651
2922
  price: number;
@@ -2656,6 +2927,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
2656
2927
  created_at?: string;
2657
2928
  exact_article_id?: string | null;
2658
2929
  id?: string;
2930
+ image_url?: string | null;
2659
2931
  is_active?: boolean;
2660
2932
  name: string;
2661
2933
  price?: number;
@@ -2666,6 +2938,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
2666
2938
  created_at?: string;
2667
2939
  exact_article_id?: string | null;
2668
2940
  id?: string;
2941
+ image_url?: string | null;
2669
2942
  is_active?: boolean;
2670
2943
  name?: string;
2671
2944
  price?: number;
@@ -2735,6 +3008,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
2735
3008
  };
2736
3009
  floricode_sync_state: {
2737
3010
  Row: {
3011
+ cursor_skip: number;
2738
3012
  error_message: string | null;
2739
3013
  last_change_date_time: string | null;
2740
3014
  last_sequence_number: number;
@@ -2744,6 +3018,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
2744
3018
  updated_at: string;
2745
3019
  };
2746
3020
  Insert: {
3021
+ cursor_skip?: number;
2747
3022
  error_message?: string | null;
2748
3023
  last_change_date_time?: string | null;
2749
3024
  last_sequence_number?: number;
@@ -2753,6 +3028,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
2753
3028
  updated_at?: string;
2754
3029
  };
2755
3030
  Update: {
3031
+ cursor_skip?: number;
2756
3032
  error_message?: string | null;
2757
3033
  last_change_date_time?: string | null;
2758
3034
  last_sequence_number?: number;
@@ -3900,6 +4176,24 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
3900
4176
  };
3901
4177
  Relationships: [];
3902
4178
  };
4179
+ floriday_order_number_map: {
4180
+ Row: {
4181
+ created_at: string;
4182
+ floriday_id: string;
4183
+ order_number: string;
4184
+ };
4185
+ Insert: {
4186
+ created_at?: string;
4187
+ floriday_id: string;
4188
+ order_number: string;
4189
+ };
4190
+ Update: {
4191
+ created_at?: string;
4192
+ floriday_id?: string;
4193
+ order_number?: string;
4194
+ };
4195
+ Relationships: [];
4196
+ };
3903
4197
  floriday_packings_cache: {
3904
4198
  Row: {
3905
4199
  connection_id: string;
@@ -5082,6 +5376,93 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
5082
5376
  };
5083
5377
  Relationships: [];
5084
5378
  };
5379
+ manufacture_product_components: {
5380
+ Row: {
5381
+ component_type: string;
5382
+ created_at: string;
5383
+ id: string;
5384
+ manufacture_product_id: string;
5385
+ product_group_id: string | null;
5386
+ quantity: number;
5387
+ trade_item_id: string | null;
5388
+ unit: string;
5389
+ };
5390
+ Insert: {
5391
+ component_type: string;
5392
+ created_at?: string;
5393
+ id?: string;
5394
+ manufacture_product_id: string;
5395
+ product_group_id?: string | null;
5396
+ quantity?: number;
5397
+ trade_item_id?: string | null;
5398
+ unit?: string;
5399
+ };
5400
+ Update: {
5401
+ component_type?: string;
5402
+ created_at?: string;
5403
+ id?: string;
5404
+ manufacture_product_id?: string;
5405
+ product_group_id?: string | null;
5406
+ quantity?: number;
5407
+ trade_item_id?: string | null;
5408
+ unit?: string;
5409
+ };
5410
+ Relationships: [{
5411
+ foreignKeyName: "manufacture_product_components_manufacture_product_id_fkey";
5412
+ columns: ["manufacture_product_id"];
5413
+ isOneToOne: false;
5414
+ referencedRelation: "manufacture_product_possible_stock_view";
5415
+ referencedColumns: ["manufacture_product_id"];
5416
+ }, {
5417
+ foreignKeyName: "manufacture_product_components_manufacture_product_id_fkey";
5418
+ columns: ["manufacture_product_id"];
5419
+ isOneToOne: false;
5420
+ referencedRelation: "manufacture_products";
5421
+ referencedColumns: ["id"];
5422
+ }, {
5423
+ foreignKeyName: "manufacture_product_components_product_group_id_fkey";
5424
+ columns: ["product_group_id"];
5425
+ isOneToOne: false;
5426
+ referencedRelation: "product_groups";
5427
+ referencedColumns: ["id"];
5428
+ }];
5429
+ };
5430
+ manufacture_products: {
5431
+ Row: {
5432
+ created_at: string;
5433
+ description: string | null;
5434
+ id: string;
5435
+ is_active: boolean;
5436
+ name: string;
5437
+ produced_stock: number;
5438
+ product_code: string;
5439
+ tenant_id: string;
5440
+ updated_at: string;
5441
+ };
5442
+ Insert: {
5443
+ created_at?: string;
5444
+ description?: string | null;
5445
+ id?: string;
5446
+ is_active?: boolean;
5447
+ name: string;
5448
+ produced_stock?: number;
5449
+ product_code: string;
5450
+ tenant_id: string;
5451
+ updated_at?: string;
5452
+ };
5453
+ Update: {
5454
+ created_at?: string;
5455
+ description?: string | null;
5456
+ id?: string;
5457
+ is_active?: boolean;
5458
+ name?: string;
5459
+ produced_stock?: number;
5460
+ product_code?: string;
5461
+ tenant_id?: string;
5462
+ updated_at?: string;
5463
+ };
5464
+ Relationships: [];
5465
+ };
5085
5466
  monteurs: {
5086
5467
  Row: {
5087
5468
  avatar_url: string | null;
@@ -5745,6 +6126,24 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
5745
6126
  referencedColumns: ["id"];
5746
6127
  }];
5747
6128
  };
6129
+ order_number_counters: {
6130
+ Row: {
6131
+ last_value: number;
6132
+ updated_at: string;
6133
+ year: number;
6134
+ };
6135
+ Insert: {
6136
+ last_value?: number;
6137
+ updated_at?: string;
6138
+ year: number;
6139
+ };
6140
+ Update: {
6141
+ last_value?: number;
6142
+ updated_at?: string;
6143
+ year?: number;
6144
+ };
6145
+ Relationships: [];
6146
+ };
5748
6147
  orders: {
5749
6148
  Row: {
5750
6149
  created_at: string;
@@ -5757,6 +6156,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
5757
6156
  notes: string | null;
5758
6157
  order_date: string;
5759
6158
  order_number: string;
6159
+ order_source: string;
5760
6160
  status: string;
5761
6161
  total: string;
5762
6162
  updated_at: string;
@@ -5772,6 +6172,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
5772
6172
  notes?: string | null;
5773
6173
  order_date?: string;
5774
6174
  order_number: string;
6175
+ order_source?: string;
5775
6176
  status?: string;
5776
6177
  total?: string;
5777
6178
  updated_at?: string;
@@ -5787,6 +6188,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
5787
6188
  notes?: string | null;
5788
6189
  order_date?: string;
5789
6190
  order_number?: string;
6191
+ order_source?: string;
5790
6192
  status?: string;
5791
6193
  total?: string;
5792
6194
  updated_at?: string;
@@ -6021,6 +6423,66 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
6021
6423
  };
6022
6424
  Relationships: [];
6023
6425
  };
6426
+ product_group_items: {
6427
+ Row: {
6428
+ created_at: string;
6429
+ id: string;
6430
+ product_group_id: string;
6431
+ quantity: number;
6432
+ trade_item_id: string;
6433
+ };
6434
+ Insert: {
6435
+ created_at?: string;
6436
+ id?: string;
6437
+ product_group_id: string;
6438
+ quantity?: number;
6439
+ trade_item_id: string;
6440
+ };
6441
+ Update: {
6442
+ created_at?: string;
6443
+ id?: string;
6444
+ product_group_id?: string;
6445
+ quantity?: number;
6446
+ trade_item_id?: string;
6447
+ };
6448
+ Relationships: [{
6449
+ foreignKeyName: "product_group_items_product_group_id_fkey";
6450
+ columns: ["product_group_id"];
6451
+ isOneToOne: false;
6452
+ referencedRelation: "product_groups";
6453
+ referencedColumns: ["id"];
6454
+ }];
6455
+ };
6456
+ product_groups: {
6457
+ Row: {
6458
+ created_at: string;
6459
+ description: string | null;
6460
+ id: string;
6461
+ is_active: boolean;
6462
+ name: string;
6463
+ tenant_id: string;
6464
+ updated_at: string;
6465
+ };
6466
+ Insert: {
6467
+ created_at?: string;
6468
+ description?: string | null;
6469
+ id?: string;
6470
+ is_active?: boolean;
6471
+ name: string;
6472
+ tenant_id: string;
6473
+ updated_at?: string;
6474
+ };
6475
+ Update: {
6476
+ created_at?: string;
6477
+ description?: string | null;
6478
+ id?: string;
6479
+ is_active?: boolean;
6480
+ name?: string;
6481
+ tenant_id?: string;
6482
+ updated_at?: string;
6483
+ };
6484
+ Relationships: [];
6485
+ };
6024
6486
  products: {
6025
6487
  Row: {
6026
6488
  barcode: string | null;
@@ -7160,7 +7622,13 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
7160
7622
  connection_id: string | null;
7161
7623
  created_at: string;
7162
7624
  data: import("../integrations/supabase/types").Json;
7625
+ floriday_id: string | null;
7626
+ floriday_link_error: string | null;
7627
+ floriday_link_status: string;
7163
7628
  id: string;
7629
+ last_floriday_sync_at: string | null;
7630
+ missing_required_fields: string[];
7631
+ source: string;
7164
7632
  updated_at: string;
7165
7633
  user_id: string;
7166
7634
  };
@@ -7168,7 +7636,13 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
7168
7636
  connection_id?: string | null;
7169
7637
  created_at?: string;
7170
7638
  data?: import("../integrations/supabase/types").Json;
7639
+ floriday_id?: string | null;
7640
+ floriday_link_error?: string | null;
7641
+ floriday_link_status?: string;
7171
7642
  id?: string;
7643
+ last_floriday_sync_at?: string | null;
7644
+ missing_required_fields?: string[];
7645
+ source?: string;
7172
7646
  updated_at?: string;
7173
7647
  user_id: string;
7174
7648
  };
@@ -7176,7 +7650,55 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
7176
7650
  connection_id?: string | null;
7177
7651
  created_at?: string;
7178
7652
  data?: import("../integrations/supabase/types").Json;
7653
+ floriday_id?: string | null;
7654
+ floriday_link_error?: string | null;
7655
+ floriday_link_status?: string;
7656
+ id?: string;
7657
+ last_floriday_sync_at?: string | null;
7658
+ missing_required_fields?: string[];
7659
+ source?: string;
7660
+ updated_at?: string;
7661
+ user_id?: string;
7662
+ };
7663
+ Relationships: [];
7664
+ };
7665
+ trade_item_stock: {
7666
+ Row: {
7667
+ connection_id: string;
7668
+ created_at: string;
7669
+ id: string;
7670
+ incoming_stock: number;
7671
+ minimum_stock: number;
7672
+ notes: string | null;
7673
+ physical_stock: number;
7674
+ reserved_stock: number;
7675
+ trade_item_key: string;
7676
+ updated_at: string;
7677
+ user_id: string;
7678
+ };
7679
+ Insert: {
7680
+ connection_id: string;
7681
+ created_at?: string;
7179
7682
  id?: string;
7683
+ incoming_stock?: number;
7684
+ minimum_stock?: number;
7685
+ notes?: string | null;
7686
+ physical_stock?: number;
7687
+ reserved_stock?: number;
7688
+ trade_item_key: string;
7689
+ updated_at?: string;
7690
+ user_id: string;
7691
+ };
7692
+ Update: {
7693
+ connection_id?: string;
7694
+ created_at?: string;
7695
+ id?: string;
7696
+ incoming_stock?: number;
7697
+ minimum_stock?: number;
7698
+ notes?: string | null;
7699
+ physical_stock?: number;
7700
+ reserved_stock?: number;
7701
+ trade_item_key?: string;
7180
7702
  updated_at?: string;
7181
7703
  user_id?: string;
7182
7704
  };
@@ -7526,6 +8048,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
7526
8048
  };
7527
8049
  twinfield_invoice_sync_logs: {
7528
8050
  Row: {
8051
+ action_type: string | null;
7529
8052
  created_at: string;
7530
8053
  details: import("../integrations/supabase/types").Json | null;
7531
8054
  duration_ms: number | null;
@@ -7538,6 +8061,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
7538
8061
  user_id: string;
7539
8062
  };
7540
8063
  Insert: {
8064
+ action_type?: string | null;
7541
8065
  created_at?: string;
7542
8066
  details?: import("../integrations/supabase/types").Json | null;
7543
8067
  duration_ms?: number | null;
@@ -7550,6 +8074,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
7550
8074
  user_id: string;
7551
8075
  };
7552
8076
  Update: {
8077
+ action_type?: string | null;
7553
8078
  created_at?: string;
7554
8079
  details?: import("../integrations/supabase/types").Json | null;
7555
8080
  duration_ms?: number | null;
@@ -7785,6 +8310,57 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
7785
8310
  referencedColumns: ["id"];
7786
8311
  }];
7787
8312
  };
8313
+ twinfield_request_metrics: {
8314
+ Row: {
8315
+ bucket_hour: string;
8316
+ connection_id: string;
8317
+ error_count: number;
8318
+ rate_limited_count: number;
8319
+ request_count: number;
8320
+ updated_at: string;
8321
+ };
8322
+ Insert: {
8323
+ bucket_hour: string;
8324
+ connection_id: string;
8325
+ error_count?: number;
8326
+ rate_limited_count?: number;
8327
+ request_count?: number;
8328
+ updated_at?: string;
8329
+ };
8330
+ Update: {
8331
+ bucket_hour?: string;
8332
+ connection_id?: string;
8333
+ error_count?: number;
8334
+ rate_limited_count?: number;
8335
+ request_count?: number;
8336
+ updated_at?: string;
8337
+ };
8338
+ Relationships: [];
8339
+ };
8340
+ twinfield_session_cache: {
8341
+ Row: {
8342
+ cluster: string;
8343
+ created_at: string;
8344
+ expires_at: string;
8345
+ session_id: string;
8346
+ user_id: string;
8347
+ };
8348
+ Insert: {
8349
+ cluster: string;
8350
+ created_at?: string;
8351
+ expires_at: string;
8352
+ session_id: string;
8353
+ user_id: string;
8354
+ };
8355
+ Update: {
8356
+ cluster?: string;
8357
+ created_at?: string;
8358
+ expires_at?: string;
8359
+ session_id?: string;
8360
+ user_id?: string;
8361
+ };
8362
+ Relationships: [];
8363
+ };
7788
8364
  twinfield_settings: {
7789
8365
  Row: {
7790
8366
  active_environment: string;
@@ -7896,6 +8472,72 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
7896
8472
  referencedColumns: ["id"];
7897
8473
  }];
7898
8474
  };
8475
+ voorraad_media_upload_failures: {
8476
+ Row: {
8477
+ action: string;
8478
+ attempt_number: number;
8479
+ caller: string;
8480
+ client_user_id: string | null;
8481
+ content_type: string | null;
8482
+ created_at: string;
8483
+ environment: string;
8484
+ error_message: string | null;
8485
+ filename: string | null;
8486
+ id: string;
8487
+ idempotency_key: string | null;
8488
+ module: string;
8489
+ path: string;
8490
+ reference_id: string | null;
8491
+ request_body_hash: string | null;
8492
+ request_timestamp: number | null;
8493
+ response_content_type: string | null;
8494
+ response_status: number | null;
8495
+ size_bytes: number | null;
8496
+ };
8497
+ Insert: {
8498
+ action?: string;
8499
+ attempt_number?: number;
8500
+ caller?: string;
8501
+ client_user_id?: string | null;
8502
+ content_type?: string | null;
8503
+ created_at?: string;
8504
+ environment: string;
8505
+ error_message?: string | null;
8506
+ filename?: string | null;
8507
+ id?: string;
8508
+ idempotency_key?: string | null;
8509
+ module?: string;
8510
+ path: string;
8511
+ reference_id?: string | null;
8512
+ request_body_hash?: string | null;
8513
+ request_timestamp?: number | null;
8514
+ response_content_type?: string | null;
8515
+ response_status?: number | null;
8516
+ size_bytes?: number | null;
8517
+ };
8518
+ Update: {
8519
+ action?: string;
8520
+ attempt_number?: number;
8521
+ caller?: string;
8522
+ client_user_id?: string | null;
8523
+ content_type?: string | null;
8524
+ created_at?: string;
8525
+ environment?: string;
8526
+ error_message?: string | null;
8527
+ filename?: string | null;
8528
+ id?: string;
8529
+ idempotency_key?: string | null;
8530
+ module?: string;
8531
+ path?: string;
8532
+ reference_id?: string | null;
8533
+ request_body_hash?: string | null;
8534
+ request_timestamp?: number | null;
8535
+ response_content_type?: string | null;
8536
+ response_status?: number | null;
8537
+ size_bytes?: number | null;
8538
+ };
8539
+ Relationships: [];
8540
+ };
7899
8541
  voorraad_publish_attempts: {
7900
8542
  Row: {
7901
8543
  action: string;
@@ -8300,6 +8942,35 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
8300
8942
  };
8301
8943
  Relationships: [];
8302
8944
  };
8945
+ manufacture_product_possible_stock_view: {
8946
+ Row: {
8947
+ component_count: number | null;
8948
+ manufacture_product_id: string | null;
8949
+ possible_stock: number | null;
8950
+ };
8951
+ Relationships: [];
8952
+ };
8953
+ product_group_stock_view: {
8954
+ Row: {
8955
+ item_count: number | null;
8956
+ product_group_id: string | null;
8957
+ total_stock: number | null;
8958
+ };
8959
+ Relationships: [{
8960
+ foreignKeyName: "product_group_items_product_group_id_fkey";
8961
+ columns: ["product_group_id"];
8962
+ isOneToOne: false;
8963
+ referencedRelation: "product_groups";
8964
+ referencedColumns: ["id"];
8965
+ }];
8966
+ };
8967
+ trade_item_stock_view: {
8968
+ Row: {
8969
+ stock: number | null;
8970
+ trade_item_id: string | null;
8971
+ };
8972
+ Relationships: [];
8973
+ };
8303
8974
  v_external_customers_exact: {
8304
8975
  Row: {
8305
8976
  account_number: string | null;
@@ -8555,6 +9226,29 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
8555
9226
  };
8556
9227
  Returns: number;
8557
9228
  };
9229
+ assign_cart_numbers: {
9230
+ Args: {
9231
+ p_carts: import("../integrations/supabase/types").Json;
9232
+ };
9233
+ Returns: {
9234
+ cart_index: number;
9235
+ cart_number: string;
9236
+ day_seq: number;
9237
+ order_id: string;
9238
+ order_source: string;
9239
+ pick_date: string;
9240
+ status: string;
9241
+ }[];
9242
+ };
9243
+ assign_floriday_order_numbers: {
9244
+ Args: {
9245
+ p_ids: string[];
9246
+ };
9247
+ Returns: {
9248
+ floriday_id: string;
9249
+ order_number: string;
9250
+ }[];
9251
+ };
8558
9252
  call_exact_route: {
8559
9253
  Args: {
8560
9254
  path: string;
@@ -8565,10 +9259,37 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
8565
9259
  Args: never;
8566
9260
  Returns: number;
8567
9261
  };
9262
+ control_get_todays_carts: {
9263
+ Args: never;
9264
+ Returns: {
9265
+ cart_index: number;
9266
+ cart_number: string;
9267
+ cart_number_id: string;
9268
+ order_id: string;
9269
+ order_source: string;
9270
+ pick_date: string;
9271
+ status: string;
9272
+ }[];
9273
+ };
9274
+ count_distinct_regulatory_products: {
9275
+ Args: never;
9276
+ Returns: number;
9277
+ };
8568
9278
  current_monteur_id: {
8569
9279
  Args: never;
8570
9280
  Returns: string;
8571
9281
  };
9282
+ dashboard_alert_counts: {
9283
+ Args: never;
9284
+ Returns: import("../integrations/supabase/types").Json;
9285
+ };
9286
+ dashboard_alert_rows: {
9287
+ Args: {
9288
+ check_id: string;
9289
+ row_limit?: number;
9290
+ };
9291
+ Returns: import("../integrations/supabase/types").Json;
9292
+ };
8572
9293
  dashboard_list_public_schema: {
8573
9294
  Args: never;
8574
9295
  Returns: {
@@ -8649,6 +9370,13 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
8649
9370
  };
8650
9371
  Returns: boolean;
8651
9372
  };
9373
+ format_cart_number: {
9374
+ Args: {
9375
+ p_pick_date: string;
9376
+ p_seq: number;
9377
+ };
9378
+ Returns: string;
9379
+ };
8652
9380
  get_active_floriday_connection_public: {
8653
9381
  Args: never;
8654
9382
  Returns: {
@@ -8764,6 +9492,12 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
8764
9492
  };
8765
9493
  Returns: import("../integrations/supabase/types").Json;
8766
9494
  };
9495
+ get_or_assign_floriday_order_number: {
9496
+ Args: {
9497
+ p_floriday_id: string;
9498
+ };
9499
+ Returns: string;
9500
+ };
8767
9501
  get_room_busy_windows: {
8768
9502
  Args: {
8769
9503
  p_from: string;
@@ -8810,6 +9544,12 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
8810
9544
  Args: never;
8811
9545
  Returns: boolean;
8812
9546
  };
9547
+ next_order_number: {
9548
+ Args: {
9549
+ p_prefix: string;
9550
+ };
9551
+ Returns: string;
9552
+ };
8813
9553
  next_work_order_number: {
8814
9554
  Args: {
8815
9555
  p_parent_work_order_id?: string;
@@ -8823,6 +9563,47 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
8823
9563
  };
8824
9564
  Returns: string;
8825
9565
  };
9566
+ pickstation_get_orders_raw: {
9567
+ Args: never;
9568
+ Returns: import("../integrations/supabase/types").Json;
9569
+ };
9570
+ pickstation_get_settings: {
9571
+ Args: never;
9572
+ Returns: import("../integrations/supabase/types").Json;
9573
+ };
9574
+ pickstation_log_print: {
9575
+ Args: {
9576
+ p_customer_name: string;
9577
+ p_documents: string[];
9578
+ p_ip_address: string;
9579
+ p_order_id: string;
9580
+ p_order_number: string;
9581
+ };
9582
+ Returns: undefined;
9583
+ };
9584
+ pickstation_set_cart_status: {
9585
+ Args: {
9586
+ p_cart_index: number;
9587
+ p_order_id: string;
9588
+ p_order_source: string;
9589
+ p_status: string;
9590
+ };
9591
+ Returns: undefined;
9592
+ };
9593
+ refresh_floricode_derived_code_lists: {
9594
+ Args: never;
9595
+ Returns: {
9596
+ environment: string;
9597
+ list_name: string;
9598
+ row_count: number;
9599
+ }[];
9600
+ };
9601
+ refresh_floricode_derived_for_product: {
9602
+ Args: {
9603
+ p_product_code: string;
9604
+ };
9605
+ Returns: number;
9606
+ };
8826
9607
  reset_floriday_sync_cursor: {
8827
9608
  Args: {
8828
9609
  p_connection_id: string;