@flowselections/mailbox-orders 1.0.4 → 1.0.6

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.
@@ -9,6 +9,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9
9
  max_workdays_earlier_pick: number;
10
10
  pick_days_before_transport: number;
11
11
  pick_distribution_enabled: boolean;
12
+ pick_weekdays: number[];
12
13
  signup_mail_enabled: boolean;
13
14
  signup_mail_lead_minutes: number;
14
15
  signup_mail_purpose: string;
@@ -22,6 +23,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
22
23
  max_workdays_earlier_pick?: number;
23
24
  pick_days_before_transport?: number;
24
25
  pick_distribution_enabled?: boolean;
26
+ pick_weekdays?: number[];
25
27
  signup_mail_enabled?: boolean;
26
28
  signup_mail_lead_minutes?: number;
27
29
  signup_mail_purpose?: string;
@@ -35,6 +37,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
35
37
  max_workdays_earlier_pick?: number;
36
38
  pick_days_before_transport?: number;
37
39
  pick_distribution_enabled?: boolean;
40
+ pick_weekdays?: number[];
38
41
  signup_mail_enabled?: boolean;
39
42
  signup_mail_lead_minutes?: number;
40
43
  signup_mail_purpose?: string;
@@ -446,6 +449,48 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
446
449
  referencedColumns: ["id"];
447
450
  }];
448
451
  };
452
+ carrier_signup_dispatch_runs: {
453
+ Row: {
454
+ detail: import("./types").Json | null;
455
+ error: string | null;
456
+ finished_at: string | null;
457
+ groups: number;
458
+ id: string;
459
+ ok: boolean;
460
+ reason: string | null;
461
+ sent: number;
462
+ skipped: import("./types").Json;
463
+ started_at: string;
464
+ unassigned: import("./types").Json;
465
+ };
466
+ Insert: {
467
+ detail?: import("./types").Json | null;
468
+ error?: string | null;
469
+ finished_at?: string | null;
470
+ groups?: number;
471
+ id?: string;
472
+ ok?: boolean;
473
+ reason?: string | null;
474
+ sent?: number;
475
+ skipped?: import("./types").Json;
476
+ started_at?: string;
477
+ unassigned?: import("./types").Json;
478
+ };
479
+ Update: {
480
+ detail?: import("./types").Json | null;
481
+ error?: string | null;
482
+ finished_at?: string | null;
483
+ groups?: number;
484
+ id?: string;
485
+ ok?: boolean;
486
+ reason?: string | null;
487
+ sent?: number;
488
+ skipped?: import("./types").Json;
489
+ started_at?: string;
490
+ unassigned?: import("./types").Json;
491
+ };
492
+ Relationships: [];
493
+ };
449
494
  carrier_signup_dispatches: {
450
495
  Row: {
451
496
  carrier_id: string;
@@ -497,6 +542,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
497
542
  contact_person: string | null;
498
543
  created_at: string;
499
544
  delivery_days: number | null;
545
+ delivery_weekdays: number[];
500
546
  email: string | null;
501
547
  id: string;
502
548
  is_default: boolean;
@@ -504,6 +550,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
504
550
  notes: string | null;
505
551
  phone: string | null;
506
552
  pickup_moments: import("./types").Json;
553
+ pickup_weekdays: number[];
507
554
  service_cities: string[];
508
555
  service_countries: string[];
509
556
  service_provinces: string[];
@@ -519,6 +566,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
519
566
  contact_person?: string | null;
520
567
  created_at?: string;
521
568
  delivery_days?: number | null;
569
+ delivery_weekdays?: number[];
522
570
  email?: string | null;
523
571
  id?: string;
524
572
  is_default?: boolean;
@@ -526,6 +574,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
526
574
  notes?: string | null;
527
575
  phone?: string | null;
528
576
  pickup_moments?: import("./types").Json;
577
+ pickup_weekdays?: number[];
529
578
  service_cities?: string[];
530
579
  service_countries?: string[];
531
580
  service_provinces?: string[];
@@ -541,6 +590,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
541
590
  contact_person?: string | null;
542
591
  created_at?: string;
543
592
  delivery_days?: number | null;
593
+ delivery_weekdays?: number[];
544
594
  email?: string | null;
545
595
  id?: string;
546
596
  is_default?: boolean;
@@ -548,6 +598,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
548
598
  notes?: string | null;
549
599
  phone?: string | null;
550
600
  pickup_moments?: import("./types").Json;
601
+ pickup_weekdays?: number[];
551
602
  service_cities?: string[];
552
603
  service_countries?: string[];
553
604
  service_provinces?: string[];
@@ -560,6 +611,180 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
560
611
  };
561
612
  Relationships: [];
562
613
  };
