@flowselections/floriday-afhandeling-module 1.0.10 → 1.0.12

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 (69) hide show
  1. package/dist-lib/components/afhandeling/ControleLijstPrint.d.ts +7 -0
  2. package/dist-lib/components/afhandeling/ControleLijstPrint.d.ts.map +1 -0
  3. package/dist-lib/components/afhandeling/ControleLijstPrint.js +67 -0
  4. package/dist-lib/components/afhandeling/ControlePage.d.ts +4 -0
  5. package/dist-lib/components/afhandeling/ControlePage.d.ts.map +1 -0
  6. package/dist-lib/components/afhandeling/ControlePage.js +460 -0
  7. package/dist-lib/components/afhandeling/DagDetailDialog.d.ts.map +1 -1
  8. package/dist-lib/components/afhandeling/DagDetailDialog.js +9 -5
  9. package/dist-lib/components/afhandeling/VervoerderForm.d.ts.map +1 -1
  10. package/dist-lib/components/afhandeling/VervoerderForm.js +10 -1
  11. package/dist-lib/components/afhandeling/VervoerdersPage.d.ts.map +1 -1
  12. package/dist-lib/components/afhandeling/VervoerdersPage.js +3 -2
  13. package/dist-lib/components/afhandeling/WeekAgendaView.d.ts.map +1 -1
  14. package/dist-lib/components/afhandeling/WeekAgendaView.js +15 -5
  15. package/dist-lib/components/afhandeling/WeekdayPicker.d.ts +12 -0
  16. package/dist-lib/components/afhandeling/WeekdayPicker.d.ts.map +1 -0
  17. package/dist-lib/components/afhandeling/WeekdayPicker.js +30 -0
  18. package/dist-lib/components/pickstation/PakbonTemplate.d.ts +1 -0
  19. package/dist-lib/components/pickstation/PakbonTemplate.d.ts.map +1 -1
  20. package/dist-lib/components/pickstation/PakbonTemplate.js +31 -8
  21. package/dist-lib/components/settings/AfhandelingSettingsCard.d.ts.map +1 -1
  22. package/dist-lib/components/settings/AfhandelingSettingsCard.js +9 -2
  23. package/dist-lib/components/ui/responsive-dialog.d.ts +20 -0
  24. package/dist-lib/components/ui/responsive-dialog.d.ts.map +1 -0
  25. package/dist-lib/components/ui/responsive-dialog.js +44 -0
  26. package/dist-lib/hooks/useOrderPlanning.d.ts.map +1 -1
  27. package/dist-lib/hooks/useOrderPlanning.js +17 -6
  28. package/dist-lib/index.d.ts +1 -0
  29. package/dist-lib/index.d.ts.map +1 -1
  30. package/dist-lib/index.js +4 -2
  31. package/dist-lib/integrations/supabase/auth-middleware.d.ts +755 -3
  32. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
  33. package/dist-lib/integrations/supabase/client.d.ts +755 -3
  34. package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
  35. package/dist-lib/integrations/supabase/client.server.d.ts +755 -3
  36. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
  37. package/dist-lib/integrations/supabase/types.d.ts +765 -3
  38. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  39. package/dist-lib/lib/afhandelingSettings.functions.d.ts +1565 -57
  40. package/dist-lib/lib/afhandelingSettings.functions.d.ts.map +1 -1
  41. package/dist-lib/lib/afhandelingSettings.functions.js +16 -1
  42. package/dist-lib/lib/carrierMatch.server.d.ts +27 -0
  43. package/dist-lib/lib/carrierMatch.server.d.ts.map +1 -0
  44. package/dist-lib/lib/carrierMatch.server.js +75 -0
  45. package/dist-lib/lib/carriers.functions.d.ts +3781 -15
  46. package/dist-lib/lib/carriers.functions.d.ts.map +1 -1
  47. package/dist-lib/lib/carriers.functions.js +17 -2
  48. package/dist-lib/lib/cartAssignments.functions.d.ts +3775 -15
  49. package/dist-lib/lib/cartAssignments.functions.d.ts.map +1 -1
  50. package/dist-lib/lib/cartControl.functions.d.ts +100519 -0
  51. package/dist-lib/lib/cartControl.functions.d.ts.map +1 -0
  52. package/dist-lib/lib/cartControl.functions.js +489 -0
  53. package/dist-lib/lib/cartRescheduling.d.ts +30 -0
  54. package/dist-lib/lib/cartRescheduling.d.ts.map +1 -0
  55. package/dist-lib/lib/cartRescheduling.js +71 -0
  56. package/dist-lib/lib/floriday.functions.d.ts +755 -3
  57. package/dist-lib/lib/floriday.functions.d.ts.map +1 -1
  58. package/dist-lib/lib/pickstationI18n.d.ts +8 -0
  59. package/dist-lib/lib/pickstationI18n.d.ts.map +1 -1
  60. package/dist-lib/lib/pickstationI18n.js +48 -0
  61. package/dist-lib/lib/pickstationOrders.server.d.ts +1 -0
  62. package/dist-lib/lib/pickstationOrders.server.d.ts.map +1 -1
  63. package/dist-lib/lib/pickstationOrders.server.js +94 -7
  64. package/dist-lib/lib/pickstationTypes.d.ts +12 -0
  65. package/dist-lib/lib/pickstationTypes.d.ts.map +1 -1
  66. package/dist-lib/lib/planning.d.ts +23 -0
  67. package/dist-lib/lib/planning.d.ts.map +1 -1
  68. package/dist-lib/lib/planning.js +66 -6
  69. package/package.json +6 -1
