@flowselections/mailbox-orders 1.0.4 → 1.0.5

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.
@@ -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;
@@ -2804,6 +3076,7 @@ export type Database = {
2804
3076
  };
2805
3077
  floricode_sync_state: {
2806
3078
  Row: {
3079
+ cursor_skip: number;
2807
3080
  error_message: string | null;
2808
3081
  last_change_date_time: string | null;
2809
3082
  last_sequence_number: number;
@@ -2813,6 +3086,7 @@ export type Database = {
2813
3086
  updated_at: string;
2814
3087
  };
2815
3088
  Insert: {
3089
+ cursor_skip?: number;
2816
3090
  error_message?: string | null;
2817
3091
  last_change_date_time?: string | null;
2818
3092
  last_sequence_number?: number;
@@ -2822,6 +3096,7 @@ export type Database = {
2822
3096
  updated_at?: string;
2823
3097
  };
2824
3098
  Update: {
3099
+ cursor_skip?: number;
2825
3100
  error_message?: string | null;
2826
3101
  last_change_date_time?: string | null;
2827
3102
  last_sequence_number?: number;
@@ -4015,6 +4290,24 @@ export type Database = {
4015
4290
  };
4016
4291
  Relationships: [];
4017
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
+ };
4018
4311
  floriday_packings_cache: {
4019
4312
  Row: {
4020
4313
  connection_id: string;
@@ -5242,6 +5535,97 @@ export type Database = {
5242
5535
  };
5243
5536
  Relationships: [];
5244
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
+ };
5245
5629
  monteurs: {
5246
5630
  Row: {
5247
5631
  avatar_url: string | null;
@@ -5933,6 +6317,24 @@ export type Database = {
5933
6317
  }
5934
6318
  ];
5935
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
+ };
5936
6338
  orders: {
5937
6339
  Row: {
5938
6340
  created_at: string;
@@ -5945,6 +6347,7 @@ export type Database = {
5945
6347
  notes: string | null;
5946
6348
  order_date: string;
5947
6349
  order_number: string;
6350
+ order_source: string;
5948
6351
  status: string;
5949
6352
  total: string;
5950
6353
  updated_at: string;
@@ -5960,6 +6363,7 @@ export type Database = {
5960
6363
  notes?: string | null;
5961
6364
  order_date?: string;
5962
6365
  order_number: string;
6366
+ order_source?: string;
5963
6367
  status?: string;
5964
6368
  total?: string;
5965
6369
  updated_at?: string;
@@ -5975,6 +6379,7 @@ export type Database = {
5975
6379
  notes?: string | null;
5976
6380
  order_date?: string;
5977
6381
  order_number?: string;
6382
+ order_source?: string;
5978
6383
  status?: string;
5979
6384
  total?: string;
5980
6385
  updated_at?: string;
@@ -6213,6 +6618,68 @@ export type Database = {
6213
6618
  };
6214
6619
  Relationships: [];
6215
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
+ };
6216
6683
  products: {
6217
6684
  Row: {
6218
6685
  barcode: string | null;
@@ -7392,7 +7859,13 @@ export type Database = {
7392
7859
  connection_id: string | null;
7393
7860
  created_at: string;
7394
7861
  data: Json;
7862
+ floriday_id: string | null;
7863
+ floriday_link_error: string | null;
7864
+ floriday_link_status: string;
7395
7865
  id: string;
7866
+ last_floriday_sync_at: string | null;
7867
+ missing_required_fields: string[];
7868
+ source: string;
7396
7869
  updated_at: string;
7397
7870
  user_id: string;
7398
7871
  };
@@ -7400,7 +7873,13 @@ export type Database = {
7400
7873
  connection_id?: string | null;
7401
7874
  created_at?: string;
7402
7875
  data?: Json;
7876
+ floriday_id?: string | null;
7877
+ floriday_link_error?: string | null;
7878
+ floriday_link_status?: string;
7403
7879
  id?: string;
7880
+ last_floriday_sync_at?: string | null;
7881
+ missing_required_fields?: string[];
7882
+ source?: string;
7404
7883
  updated_at?: string;
7405
7884
  user_id: string;
7406
7885
  };
@@ -7408,7 +7887,55 @@ export type Database = {
7408
7887
  connection_id?: string | null;
7409
7888
  created_at?: string;
7410
7889
  data?: Json;
7890
+ floriday_id?: string | null;
7891
+ floriday_link_error?: string | null;
7892
+ floriday_link_status?: string;
7411
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;
7412
7939
  updated_at?: string;
7413
7940
  user_id?: string;
7414
7941
  };
@@ -7764,6 +8291,7 @@ export type Database = {
7764
8291
  };
7765
8292
  twinfield_invoice_sync_logs: {
7766
8293
  Row: {
8294
+ action_type: string | null;
7767
8295
  created_at: string;
7768
8296
  details: Json | null;
7769
8297
  duration_ms: number | null;
@@ -7776,6 +8304,7 @@ export type Database = {
7776
8304
  user_id: string;
7777
8305
  };
7778
8306
  Insert: {
8307
+ action_type?: string | null;
7779
8308
  created_at?: string;
7780
8309
  details?: Json | null;
7781
8310
  duration_ms?: number | null;
@@ -7788,6 +8317,7 @@ export type Database = {
7788
8317
  user_id: string;
7789
8318
  };
7790
8319
  Update: {
8320
+ action_type?: string | null;
7791
8321
  created_at?: string;
7792
8322
  details?: Json | null;
7793
8323
  duration_ms?: number | null;
@@ -8027,6 +8557,57 @@ export type Database = {
8027
8557
  }
8028
8558
  ];
8029
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
+ };
8030
8611
  twinfield_settings: {
8031
8612
  Row: {
8032
8613
  active_environment: string;
@@ -8620,6 +9201,37 @@ export type Database = {
8620
9201
  };
8621
9202
  Relationships: [];
8622
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
+ };
8623
9235
  v_external_customers_exact: {
8624
9236
  Row: {
8625
9237
  account_number: string | null;
@@ -8885,6 +9497,29 @@ export type Database = {
8885
9497
  };
8886
9498
  Returns: number;
8887
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
+ };
8888
9523
  call_exact_route: {
8889
9524
  Args: {
8890
9525
  path: string;
@@ -8895,10 +9530,37 @@ export type Database = {
8895
9530
  Args: never;
8896
9531
  Returns: number;
8897
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
+ };
8898
9549
  current_monteur_id: {
8899
9550
  Args: never;
8900
9551
  Returns: string;
8901
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
+ };
8902
9564
  dashboard_list_public_schema: {
8903
9565
  Args: never;
8904
9566
  Returns: {
@@ -8979,6 +9641,13 @@ export type Database = {
8979
9641
  };
8980
9642
  Returns: boolean;
8981
9643
  };
9644
+ format_cart_number: {
9645
+ Args: {
9646
+ p_pick_date: string;
9647
+ p_seq: number;
9648
+ };
9649
+ Returns: string;
9650
+ };
8982
9651
  get_active_floriday_connection_public: {
8983
9652
  Args: never;
8984
9653
  Returns: {
@@ -9094,6 +9763,12 @@ export type Database = {
9094
9763
  };
9095
9764
  Returns: Json;
9096
9765
  };
9766
+ get_or_assign_floriday_order_number: {
9767
+ Args: {
9768
+ p_floriday_id: string;
9769
+ };
9770
+ Returns: string;
9771
+ };
9097
9772
  get_room_busy_windows: {
9098
9773
  Args: {
9099
9774
  p_from: string;
@@ -9140,6 +9815,12 @@ export type Database = {
9140
9815
  Args: never;
9141
9816
  Returns: boolean;
9142
9817
  };
9818
+ next_order_number: {
9819
+ Args: {
9820
+ p_prefix: string;
9821
+ };
9822
+ Returns: string;
9823
+ };
9143
9824
  next_work_order_number: {
9144
9825
  Args: {
9145
9826
  p_parent_work_order_id?: string;
@@ -9171,14 +9852,29 @@ export type Database = {
9171
9852
  };
9172
9853
  Returns: undefined;
9173
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
+ };
9174
9864
  refresh_floricode_derived_code_lists: {
9175
9865
  Args: never;
9176
9866
  Returns: {
9177
- out_environment: string;
9178
- out_list_name: string;
9179
- out_row_count: number;
9867
+ environment: string;
9868
+ list_name: string;
9869
+ row_count: number;
9180
9870
  }[];
9181
9871
  };
9872
+ refresh_floricode_derived_for_product: {
9873
+ Args: {
9874
+ p_product_code: string;
9875
+ };
9876
+ Returns: number;
9877
+ };
9182
9878
  reset_floriday_sync_cursor: {
9183
9879
  Args: {
9184
9880
  p_connection_id: string;