614
+ cart_control_draft: {
615
+ Row: {
616
+ cart_states: import("./types").Json;
617
+ checked_keys: import("./types").Json;
618
+ draft_date: string;
619
+ form_state: import("./types").Json;
620
+ notes: string;
621
+ updated_at: string;
622
+ user_id: string;
623
+ };
624
+ Insert: {
625
+ cart_states?: import("./types").Json;
626
+ checked_keys?: import("./types").Json;
627
+ draft_date: string;
628
+ form_state?: import("./types").Json;
629
+ notes?: string;
630
+ updated_at?: string;
631
+ user_id: string;
632
+ };
633
+ Update: {
634
+ cart_states?: import("./types").Json;
635
+ checked_keys?: import("./types").Json;
636
+ draft_date?: string;
637
+ form_state?: import("./types").Json;
638
+ notes?: string;
639
+ updated_at?: string;
640
+ user_id?: string;
641
+ };
642
+ Relationships: [];
643
+ };
644
+ cart_control_items: {
645
+ Row: {
646
+ action: string;
647
+ block_reason: string | null;
648
+ carrier_name: string | null;
649
+ cart_index: number;
650
+ cart_number_id: string | null;
651
+ cart_number_label: string | null;
652
+ created_at: string;
653
+ customer_name: string | null;
654
+ delivery_date: string | null;
655
+ id: string;
656
+ new_pick_date: string | null;
657
+ order_id: string;
658
+ order_number: string | null;
659
+ order_source: string;
660
+ pickup_date: string | null;
661
+ session_id: string;
662
+ };
663
+ Insert: {
664
+ action: string;
665
+ block_reason?: string | null;
666
+ carrier_name?: string | null;
667
+ cart_index: number;
668
+ cart_number_id?: string | null;
669
+ cart_number_label?: string | null;
670
+ created_at?: string;
671
+ customer_name?: string | null;
672
+ delivery_date?: string | null;
673
+ id?: string;
674
+ new_pick_date?: string | null;
675
+ order_id: string;
676
+ order_number?: string | null;
677
+ order_source: string;
678
+ pickup_date?: string | null;
679
+ session_id: string;
680
+ };
681
+ Update: {
682
+ action?: string;
683
+ block_reason?: string | null;
684
+ carrier_name?: string | null;
685
+ cart_index?: number;
686
+ cart_number_id?: string | null;
687
+ cart_number_label?: string | null;
688
+ created_at?: string;
689
+ customer_name?: string | null;
690
+ delivery_date?: string | null;
691
+ id?: string;
692
+ new_pick_date?: string | null;
693
+ order_id?: string;
694
+ order_number?: string | null;
695
+ order_source?: string;
696
+ pickup_date?: string | null;
697
+ session_id?: string;
698
+ };
699
+ Relationships: [{
700
+ foreignKeyName: "cart_control_items_session_id_fkey";
701
+ columns: ["session_id"];
702
+ isOneToOne: false;
703
+ referencedRelation: "cart_control_sessions";
704
+ referencedColumns: ["id"];
705
+ }];
706
+ };
707
+ cart_control_sessions: {
708
+ Row: {
709
+ blocked_count: number;
710
+ checked_count: number;
711
+ control_date: string;
712
+ created_at: string;
713
+ id: string;
714
+ notes: string | null;
715
+ performed_at: string;
716
+ rescheduled_count: number;
717
+ stock_consumed_at: string | null;
718
+ total_carts: number;
719
+ updated_at: string;
720
+ user_id: string;
721
+ };
722
+ Insert: {
723
+ blocked_count?: number;
724
+ checked_count?: number;
725
+ control_date?: string;
726
+ created_at?: string;
727
+ id?: string;
728
+ notes?: string | null;
729
+ performed_at?: string;
730
+ rescheduled_count?: number;
731
+ stock_consumed_at?: string | null;
732
+ total_carts?: number;
733
+ updated_at?: string;
734
+ user_id: string;
735
+ };
736
+ Update: {
737
+ blocked_count?: number;
738
+ checked_count?: number;
739
+ control_date?: string;
740
+ created_at?: string;
741
+ id?: string;
742
+ notes?: string | null;
743
+ performed_at?: string;
744
+ rescheduled_count?: number;
745
+ stock_consumed_at?: string | null;
746
+ total_carts?: number;
747
+ updated_at?: string;
748
+ user_id?: string;
749
+ };
750
+ Relationships: [];
751
+ };
752
+ cart_numbers: {
753
+ Row: {
754
+ assigned_at: string;
755
+ cart_index: number;
756
+ cart_number: string;
757
+ day_seq: number;
758
+ id: string;
759
+ order_id: string;
760
+ order_source: string;
761
+ pick_date: string;
762
+ status: string;
763
+ };
764
+ Insert: {
765
+ assigned_at?: string;
766
+ cart_index: number;
767
+ cart_number: string;
768
+ day_seq: number;
769
+ id?: string;
770
+ order_id: string;
771
+ order_source: string;
772
+ pick_date: string;
773
+ status?: string;
774
+ };
775
+ Update: {
776
+ assigned_at?: string;
777
+ cart_index?: number;
778
+ cart_number?: string;
779
+ day_seq?: number;
780
+ id?: string;
781
+ order_id?: string;
782
+ order_source?: string;
783
+ pick_date?: string;
784
+ status?: string;
785
+ };
786
+ Relationships: [];
787
+ };
563
788
  cart_pick_overrides: {
564
789
  Row: {
565
790
  cart_index: number;
@@ -1232,6 +1457,54 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
1232
1457
  referencedColumns: ["id"];
1233
1458
  }];