@@ -8,6 +8,7 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
8
8
  max_workdays_earlier_pick: number;
9
9
  pick_days_before_transport: number;
10
10
  pick_distribution_enabled: boolean;
11
+ pick_weekdays: number[];
11
12
  signup_mail_enabled: boolean;
12
13
  signup_mail_lead_minutes: number;
13
14
  signup_mail_purpose: string;
@@ -21,6 +22,7 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
21
22
  max_workdays_earlier_pick?: number;
22
23
  pick_days_before_transport?: number;
23
24
  pick_distribution_enabled?: boolean;
25
+ pick_weekdays?: number[];
24
26
  signup_mail_enabled?: boolean;
25
27
  signup_mail_lead_minutes?: number;
26
28
  signup_mail_purpose?: string;
@@ -34,6 +36,7 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
34
36
  max_workdays_earlier_pick?: number;
35
37
  pick_days_before_transport?: number;
36
38
  pick_distribution_enabled?: boolean;
39
+ pick_weekdays?: number[];
37
40
  signup_mail_enabled?: boolean;
38
41
  signup_mail_lead_minutes?: number;
39
42
  signup_mail_purpose?: string;
@@ -445,6 +448,48 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
445
448
  referencedColumns: ["id"];
446
449
  }];
447
450
  };
451
+ carrier_signup_dispatch_runs: {
452
+ Row: {
453
+ detail: import("./types").Json | null;
454
+ error: string | null;
455
+ finished_at: string | null;
456
+ groups: number;
457
+ id: string;
458
+ ok: boolean;
459
+ reason: string | null;
460
+ sent: number;
461
+ skipped: import("./types").Json;
462
+ started_at: string;
463
+ unassigned: import("./types").Json;
464
+ };
465
+ Insert: {
466
+ detail?: import("./types").Json | null;
467
+ error?: string | null;
468
+ finished_at?: string | null;
469
+ groups?: number;
470
+ id?: string;
471
+ ok?: boolean;
472
+ reason?: string | null;
473
+ sent?: number;
474
+ skipped?: import("./types").Json;
475
+ started_at?: string;
476
+ unassigned?: import("./types").Json;
477
+ };
478
+ Update: {
479
+ detail?: import("./types").Json | null;
480
+ error?: string | null;
481
+ finished_at?: string | null;
482
+ groups?: number;
483
+ id?: string;
484
+ ok?: boolean;
485
+ reason?: string | null;
486
+ sent?: number;
487
+ skipped?: import("./types").Json;
488
+ started_at?: string;
489
+ unassigned?: import("./types").Json;
490
+ };
491
+ Relationships: [];
492
+ };
448
493
  carrier_signup_dispatches: {
449
494
  Row: {
450
495
  carrier_id: string;
@@ -496,6 +541,7 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
496
541
  contact_person: string | null;
497
542
  created_at: string;
498
543
  delivery_days: number | null;
544
+ delivery_weekdays: number[];
499
545
  email: string | null;
500
546
  id: string;
501
547
  is_default: boolean;
@@ -503,6 +549,7 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
503
549
  notes: string | null;
504
550
  phone: string | null;
505
551
  pickup_moments: import("./types").Json;
552
+ pickup_weekdays: number[];
506
553
  service_cities: string[];
507
554
  service_countries: string[];
508
555
  service_provinces: string[];
@@ -518,6 +565,7 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
518
565
  contact_person?: string | null;
519
566
  created_at?: string;
520
567
  delivery_days?: number | null;
568
+ delivery_weekdays?: number[];
521
569
  email?: string | null;
522
570
  id?: string;
523
571
  is_default?: boolean;
@@ -525,6 +573,7 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
525
573
  notes?: string | null;
526
574
  phone?: string | null;
527
575
  pickup_moments?: import("./types").Json;
576
+ pickup_weekdays?: number[];
528
577
  service_cities?: string[];
529
578
  service_countries?: string[];
530
579
  service_provinces?: string[];
@@ -540,6 +589,7 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
540
589
  contact_person?: string | null;
541
590
  created_at?: string;
542
591
  delivery_days?: number | null;
592
+ delivery_weekdays?: number[];
543
593
  email?: string | null;
544
594
  id?: string;
545
595
  is_default?: boolean;
@@ -547,6 +597,7 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
547
597
  notes?: string | null;
548
598
  phone?: string | null;
549
599
  pickup_moments?: import("./types").Json;
600
+ pickup_weekdays?: number[];
550
601
  service_cities?: string[];
551
602
  service_countries?: string[];
552
603
  service_provinces?: string[];
@@ -559,6 +610,180 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
559
610
  };
560
611
  Relationships: [];
561
612
  };
