@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
@@ -14,6 +14,7 @@ export type Database = {
14
14
  max_workdays_earlier_pick: number;
15
15
  pick_days_before_transport: number;
16
16
  pick_distribution_enabled: boolean;
17
+ pick_weekdays: number[];
17
18
  signup_mail_enabled: boolean;
18
19
  signup_mail_lead_minutes: number;
19
20
  signup_mail_purpose: string;
@@ -27,6 +28,7 @@ export type Database = {
27
28
  max_workdays_earlier_pick?: number;
28
29
  pick_days_before_transport?: number;
29
30
  pick_distribution_enabled?: boolean;
31
+ pick_weekdays?: number[];
30
32
  signup_mail_enabled?: boolean;
31
33
  signup_mail_lead_minutes?: number;
32
34
  signup_mail_purpose?: string;
@@ -40,6 +42,7 @@ export type Database = {
40
42
  max_workdays_earlier_pick?: number;
41
43
  pick_days_before_transport?: number;
42
44
  pick_distribution_enabled?: boolean;
45
+ pick_weekdays?: number[];
43
46
  signup_mail_enabled?: boolean;
44
47
  signup_mail_lead_minutes?: number;
45
48
  signup_mail_purpose?: string;
@@ -458,6 +461,48 @@ export type Database = {
458
461
  }
459
462
  ];
460
463
  };
464
+ carrier_signup_dispatch_runs: {
465
+ Row: {
466
+ detail: 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: Json;
475
+ started_at: string;
476
+ unassigned: Json;
477
+ };
478
+ Insert: {
479
+ detail?: 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?: Json;
488
+ started_at?: string;
489
+ unassigned?: Json;
490
+ };
491
+ Update: {
492
+ detail?: Json | null;
493
+ error?: string | null;
494
+ finished_at?: string | null;
495
+ groups?: number;
496
+ id?: string;
497
+ ok?: boolean;
498
+ reason?: string | null;
499
+ sent?: number;
500
+ skipped?: Json;
501
+ started_at?: string;
502
+ unassigned?: Json;
503
+ };
504
+ Relationships: [];
505
+ };
461
506
  carrier_signup_dispatches: {
462
507
  Row: {
463
508
  carrier_id: string;
@@ -511,6 +556,7 @@ export type Database = {
511
556
  contact_person: string | null;
512
557
  created_at: string;
513
558
  delivery_days: number | null;
559
+ delivery_weekdays: number[];
514
560
  email: string | null;
515
561
  id: string;
516
562
  is_default: boolean;
@@ -518,6 +564,7 @@ export type Database = {
518
564
  notes: string | null;
519
565
  phone: string | null;
520
566
  pickup_moments: Json;
567
+ pickup_weekdays: number[];
521
568
  service_cities: string[];
522
569
  service_countries: string[];
523
570
  service_provinces: string[];
@@ -533,6 +580,7 @@ export type Database = {
533
580
  contact_person?: string | null;
534
581
  created_at?: string;
535
582
  delivery_days?: number | null;
583
+ delivery_weekdays?: number[];
536
584
  email?: string | null;
537
585
  id?: string;
538
586
  is_default?: boolean;
@@ -540,6 +588,7 @@ export type Database = {
540
588
  notes?: string | null;
541
589
  phone?: string | null;
542
590
  pickup_moments?: Json;
591
+ pickup_weekdays?: number[];
543
592
  service_cities?: string[];
544
593
  service_countries?: string[];
545
594
  service_provinces?: string[];
@@ -555,6 +604,7 @@ export type Database = {
555
604
  contact_person?: string | null;
556
605
  created_at?: string;
557
606
  delivery_days?: number | null;
607
+ delivery_weekdays?: number[];
558
608
  email?: string | null;
559
609
  id?: string;
560
610
  is_default?: boolean;
@@ -562,6 +612,7 @@ export type Database = {
562
612
  notes?: string | null;
563
613
  phone?: string | null;
564
614
  pickup_moments?: Json;
615
+ pickup_weekdays?: number[];
565
616
  service_cities?: string[];
566
617
  service_countries?: string[];
567
618
  service_provinces?: string[];
@@ -574,6 +625,179 @@ export type Database = {
574
625
  };
575
626
  Relationships: [];
576
627
  };
628
+ cart_control_draft: {
629
+ Row: {
630
+ cart_states: Json;
631
+ checked_keys: Json;
632
+ draft_date: string;
633
+ form_state: Json;
634
+ notes: string;
635
+ updated_at: string;
636
+ user_id: string;
637
+ };
638
+ Insert: {
639
+ cart_states?: Json;
640
+ checked_keys?: Json;
641
+ draft_date: string;
642
+ form_state?: Json;
643
+ notes?: string;
644
+ updated_at?: string;
645
+ user_id: string;
646
+ };
647
+ Update: {
648
+ cart_states?: Json;
649
+ checked_keys?: Json;
650
+ draft_date?: string;
651
+ form_state?: Json;
652
+ notes?: string;
653
+ updated_at?: string;
654
+ user_id?: string;
655
+ };
656
+ Relationships: [];
657
+ };
658
+ cart_control_items: {
659
+ Row: {
660
+ action: string;
661
+ block_reason: string | null;
662
+ carrier_name: string | null;
663
+ cart_index: number;
664
+ cart_number_id: string | null;
665
+ cart_number_label: string | null;
666
+ created_at: string;
667
+ customer_name: string | null;
668
+ delivery_date: string | null;
669
+ id: string;
670
+ new_pick_date: string | null;
671
+ order_id: string;
672
+ order_number: string | null;
673
+ order_source: string;
674
+ pickup_date: string | null;
675
+ session_id: string;
676
+ };
677
+ Insert: {
678
+ action: string;
679
+ block_reason?: string | null;
680
+ carrier_name?: string | null;
681
+ cart_index: number;
682
+ cart_number_id?: string | null;
683
+ cart_number_label?: string | null;
684
+ created_at?: string;
685
+ customer_name?: string | null;
686
+ delivery_date?: string | null;
687
+ id?: string;
688
+ new_pick_date?: string | null;
689
+ order_id: string;
690
+ order_number?: string | null;
691
+ order_source: string;
692
+ pickup_date?: string | null;
693
+ session_id: string;
694
+ };
695
+ Update: {
696
+ action?: string;
697
+ block_reason?: string | null;
698
+ carrier_name?: string | null;
699
+ cart_index?: number;
700
+ cart_number_id?: string | null;
701
+ cart_number_label?: string | null;
702
+ created_at?: string;
703
+ customer_name?: string | null;
704
+ delivery_date?: string | null;
705
+ id?: string;
706
+ new_pick_date?: string | null;
707
+ order_id?: string;
708
+ order_number?: string | null;
709
+ order_source?: string;
710
+ pickup_date?: string | null;
711
+ session_id?: string;
712
+ };
713
+ Relationships: [
714
+ {
715
+ foreignKeyName: "cart_control_items_session_id_fkey";
716
+ columns: ["session_id"];
717
+ isOneToOne: false;
718
+ referencedRelation: "cart_control_sessions";
719
+ referencedColumns: ["id"];
720
+ }
721
+ ];
722
+ };
723
+ cart_control_sessions: {
724
+ Row: {
725
+ blocked_count: number;
726
+ checked_count: number;
727
+ control_date: string;
728
+ created_at: string;
729
+ id: string;
730
+ notes: string | null;
731
+ performed_at: string;
732
+ rescheduled_count: number;
733
+ total_carts: number;
734
+ updated_at: string;
735
+ user_id: string;
736
+ };
737
+ Insert: {
738
+ blocked_count?: number;
739
+ checked_count?: number;
740
+ control_date?: string;
741
+ created_at?: string;
742
+ id?: string;
743
+ notes?: string | null;
744
+ performed_at?: string;
745
+ rescheduled_count?: number;
746
+ total_carts?: number;
747
+ updated_at?: string;
748
+ user_id: string;
749
+ };
750
+ Update: {
751
+ blocked_count?: number;
752
+ checked_count?: number;
753
+ control_date?: string;
754
+ created_at?: string;
755
+ id?: string;
756
+ notes?: string | null;
757
+ performed_at?: string;
758
+ rescheduled_count?: number;
759
+ total_carts?: number;
760
+ updated_at?: string;
761
+ user_id?: string;
762
+ };
763
+ Relationships: [];
764
+ };
765
+ cart_numbers: {
766
+ Row: {
767
+ assigned_at: string;
768
+ cart_index: number;
769
+ cart_number: string;
770
+ day_seq: number;
771
+ id: string;
772
+ order_id: string;
773
+ order_source: string;
774
+ pick_date: string;
775
+ status: string;
776
+ };
777
+ Insert: {
778
+ assigned_at?: string;
779
+ cart_index: number;
780
+ cart_number: string;
781
+ day_seq: number;
782
+ id?: string;
783
+ order_id: string;
784
+ order_source: string;
785
+ pick_date: string;
786
+ status?: string;
787
+ };
788
+ Update: {
789
+ assigned_at?: string;
790
+ cart_index?: number;
791
+ cart_number?: string;
792
+ day_seq?: number;
793
+ id?: string;
794
+ order_id?: string;
795
+ order_source?: string;
796
+ pick_date?: string;
797
+ status?: string;
798
+ };
799
+ Relationships: [];
800
+ };
577
801
  cart_pick_overrides: {
578
802
  Row: {
579
803
  cart_index: number;
@@ -1266,6 +1490,54 @@ export type Database = {
1266
1490
  }
1267
1491
  ];
1268
1492
  };
1493
+ dashboard_critical_alerts: {
1494
+ Row: {
1495
+ alert_key: string;
1496
+ alert_type: string;
1497
+ created_at: string;
1498
+ description: string | null;
1499
+ id: string;
1500
+ metadata: Json | null;
1501
+ priority: string;
1502
+ raised_at: string;
1503
+ related_cart_ids: string[] | null;
1504
+ resolved_at: string | null;
1505
+ title: string;
1506
+ updated_at: string;
1507
+ user_id: string;
1508
+ };
1509
+ Insert: {
1510
+ alert_key: string;
1511
+ alert_type: string;
1512
+ created_at?: string;
1513
+ description?: string | null;
1514
+ id?: string;
1515
+ metadata?: Json | null;
1516
+ priority?: string;
1517
+ raised_at?: string;
1518
+ related_cart_ids?: string[] | null;
1519
+ resolved_at?: string | null;
1520
+ title: string;
1521
+ updated_at?: string;
1522
+ user_id: string;
1523
+ };
1524
+ Update: {
1525
+ alert_key?: string;
1526
+ alert_type?: string;
1527
+ created_at?: string;
1528
+ description?: string | null;
1529
+ id?: string;
1530
+ metadata?: Json | null;
1531
+ priority?: string;
1532
+ raised_at?: string;
1533
+ related_cart_ids?: string[] | null;
1534
+ resolved_at?: string | null;
1535
+ title?: string;
1536
+ updated_at?: string;
1537
+ user_id?: string;
1538
+ };
1539
+ Relationships: [];
1540
+ };
1269
1541
  dashboard_daily_reports: {
1270
1542
  Row: {
1271
1543
  created_at: string;
@@ -2712,6 +2984,7 @@ export type Database = {
2712
2984
  created_at: string;
2713
2985
  exact_article_id: string | null;
2714
2986
  id: string;
2987
+ image_url: string | null;
2715
2988
  is_active: boolean;
2716
2989
  name: string;
2717
2990
  price: number;
@@ -2722,6 +2995,7 @@ export type Database = {
2722
2995
  created_at?: string;
2723
2996
  exact_article_id?: string | null;
2724
2997
  id?: string;
2998
+ image_url?: string | null;
2725
2999
  is_active?: boolean;
2726
3000
  name: string;
2727
3001
  price?: number;
@@ -2732,6 +3006,7 @@ export type Database = {
2732
3006
  created_at?: string;
2733
3007
  exact_article_id?: string | null;
2734
3008
  id?: string;
3009
+ image_url?: string | null;
2735
3010
  is_active?: boolean;
2736
3011
  name?: string;
2737
3012
  price?: number;
@@ -2801,6 +3076,7 @@ export type Database = {
2801
3076
  };
2802
3077
  floricode_sync_state: {
2803
3078
  Row: {
3079
+ cursor_skip: number;
2804
3080
  error_message: string | null;
2805
3081
  last_change_date_time: string | null;
2806
3082
  last_sequence_number: number;
@@ -2810,6 +3086,7 @@ export type Database = {
2810
3086
  updated_at: string;
2811
3087
  };
2812
3088
  Insert: {
3089
+ cursor_skip?: number;
2813
3090
  error_message?: string | null;
2814
3091
  last_change_date_time?: string | null;
2815
3092
  last_sequence_number?: number;
@@ -2819,6 +3096,7 @@ export type Database = {
2819
3096
  updated_at?: string;
2820
3097
  };
2821
3098
  Update: {
3099
+ cursor_skip?: number;
2822
3100
  error_message?: string | null;
2823
3101
  last_change_date_time?: string | null;
2824
3102
  last_sequence_number?: number;
@@ -4012,6 +4290,24 @@ export type Database = {
4012
4290
  };
4013
4291
  Relationships: [];
4014
4292
  };
4293
+ floriday_order_number_map: {
4294
+ Row: {
4295
+ created_at: string;
4296
+ floriday_id: string;
4297
+ order_number: string;
4298
+ };
4299
+ Insert: {
4300
+ created_at?: string;
4301
+ floriday_id: string;
4302
+ order_number: string;
4303
+ };
4304
+ Update: {
4305
+ created_at?: string;
4306
+ floriday_id?: string;
4307
+ order_number?: string;
4308
+ };
4309
+ Relationships: [];
4310
+ };
4015
4311
  floriday_packings_cache: {
4016
4312
  Row: {
4017
4313
  connection_id: string;
@@ -5239,6 +5535,97 @@ export type Database = {
5239
5535
  };
5240
5536
  Relationships: [];
5241
5537
  };
5538
+ manufacture_product_components: {
5539
+ Row: {
5540
+ component_type: string;
5541
+ created_at: string;
5542
+ id: string;
5543
+ manufacture_product_id: string;
5544
+ product_group_id: string | null;
5545
+ quantity: number;
5546
+ trade_item_id: string | null;
5547
+ unit: string;
5548
+ };
5549
+ Insert: {
5550
+ component_type: string;
5551
+ created_at?: string;
5552
+ id?: string;
5553
+ manufacture_product_id: string;
5554
+ product_group_id?: string | null;
5555
+ quantity?: number;
5556
+ trade_item_id?: string | null;
5557
+ unit?: string;
5558
+ };
5559
+ Update: {
5560
+ component_type?: string;
5561
+ created_at?: string;
5562
+ id?: string;
5563
+ manufacture_product_id?: string;
5564
+ product_group_id?: string | null;
5565
+ quantity?: number;
5566
+ trade_item_id?: string | null;
5567
+ unit?: string;
5568
+ };
5569
+ Relationships: [
5570
+ {
5571
+ foreignKeyName: "manufacture_product_components_manufacture_product_id_fkey";
5572
+ columns: ["manufacture_product_id"];
5573
+ isOneToOne: false;
5574
+ referencedRelation: "manufacture_product_possible_stock_view";
5575
+ referencedColumns: ["manufacture_product_id"];
5576
+ },
5577
+ {
5578
+ foreignKeyName: "manufacture_product_components_manufacture_product_id_fkey";
5579
+ columns: ["manufacture_product_id"];
5580
+ isOneToOne: false;
5581
+ referencedRelation: "manufacture_products";
5582
+ referencedColumns: ["id"];
5583
+ },
5584
+ {
5585
+ foreignKeyName: "manufacture_product_components_product_group_id_fkey";
5586
+ columns: ["product_group_id"];
5587
+ isOneToOne: false;
5588
+ referencedRelation: "product_groups";
5589
+ referencedColumns: ["id"];
5590
+ }
5591
+ ];
5592
+ };
5593
+ manufacture_products: {
5594
+ Row: {
5595
+ created_at: string;
5596
+ description: string | null;
5597
+ id: string;
5598
+ is_active: boolean;
5599
+ name: string;
5600
+ produced_stock: number;
5601
+ product_code: string;
5602
+ tenant_id: string;
5603
+ updated_at: string;
5604
+ };
5605
+ Insert: {
5606
+ created_at?: string;
5607
+ description?: string | null;
5608
+ id?: string;
5609
+ is_active?: boolean;
5610
+ name: string;
5611
+ produced_stock?: number;
5612
+ product_code: string;
5613
+ tenant_id: string;
5614
+ updated_at?: string;
5615
+ };
5616
+ Update: {
5617
+ created_at?: string;
5618
+ description?: string | null;
5619
+ id?: string;
5620
+ is_active?: boolean;
5621
+ name?: string;
5622
+ produced_stock?: number;
5623
+ product_code?: string;
5624
+ tenant_id?: string;
5625
+ updated_at?: string;
5626
+ };
5627
+ Relationships: [];
5628
+ };
5242
5629
  monteurs: {
5243
5630
  Row: {
5244
5631
  avatar_url: string | null;
@@ -5930,6 +6317,24 @@ export type Database = {
5930
6317
  }
5931
6318
  ];
5932
6319
  };
6320
+ order_number_counters: {
6321
+ Row: {
6322
+ last_value: number;
6323
+ updated_at: string;
6324
+ year: number;
6325
+ };
6326
+ Insert: {
6327
+ last_value?: number;
6328
+ updated_at?: string;
6329
+ year: number;
6330
+ };
6331
+ Update: {
6332
+ last_value?: number;
6333
+ updated_at?: string;
6334
+ year?: number;
6335
+ };
6336
+ Relationships: [];
6337
+ };
5933
6338
  orders: {
5934
6339
  Row: {
5935
6340
  created_at: string;
@@ -5942,6 +6347,7 @@ export type Database = {
5942
6347
  notes: string | null;
5943
6348
  order_date: string;
5944
6349
  order_number: string;
6350
+ order_source: string;
5945
6351
  status: string;
5946
6352
  total: string;
5947
6353
  updated_at: string;
@@ -5957,6 +6363,7 @@ export type Database = {
5957
6363
  notes?: string | null;
5958
6364
  order_date?: string;
5959
6365
  order_number: string;
6366
+ order_source?: string;
5960
6367
  status?: string;
5961
6368
  total?: string;
5962
6369
  updated_at?: string;
@@ -5972,6 +6379,7 @@ export type Database = {
5972
6379
  notes?: string | null;
5973
6380
  order_date?: string;
5974
6381
  order_number?: string;
6382
+ order_source?: string;
5975
6383
  status?: string;
5976
6384
  total?: string;
5977
6385
  updated_at?: string;
@@ -6210,6 +6618,68 @@ export type Database = {
6210
6618
  };
6211
6619
  Relationships: [];
6212
6620
  };
6621
+ product_group_items: {
6622
+ Row: {
6623
+ created_at: string;
6624
+ id: string;
6625
+ product_group_id: string;
6626
+ quantity: number;
6627
+ trade_item_id: string;
6628
+ };
6629
+ Insert: {
6630
+ created_at?: string;
6631
+ id?: string;
6632
+ product_group_id: string;
6633
+ quantity?: number;
6634
+ trade_item_id: string;
6635
+ };
6636
+ Update: {
6637
+ created_at?: string;
6638
+ id?: string;
6639
+ product_group_id?: string;
6640
+ quantity?: number;
6641
+ trade_item_id?: string;
6642
+ };
6643
+ Relationships: [
6644
+ {
6645
+ foreignKeyName: "product_group_items_product_group_id_fkey";
6646
+ columns: ["product_group_id"];
6647
+ isOneToOne: false;
6648
+ referencedRelation: "product_groups";
6649
+ referencedColumns: ["id"];
6650
+ }
6651
+ ];
6652
+ };
6653
+ product_groups: {
6654
+ Row: {
6655
+ created_at: string;
6656
+ description: string | null;
6657
+ id: string;
6658
+ is_active: boolean;
6659
+ name: string;
6660
+ tenant_id: string;
6661
+ updated_at: string;
6662
+ };
6663
+ Insert: {
6664
+ created_at?: string;
6665
+ description?: string | null;
6666
+ id?: string;
6667
+ is_active?: boolean;
6668
+ name: string;
6669
+ tenant_id: string;
6670
+ updated_at?: string;
6671
+ };
6672
+ Update: {
6673
+ created_at?: string;
6674
+ description?: string | null;
6675
+ id?: string;
6676
+ is_active?: boolean;
6677
+ name?: string;
6678
+ tenant_id?: string;
6679
+ updated_at?: string;
6680
+ };
6681
+ Relationships: [];
6682
+ };
6213
6683
  products: {
6214
6684
  Row: {
6215
6685
  barcode: string | null;
@@ -7389,7 +7859,13 @@ export type Database = {
7389
7859
  connection_id: string | null;
7390
7860
  created_at: string;
7391
7861
  data: Json;
7862
+ floriday_id: string | null;
7863
+ floriday_link_error: string | null;
7864
+ floriday_link_status: string;
7392
7865
  id: string;
7866
+ last_floriday_sync_at: string | null;
7867
+ missing_required_fields: string[];
7868
+ source: string;
7393
7869
  updated_at: string;
7394
7870
  user_id: string;
7395
7871
  };
@@ -7397,7 +7873,13 @@ export type Database = {
7397
7873
  connection_id?: string | null;
7398
7874
  created_at?: string;
7399
7875
  data?: Json;
7876
+ floriday_id?: string | null;
7877
+ floriday_link_error?: string | null;
7878
+ floriday_link_status?: string;
7400
7879
  id?: string;
7880
+ last_floriday_sync_at?: string | null;
7881
+ missing_required_fields?: string[];
7882
+ source?: string;
7401
7883
  updated_at?: string;
7402
7884
  user_id: string;
7403
7885
  };
@@ -7405,7 +7887,55 @@ export type Database = {
7405
7887
  connection_id?: string | null;
7406
7888
  created_at?: string;
7407
7889
  data?: Json;
7890
+ floriday_id?: string | null;
7891
+ floriday_link_error?: string | null;
7892
+ floriday_link_status?: string;
7408
7893
  id?: string;
7894
+ last_floriday_sync_at?: string | null;
7895
+ missing_required_fields?: string[];
7896
+ source?: string;
7897
+ updated_at?: string;
7898
+ user_id?: string;
7899
+ };
7900
+ Relationships: [];
7901
+ };
7902
+ trade_item_stock: {
7903
+ Row: {
7904
+ connection_id: string;
7905
+ created_at: string;
7906
+ id: string;
7907
+ incoming_stock: number;
7908
+ minimum_stock: number;
7909
+ notes: string | null;
7910
+ physical_stock: number;
7911
+ reserved_stock: number;
7912
+ trade_item_key: string;
7913
+ updated_at: string;
7914
+ user_id: string;
7915
+ };
7916
+ Insert: {
7917
+ connection_id: string;
7918
+ created_at?: string;
7919
+ id?: string;
7920
+ incoming_stock?: number;
7921
+ minimum_stock?: number;
7922
+ notes?: string | null;
7923
+ physical_stock?: number;
7924
+ reserved_stock?: number;
7925
+ trade_item_key: string;
7926
+ updated_at?: string;
7927
+ user_id: string;
7928
+ };
7929
+ Update: {
7930
+ connection_id?: string;
7931
+ created_at?: string;
7932
+ id?: string;
7933
+ incoming_stock?: number;
7934
+ minimum_stock?: number;
7935
+ notes?: string | null;
7936
+ physical_stock?: number;
7937
+ reserved_stock?: number;
7938
+ trade_item_key?: string;
7409
7939
  updated_at?: string;
7410
7940
  user_id?: string;
7411
7941
  };
@@ -7761,6 +8291,7 @@ export type Database = {
7761
8291
  };
7762
8292
  twinfield_invoice_sync_logs: {
7763
8293
  Row: {
8294
+ action_type: string | null;
7764
8295
  created_at: string;
7765
8296
  details: Json | null;
7766
8297
  duration_ms: number | null;
@@ -7773,6 +8304,7 @@ export type Database = {
7773
8304
  user_id: string;
7774
8305
  };
7775
8306
  Insert: {
8307
+ action_type?: string | null;
7776
8308
  created_at?: string;
7777
8309
  details?: Json | null;
7778
8310
  duration_ms?: number | null;
@@ -7785,6 +8317,7 @@ export type Database = {
7785
8317
  user_id: string;
7786
8318
  };
7787
8319
  Update: {
8320
+ action_type?: string | null;
7788
8321
  created_at?: string;
7789
8322
  details?: Json | null;
7790
8323
  duration_ms?: number | null;
@@ -8024,6 +8557,57 @@ export type Database = {
8024
8557
  }
8025
8558
  ];
8026
8559
  };
8560
+ twinfield_request_metrics: {
8561
+ Row: {
8562
+ bucket_hour: string;
8563
+ connection_id: string;
8564
+ error_count: number;
8565
+ rate_limited_count: number;
8566
+ request_count: number;
8567
+ updated_at: string;
8568
+ };
8569
+ Insert: {
8570
+ bucket_hour: string;
8571
+ connection_id: string;
8572
+ error_count?: number;
8573
+ rate_limited_count?: number;
8574
+ request_count?: number;
8575
+ updated_at?: string;
8576
+ };
8577
+ Update: {
8578
+ bucket_hour?: string;
8579
+ connection_id?: string;
8580
+ error_count?: number;
8581
+ rate_limited_count?: number;
8582
+ request_count?: number;
8583
+ updated_at?: string;
8584
+ };
8585
+ Relationships: [];
8586
+ };
8587
+ twinfield_session_cache: {
8588
+ Row: {
8589
+ cluster: string;
8590
+ created_at: string;
8591
+ expires_at: string;
8592
+ session_id: string;
8593
+ user_id: string;
8594
+ };
8595
+ Insert: {
8596
+ cluster: string;
8597
+ created_at?: string;
8598
+ expires_at: string;
8599
+ session_id: string;
8600
+ user_id: string;
8601
+ };
8602
+ Update: {
8603
+ cluster?: string;
8604
+ created_at?: string;
8605
+ expires_at?: string;
8606
+ session_id?: string;
8607
+ user_id?: string;
8608
+ };
8609
+ Relationships: [];
8610
+ };
8027
8611
  twinfield_settings: {
8028
8612
  Row: {
8029
8613
  active_environment: string;
@@ -8141,6 +8725,72 @@ export type Database = {
8141
8725
  }
8142
8726
  ];
8143
8727
  };
8728
+ voorraad_media_upload_failures: {
8729
+ Row: {
8730
+ action: string;
8731
+ attempt_number: number;
8732
+ caller: string;
8733
+ client_user_id: string | null;
8734
+ content_type: string | null;
8735
+ created_at: string;
8736
+ environment: string;
8737
+ error_message: string | null;
8738
+ filename: string | null;
8739
+ id: string;
8740
+ idempotency_key: string | null;
8741
+ module: string;
8742
+ path: string;
8743
+ reference_id: string | null;
8744
+ request_body_hash: string | null;
8745
+ request_timestamp: number | null;
8746
+ response_content_type: string | null;
8747
+ response_status: number | null;
8748
+ size_bytes: number | null;
8749
+ };
8750
+ Insert: {
8751
+ action?: string;
8752
+ attempt_number?: number;
8753
+ caller?: string;
8754
+ client_user_id?: string | null;
8755
+ content_type?: string | null;
8756
+ created_at?: string;
8757
+ environment: string;
8758
+ error_message?: string | null;
8759
+ filename?: string | null;
8760
+ id?: string;
8761
+ idempotency_key?: string | null;
8762
+ module?: string;
8763
+ path: string;
8764
+ reference_id?: string | null;
8765
+ request_body_hash?: string | null;
8766
+ request_timestamp?: number | null;
8767
+ response_content_type?: string | null;
8768
+ response_status?: number | null;
8769
+ size_bytes?: number | null;
8770
+ };
8771
+ Update: {
8772
+ action?: string;
8773
+ attempt_number?: number;
8774
+ caller?: string;
8775
+ client_user_id?: string | null;
8776
+ content_type?: string | null;
8777
+ created_at?: string;
8778
+ environment?: string;
8779
+ error_message?: string | null;
8780
+ filename?: string | null;
8781
+ id?: string;
8782
+ idempotency_key?: string | null;
8783
+ module?: string;
8784
+ path?: string;
8785
+ reference_id?: string | null;
8786
+ request_body_hash?: string | null;
8787
+ request_timestamp?: number | null;
8788
+ response_content_type?: string | null;
8789
+ response_status?: number | null;
8790
+ size_bytes?: number | null;
8791
+ };
8792
+ Relationships: [];
8793
+ };
8144
8794
  voorraad_publish_attempts: {
8145
8795
  Row: {
8146
8796
  action: string;
@@ -8551,6 +9201,37 @@ export type Database = {
8551
9201
  };
8552
9202
  Relationships: [];
8553
9203
  };
9204
+ manufacture_product_possible_stock_view: {
9205
+ Row: {
9206
+ component_count: number | null;
9207
+ manufacture_product_id: string | null;
9208
+ possible_stock: number | null;
9209
+ };
9210
+ Relationships: [];
9211
+ };
9212
+ product_group_stock_view: {
9213
+ Row: {
9214
+ item_count: number | null;
9215
+ product_group_id: string | null;
9216
+ total_stock: number | null;
9217
+ };
9218
+ Relationships: [
9219
+ {
9220
+ foreignKeyName: "product_group_items_product_group_id_fkey";
9221
+ columns: ["product_group_id"];
9222
+ isOneToOne: false;
9223
+ referencedRelation: "product_groups";
9224
+ referencedColumns: ["id"];
9225
+ }
9226
+ ];
9227
+ };
9228
+ trade_item_stock_view: {
9229
+ Row: {
9230
+ stock: number | null;
9231
+ trade_item_id: string | null;
9232
+ };
9233
+ Relationships: [];
9234
+ };
8554
9235
  v_external_customers_exact: {
8555
9236
  Row: {
8556
9237
  account_number: string | null;
@@ -8816,6 +9497,29 @@ export type Database = {
8816
9497
  };
8817
9498
  Returns: number;
8818
9499
  };
9500
+ assign_cart_numbers: {
9501
+ Args: {
9502
+ p_carts: Json;
9503
+ };
9504
+ Returns: {
9505
+ cart_index: number;
9506
+ cart_number: string;
9507
+ day_seq: number;
9508
+ order_id: string;
9509
+ order_source: string;
9510
+ pick_date: string;
9511
+ status: string;
9512
+ }[];
9513
+ };
9514
+ assign_floriday_order_numbers: {
9515
+ Args: {
9516
+ p_ids: string[];
9517
+ };
9518
+ Returns: {
9519
+ floriday_id: string;
9520
+ order_number: string;
9521
+ }[];
9522
+ };
8819
9523
  call_exact_route: {
8820
9524
  Args: {
8821
9525
  path: string;
@@ -8826,10 +9530,37 @@ export type Database = {
8826
9530
  Args: never;
8827
9531
  Returns: number;
8828
9532
  };
9533
+ control_get_todays_carts: {
9534
+ Args: never;
9535
+ Returns: {
9536
+ cart_index: number;
9537
+ cart_number: string;
9538
+ cart_number_id: string;
9539
+ order_id: string;
9540
+ order_source: string;
9541
+ pick_date: string;
9542
+ status: string;
9543
+ }[];
9544
+ };
9545
+ count_distinct_regulatory_products: {
9546
+ Args: never;
9547
+ Returns: number;
9548
+ };
8829
9549
  current_monteur_id: {
8830
9550
  Args: never;
8831
9551
  Returns: string;
8832
9552
  };
9553
+ dashboard_alert_counts: {
9554
+ Args: never;
9555
+ Returns: Json;
9556
+ };
9557
+ dashboard_alert_rows: {
9558
+ Args: {
9559
+ check_id: string;
9560
+ row_limit?: number;
9561
+ };
9562
+ Returns: Json;
9563
+ };
8833
9564
  dashboard_list_public_schema: {
8834
9565
  Args: never;
8835
9566
  Returns: {
@@ -8910,6 +9641,13 @@ export type Database = {
8910
9641
  };
8911
9642
  Returns: boolean;
8912
9643
  };
9644
+ format_cart_number: {
9645
+ Args: {
9646
+ p_pick_date: string;
9647
+ p_seq: number;
9648
+ };
9649
+ Returns: string;
9650
+ };
8913
9651
  get_active_floriday_connection_public: {
8914
9652
  Args: never;
8915
9653
  Returns: {
@@ -9025,6 +9763,12 @@ export type Database = {
9025
9763
  };
9026
9764
  Returns: Json;
9027
9765
  };
9766
+ get_or_assign_floriday_order_number: {
9767
+ Args: {
9768
+ p_floriday_id: string;
9769
+ };
9770
+ Returns: string;
9771
+ };
9028
9772
  get_room_busy_windows: {
9029
9773
  Args: {
9030
9774
  p_from: string;
@@ -9071,6 +9815,12 @@ export type Database = {
9071
9815
  Args: never;
9072
9816
  Returns: boolean;
9073
9817
  };
9818
+ next_order_number: {
9819
+ Args: {
9820
+ p_prefix: string;
9821
+ };
9822
+ Returns: string;
9823
+ };
9074
9824
  next_work_order_number: {
9075
9825
  Args: {
9076
9826
  p_parent_work_order_id?: string;
@@ -9084,6 +9834,47 @@ export type Database = {
9084
9834
  };
9085
9835
  Returns: string;
9086
9836
  };
9837
+ pickstation_get_orders_raw: {
9838
+ Args: never;
9839
+ Returns: Json;
9840
+ };
9841
+ pickstation_get_settings: {
9842
+ Args: never;
9843
+ Returns: Json;
9844
+ };
9845
+ pickstation_log_print: {
9846
+ Args: {
9847
+ p_customer_name: string;
9848
+ p_documents: string[];
9849
+ p_ip_address: string;
9850
+ p_order_id: string;
9851
+ p_order_number: string;
9852
+ };
9853
+ Returns: undefined;
9854
+ };
9855
+ pickstation_set_cart_status: {
9856
+ Args: {
9857
+ p_cart_index: number;
9858
+ p_order_id: string;
9859
+ p_order_source: string;
9860
+ p_status: string;
9861
+ };
9862
+ Returns: undefined;
9863
+ };
9864
+ refresh_floricode_derived_code_lists: {
9865
+ Args: never;
9866
+ Returns: {
9867
+ environment: string;
9868
+ list_name: string;
9869
+ row_count: number;
9870
+ }[];
9871
+ };
9872
+ refresh_floricode_derived_for_product: {
9873
+ Args: {
9874
+ p_product_code: string;
9875
+ };
9876
+ Returns: number;
9877
+ };
9087
9878
  reset_floriday_sync_cursor: {
9088
9879
  Args: {
9089
9880
  p_connection_id: string;