1234
1459
  };
1460
+ dashboard_critical_alerts: {
1461
+ Row: {
1462
+ alert_key: string;
1463
+ alert_type: string;
1464
+ created_at: string;
1465
+ description: string | null;
1466
+ id: string;
1467
+ metadata: import("./types").Json | null;
1468
+ priority: string;
1469
+ raised_at: string;
1470
+ related_cart_ids: string[] | null;
1471
+ resolved_at: string | null;
1472
+ title: string;
1473
+ updated_at: string;
1474
+ user_id: string;
1475
+ };
1476
+ Insert: {
1477
+ alert_key: string;
1478
+ alert_type: string;
1479
+ created_at?: string;
1480
+ description?: string | null;
1481
+ id?: string;
1482
+ metadata?: import("./types").Json | null;
1483
+ priority?: string;
1484
+ raised_at?: string;
1485
+ related_cart_ids?: string[] | null;
1486
+ resolved_at?: string | null;
1487
+ title: string;
1488
+ updated_at?: string;
1489
+ user_id: string;
1490
+ };
1491
+ Update: {
1492
+ alert_key?: string;
1493
+ alert_type?: string;
1494
+ created_at?: string;
1495
+ description?: string | null;
1496
+ id?: string;
1497
+ metadata?: import("./types").Json | null;
1498
+ priority?: string;
1499
+ raised_at?: string;
1500
+ related_cart_ids?: string[] | null;
1501
+ resolved_at?: string | null;
1502
+ title?: string;
1503
+ updated_at?: string;
1504
+ user_id?: string;
1505
+ };
1506
+ Relationships: [];
1507
+ };
1235
1508
  dashboard_daily_reports: {
1236
1509
  Row: {
1237
1510
  created_at: string;
@@ -2734,6 +3007,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
2734
3007
  };
2735
3008
  floricode_sync_state: {
2736
3009
  Row: {
3010
+ cursor_skip: number;
2737
3011
  error_message: string | null;
2738
3012
  last_change_date_time: string | null;
2739
3013
  last_sequence_number: number;
@@ -2743,6 +3017,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
2743
3017
  updated_at: string;
2744
3018
  };
2745
3019
  Insert: {
3020
+ cursor_skip?: number;
2746
3021
  error_message?: string | null;
2747
3022
  last_change_date_time?: string | null;
2748
3023
  last_sequence_number?: number;
@@ -2752,6 +3027,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
2752
3027
  updated_at?: string;
2753
3028
  };
2754
3029
  Update: {
3030
+ cursor_skip?: number;
2755
3031
  error_message?: string | null;
2756
3032
  last_change_date_time?: string | null;
2757
3033
  last_sequence_number?: number;
@@ -3899,6 +4175,24 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
3899
4175
  };
3900
4176
  Relationships: [];
3901
4177
  };
4178
+ floriday_order_number_map: {
4179
+ Row: {
4180
+ created_at: string;
4181
+ floriday_id: string;
4182
+ order_number: string;
4183
+ };
4184
+ Insert: {
4185
+ created_at?: string;
4186
+ floriday_id: string;
4187
+ order_number: string;
4188
+ };
4189
+ Update: {
4190
+ created_at?: string;
4191
+ floriday_id?: string;
4192
+ order_number?: string;
4193
+ };
4194
+ Relationships: [];
4195
+ };
3902
4196
  floriday_packings_cache: {
3903
4197
  Row: {
3904
4198
  connection_id: string;
@@ -5081,6 +5375,93 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
5081
5375
  };
5082
5376
  Relationships: [];
5083
5377
  };
5378
+ manufacture_product_components: {
5379
+ Row: {
5380
+ component_type: string;
5381
+ created_at: string;
5382
+ id: string;
5383
+ manufacture_product_id: string;
5384
+ product_group_id: string | null;
5385
+ quantity: number;
5386
+ trade_item_id: string | null;
5387
+ unit: string;
5388
+ };
5389
+ Insert: {
5390
+ component_type: string;
5391
+ created_at?: string;
5392
+ id?: string;
5393
+ manufacture_product_id: string;
5394
+ product_group_id?: string | null;
5395
+ quantity?: number;
5396
+ trade_item_id?: string | null;
5397
+ unit?: string;
5398
+ };
5399
+ Update: {
5400
+ component_type?: string;
5401
+ created_at?: string;
5402
+ id?: string;
5403
+ manufacture_product_id?: string;
5404
+ product_group_id?: string | null;
5405
+ quantity?: number;
5406
+ trade_item_id?: string | null;
5407
+ unit?: string;
5408
+ };
5409
+ Relationships: [{
5410
+ foreignKeyName: "manufacture_product_components_manufacture_product_id_fkey";
5411
+ columns: ["manufacture_product_id"];
5412
+ isOneToOne: false;
5413
+ referencedRelation: "manufacture_product_possible_stock_view";
5414
+ referencedColumns: ["manufacture_product_id"];
5415
+ }, {
5416
+ foreignKeyName: "manufacture_product_components_manufacture_product_id_fkey";
5417
+ columns: ["manufacture_product_id"];
5418
+ isOneToOne: false;
5419
+ referencedRelation: "manufacture_products";
5420
+ referencedColumns: ["id"];
5421
+ }, {
5422
+ foreignKeyName: "manufacture_product_components_product_group_id_fkey";
5423
+ columns: ["product_group_id"];
5424
+ isOneToOne: false;
5425
+ referencedRelation: "product_groups";
5426
+ referencedColumns: ["id"];
5427
+ }];
5428
+ };
5429
+ manufacture_products: {
5430
+ Row: {
5431
+ created_at: string;
5432
+ description: string | null;
5433
+ id: string;
5434
+ is_active: boolean;
5435
+ name: string;
5436
+ produced_stock: number;
5437
+ product_code: string;
5438
+ tenant_id: string;
5439
+ updated_at: string;
5440
+ };
5441
+ Insert: {
5442
+ created_at?: string;
5443
+ description?: string | null;
5444
+ id?: string;
5445
+ is_active?: boolean;
5446
+ name: string;
5447
+ produced_stock?: number;
5448
+ product_code: string;
5449
+ tenant_id: string;
5450
+ updated_at?: string;
5451
+ };
5452
+ Update: {
5453
+ created_at?: string;
5454
+ description?: string | null;
5455
+ id?: string;
5456
+ is_active?: boolean;
5457
+ name?: string;
5458
+ produced_stock?: number;
5459
+ product_code?: string;
5460
+ tenant_id?: string;
5461
+ updated_at?: string;
5462
+ };
5463
+ Relationships: [];
5464
+ };
5084
5465
  monteurs: {
5085
5466
  Row: {
5086
5467
  avatar_url: string | null;
@@ -5744,6 +6125,24 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
5744
6125
  referencedColumns: ["id"];
5745
6126
  }];
5746
6127
  };