613
+ cart_control_draft: {
614
+ Row: {
615
+ cart_states: import("./types").Json;
616
+ checked_keys: import("./types").Json;
617
+ draft_date: string;
618
+ form_state: import("./types").Json;
619
+ notes: string;
620
+ updated_at: string;
621
+ user_id: string;
622
+ };
623
+ Insert: {
624
+ cart_states?: import("./types").Json;
625
+ checked_keys?: import("./types").Json;
626
+ draft_date: string;
627
+ form_state?: import("./types").Json;
628
+ notes?: string;
629
+ updated_at?: string;
630
+ user_id: string;
631
+ };
632
+ Update: {
633
+ cart_states?: import("./types").Json;
634
+ checked_keys?: import("./types").Json;
635
+ draft_date?: string;
636
+ form_state?: import("./types").Json;
637
+ notes?: string;
638
+ updated_at?: string;
639
+ user_id?: string;
640
+ };
641
+ Relationships: [];
642
+ };
643
+ cart_control_items: {
644
+ Row: {
645
+ action: string;
646
+ block_reason: string | null;
647
+ carrier_name: string | null;
648
+ cart_index: number;
649
+ cart_number_id: string | null;
650
+ cart_number_label: string | null;
651
+ created_at: string;
652
+ customer_name: string | null;
653
+ delivery_date: string | null;
654
+ id: string;
655
+ new_pick_date: string | null;
656
+ order_id: string;
657
+ order_number: string | null;
658
+ order_source: string;
659
+ pickup_date: string | null;
660
+ session_id: string;
661
+ };
662
+ Insert: {
663
+ action: string;
664
+ block_reason?: string | null;
665
+ carrier_name?: string | null;
666
+ cart_index: number;
667
+ cart_number_id?: string | null;
668
+ cart_number_label?: string | null;
669
+ created_at?: string;
670
+ customer_name?: string | null;
671
+ delivery_date?: string | null;
672
+ id?: string;
673
+ new_pick_date?: string | null;
674
+ order_id: string;
675
+ order_number?: string | null;
676
+ order_source: string;
677
+ pickup_date?: string | null;
678
+ session_id: string;
679
+ };
680
+ Update: {
681
+ action?: string;
682
+ block_reason?: string | null;
683
+ carrier_name?: string | null;
684
+ cart_index?: number;
685
+ cart_number_id?: string | null;
686
+ cart_number_label?: string | null;
687
+ created_at?: string;
688
+ customer_name?: string | null;
689
+ delivery_date?: string | null;
690
+ id?: string;
691
+ new_pick_date?: string | null;
692
+ order_id?: string;
693
+ order_number?: string | null;
694
+ order_source?: string;
695
+ pickup_date?: string | null;
696
+ session_id?: string;
697
+ };
698
+ Relationships: [{
699
+ foreignKeyName: "cart_control_items_session_id_fkey";
700
+ columns: ["session_id"];
701
+ isOneToOne: false;
702
+ referencedRelation: "cart_control_sessions";
703
+ referencedColumns: ["id"];
704
+ }];
705
+ };
706
+ cart_control_sessions: {
707
+ Row: {
708
+ blocked_count: number;
709
+ checked_count: number;
710
+ control_date: string;
711
+ created_at: string;
712
+ id: string;
713
+ notes: string | null;
714
+ performed_at: string;
715
+ rescheduled_count: number;
716
+ stock_consumed_at: string | null;
717
+ total_carts: number;
718
+ updated_at: string;
719
+ user_id: string;
720
+ };
721
+ Insert: {
722
+ blocked_count?: number;
723
+ checked_count?: number;
724
+ control_date?: string;
725
+ created_at?: string;
726
+ id?: string;
727
+ notes?: string | null;
728
+ performed_at?: string;
729
+ rescheduled_count?: number;
730
+ stock_consumed_at?: string | null;
731
+ total_carts?: number;
732
+ updated_at?: string;
733
+ user_id: string;
734
+ };
735
+ Update: {
736
+ blocked_count?: number;
737
+ checked_count?: number;
738
+ control_date?: string;
739
+ created_at?: string;
740
+ id?: string;
741
+ notes?: string | null;
742
+ performed_at?: string;
743
+ rescheduled_count?: number;
744
+ stock_consumed_at?: string | null;
745
+ total_carts?: number;
746
+ updated_at?: string;
747
+ user_id?: string;
748
+ };
749
+ Relationships: [];
750
+ };
751
+ cart_numbers: {
752
+ Row: {
753
+ assigned_at: string;
754
+ cart_index: number;
755
+ cart_number: string;
756
+ day_seq: number;
757
+ id: string;
758
+ order_id: string;
759
+ order_source: string;
760
+ pick_date: string;
761
+ status: string;
762
+ };
763
+ Insert: {
764
+ assigned_at?: string;
765
+ cart_index: number;
766
+ cart_number: string;
767
+ day_seq: number;
768
+ id?: string;
769
+ order_id: string;
770
+ order_source: string;
771
+ pick_date: string;
772
+ status?: string;
773
+ };
774
+ Update: {
775
+ assigned_at?: string;
776
+ cart_index?: number;
777
+ cart_number?: string;
778
+ day_seq?: number;
779
+ id?: string;
780
+ order_id?: string;
781
+ order_source?: string;
782
+ pick_date?: string;
783
+ status?: string;
784
+ };
785
+ Relationships: [];
786
+ };
562
787
  cart_pick_overrides: {
563
788
  Row: {
564
789
  cart_index: number;
@@ -1231,6 +1456,54 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
1231
1456
  referencedColumns: ["id"];
1232
1457
  }];
1233
1458
  };
1459
+ dashboard_critical_alerts: {
1460
+ Row: {
1461
+ alert_key: string;
1462
+ alert_type: string;
1463
+ created_at: string;
1464
+ description: string | null;
1465
+ id: string;
1466
+ metadata: import("./types").Json | null;
1467
+ priority: string;
1468
+ raised_at: string;
1469
+ related_cart_ids: string[] | null;
1470
+ resolved_at: string | null;
1471
+ title: string;
1472
+ updated_at: string;
1473
+ user_id: string;
1474
+ };
1475
+ Insert: {
1476
+ alert_key: string;
1477
+ alert_type: string;
1478
+ created_at?: string;
1479
+ description?: string | null;
1480
+ id?: string;
1481
+ metadata?: import("./types").Json | null;
1482
+ priority?: string;
1483
+ raised_at?: string;
1484
+ related_cart_ids?: string[] | null;
1485
+ resolved_at?: string | null;
1486
+ title: string;
1487
+ updated_at?: string;
1488
+ user_id: string;
1489
+ };
1490
+ Update: {
1491
+ alert_key?: string;
1492
+ alert_type?: string;
1493
+ created_at?: string;
1494
+ description?: string | null;
1495
+ id?: string;
1496
+ metadata?: import("./types").Json | null;
1497
+ priority?: string;
1498
+ raised_at?: string;
1499
+ related_cart_ids?: string[] | null;
1500
+ resolved_at?: string | null;
1501
+ title?: string;
1502
+ updated_at?: string;
1503
+ user_id?: string;
1504
+ };
1505
+ Relationships: [];
1506
+ };
1234
1507
  dashboard_daily_reports: {
1235
1508
  Row: {
1236
1509
  created_at: string;
@@ -2733,6 +3006,7 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
2733
3006
  };
2734
3007
  floricode_sync_state: {
2735
3008
  Row: {
3009
+ cursor_skip: number;
2736
3010
  error_message: string | null;
2737
3011
  last_change_date_time: string | null;
2738
3012
  last_sequence_number: number;
@@ -2742,6 +3016,7 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
2742
3016
  updated_at: string;
2743
3017
  };
2744
3018
  Insert: {
3019
+ cursor_skip?: number;
2745
3020
  error_message?: string | null;
2746
3021
  last_change_date_time?: string | null;
2747
3022
  last_sequence_number?: number;
@@ -2751,6 +3026,7 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
2751
3026
  updated_at?: string;
2752
3027
  };
2753
3028
  Update: {
3029
+ cursor_skip?: number;
2754
3030
  error_message?: string | null;
2755
3031
  last_change_date_time?: string | null;
2756
3032
  last_sequence_number?: number;
@@ -5098,6 +5374,93 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
5098
5374
  };
5099
5375
  Relationships: [];
5100
5376
  };
5377
+ manufacture_product_components: {
5378
+ Row: {
5379
+ component_type: string;
5380
+ created_at: string;
5381
+ id: string;
5382
+ manufacture_product_id: string;
5383
+ product_group_id: string | null;
5384
+ quantity: number;
5385
+ trade_item_id: string | null;
5386
+ unit: string;
5387
+ };
5388
+ Insert: {
5389
+ component_type: string;
5390
+ created_at?: string;
5391
+ id?: string;
5392
+ manufacture_product_id: string;
5393
+ product_group_id?: string | null;
5394
+ quantity?: number;
5395
+ trade_item_id?: string | null;
5396
+ unit?: string;
5397
+ };
5398
+ Update: {
5399
+ component_type?: string;
5400
+ created_at?: string;
5401
+ id?: string;
5402
+ manufacture_product_id?: string;
5403
+ product_group_id?: string | null;
5404
+ quantity?: number;
5405
+ trade_item_id?: string | null;
5406
+ unit?: string;
5407
+ };
5408
+ Relationships: [{
5409
+ foreignKeyName: "manufacture_product_components_manufacture_product_id_fkey";
5410
+ columns: ["manufacture_product_id"];
5411
+ isOneToOne: false;
5412
+ referencedRelation: "manufacture_product_possible_stock_view";
5413
+ referencedColumns: ["manufacture_product_id"];
5414
+ }, {
5415
+ foreignKeyName: "manufacture_product_components_manufacture_product_id_fkey";
5416
+ columns: ["manufacture_product_id"];
5417
+ isOneToOne: false;
5418
+ referencedRelation: "manufacture_products";
5419
+ referencedColumns: ["id"];
5420
+ }, {
5421
+ foreignKeyName: "manufacture_product_components_product_group_id_fkey";
5422
+ columns: ["product_group_id"];
5423
+ isOneToOne: false;
5424
+ referencedRelation: "product_groups";
5425
+ referencedColumns: ["id"];
5426
+ }];
5427
+ };
5428
+ manufacture_products: {
5429
+ Row: {
5430
+ created_at: string;
5431
+ description: string | null;
5432
+ id: string;
5433
+ is_active: boolean;
5434
+ name: string;
5435
+ produced_stock: number;
5436
+ product_code: string;
5437
+ tenant_id: string;
5438
+ updated_at: string;
5439
+ };
5440
+ Insert: {
5441
+ created_at?: string;
5442
+ description?: string | null;
5443
+ id?: string;
5444
+ is_active?: boolean;
5445
+ name: string;
5446
+ produced_stock?: number;
5447
+ product_code: string;
5448
+ tenant_id: string;
5449
+ updated_at?: string;
5450
+ };
5451
+ Update: {
5452
+ created_at?: string;
5453
+ description?: string | null;
5454
+ id?: string;
5455
+ is_active?: boolean;
5456
+ name?: string;
5457
+ produced_stock?: number;
5458
+ product_code?: string;
5459
+ tenant_id?: string;
5460
+ updated_at?: string;
5461
+ };
5462
+ Relationships: [];
5463
+ };
5101
5464
  monteurs: {
5102
5465
  Row: {
5103
5466
  avatar_url: string | null;
@@ -6058,6 +6421,66 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
6058
6421
  };
6059
6422
  Relationships: [];
6060
6423
  };
6424
+ product_group_items: {
6425
+ Row: {
6426
+ created_at: string;
6427
+ id: string;
6428
+ product_group_id: string;
6429
+ quantity: number;
6430
+ trade_item_id: string;
6431
+ };
6432
+ Insert: {
6433
+ created_at?: string;
6434
+ id?: string;
6435
+ product_group_id: string;
6436
+ quantity?: number;
6437
+ trade_item_id: string;
6438
+ };
6439
+ Update: {
6440
+ created_at?: string;
6441
+ id?: string;
6442
+ product_group_id?: string;
6443
+ quantity?: number;
6444
+ trade_item_id?: string;
6445
+ };
6446
+ Relationships: [{
6447
+ foreignKeyName: "product_group_items_product_group_id_fkey";
6448
+ columns: ["product_group_id"];
6449
+ isOneToOne: false;
6450
+ referencedRelation: "product_groups";
6451
+ referencedColumns: ["id"];
6452
+ }];
6453
+ };
6454
+ product_groups: {
6455
+ Row: {
6456
+ created_at: string;
6457
+ description: string | null;
6458
+ id: string;
6459
+ is_active: boolean;
6460
+ name: string;
6461
+ tenant_id: string;
6462
+ updated_at: string;
6463
+ };
6464
+ Insert: {
6465
+ created_at?: string;
6466
+ description?: string | null;
6467
+ id?: string;
6468
+ is_active?: boolean;
6469
+ name: string;
6470
+ tenant_id: string;
6471
+ updated_at?: string;
6472
+ };
6473
+ Update: {
6474
+ created_at?: string;
6475
+ description?: string | null;
6476
+ id?: string;
6477
+ is_active?: boolean;
6478
+ name?: string;
6479
+ tenant_id?: string;
6480
+ updated_at?: string;
6481
+ };
6482
+ Relationships: [];
6483
+ };
6061
6484
  products: {
6062
6485
  Row: {
6063
6486
  barcode: string | null;
@@ -6077,6 +6500,7 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
6077
6500
  purchase_price: number | null;
6078
6501
  quantity: number;
6079
6502
  sale_price: number | null;
6503
+ trade_item_key: string | null;
6080
6504
  unit: string;
6081
6505
  updated_at: string;
6082
6506
  weight: string | null;
@@ -6099,6 +6523,7 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
6099
6523
  purchase_price?: number | null;
6100
6524
  quantity?: number;
6101
6525
  sale_price?: number | null;
6526
+ trade_item_key?: string | null;
6102
6527
  unit?: string;
6103
6528
  updated_at?: string;
6104
6529
  weight?: string | null;
@@ -6121,6 +6546,7 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
6121
6546
  purchase_price?: number | null;
6122
6547
  quantity?: number;
6123
6548
  sale_price?: number | null;
6549
+ trade_item_key?: string | null;
6124
6550
  unit?: string;
6125
6551
  updated_at?: string;
6126
6552
  weight?: string | null;
@@ -6940,6 +7366,60 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
6940
7366
  };
6941
7367
  Relationships: [];
6942
7368
  };
7369
+ stock_mutation_log: {
7370
+ Row: {
7371
+ connection_id: string | null;
7372
+ created_at: string;
7373
+ created_by: string | null;
7374
+ id: string;
7375
+ mutation_type: string;
7376
+ order_id: string | null;
7377
+ order_item_id: string | null;
7378
+ order_source: string | null;
7379
+ physical_after: number | null;
7380
+ physical_before: number | null;
7381
+ qty_delta: number;
7382
+ reason: string | null;
7383
+ reserved_after: number | null;
7384
+ reserved_before: number | null;
7385
+ trade_item_key: string;
7386
+ };
7387
+ Insert: {
7388
+ connection_id?: string | null;
7389
+ created_at?: string;
7390
+ created_by?: string | null;
7391
+ id?: string;
7392
+ mutation_type: string;
7393
+ order_id?: string | null;
7394
+ order_item_id?: string | null;
7395
+ order_source?: string | null;
7396
+ physical_after?: number | null;
7397
+ physical_before?: number | null;
7398
+ qty_delta: number;
7399
+ reason?: string | null;
7400
+ reserved_after?: number | null;
7401
+ reserved_before?: number | null;
7402
+ trade_item_key: string;
7403
+ };
7404
+ Update: {
7405
+ connection_id?: string | null;
7406
+ created_at?: string;
7407
+ created_by?: string | null;
7408
+ id?: string;
7409
+ mutation_type?: string;
7410
+ order_id?: string | null;
7411
+ order_item_id?: string | null;
7412
+ order_source?: string | null;
7413
+ physical_after?: number | null;
7414
+ physical_before?: number | null;
7415
+ qty_delta?: number;
7416
+ reason?: string | null;
7417
+ reserved_after?: number | null;
7418
+ reserved_before?: number | null;
7419
+ trade_item_key?: string;
7420
+ };
7421
+ Relationships: [];
7422
+ };
6943
7423
  supplier_products: {
6944
7424
  Row: {
6945
7425
  article_number: string | null;
@@ -7197,7 +7677,13 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
7197
7677
  connection_id: string | null;
7198
7678
  created_at: string;
7199
7679
  data: import("./types").Json;
7680
+ floriday_id: string | null;
7681
+ floriday_link_error: string | null;
7682
+ floriday_link_status: string;
7200
7683
  id: string;
7684
+ last_floriday_sync_at: string | null;
7685
+ missing_required_fields: string[];
7686
+ source: string;
7201
7687
  updated_at: string;
7202
7688
  user_id: string;
7203
7689
  };
@@ -7205,7 +7691,13 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
7205
7691
  connection_id?: string | null;
7206
7692
  created_at?: string;
7207
7693
  data?: import("./types").Json;
7694
+ floriday_id?: string | null;
7695
+ floriday_link_error?: string | null;
7696
+ floriday_link_status?: string;
7208
7697
  id?: string;
7698
+ last_floriday_sync_at?: string | null;
7699
+ missing_required_fields?: string[];
7700
+ source?: string;
7209
7701
  updated_at?: string;
7210
7702
  user_id: string;
7211
7703
  };
@@ -7213,7 +7705,55 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
7213
7705
  connection_id?: string | null;
7214
7706
  created_at?: string;
7215
7707
  data?: import("./types").Json;
7708
+ floriday_id?: string | null;
7709
+ floriday_link_error?: string | null;
7710
+ floriday_link_status?: string;
7711
+ id?: string;
7712
+ last_floriday_sync_at?: string | null;
7713
+ missing_required_fields?: string[];
7714
+ source?: string;
7715
+ updated_at?: string;
7716
+ user_id?: string;
7717
+ };
7718
+ Relationships: [];
7719
+ };
7720
+ trade_item_stock: {
7721
+ Row: {
7722
+ connection_id: string;
7723
+ created_at: string;
7724
+ id: string;
7725
+ incoming_stock: number;
7726
+ minimum_stock: number;
7727
+ notes: string | null;
7728
+ physical_stock: number;
7729
+ reserved_stock: number;
7730
+ trade_item_key: string;
7731
+ updated_at: string;
7732
+ user_id: string;
7733
+ };
7734
+ Insert: {
7735
+ connection_id: string;
7736
+ created_at?: string;
7737
+ id?: string;
7738
+ incoming_stock?: number;
7739
+ minimum_stock?: number;
7740
+ notes?: string | null;
7741
+ physical_stock?: number;
7742
+ reserved_stock?: number;
7743
+ trade_item_key: string;
7744
+ updated_at?: string;
7745
+ user_id: string;
7746
+ };
7747
+ Update: {
7748
+ connection_id?: string;
7749
+ created_at?: string;
7216
7750
  id?: string;
7751
+ incoming_stock?: number;
7752
+ minimum_stock?: number;
7753
+ notes?: string | null;
7754
+ physical_stock?: number;
7755
+ reserved_stock?: number;
7756
+ trade_item_key?: string;
7217
7757
  updated_at?: string;
7218
7758
  user_id?: string;
7219
7759
  };
@@ -7563,6 +8103,7 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
7563
8103
  };