6128
+ order_number_counters: {
6129
+ Row: {
6130
+ last_value: number;
6131
+ updated_at: string;
6132
+ year: number;
6133
+ };
6134
+ Insert: {
6135
+ last_value?: number;
6136
+ updated_at?: string;
6137
+ year: number;
6138
+ };
6139
+ Update: {
6140
+ last_value?: number;
6141
+ updated_at?: string;
6142
+ year?: number;
6143
+ };
6144
+ Relationships: [];
6145
+ };
5747
6146
  orders: {
5748
6147
  Row: {
5749
6148
  created_at: string;
@@ -5756,6 +6155,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
5756
6155
  notes: string | null;
5757
6156
  order_date: string;
5758
6157
  order_number: string;
6158
+ order_source: string;
5759
6159
  status: string;
5760
6160
  total: string;
5761
6161
  updated_at: string;
@@ -5771,6 +6171,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
5771
6171
  notes?: string | null;
5772
6172
  order_date?: string;
5773
6173
  order_number: string;
6174
+ order_source?: string;
5774
6175
  status?: string;
5775
6176
  total?: string;
5776
6177
  updated_at?: string;
@@ -5786,6 +6187,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
5786
6187
  notes?: string | null;
5787
6188
  order_date?: string;
5788
6189
  order_number?: string;
6190
+ order_source?: string;
5789
6191
  status?: string;
5790
6192
  total?: string;
5791
6193
  updated_at?: string;
@@ -6020,6 +6422,66 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
6020
6422
  };
6021
6423
  Relationships: [];
6022
6424
  };