7564
8104
  twinfield_invoice_sync_logs: {
7565
8105
  Row: {
8106
+ action_type: string | null;
7566
8107
  created_at: string;
7567
8108
  details: import("./types").Json | null;
7568
8109
  duration_ms: number | null;
@@ -7575,6 +8116,7 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
7575
8116
  user_id: string;
7576
8117
  };
7577
8118
  Insert: {
8119
+ action_type?: string | null;
7578
8120
  created_at?: string;
7579
8121
  details?: import("./types").Json | null;
7580
8122
  duration_ms?: number | null;
@@ -7587,6 +8129,7 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
7587
8129
  user_id: string;
7588
8130
  };
7589
8131
  Update: {
8132
+ action_type?: string | null;
7590
8133
  created_at?: string;
7591
8134
  details?: import("./types").Json | null;
7592
8135
  duration_ms?: number | null;
@@ -7822,6 +8365,57 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
7822
8365
  referencedColumns: ["id"];
7823
8366
  }];
7824
8367
  };
8368
+ twinfield_request_metrics: {
8369
+ Row: {
8370
+ bucket_hour: string;
8371
+ connection_id: string;
8372
+ error_count: number;
8373
+ rate_limited_count: number;
8374
+ request_count: number;
8375
+ updated_at: string;
8376
+ };
8377
+ Insert: {
8378
+ bucket_hour: string;
8379
+ connection_id: string;
8380
+ error_count?: number;
8381
+ rate_limited_count?: number;
8382
+ request_count?: number;
8383
+ updated_at?: string;
8384
+ };
8385
+ Update: {
8386
+ bucket_hour?: string;
8387
+ connection_id?: string;
8388
+ error_count?: number;
8389
+ rate_limited_count?: number;
8390
+ request_count?: number;
8391
+ updated_at?: string;
8392
+ };
8393
+ Relationships: [];
8394
+ };
8395
+ twinfield_session_cache: {
8396
+ Row: {
8397
+ cluster: string;
8398
+ created_at: string;
8399
+ expires_at: string;
8400
+ session_id: string;
8401
+ user_id: string;
8402
+ };
8403
+ Insert: {
8404
+ cluster: string;
8405
+ created_at?: string;
8406
+ expires_at: string;
8407
+ session_id: string;
8408
+ user_id: string;
8409
+ };
8410
+ Update: {
8411
+ cluster?: string;
8412
+ created_at?: string;
8413
+ expires_at?: string;
8414
+ session_id?: string;
8415
+ user_id?: string;
8416
+ };
8417
+ Relationships: [];
8418
+ };
7825
8419
  twinfield_settings: {
7826
8420
  Row: {
7827
8421
  active_environment: string;
@@ -8403,6 +8997,35 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
8403
8997
  };
8404
8998
  Relationships: [];
8405
8999
  };