6425
+ product_group_items: {
6426
+ Row: {
6427
+ created_at: string;
6428
+ id: string;
6429
+ product_group_id: string;
6430
+ quantity: number;
6431
+ trade_item_id: string;
6432
+ };
6433
+ Insert: {
6434
+ created_at?: string;
6435
+ id?: string;
6436
+ product_group_id: string;
6437
+ quantity?: number;
6438
+ trade_item_id: string;
6439
+ };
6440
+ Update: {
6441
+ created_at?: string;
6442
+ id?: string;
6443
+ product_group_id?: string;
6444
+ quantity?: number;
6445
+ trade_item_id?: string;
6446
+ };
6447
+ Relationships: [{
6448
+ foreignKeyName: "product_group_items_product_group_id_fkey";
6449
+ columns: ["product_group_id"];
6450
+ isOneToOne: false;
6451
+ referencedRelation: "product_groups";
6452
+ referencedColumns: ["id"];
6453
+ }];
6454
+ };
6455
+ product_groups: {
6456
+ Row: {
6457
+ created_at: string;
6458
+ description: string | null;
6459
+ id: string;
6460
+ is_active: boolean;
6461
+ name: string;
6462
+ tenant_id: string;
6463
+ updated_at: string;
6464
+ };
6465
+ Insert: {
6466
+ created_at?: string;
6467
+ description?: string | null;
6468
+ id?: string;
6469
+ is_active?: boolean;
6470
+ name: string;
6471
+ tenant_id: string;
6472
+ updated_at?: string;
6473
+ };
6474
+ Update: {
6475
+ created_at?: string;
6476
+ description?: string | null;
6477
+ id?: string;
6478
+ is_active?: boolean;
6479
+ name?: string;
6480
+ tenant_id?: string;
6481
+ updated_at?: string;
6482
+ };
6483
+ Relationships: [];
6484
+ };
6023
6485
  products: {
6024
6486
  Row: {
6025
6487
  barcode: string | null;
@@ -6039,6 +6501,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
6039
6501
  purchase_price: number | null;
6040
6502
  quantity: number;
6041
6503
  sale_price: number | null;
6504
+ trade_item_key: string | null;
6042
6505
  unit: string;
6043
6506
  updated_at: string;
6044
6507
  weight: string | null;
@@ -6061,6 +6524,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
6061
6524
  purchase_price?: number | null;
6062
6525
  quantity?: number;
6063
6526
  sale_price?: number | null;
6527
+ trade_item_key?: string | null;
6064
6528
  unit?: string;
6065
6529
  updated_at?: string;
6066
6530
  weight?: string | null;
@@ -6083,6 +6547,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
6083
6547
  purchase_price?: number | null;
6084
6548
  quantity?: number;
6085
6549
  sale_price?: number | null;
6550
+ trade_item_key?: string | null;
6086
6551
  unit?: string;
6087
6552
  updated_at?: string;
6088
6553
  weight?: string | null;
@@ -6902,6 +7367,60 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
6902
7367
  };
6903
7368
  Relationships: [];
6904
7369
  };
7370
+ stock_mutation_log: {
7371
+ Row: {
7372
+ connection_id: string | null;
7373
+ created_at: string;
7374
+ created_by: string | null;
7375
+ id: string;
7376
+ mutation_type: string;
7377
+ order_id: string | null;
7378
+ order_item_id: string | null;
7379
+ order_source: string | null;
7380
+ physical_after: number | null;
7381
+ physical_before: number | null;
7382
+ qty_delta: number;
7383
+ reason: string | null;
7384
+ reserved_after: number | null;
7385
+ reserved_before: number | null;
7386
+ trade_item_key: string;
7387
+ };
7388
+ Insert: {
7389
+ connection_id?: string | null;
7390
+ created_at?: string;
7391
+ created_by?: string | null;
7392
+ id?: string;
7393
+ mutation_type: string;
7394
+ order_id?: string | null;
7395
+ order_item_id?: string | null;
7396
+ order_source?: string | null;
7397
+ physical_after?: number | null;
7398
+ physical_before?: number | null;
7399
+ qty_delta: number;
7400
+ reason?: string | null;
7401
+ reserved_after?: number | null;
7402
+ reserved_before?: number | null;
7403
+ trade_item_key: string;
7404
+ };
7405
+ Update: {
7406
+ connection_id?: string | null;
7407
+ created_at?: string;
7408
+ created_by?: string | null;
7409
+ id?: string;
7410
+ mutation_type?: string;
7411
+ order_id?: string | null;
7412
+ order_item_id?: string | null;
7413
+ order_source?: string | null;
7414
+ physical_after?: number | null;
7415
+ physical_before?: number | null;
7416
+ qty_delta?: number;
7417
+ reason?: string | null;
7418
+ reserved_after?: number | null;
7419
+ reserved_before?: number | null;
7420
+ trade_item_key?: string;
7421
+ };
7422
+ Relationships: [];
7423
+ };
6905
7424
  supplier_products: {
6906
7425
  Row: {
6907
7426
  article_number: string | null;
@@ -7159,7 +7678,13 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7159
7678
  connection_id: string | null;
7160
7679
  created_at: string;
7161
7680
  data: import("./types").Json;
7681
+ floriday_id: string | null;
7682
+ floriday_link_error: string | null;
7683
+ floriday_link_status: string;
7162
7684
  id: string;
7685
+ last_floriday_sync_at: string | null;
7686
+ missing_required_fields: string[];
7687
+ source: string;
7163
7688
  updated_at: string;
7164
7689
  user_id: string;
7165
7690
  };
@@ -7167,7 +7692,13 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7167
7692
  connection_id?: string | null;
7168
7693
  created_at?: string;
7169
7694
  data?: import("./types").Json;
7695
+ floriday_id?: string | null;
7696
+ floriday_link_error?: string | null;
7697
+ floriday_link_status?: string;
7170
7698
  id?: string;
7699
+ last_floriday_sync_at?: string | null;
7700
+ missing_required_fields?: string[];
7701
+ source?: string;
7171
7702
  updated_at?: string;
7172
7703
  user_id: string;
7173
7704
  };
@@ -7175,7 +7706,55 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7175
7706
  connection_id?: string | null;
7176
7707
  created_at?: string;
7177
7708
  data?: import("./types").Json;
7709
+ floriday_id?: string | null;
7710
+ floriday_link_error?: string | null;
7711
+ floriday_link_status?: string;
7178
7712
  id?: string;
7713
+ last_floriday_sync_at?: string | null;
7714
+ missing_required_fields?: string[];
7715
+ source?: string;
7716
+ updated_at?: string;
7717
+ user_id?: string;
7718
+ };
7719
+ Relationships: [];
7720
+ };
7721
+ trade_item_stock: {
7722
+ Row: {
7723
+ connection_id: string;
7724
+ created_at: string;
7725
+ id: string;
7726
+ incoming_stock: number;
7727
+ minimum_stock: number;
7728
+ notes: string | null;
7729
+ physical_stock: number;
7730
+ reserved_stock: number;
7731
+ trade_item_key: string;
7732
+ updated_at: string;
7733
+ user_id: string;
7734
+ };
7735
+ Insert: {
7736
+ connection_id: string;
7737
+ created_at?: string;
7738
+ id?: string;
7739
+ incoming_stock?: number;
7740
+ minimum_stock?: number;
7741
+ notes?: string | null;
7742
+ physical_stock?: number;
7743
+ reserved_stock?: number;
7744
+ trade_item_key: string;
7745
+ updated_at?: string;
7746
+ user_id: string;
7747
+ };
7748
+ Update: {
7749
+ connection_id?: string;
7750
+ created_at?: string;
7751
+ id?: string;
7752
+ incoming_stock?: number;
7753
+ minimum_stock?: number;
7754
+ notes?: string | null;
7755
+ physical_stock?: number;
7756
+ reserved_stock?: number;
7757
+ trade_item_key?: string;
7179
7758
  updated_at?: string;
7180
7759
  user_id?: string;
7181
7760
  };
@@ -7525,6 +8104,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7525
8104
  };