9000
+ manufacture_product_possible_stock_view: {
9001
+ Row: {
9002
+ component_count: number | null;
9003
+ manufacture_product_id: string | null;
9004
+ possible_stock: number | null;
9005
+ };
9006
+ Relationships: [];
9007
+ };
9008
+ product_group_stock_view: {
9009
+ Row: {
9010
+ item_count: number | null;
9011
+ product_group_id: string | null;
9012
+ total_stock: number | null;
9013
+ };
9014
+ Relationships: [{
9015
+ foreignKeyName: "product_group_items_product_group_id_fkey";
9016
+ columns: ["product_group_id"];
9017
+ isOneToOne: false;
9018
+ referencedRelation: "product_groups";
9019
+ referencedColumns: ["id"];
9020
+ }];
9021
+ };
9022
+ trade_item_stock_view: {
9023
+ Row: {
9024
+ stock: number | null;
9025
+ trade_item_id: string | null;
9026
+ };
9027
+ Relationships: [];
9028
+ };
8406
9029
  v_external_customers_exact: {
8407
9030
  Row: {
8408
9031
  account_number: string | null;
@@ -8658,6 +9281,68 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
8658
9281
  };
8659
9282
  Returns: number;
8660
9283
  };
9284
+ afh_city_code: {
9285
+ Args: {
9286
+ _city: string;
9287
+ _country: string;
9288
+ };
9289
+ Returns: string;
9290
+ };
9291
+ afh_normalize_country: {
9292
+ Args: {
9293
+ _raw: string;
9294
+ };
9295
+ Returns: string;
9296
+ };
9297
+ afh_normalize_nl_province: {
9298
+ Args: {
9299
+ _raw: string;
9300
+ };
9301
+ Returns: string;
9302
+ };
9303
+ afh_subtract_workdays: {
9304
+ Args: {
9305
+ _date: string;
9306
+ _days: number;
9307
+ };
9308
+ Returns: string;
9309
+ };
9310
+ apply_stock_consumption: {
9311
+ Args: {
9312
+ p_order_id: string;
9313
+ p_order_item_id: string;
9314
+ p_qty: number;
9315
+ p_reason: string;
9316
+ p_source: string;
9317
+ p_trade_item_key: string;
9318
+ };
9319
+ Returns: undefined;
9320
+ };
9321
+ apply_stock_reservation: {
9322
+ Args: {
9323
+ p_order_id: string;
9324
+ p_order_item_id: string;
9325
+ p_qty: number;
9326
+ p_reason: string;
9327
+ p_source: string;
9328
+ p_trade_item_key: string;
9329
+ };
9330
+ Returns: undefined;
9331
+ };
9332
+ assign_cart_numbers: {
9333
+ Args: {
9334
+ p_carts: import("./types").Json;
9335
+ };
9336
+ Returns: {
9337
+ cart_index: number;
9338
+ cart_number: string;
9339
+ day_seq: number;
9340
+ order_id: string;
9341
+ order_source: string;
9342
+ pick_date: string;
9343
+ status: string;
9344
+ }[];
9345
+ };
8661
9346
  assign_floriday_order_numbers: {
8662
9347
  Args: {
8663
9348
  p_ids: string[];
@@ -8667,6 +9352,12 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
8667
9352
  order_number: string;
8668
9353
  }[];
8669
9354
  };