7526
8105
  twinfield_invoice_sync_logs: {
7527
8106
  Row: {
8107
+ action_type: string | null;
7528
8108
  created_at: string;
7529
8109
  details: import("./types").Json | null;
7530
8110
  duration_ms: number | null;
@@ -7537,6 +8117,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7537
8117
  user_id: string;
7538
8118
  };
7539
8119
  Insert: {
8120
+ action_type?: string | null;
7540
8121
  created_at?: string;
7541
8122
  details?: import("./types").Json | null;
7542
8123
  duration_ms?: number | null;
@@ -7549,6 +8130,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7549
8130
  user_id: string;
7550
8131
  };
7551
8132
  Update: {
8133
+ action_type?: string | null;
7552
8134
  created_at?: string;
7553
8135
  details?: import("./types").Json | null;
7554
8136
  duration_ms?: number | null;
@@ -7784,6 +8366,57 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7784
8366
  referencedColumns: ["id"];
7785
8367
  }];
7786
8368
  };
8369
+ twinfield_request_metrics: {
8370
+ Row: {
8371
+ bucket_hour: string;
8372
+ connection_id: string;
8373
+ error_count: number;
8374
+ rate_limited_count: number;
8375
+ request_count: number;
8376
+ updated_at: string;
8377
+ };
8378
+ Insert: {
8379
+ bucket_hour: string;
8380
+ connection_id: string;
8381
+ error_count?: number;
8382
+ rate_limited_count?: number;
8383
+ request_count?: number;
8384
+ updated_at?: string;
8385
+ };
8386
+ Update: {
8387
+ bucket_hour?: string;
8388
+ connection_id?: string;
8389
+ error_count?: number;
8390
+ rate_limited_count?: number;
8391
+ request_count?: number;
8392
+ updated_at?: string;
8393
+ };
8394
+ Relationships: [];
8395
+ };
8396
+ twinfield_session_cache: {
8397
+ Row: {
8398
+ cluster: string;
8399
+ created_at: string;
8400
+ expires_at: string;
8401
+ session_id: string;
8402
+ user_id: string;
8403
+ };
8404
+ Insert: {
8405
+ cluster: string;
8406
+ created_at?: string;
8407
+ expires_at: string;
8408
+ session_id: string;
8409
+ user_id: string;
8410
+ };
8411
+ Update: {
8412
+ cluster?: string;
8413
+ created_at?: string;
8414
+ expires_at?: string;
8415
+ session_id?: string;
8416
+ user_id?: string;
8417
+ };
8418
+ Relationships: [];
8419
+ };
7787
8420
  twinfield_settings: {
7788
8421
  Row: {
7789
8422
  active_environment: string;
@@ -8365,6 +8998,35 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
8365
8998
  };
8366
8999
  Relationships: [];
8367
9000
  };
9001
+ manufacture_product_possible_stock_view: {
9002
+ Row: {
9003
+ component_count: number | null;
9004
+ manufacture_product_id: string | null;
9005
+ possible_stock: number | null;
9006
+ };
9007
+ Relationships: [];
9008
+ };
9009
+ product_group_stock_view: {
9010
+ Row: {
9011
+ item_count: number | null;
9012
+ product_group_id: string | null;
9013
+ total_stock: number | null;
9014
+ };
9015
+ Relationships: [{
9016
+ foreignKeyName: "product_group_items_product_group_id_fkey";
9017
+ columns: ["product_group_id"];
9018
+ isOneToOne: false;
9019
+ referencedRelation: "product_groups";
9020
+ referencedColumns: ["id"];
9021
+ }];
9022
+ };
9023
+ trade_item_stock_view: {
9024
+ Row: {
9025
+ stock: number | null;
9026
+ trade_item_id: string | null;
9027
+ };
9028
+ Relationships: [];
9029
+ };
8368
9030
  v_external_customers_exact: {
8369
9031
  Row: {
8370
9032
  account_number: string | null;
@@ -8620,6 +9282,51 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
8620
9282
  };
8621
9283
  Returns: number;
8622
9284
  };
9285
+ apply_stock_consumption: {
9286
+ Args: {
9287
+ p_order_id: string;
9288
+ p_order_item_id: string;
9289
+ p_qty: number;
9290
+ p_reason: string;
9291
+ p_source: string;
9292
+ p_trade_item_key: string;
9293
+ };
9294
+ Returns: undefined;
9295
+ };
9296
+ apply_stock_reservation: {
9297
+ Args: {
9298
+ p_order_id: string;
9299
+ p_order_item_id: string;
9300
+ p_qty: number;
9301
+ p_reason: string;
9302
+ p_source: string;
9303
+ p_trade_item_key: string;
9304
+ };
9305
+ Returns: undefined;
9306
+ };
9307
+ assign_cart_numbers: {
9308
+ Args: {
9309
+ p_carts: import("./types").Json;
9310
+ };
9311
+ Returns: {
9312
+ cart_index: number;
9313
+ cart_number: string;
9314
+ day_seq: number;
9315
+ order_id: string;
9316
+ order_source: string;
9317
+ pick_date: string;
9318
+ status: string;
9319
+ }[];
9320
+ };
9321
+ assign_floriday_order_numbers: {
9322
+ Args: {
9323
+ p_ids: string[];
9324
+ };
9325
+ Returns: {
9326
+ floriday_id: string;
9327
+ order_number: string;
9328
+ }[];
9329
+ };
8623
9330
  call_exact_route: {
8624
9331
  Args: {
8625
9332
  path: string;
@@ -8630,10 +9337,37 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
8630
9337
  Args: never;
8631
9338
  Returns: number;
8632
9339
  };
9340
+ control_get_todays_carts: {
9341
+ Args: never;
9342
+ Returns: {
9343
+ cart_index: number;
9344
+ cart_number: string;
9345
+ cart_number_id: string;
9346
+ order_id: string;
9347
+ order_source: string;
9348
+ pick_date: string;
9349
+ status: string;
9350
+ }[];
9351
+ };
9352
+ count_distinct_regulatory_products: {
9353
+ Args: never;
9354
+ Returns: number;
9355
+ };
8633
9356
  current_monteur_id: {
8634
9357
  Args: never;
8635
9358
  Returns: string;
8636
9359
  };
9360
+ dashboard_alert_counts: {
9361
+ Args: never;
9362
+ Returns: import("./types").Json;
9363
+ };
9364
+ dashboard_alert_rows: {
9365
+ Args: {
9366
+ check_id: string;
9367
+ row_limit?: number;
9368
+ };
9369
+ Returns: import("./types").Json;
9370
+ };
8637
9371
  dashboard_list_public_schema: {
8638
9372
  Args: never;
8639
9373
  Returns: {
@@ -8714,6 +9448,13 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
8714
9448
  };
8715
9449
  Returns: boolean;
8716
9450
  };
9451
+ format_cart_number: {
9452
+ Args: {
9453
+ p_pick_date: string;
9454
+ p_seq: number;
9455
+ };
9456
+ Returns: string;
9457
+ };
8717
9458
  get_active_floriday_connection_public: {
8718
9459
  Args: never;
8719
9460
  Returns: {
@@ -8829,6 +9570,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
8829
9570
  };
8830
9571
  Returns: import("./types").Json;
8831
9572
  };
9573
+ get_or_assign_floriday_order_number: {
9574
+ Args: {
9575
+ p_floriday_id: string;
9576
+ };
9577
+ Returns: string;
9578
+ };
8832
9579
  get_room_busy_windows: {
8833
9580
  Args: {
8834
9581
  p_from: string;
@@ -8875,6 +9622,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
8875
9622
  Args: never;
8876
9623
  Returns: boolean;
8877
9624
  };
9625
+ next_order_number: {
9626
+ Args: {
9627
+ p_prefix: string;
9628
+ };
9629
+ Returns: string;
9630
+ };
8878
9631
  next_work_order_number: {
8879
9632
  Args: {
8880
9633
  p_parent_work_order_id?: string;
@@ -8906,14 +9659,29 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
8906
9659
  };
8907
9660
  Returns: undefined;
8908
9661
  };
9662
+ pickstation_set_cart_status: {
9663
+ Args: {
9664
+ p_cart_index: number;
9665
+ p_order_id: string;
9666
+ p_order_source: string;
9667
+ p_status: string;
9668
+ };
9669
+ Returns: undefined;
9670
+ };
8909
9671
  refresh_floricode_derived_code_lists: {
8910
9672
  Args: never;
8911
9673
  Returns: {
8912
- out_environment: string;
8913
- out_list_name: string;
8914
- out_row_count: number;
9674
+ environment: string;
9675
+ list_name: string;
9676
+ row_count: number;
8915
9677
  }[];
8916
9678
  };
9679
+ refresh_floricode_derived_for_product: {
9680
+ Args: {
9681
+ p_product_code: string;
9682
+ };
9683
+ Returns: number;
9684
+ };
8917
9685
  reset_floriday_sync_cursor: {
8918
9686
  Args: {
8919
9687
  p_connection_id: string;