9355
+ backfill_open_order_reservations: {
9356
+ Args: never;
9357
+ Returns: {
9358
+ processed_items: number;
9359
+ }[];
9360
+ };
8670
9361
  call_exact_route: {
8671
9362
  Args: {
8672
9363
  path: string;
@@ -8677,10 +9368,37 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
8677
9368
  Args: never;
8678
9369
  Returns: number;
8679
9370
  };
9371
+ control_get_todays_carts: {
9372
+ Args: never;
9373
+ Returns: {
9374
+ cart_index: number;
9375
+ cart_number: string;
9376
+ cart_number_id: string;
9377
+ order_id: string;
9378
+ order_source: string;
9379
+ pick_date: string;
9380
+ status: string;
9381
+ }[];
9382
+ };
9383
+ count_distinct_regulatory_products: {
9384
+ Args: never;
9385
+ Returns: number;
9386
+ };
8680
9387
  current_monteur_id: {
8681
9388
  Args: never;
8682
9389
  Returns: string;
8683
9390
  };
9391
+ dashboard_alert_counts: {
9392
+ Args: never;
9393
+ Returns: import("./types").Json;
9394
+ };
9395
+ dashboard_alert_rows: {
9396
+ Args: {
9397
+ check_id: string;
9398
+ row_limit?: number;
9399
+ };
9400
+ Returns: import("./types").Json;
9401
+ };
8684
9402
  dashboard_list_public_schema: {
8685
9403
  Args: never;
8686
9404
  Returns: {
@@ -8689,6 +9407,12 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
8689
9407
  table_name: string;
8690
9408
  }[];
8691
9409
  };
9410
+ dispatch_carrier_signups_sql: {
9411
+ Args: {
9412
+ _catchup?: string;
9413
+ };
9414
+ Returns: import("./types").Json;
9415
+ };
8692
9416
  email_auth_decrypt: {
8693
9417
  Args: {
8694
9418
  cipher: string;
@@ -8761,6 +9485,19 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
8761
9485
  };
8762
9486
  Returns: boolean;
8763
9487
  };
9488
+ find_trade_item_key_by_name: {
9489
+ Args: {
9490
+ p_name: string;
9491
+ };
9492
+ Returns: string;
9493
+ };
9494
+ format_cart_number: {
9495
+ Args: {
9496
+ p_pick_date: string;
9497
+ p_seq: number;
9498
+ };
9499
+ Returns: string;
9500
+ };
8764
9501
  get_active_floriday_connection_public: {
8765
9502
  Args: never;
8766
9503
  Returns: {
@@ -8965,14 +9702,29 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
8965
9702
  };
8966
9703
  Returns: undefined;
8967
9704
  };
9705
+ pickstation_set_cart_status: {
9706
+ Args: {
9707
+ p_cart_index: number;
9708
+ p_order_id: string;
9709
+ p_order_source: string;
9710
+ p_status: string;
9711
+ };
9712
+ Returns: undefined;
9713
+ };
8968
9714
  refresh_floricode_derived_code_lists: {
8969
9715
  Args: never;
8970
9716
  Returns: {
8971
- out_environment: string;
8972
- out_list_name: string;
8973
- out_row_count: number;
9717
+ environment: string;
9718
+ list_name: string;
9719
+ row_count: number;
8974
9720
  }[];
8975
9721
  };
9722
+ refresh_floricode_derived_for_product: {
9723
+ Args: {
9724
+ p_product_code: string;
9725
+ };
9726
+ Returns: number;
9727
+ };
8976
9728
  reset_floriday_sync_cursor: {
8977
9729
  Args: {
8978
9730
  p_connection_id: string;