@flowselections/floriday-afhandeling-module 1.0.9 → 1.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) 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 +2 -0
  5. package/dist-lib/components/afhandeling/ControlePage.d.ts.map +1 -0
  6. package/dist-lib/components/afhandeling/ControlePage.js +456 -0
  7. package/dist-lib/components/afhandeling/DagDetailDialog.d.ts +9 -0
  8. package/dist-lib/components/afhandeling/DagDetailDialog.d.ts.map +1 -0
  9. package/dist-lib/components/afhandeling/DagDetailDialog.js +149 -0
  10. package/dist-lib/components/afhandeling/LeveringenPage.d.ts.map +1 -1
  11. package/dist-lib/components/afhandeling/LeveringenPage.js +11 -5
  12. package/dist-lib/components/afhandeling/PickAgendaView.d.ts.map +1 -1
  13. package/dist-lib/components/afhandeling/PickAgendaView.js +13 -4
  14. package/dist-lib/components/afhandeling/PlanningAgendaPage.d.ts.map +1 -1
  15. package/dist-lib/components/afhandeling/PlanningAgendaPage.js +2 -2
  16. package/dist-lib/components/afhandeling/ServiceAreaSelect.d.ts +12 -0
  17. package/dist-lib/components/afhandeling/ServiceAreaSelect.d.ts.map +1 -0
  18. package/dist-lib/components/afhandeling/ServiceAreaSelect.js +79 -0
  19. package/dist-lib/components/afhandeling/VervoerderForm.d.ts.map +1 -1
  20. package/dist-lib/components/afhandeling/VervoerderForm.js +62 -6
  21. package/dist-lib/components/afhandeling/VervoerdersPage.d.ts.map +1 -1
  22. package/dist-lib/components/afhandeling/VervoerdersPage.js +25 -6
  23. package/dist-lib/components/afhandeling/WeekAgendaView.d.ts +2 -1
  24. package/dist-lib/components/afhandeling/WeekAgendaView.d.ts.map +1 -1
  25. package/dist-lib/components/afhandeling/WeekAgendaView.js +63 -18
  26. package/dist-lib/components/afhandeling/WeekdayPicker.d.ts +12 -0
  27. package/dist-lib/components/afhandeling/WeekdayPicker.d.ts.map +1 -0
  28. package/dist-lib/components/afhandeling/WeekdayPicker.js +30 -0
  29. package/dist-lib/components/pickstation/PakbonTemplate.d.ts +6 -2
  30. package/dist-lib/components/pickstation/PakbonTemplate.d.ts.map +1 -1
  31. package/dist-lib/components/pickstation/PakbonTemplate.js +37 -12
  32. package/dist-lib/components/settings/AfhandelingSettingsCard.d.ts.map +1 -1
  33. package/dist-lib/components/settings/AfhandelingSettingsCard.js +25 -6
  34. package/dist-lib/components/ui/responsive-dialog.d.ts +20 -0
  35. package/dist-lib/components/ui/responsive-dialog.d.ts.map +1 -0
  36. package/dist-lib/components/ui/responsive-dialog.js +44 -0
  37. package/dist-lib/hooks/useOrderPlanning.d.ts +3 -0
  38. package/dist-lib/hooks/useOrderPlanning.d.ts.map +1 -1
  39. package/dist-lib/hooks/useOrderPlanning.js +64 -12
  40. package/dist-lib/index.d.ts +1 -0
  41. package/dist-lib/index.d.ts.map +1 -1
  42. package/dist-lib/index.js +4 -2
  43. package/dist-lib/integrations/supabase/auth-middleware.d.ts +2898 -147
  44. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
  45. package/dist-lib/integrations/supabase/client.d.ts +2898 -147
  46. package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
  47. package/dist-lib/integrations/supabase/client.server.d.ts +2898 -147
  48. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
  49. package/dist-lib/integrations/supabase/types.d.ts +2986 -155
  50. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  51. package/dist-lib/integrations/supabase/types.js +1 -0
  52. package/dist-lib/lib/afhandelingSettings.functions.d.ts +10666 -5151
  53. package/dist-lib/lib/afhandelingSettings.functions.d.ts.map +1 -1
  54. package/dist-lib/lib/afhandelingSettings.functions.js +42 -2
  55. package/dist-lib/lib/carrierMatch.server.d.ts +27 -0
  56. package/dist-lib/lib/carrierMatch.server.d.ts.map +1 -0
  57. package/dist-lib/lib/carrierMatch.server.js +75 -0
  58. package/dist-lib/lib/carrierSignupMail.server.d.ts +56 -0
  59. package/dist-lib/lib/carrierSignupMail.server.d.ts.map +1 -0
  60. package/dist-lib/lib/carrierSignupMail.server.js +229 -0
  61. package/dist-lib/lib/carriers.functions.d.ts +36404 -15470
  62. package/dist-lib/lib/carriers.functions.d.ts.map +1 -1
  63. package/dist-lib/lib/carriers.functions.js +43 -2
  64. package/dist-lib/lib/cartAssignments.functions.d.ts +49609 -0
  65. package/dist-lib/lib/cartAssignments.functions.d.ts.map +1 -0
  66. package/dist-lib/lib/cartAssignments.functions.js +130 -0
  67. package/dist-lib/lib/cartControl.functions.d.ts +99259 -0
  68. package/dist-lib/lib/cartControl.functions.d.ts.map +1 -0
  69. package/dist-lib/lib/cartControl.functions.js +489 -0
  70. package/dist-lib/lib/cartMoveImpact.d.ts +8 -0
  71. package/dist-lib/lib/cartMoveImpact.d.ts.map +1 -0
  72. package/dist-lib/lib/cartMoveImpact.js +26 -0
  73. package/dist-lib/lib/cartRescheduling.d.ts +30 -0
  74. package/dist-lib/lib/cartRescheduling.d.ts.map +1 -0
  75. package/dist-lib/lib/cartRescheduling.js +71 -0
  76. package/dist-lib/lib/floriday.functions.d.ts +2902 -147
  77. package/dist-lib/lib/floriday.functions.d.ts.map +1 -1
  78. package/dist-lib/lib/floriday.functions.js +178 -98
  79. package/dist-lib/lib/geo/euServiceAreas.d.ts +30 -0
  80. package/dist-lib/lib/geo/euServiceAreas.d.ts.map +1 -0
  81. package/dist-lib/lib/geo/euServiceAreas.js +277 -0
  82. package/dist-lib/lib/invalidatePlanning.d.ts +11 -0
  83. package/dist-lib/lib/invalidatePlanning.d.ts.map +1 -0
  84. package/dist-lib/lib/invalidatePlanning.js +25 -0
  85. package/dist-lib/lib/pickstationI18n.d.ts +12 -0
  86. package/dist-lib/lib/pickstationI18n.d.ts.map +1 -1
  87. package/dist-lib/lib/pickstationI18n.js +72 -0
  88. package/dist-lib/lib/pickstationOrders.server.d.ts +2 -1
  89. package/dist-lib/lib/pickstationOrders.server.d.ts.map +1 -1
  90. package/dist-lib/lib/pickstationOrders.server.js +393 -178
  91. package/dist-lib/lib/pickstationTypes.d.ts +23 -2
  92. package/dist-lib/lib/pickstationTypes.d.ts.map +1 -1
  93. package/dist-lib/lib/planning.d.ts +41 -2
  94. package/dist-lib/lib/planning.d.ts.map +1 -1
  95. package/dist-lib/lib/planning.js +159 -36
  96. package/package.json +2 -2
@@ -14,6 +14,10 @@ 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[];
18
+ signup_mail_enabled: boolean;
19
+ signup_mail_lead_minutes: number;
20
+ signup_mail_purpose: string;
17
21
  transport_register_days_before: number;
18
22
  updated_at: string;
19
23
  user_id: string;
@@ -24,6 +28,10 @@ export type Database = {
24
28
  max_workdays_earlier_pick?: number;
25
29
  pick_days_before_transport?: number;
26
30
  pick_distribution_enabled?: boolean;
31
+ pick_weekdays?: number[];
32
+ signup_mail_enabled?: boolean;
33
+ signup_mail_lead_minutes?: number;
34
+ signup_mail_purpose?: string;
27
35
  transport_register_days_before?: number;
28
36
  updated_at?: string;
29
37
  user_id: string;
@@ -34,6 +42,10 @@ export type Database = {
34
42
  max_workdays_earlier_pick?: number;
35
43
  pick_days_before_transport?: number;
36
44
  pick_distribution_enabled?: boolean;
45
+ pick_weekdays?: number[];
46
+ signup_mail_enabled?: boolean;
47
+ signup_mail_lead_minutes?: number;
48
+ signup_mail_purpose?: string;
37
49
  transport_register_days_before?: number;
38
50
  updated_at?: string;
39
51
  user_id?: string;
@@ -449,12 +461,102 @@ export type Database = {
449
461
  }
450
462
  ];
451
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
+ };
506
+ carrier_signup_dispatches: {
507
+ Row: {
508
+ carrier_id: string;
509
+ cart_count: number;
510
+ created_at: string;
511
+ id: string;
512
+ order_count: number;
513
+ outbox_id: string | null;
514
+ pickup_date: string;
515
+ pickup_moment_key: string;
516
+ sent_at: string;
517
+ signup_deadline: string;
518
+ };
519
+ Insert: {
520
+ carrier_id: string;
521
+ cart_count?: number;
522
+ created_at?: string;
523
+ id?: string;
524
+ order_count?: number;
525
+ outbox_id?: string | null;
526
+ pickup_date: string;
527
+ pickup_moment_key: string;
528
+ sent_at?: string;
529
+ signup_deadline: string;
530
+ };
531
+ Update: {
532
+ carrier_id?: string;
533
+ cart_count?: number;
534
+ created_at?: string;
535
+ id?: string;
536
+ order_count?: number;
537
+ outbox_id?: string | null;
538
+ pickup_date?: string;
539
+ pickup_moment_key?: string;
540
+ sent_at?: string;
541
+ signup_deadline?: string;
542
+ };
543
+ Relationships: [
544
+ {
545
+ foreignKeyName: "carrier_signup_dispatches_carrier_id_fkey";
546
+ columns: ["carrier_id"];
547
+ isOneToOne: false;
548
+ referencedRelation: "carriers";
549
+ referencedColumns: ["id"];
550
+ }
551
+ ];
552
+ };
452
553
  carriers: {
453
554
  Row: {
454
555
  address: string | null;
455
556
  contact_person: string | null;
456
557
  created_at: string;
457
558
  delivery_days: number | null;
559
+ delivery_weekdays: number[];
458
560
  email: string | null;
459
561
  id: string;
460
562
  is_default: boolean;
@@ -462,9 +564,14 @@ export type Database = {
462
564
  notes: string | null;
463
565
  phone: string | null;
464
566
  pickup_moments: Json;
567
+ pickup_weekdays: number[];
568
+ service_cities: string[];
569
+ service_countries: string[];
570
+ service_provinces: string[];
465
571
  signup_days_before_delivery: number;
466
572
  signup_time_1: string | null;
467
573
  signup_time_2: string | null;
574
+ sort_order: number;
468
575
  updated_at: string;
469
576
  user_id: string;
470
577
  };
@@ -473,6 +580,7 @@ export type Database = {
473
580
  contact_person?: string | null;
474
581
  created_at?: string;
475
582
  delivery_days?: number | null;
583
+ delivery_weekdays?: number[];
476
584
  email?: string | null;
477
585
  id?: string;
478
586
  is_default?: boolean;
@@ -480,9 +588,14 @@ export type Database = {
480
588
  notes?: string | null;
481
589
  phone?: string | null;
482
590
  pickup_moments?: Json;
591
+ pickup_weekdays?: number[];
592
+ service_cities?: string[];
593
+ service_countries?: string[];
594
+ service_provinces?: string[];
483
595
  signup_days_before_delivery?: number;
484
596
  signup_time_1?: string | null;
485
597
  signup_time_2?: string | null;
598
+ sort_order?: number;
486
599
  updated_at?: string;
487
600
  user_id: string;
488
601
  };
@@ -491,6 +604,7 @@ export type Database = {
491
604
  contact_person?: string | null;
492
605
  created_at?: string;
493
606
  delivery_days?: number | null;
607
+ delivery_weekdays?: number[];
494
608
  email?: string | null;
495
609
  id?: string;
496
610
  is_default?: boolean;
@@ -498,14 +612,231 @@ export type Database = {
498
612
  notes?: string | null;
499
613
  phone?: string | null;
500
614
  pickup_moments?: Json;
615
+ pickup_weekdays?: number[];
616
+ service_cities?: string[];
617
+ service_countries?: string[];
618
+ service_provinces?: string[];
501
619
  signup_days_before_delivery?: number;
502
620
  signup_time_1?: string | null;
503
621
  signup_time_2?: string | null;
622
+ sort_order?: number;
623
+ updated_at?: string;
624
+ user_id?: string;
625
+ };
626
+ Relationships: [];
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;
504
653
  updated_at?: string;
505
654
  user_id?: string;
506
655
  };
507
656
  Relationships: [];
508
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
+ };
801
+ cart_pick_overrides: {
802
+ Row: {
803
+ cart_index: number;
804
+ created_at: string;
805
+ id: string;
806
+ moved_from_date: string | null;
807
+ notes: string | null;
808
+ order_id: string;
809
+ order_source: string;
810
+ pick_date: string;
811
+ status: string;
812
+ updated_at: string;
813
+ };
814
+ Insert: {
815
+ cart_index: number;
816
+ created_at?: string;
817
+ id?: string;
818
+ moved_from_date?: string | null;
819
+ notes?: string | null;
820
+ order_id: string;
821
+ order_source: string;
822
+ pick_date: string;
823
+ status?: string;
824
+ updated_at?: string;
825
+ };
826
+ Update: {
827
+ cart_index?: number;
828
+ created_at?: string;
829
+ id?: string;
830
+ moved_from_date?: string | null;
831
+ notes?: string | null;
832
+ order_id?: string;
833
+ order_source?: string;
834
+ pick_date?: string;
835
+ status?: string;
836
+ updated_at?: string;
837
+ };
838
+ Relationships: [];
839
+ };
509
840
  collections: {
510
841
  Row: {
511
842
  created_at: string;
@@ -621,50 +952,75 @@ export type Database = {
621
952
  customer_delivery_locations: {
622
953
  Row: {
623
954
  address_line: string | null;
955
+ carrier_assignment_source: string;
956
+ carrier_id: string | null;
624
957
  city: string | null;
625
958
  country: string | null;
626
959
  created_at: string;
627
960
  customer_id: string;
628
961
  floriday_location_id: string | null;
629
962
  gln: string | null;
963
+ house_number: string | null;
630
964
  id: string;
631
965
  is_primary: boolean;
632
966
  name: string | null;
633
967
  postal_code: string | null;
968
+ province: string | null;
634
969
  raw: Json | null;
970
+ self_pickup: boolean;
971
+ street: string | null;
635
972
  updated_at: string;
636
973
  };
637
974
  Insert: {
638
975
  address_line?: string | null;
976
+ carrier_assignment_source?: string;
977
+ carrier_id?: string | null;
639
978
  city?: string | null;
640
979
  country?: string | null;
641
980
  created_at?: string;
642
981
  customer_id: string;
643
982
  floriday_location_id?: string | null;
644
983
  gln?: string | null;
984
+ house_number?: string | null;
645
985
  id?: string;
646
986
  is_primary?: boolean;
647
987
  name?: string | null;
648
988
  postal_code?: string | null;
989
+ province?: string | null;
649
990
  raw?: Json | null;
991
+ self_pickup?: boolean;
992
+ street?: string | null;
650
993
  updated_at?: string;
651
994
  };
652
995
  Update: {
653
996
  address_line?: string | null;
997
+ carrier_assignment_source?: string;
998
+ carrier_id?: string | null;
654
999
  city?: string | null;
655
1000
  country?: string | null;
656
1001
  created_at?: string;
657
1002
  customer_id?: string;
658
1003
  floriday_location_id?: string | null;
659
1004
  gln?: string | null;
1005
+ house_number?: string | null;
660
1006
  id?: string;
661
1007
  is_primary?: boolean;
662
1008
  name?: string | null;
663
1009
  postal_code?: string | null;
1010
+ province?: string | null;
664
1011
  raw?: Json | null;
1012
+ self_pickup?: boolean;
1013
+ street?: string | null;
665
1014
  updated_at?: string;
666
1015
  };
667
1016
  Relationships: [
1017
+ {
1018
+ foreignKeyName: "customer_delivery_locations_carrier_id_fkey";
1019
+ columns: ["carrier_id"];
1020
+ isOneToOne: false;
1021
+ referencedRelation: "carriers";
1022
+ referencedColumns: ["id"];
1023
+ },
668
1024
  {
669
1025
  foreignKeyName: "customer_delivery_locations_customer_id_fkey";
670
1026
  columns: ["customer_id"];
@@ -1134,6 +1490,54 @@ export type Database = {
1134
1490
  }
1135
1491
  ];
1136
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
+ };
1137
1541
  dashboard_daily_reports: {
1138
1542
  Row: {
1139
1543
  created_at: string;
@@ -1492,18 +1896,21 @@ export type Database = {
1492
1896
  };
1493
1897
  email_auth_purpose_settings: {
1494
1898
  Row: {
1899
+ default_cc: string[];
1495
1900
  purpose: string;
1496
1901
  reply_to: string | null;
1497
1902
  updated_at: string;
1498
1903
  updated_by: string | null;
1499
1904
  };
1500
1905
  Insert: {
1906
+ default_cc?: string[];
1501
1907
  purpose: string;
1502
1908
  reply_to?: string | null;
1503
1909
  updated_at?: string;
1504
1910
  updated_by?: string | null;
1505
1911
  };
1506
1912
  Update: {
1913
+ default_cc?: string[];
1507
1914
  purpose?: string;
1508
1915
  reply_to?: string | null;
1509
1916
  updated_at?: string;
@@ -2544,12 +2951,40 @@ export type Database = {
2544
2951
  };
2545
2952
  Relationships: [];
2546
2953
  };
2954
+ extra_pricing_types: {
2955
+ Row: {
2956
+ code: string;
2957
+ created_at: string;
2958
+ id: string;
2959
+ label: string;
2960
+ sort_order: number;
2961
+ updated_at: string;
2962
+ };
2963
+ Insert: {
2964
+ code: string;
2965
+ created_at?: string;
2966
+ id?: string;
2967
+ label: string;
2968
+ sort_order?: number;
2969
+ updated_at?: string;
2970
+ };
2971
+ Update: {
2972
+ code?: string;
2973
+ created_at?: string;
2974
+ id?: string;
2975
+ label?: string;
2976
+ sort_order?: number;
2977
+ updated_at?: string;
2978
+ };
2979
+ Relationships: [];
2980
+ };
2547
2981
  extras: {
2548
2982
  Row: {
2549
2983
  category: string;
2550
2984
  created_at: string;
2551
2985
  exact_article_id: string | null;
2552
2986
  id: string;
2987
+ image_url: string | null;
2553
2988
  is_active: boolean;
2554
2989
  name: string;
2555
2990
  price: number;
@@ -2560,6 +2995,7 @@ export type Database = {
2560
2995
  created_at?: string;
2561
2996
  exact_article_id?: string | null;
2562
2997
  id?: string;
2998
+ image_url?: string | null;
2563
2999
  is_active?: boolean;
2564
3000
  name: string;
2565
3001
  price?: number;
@@ -2570,6 +3006,7 @@ export type Database = {
2570
3006
  created_at?: string;
2571
3007
  exact_article_id?: string | null;
2572
3008
  id?: string;
3009
+ image_url?: string | null;
2573
3010
  is_active?: boolean;
2574
3011
  name?: string;
2575
3012
  price?: number;
@@ -2639,6 +3076,7 @@ export type Database = {
2639
3076
  };
2640
3077
  floricode_sync_state: {
2641
3078
  Row: {
3079
+ cursor_skip: number;
2642
3080
  error_message: string | null;
2643
3081
  last_change_date_time: string | null;
2644
3082
  last_sequence_number: number;
@@ -2648,6 +3086,7 @@ export type Database = {
2648
3086
  updated_at: string;
2649
3087
  };
2650
3088
  Insert: {
3089
+ cursor_skip?: number;
2651
3090
  error_message?: string | null;
2652
3091
  last_change_date_time?: string | null;
2653
3092
  last_sequence_number?: number;
@@ -2657,6 +3096,7 @@ export type Database = {
2657
3096
  updated_at?: string;
2658
3097
  };
2659
3098
  Update: {
3099
+ cursor_skip?: number;
2660
3100
  error_message?: string | null;
2661
3101
  last_change_date_time?: string | null;
2662
3102
  last_sequence_number?: number;
@@ -2667,43 +3107,37 @@ export type Database = {
2667
3107
  };
2668
3108
  Relationships: [];
2669
3109
  };
2670
- floriday_carriers_cache: {
3110
+ floriday_additional_services_cache: {
2671
3111
  Row: {
2672
- connection_id: string | null;
2673
- created_at: string;
3112
+ connection_id: string;
2674
3113
  data: Json;
2675
3114
  fetched_at: string;
2676
- gln_code: string | null;
2677
- id: string;
2678
- name: string | null;
2679
- organization_id: string;
3115
+ floriday_id: string;
3116
+ is_deleted: boolean;
3117
+ sequence_number: number;
2680
3118
  updated_at: string;
2681
3119
  };
2682
3120
  Insert: {
2683
- connection_id?: string | null;
2684
- created_at?: string;
3121
+ connection_id: string;
2685
3122
  data: Json;
2686
3123
  fetched_at?: string;
2687
- gln_code?: string | null;
2688
- id?: string;
2689
- name?: string | null;
2690
- organization_id: string;
3124
+ floriday_id: string;
3125
+ is_deleted?: boolean;
3126
+ sequence_number?: number;
2691
3127
  updated_at?: string;
2692
3128
  };
2693
3129
  Update: {
2694
- connection_id?: string | null;
2695
- created_at?: string;
3130
+ connection_id?: string;
2696
3131
  data?: Json;
2697
3132
  fetched_at?: string;
2698
- gln_code?: string | null;
2699
- id?: string;
2700
- name?: string | null;
2701
- organization_id?: string;
3133
+ floriday_id?: string;
3134
+ is_deleted?: boolean;
3135
+ sequence_number?: number;
2702
3136
  updated_at?: string;
2703
3137
  };
2704
3138
  Relationships: [
2705
3139
  {
2706
- foreignKeyName: "floriday_carriers_cache_connection_id_fkey";
3140
+ foreignKeyName: "floriday_additional_services_cache_connection_id_fkey";
2707
3141
  columns: ["connection_id"];
2708
3142
  isOneToOne: false;
2709
3143
  referencedRelation: "floriday_connections";
@@ -2711,100 +3145,1203 @@ export type Database = {
2711
3145
  }
2712
3146
  ];
2713
3147
  };
2714
- floriday_connections: {
3148
+ floriday_agreement_calloffs_cache: {
2715
3149
  Row: {
2716
- access_token: string | null;
2717
- api_key: string;
2718
- client_id: string;
2719
- client_secret: string;
2720
- created_at: string;
2721
- customers_endpoint: string | null;
2722
- environment: string;
2723
- gln_code: string | null;
3150
+ agreement_id: string | null;
3151
+ connection_id: string;
3152
+ data: Json;
3153
+ delivery_date: string | null;
3154
+ fetched_at: string;
3155
+ floriday_id: string;
2724
3156
  id: string;
2725
- is_active: boolean;
2726
- label: string;
2727
- organization_name: string | null;
2728
- preferred_warehouse_id: string | null;
2729
- preferred_warehouse_name: string | null;
2730
- token_expires_at: string | null;
3157
+ is_deleted: boolean;
3158
+ sequence_number: number;
3159
+ status: string | null;
2731
3160
  updated_at: string;
2732
3161
  };
2733
3162
  Insert: {
2734
- access_token?: string | null;
2735
- api_key: string;
2736
- client_id: string;
2737
- client_secret: string;
2738
- created_at?: string;
2739
- customers_endpoint?: string | null;
2740
- environment: string;
2741
- gln_code?: string | null;
3163
+ agreement_id?: string | null;
3164
+ connection_id: string;
3165
+ data?: Json;
3166
+ delivery_date?: string | null;
3167
+ fetched_at?: string;
3168
+ floriday_id: string;
2742
3169
  id?: string;
2743
- is_active?: boolean;
2744
- label?: string;
2745
- organization_name?: string | null;
2746
- preferred_warehouse_id?: string | null;
2747
- preferred_warehouse_name?: string | null;
2748
- token_expires_at?: string | null;
3170
+ is_deleted?: boolean;
3171
+ sequence_number?: number;
3172
+ status?: string | null;
2749
3173
  updated_at?: string;
2750
3174
  };
2751
3175
  Update: {
2752
- access_token?: string | null;
2753
- api_key?: string;
2754
- client_id?: string;
2755
- client_secret?: string;
2756
- created_at?: string;
2757
- customers_endpoint?: string | null;
2758
- environment?: string;
2759
- gln_code?: string | null;
3176
+ agreement_id?: string | null;
3177
+ connection_id?: string;
3178
+ data?: Json;
3179
+ delivery_date?: string | null;
3180
+ fetched_at?: string;
3181
+ floriday_id?: string;
2760
3182
  id?: string;
2761
- is_active?: boolean;
2762
- label?: string;
2763
- organization_name?: string | null;
2764
- preferred_warehouse_id?: string | null;
2765
- preferred_warehouse_name?: string | null;
2766
- token_expires_at?: string | null;
3183
+ is_deleted?: boolean;
3184
+ sequence_number?: number;
3185
+ status?: string | null;
2767
3186
  updated_at?: string;
2768
3187
  };
2769
- Relationships: [];
3188
+ Relationships: [
3189
+ {
3190
+ foreignKeyName: "floriday_agreement_calloffs_cache_connection_id_fkey";
3191
+ columns: ["connection_id"];
3192
+ isOneToOne: false;
3193
+ referencedRelation: "floriday_connections";
3194
+ referencedColumns: ["id"];
3195
+ }
3196
+ ];
2770
3197
  };
2771
- floriday_connections_cache: {
3198
+ floriday_agreements_cache: {
2772
3199
  Row: {
2773
3200
  buyer_organization_id: string | null;
2774
- buyer_organization_name: string | null;
2775
3201
  connection_id: string;
2776
3202
  data: Json;
2777
- floriday_connection_id: string;
3203
+ fetched_at: string;
3204
+ floriday_id: string;
3205
+ id: string;
2778
3206
  is_deleted: boolean;
2779
3207
  sequence_number: number;
2780
3208
  status: string | null;
2781
- synced_at: string;
3209
+ updated_at: string;
3210
+ valid_from: string | null;
3211
+ valid_until: string | null;
2782
3212
  };
2783
3213
  Insert: {
2784
3214
  buyer_organization_id?: string | null;
2785
- buyer_organization_name?: string | null;
3215
+ connection_id: string;
3216
+ data?: Json;
3217
+ fetched_at?: string;
3218
+ floriday_id: string;
3219
+ id?: string;
3220
+ is_deleted?: boolean;
3221
+ sequence_number?: number;
3222
+ status?: string | null;
3223
+ updated_at?: string;
3224
+ valid_from?: string | null;
3225
+ valid_until?: string | null;
3226
+ };
3227
+ Update: {
3228
+ buyer_organization_id?: string | null;
3229
+ connection_id?: string;
3230
+ data?: Json;
3231
+ fetched_at?: string;
3232
+ floriday_id?: string;
3233
+ id?: string;
3234
+ is_deleted?: boolean;
3235
+ sequence_number?: number;
3236
+ status?: string | null;
3237
+ updated_at?: string;
3238
+ valid_from?: string | null;
3239
+ valid_until?: string | null;
3240
+ };
3241
+ Relationships: [
3242
+ {
3243
+ foreignKeyName: "floriday_agreements_cache_connection_id_fkey";
3244
+ columns: ["connection_id"];
3245
+ isOneToOne: false;
3246
+ referencedRelation: "floriday_connections";
3247
+ referencedColumns: ["id"];
3248
+ }
3249
+ ];
3250
+ };
3251
+ floriday_auction_letters_cache: {
3252
+ Row: {
3253
+ auction_letter_code: string;
3254
+ clock_supply_id: string;
3255
+ connection_id: string;
3256
+ content_type: string;
3257
+ fetched_at: string;
3258
+ id: string;
3259
+ storage_path: string;
3260
+ };
3261
+ Insert: {
3262
+ auction_letter_code: string;
3263
+ clock_supply_id: string;
3264
+ connection_id: string;
3265
+ content_type?: string;
3266
+ fetched_at?: string;
3267
+ id?: string;
3268
+ storage_path: string;
3269
+ };
3270
+ Update: {
3271
+ auction_letter_code?: string;
3272
+ clock_supply_id?: string;
3273
+ connection_id?: string;
3274
+ content_type?: string;
3275
+ fetched_at?: string;
3276
+ id?: string;
3277
+ storage_path?: string;
3278
+ };
3279
+ Relationships: [
3280
+ {
3281
+ foreignKeyName: "floriday_auction_letters_cache_connection_id_fkey";
3282
+ columns: ["connection_id"];
3283
+ isOneToOne: false;
3284
+ referencedRelation: "floriday_connections";
3285
+ referencedColumns: ["id"];
3286
+ }
3287
+ ];
3288
+ };
3289
+ floriday_base_items_cache: {
3290
+ Row: {
2786
3291
  connection_id: string;
2787
3292
  data: Json;
2788
- floriday_connection_id: string;
3293
+ fetched_at: string;
3294
+ floriday_id: string;
3295
+ is_deleted: boolean;
3296
+ sequence_number: number;
3297
+ updated_at: string;
3298
+ };
3299
+ Insert: {
3300
+ connection_id: string;
3301
+ data: Json;
3302
+ fetched_at?: string;
3303
+ floriday_id: string;
3304
+ is_deleted?: boolean;
3305
+ sequence_number?: number;
3306
+ updated_at?: string;
3307
+ };
3308
+ Update: {
3309
+ connection_id?: string;
3310
+ data?: Json;
3311
+ fetched_at?: string;
3312
+ floriday_id?: string;
2789
3313
  is_deleted?: boolean;
3314
+ sequence_number?: number;
3315
+ updated_at?: string;
3316
+ };
3317
+ Relationships: [
3318
+ {
3319
+ foreignKeyName: "floriday_base_items_cache_connection_id_fkey";
3320
+ columns: ["connection_id"];
3321
+ isOneToOne: false;
3322
+ referencedRelation: "floriday_connections";
3323
+ referencedColumns: ["id"];
3324
+ }
3325
+ ];
3326
+ };
3327
+ floriday_blanket_orders_cache: {
3328
+ Row: {
3329
+ connection_id: string;
3330
+ contract_id: string | null;
3331
+ created_at: string;
3332
+ data: Json;
3333
+ fetched_at: string;
3334
+ floriday_id: string;
3335
+ id: string;
3336
+ is_deleted: boolean;
2790
3337
  sequence_number: number;
2791
- status?: string | null;
2792
- synced_at?: string;
3338
+ updated_at: string;
3339
+ };
3340
+ Insert: {
3341
+ connection_id: string;
3342
+ contract_id?: string | null;
3343
+ created_at?: string;
3344
+ data: Json;
3345
+ fetched_at?: string;
3346
+ floriday_id: string;
3347
+ id?: string;
3348
+ is_deleted?: boolean;
3349
+ sequence_number?: number;
3350
+ updated_at?: string;
3351
+ };
3352
+ Update: {
3353
+ connection_id?: string;
3354
+ contract_id?: string | null;
3355
+ created_at?: string;
3356
+ data?: Json;
3357
+ fetched_at?: string;
3358
+ floriday_id?: string;
3359
+ id?: string;
3360
+ is_deleted?: boolean;
3361
+ sequence_number?: number;
3362
+ updated_at?: string;
3363
+ };
3364
+ Relationships: [
3365
+ {
3366
+ foreignKeyName: "floriday_blanket_orders_cache_connection_id_fkey";
3367
+ columns: ["connection_id"];
3368
+ isOneToOne: false;
3369
+ referencedRelation: "floriday_connections";
3370
+ referencedColumns: ["id"];
3371
+ }
3372
+ ];
3373
+ };
3374
+ floriday_carriers_cache: {
3375
+ Row: {
3376
+ connection_id: string | null;
3377
+ created_at: string;
3378
+ data: Json;
3379
+ fetched_at: string;
3380
+ gln_code: string | null;
3381
+ id: string;
3382
+ name: string | null;
3383
+ organization_id: string;
3384
+ updated_at: string;
3385
+ };
3386
+ Insert: {
3387
+ connection_id?: string | null;
3388
+ created_at?: string;
3389
+ data: Json;
3390
+ fetched_at?: string;
3391
+ gln_code?: string | null;
3392
+ id?: string;
3393
+ name?: string | null;
3394
+ organization_id: string;
3395
+ updated_at?: string;
3396
+ };
3397
+ Update: {
3398
+ connection_id?: string | null;
3399
+ created_at?: string;
3400
+ data?: Json;
3401
+ fetched_at?: string;
3402
+ gln_code?: string | null;
3403
+ id?: string;
3404
+ name?: string | null;
3405
+ organization_id?: string;
3406
+ updated_at?: string;
3407
+ };
3408
+ Relationships: [
3409
+ {
3410
+ foreignKeyName: "floriday_carriers_cache_connection_id_fkey";
3411
+ columns: ["connection_id"];
3412
+ isOneToOne: false;
3413
+ referencedRelation: "floriday_connections";
3414
+ referencedColumns: ["id"];
3415
+ }
3416
+ ];
3417
+ };
3418
+ floriday_clock_presales_cache: {
3419
+ Row: {
3420
+ buyer_organization_id: string | null;
3421
+ clock_supply_id: string | null;
3422
+ connection_id: string;
3423
+ data: Json;
3424
+ fetched_at: string;
3425
+ floriday_id: string;
3426
+ id: string;
3427
+ is_deleted: boolean;
3428
+ sequence_number: number;
3429
+ updated_at: string;
3430
+ };
3431
+ Insert: {
3432
+ buyer_organization_id?: string | null;
3433
+ clock_supply_id?: string | null;
3434
+ connection_id: string;
3435
+ data?: Json;
3436
+ fetched_at?: string;
3437
+ floriday_id: string;
3438
+ id?: string;
3439
+ is_deleted?: boolean;
3440
+ sequence_number?: number;
3441
+ updated_at?: string;
3442
+ };
3443
+ Update: {
3444
+ buyer_organization_id?: string | null;
3445
+ clock_supply_id?: string | null;
3446
+ connection_id?: string;
3447
+ data?: Json;
3448
+ fetched_at?: string;
3449
+ floriday_id?: string;
3450
+ id?: string;
3451
+ is_deleted?: boolean;
3452
+ sequence_number?: number;
3453
+ updated_at?: string;
3454
+ };
3455
+ Relationships: [
3456
+ {
3457
+ foreignKeyName: "floriday_clock_presales_cache_connection_id_fkey";
3458
+ columns: ["connection_id"];
3459
+ isOneToOne: false;
3460
+ referencedRelation: "floriday_connections";
3461
+ referencedColumns: ["id"];
3462
+ }
3463
+ ];
3464
+ };
3465
+ floriday_clock_supplies_cache: {
3466
+ Row: {
3467
+ auction_date: string | null;
3468
+ connection_id: string;
3469
+ data: Json;
3470
+ fetched_at: string;
3471
+ floriday_id: string;
3472
+ id: string;
3473
+ is_deleted: boolean;
3474
+ sequence_number: number;
3475
+ status: string | null;
3476
+ trade_item_id: string | null;
3477
+ updated_at: string;
3478
+ };
3479
+ Insert: {
3480
+ auction_date?: string | null;
3481
+ connection_id: string;
3482
+ data?: Json;
3483
+ fetched_at?: string;
3484
+ floriday_id: string;
3485
+ id?: string;
3486
+ is_deleted?: boolean;
3487
+ sequence_number?: number;
3488
+ status?: string | null;
3489
+ trade_item_id?: string | null;
3490
+ updated_at?: string;
3491
+ };
3492
+ Update: {
3493
+ auction_date?: string | null;
3494
+ connection_id?: string;
3495
+ data?: Json;
3496
+ fetched_at?: string;
3497
+ floriday_id?: string;
3498
+ id?: string;
3499
+ is_deleted?: boolean;
3500
+ sequence_number?: number;
3501
+ status?: string | null;
3502
+ trade_item_id?: string | null;
3503
+ updated_at?: string;
3504
+ };
3505
+ Relationships: [
3506
+ {
3507
+ foreignKeyName: "floriday_clock_supplies_cache_connection_id_fkey";
3508
+ columns: ["connection_id"];
3509
+ isOneToOne: false;
3510
+ referencedRelation: "floriday_connections";
3511
+ referencedColumns: ["id"];
3512
+ }
3513
+ ];
3514
+ };
3515
+ floriday_code_lists_cache: {
3516
+ Row: {
3517
+ code: string;
3518
+ environment: string;
3519
+ label: string | null;
3520
+ list_name: string;
3521
+ payload: Json | null;
3522
+ updated_at: string;
3523
+ };
3524
+ Insert: {
3525
+ code: string;
3526
+ environment: string;
3527
+ label?: string | null;
3528
+ list_name: string;
3529
+ payload?: Json | null;
3530
+ updated_at?: string;
3531
+ };
3532
+ Update: {
3533
+ code?: string;
3534
+ environment?: string;
3535
+ label?: string | null;
3536
+ list_name?: string;
3537
+ payload?: Json | null;
3538
+ updated_at?: string;
3539
+ };
3540
+ Relationships: [];
3541
+ };
3542
+ floriday_collections_cache: {
3543
+ Row: {
3544
+ connection_id: string;
3545
+ data: Json;
3546
+ fetched_at: string;
3547
+ floriday_id: string;
3548
+ is_deleted: boolean;
3549
+ sequence_number: number;
3550
+ updated_at: string;
3551
+ };
3552
+ Insert: {
3553
+ connection_id: string;
3554
+ data: Json;
3555
+ fetched_at?: string;
3556
+ floriday_id: string;
3557
+ is_deleted?: boolean;
3558
+ sequence_number?: number;
3559
+ updated_at?: string;
3560
+ };
3561
+ Update: {
3562
+ connection_id?: string;
3563
+ data?: Json;
3564
+ fetched_at?: string;
3565
+ floriday_id?: string;
3566
+ is_deleted?: boolean;
3567
+ sequence_number?: number;
3568
+ updated_at?: string;
3569
+ };
3570
+ Relationships: [
3571
+ {
3572
+ foreignKeyName: "floriday_collections_cache_connection_id_fkey";
3573
+ columns: ["connection_id"];
3574
+ isOneToOne: false;
3575
+ referencedRelation: "floriday_connections";
3576
+ referencedColumns: ["id"];
3577
+ }
3578
+ ];
3579
+ };
3580
+ floriday_commercial_service_types_cache: {
3581
+ Row: {
3582
+ connection_id: string;
3583
+ data: Json;
3584
+ fetched_at: string;
3585
+ floriday_id: string;
3586
+ is_deleted: boolean;
3587
+ sequence_number: number;
3588
+ updated_at: string;
3589
+ };
3590
+ Insert: {
3591
+ connection_id: string;
3592
+ data: Json;
3593
+ fetched_at?: string;
3594
+ floriday_id: string;
3595
+ is_deleted?: boolean;
3596
+ sequence_number?: number;
3597
+ updated_at?: string;
3598
+ };
3599
+ Update: {
3600
+ connection_id?: string;
3601
+ data?: Json;
3602
+ fetched_at?: string;
3603
+ floriday_id?: string;
3604
+ is_deleted?: boolean;
3605
+ sequence_number?: number;
3606
+ updated_at?: string;
3607
+ };
3608
+ Relationships: [
3609
+ {
3610
+ foreignKeyName: "floriday_commercial_service_types_cache_connection_id_fkey";
3611
+ columns: ["connection_id"];
3612
+ isOneToOne: false;
3613
+ referencedRelation: "floriday_connections";
3614
+ referencedColumns: ["id"];
3615
+ }
3616
+ ];
3617
+ };
3618
+ floriday_connections: {
3619
+ Row: {
3620
+ access_token: string | null;
3621
+ api_key: string;
3622
+ client_id: string;
3623
+ client_secret: string;
3624
+ created_at: string;
3625
+ customers_endpoint: string | null;
3626
+ environment: string;
3627
+ gln_code: string | null;
3628
+ id: string;
3629
+ is_active: boolean;
3630
+ label: string;
3631
+ organization_name: string | null;
3632
+ preferred_warehouse_id: string | null;
3633
+ preferred_warehouse_name: string | null;
3634
+ token_expires_at: string | null;
3635
+ updated_at: string;
3636
+ };
3637
+ Insert: {
3638
+ access_token?: string | null;
3639
+ api_key: string;
3640
+ client_id: string;
3641
+ client_secret: string;
3642
+ created_at?: string;
3643
+ customers_endpoint?: string | null;
3644
+ environment: string;
3645
+ gln_code?: string | null;
3646
+ id?: string;
3647
+ is_active?: boolean;
3648
+ label?: string;
3649
+ organization_name?: string | null;
3650
+ preferred_warehouse_id?: string | null;
3651
+ preferred_warehouse_name?: string | null;
3652
+ token_expires_at?: string | null;
3653
+ updated_at?: string;
3654
+ };
3655
+ Update: {
3656
+ access_token?: string | null;
3657
+ api_key?: string;
3658
+ client_id?: string;
3659
+ client_secret?: string;
3660
+ created_at?: string;
3661
+ customers_endpoint?: string | null;
3662
+ environment?: string;
3663
+ gln_code?: string | null;
3664
+ id?: string;
3665
+ is_active?: boolean;
3666
+ label?: string;
3667
+ organization_name?: string | null;
3668
+ preferred_warehouse_id?: string | null;
3669
+ preferred_warehouse_name?: string | null;
3670
+ token_expires_at?: string | null;
3671
+ updated_at?: string;
3672
+ };
3673
+ Relationships: [];
3674
+ };
3675
+ floriday_connections_cache: {
3676
+ Row: {
3677
+ buyer_organization_id: string | null;
3678
+ buyer_organization_name: string | null;
3679
+ connection_id: string;
3680
+ data: Json;
3681
+ floriday_connection_id: string;
3682
+ is_deleted: boolean;
3683
+ sequence_number: number;
3684
+ status: string | null;
3685
+ synced_at: string;
3686
+ };
3687
+ Insert: {
3688
+ buyer_organization_id?: string | null;
3689
+ buyer_organization_name?: string | null;
3690
+ connection_id: string;
3691
+ data: Json;
3692
+ floriday_connection_id: string;
3693
+ is_deleted?: boolean;
3694
+ sequence_number: number;
3695
+ status?: string | null;
3696
+ synced_at?: string;
3697
+ };
3698
+ Update: {
3699
+ buyer_organization_id?: string | null;
3700
+ buyer_organization_name?: string | null;
3701
+ connection_id?: string;
3702
+ data?: Json;
3703
+ floriday_connection_id?: string;
3704
+ is_deleted?: boolean;
3705
+ sequence_number?: number;
3706
+ status?: string | null;
3707
+ synced_at?: string;
3708
+ };
3709
+ Relationships: [
3710
+ {
3711
+ foreignKeyName: "floriday_connections_cache_connection_id_fkey";
3712
+ columns: ["connection_id"];
3713
+ isOneToOne: false;
3714
+ referencedRelation: "floriday_connections";
3715
+ referencedColumns: ["id"];
3716
+ }
3717
+ ];
3718
+ };
3719
+ floriday_contract_trade_item_groups_cache: {
3720
+ Row: {
3721
+ connection_id: string;
3722
+ data: Json;
3723
+ fetched_at: string;
3724
+ floriday_id: string;
3725
+ is_deleted: boolean;
3726
+ sequence_number: number;
3727
+ updated_at: string;
3728
+ };
3729
+ Insert: {
3730
+ connection_id: string;
3731
+ data: Json;
3732
+ fetched_at?: string;
3733
+ floriday_id: string;
3734
+ is_deleted?: boolean;
3735
+ sequence_number?: number;
3736
+ updated_at?: string;
3737
+ };
3738
+ Update: {
3739
+ connection_id?: string;
3740
+ data?: Json;
3741
+ fetched_at?: string;
3742
+ floriday_id?: string;
3743
+ is_deleted?: boolean;
3744
+ sequence_number?: number;
3745
+ updated_at?: string;
3746
+ };
3747
+ Relationships: [
3748
+ {
3749
+ foreignKeyName: "floriday_contract_trade_item_groups_cache_connection_id_fkey";
3750
+ columns: ["connection_id"];
3751
+ isOneToOne: false;
3752
+ referencedRelation: "floriday_connections";
3753
+ referencedColumns: ["id"];
3754
+ }
3755
+ ];
3756
+ };
3757
+ floriday_contracts_cache: {
3758
+ Row: {
3759
+ connection_id: string;
3760
+ created_at: string;
3761
+ data: Json;
3762
+ fetched_at: string;
3763
+ floriday_id: string;
3764
+ id: string;
3765
+ is_deleted: boolean;
3766
+ sequence_number: number;
3767
+ updated_at: string;
3768
+ };
3769
+ Insert: {
3770
+ connection_id: string;
3771
+ created_at?: string;
3772
+ data: Json;
3773
+ fetched_at?: string;
3774
+ floriday_id: string;
3775
+ id?: string;
3776
+ is_deleted?: boolean;
3777
+ sequence_number?: number;
3778
+ updated_at?: string;
3779
+ };
3780
+ Update: {
3781
+ connection_id?: string;
3782
+ created_at?: string;
3783
+ data?: Json;
3784
+ fetched_at?: string;
3785
+ floriday_id?: string;
3786
+ id?: string;
3787
+ is_deleted?: boolean;
3788
+ sequence_number?: number;
3789
+ updated_at?: string;
3790
+ };
3791
+ Relationships: [
3792
+ {
3793
+ foreignKeyName: "floriday_contracts_cache_connection_id_fkey";
3794
+ columns: ["connection_id"];
3795
+ isOneToOne: false;
3796
+ referencedRelation: "floriday_connections";
3797
+ referencedColumns: ["id"];
3798
+ }
3799
+ ];
3800
+ };
3801
+ floriday_customer_sticker_pdfs_cache: {
3802
+ Row: {
3803
+ byte_size: number | null;
3804
+ connection_id: string;
3805
+ content_type: string;
3806
+ created_at: string;
3807
+ fetched_at: string;
3808
+ id: string;
3809
+ sticker_id: string;
3810
+ storage_path: string;
3811
+ };
3812
+ Insert: {
3813
+ byte_size?: number | null;
3814
+ connection_id: string;
3815
+ content_type?: string;
3816
+ created_at?: string;
3817
+ fetched_at?: string;
3818
+ id?: string;
3819
+ sticker_id: string;
3820
+ storage_path: string;
3821
+ };
3822
+ Update: {
3823
+ byte_size?: number | null;
3824
+ connection_id?: string;
3825
+ content_type?: string;
3826
+ created_at?: string;
3827
+ fetched_at?: string;
3828
+ id?: string;
3829
+ sticker_id?: string;
3830
+ storage_path?: string;
3831
+ };
3832
+ Relationships: [
3833
+ {
3834
+ foreignKeyName: "floriday_customer_sticker_pdfs_cache_connection_id_fkey";
3835
+ columns: ["connection_id"];
3836
+ isOneToOne: false;
3837
+ referencedRelation: "floriday_connections";
3838
+ referencedColumns: ["id"];
3839
+ }
3840
+ ];
3841
+ };
3842
+ floriday_customer_stickers_cache: {
3843
+ Row: {
3844
+ connection_id: string;
3845
+ created_at: string;
3846
+ data: Json;
3847
+ fetched_at: string;
3848
+ floriday_id: string;
3849
+ id: string;
3850
+ is_deleted: boolean;
3851
+ quantity: number | null;
3852
+ sales_order_id: string | null;
3853
+ sequence_number: number;
3854
+ status: string | null;
3855
+ trade_item_id: string | null;
3856
+ updated_at: string;
3857
+ };
3858
+ Insert: {
3859
+ connection_id: string;
3860
+ created_at?: string;
3861
+ data?: Json;
3862
+ fetched_at?: string;
3863
+ floriday_id: string;
3864
+ id?: string;
3865
+ is_deleted?: boolean;
3866
+ quantity?: number | null;
3867
+ sales_order_id?: string | null;
3868
+ sequence_number?: number;
3869
+ status?: string | null;
3870
+ trade_item_id?: string | null;
3871
+ updated_at?: string;
3872
+ };
3873
+ Update: {
3874
+ connection_id?: string;
3875
+ created_at?: string;
3876
+ data?: Json;
3877
+ fetched_at?: string;
3878
+ floriday_id?: string;
3879
+ id?: string;
3880
+ is_deleted?: boolean;
3881
+ quantity?: number | null;
3882
+ sales_order_id?: string | null;
3883
+ sequence_number?: number;
3884
+ status?: string | null;
3885
+ trade_item_id?: string | null;
3886
+ updated_at?: string;
3887
+ };
3888
+ Relationships: [
3889
+ {
3890
+ foreignKeyName: "floriday_customer_stickers_cache_connection_id_fkey";
3891
+ columns: ["connection_id"];
3892
+ isOneToOne: false;
3893
+ referencedRelation: "floriday_connections";
3894
+ referencedColumns: ["id"];
3895
+ }
3896
+ ];
3897
+ };
3898
+ floriday_customers_cache: {
3899
+ Row: {
3900
+ connection_id: string | null;
3901
+ data: Json;
3902
+ fetched_at: string;
3903
+ gln_code: string | null;
3904
+ is_deleted: boolean;
3905
+ name: string | null;
3906
+ organization_id: string;
3907
+ sequence_number: number | null;
3908
+ };
3909
+ Insert: {
3910
+ connection_id?: string | null;
3911
+ data?: Json;
3912
+ fetched_at?: string;
3913
+ gln_code?: string | null;
3914
+ is_deleted?: boolean;
3915
+ name?: string | null;
3916
+ organization_id: string;
3917
+ sequence_number?: number | null;
3918
+ };
3919
+ Update: {
3920
+ connection_id?: string | null;
3921
+ data?: Json;
3922
+ fetched_at?: string;
3923
+ gln_code?: string | null;
3924
+ is_deleted?: boolean;
3925
+ name?: string | null;
3926
+ organization_id?: string;
3927
+ sequence_number?: number | null;
3928
+ };
3929
+ Relationships: [
3930
+ {
3931
+ foreignKeyName: "floriday_customers_cache_connection_id_fkey";
3932
+ columns: ["connection_id"];
3933
+ isOneToOne: false;
3934
+ referencedRelation: "floriday_connections";
3935
+ referencedColumns: ["id"];
3936
+ }
3937
+ ];
3938
+ };
3939
+ floriday_delivery_condition_sets_cache: {
3940
+ Row: {
3941
+ connection_id: string;
3942
+ data: Json;
3943
+ fetched_at: string;
3944
+ floriday_id: string;
3945
+ is_deleted: boolean;
3946
+ sequence_number: number;
3947
+ updated_at: string;
3948
+ };
3949
+ Insert: {
3950
+ connection_id: string;
3951
+ data: Json;
3952
+ fetched_at?: string;
3953
+ floriday_id: string;
3954
+ is_deleted?: boolean;
3955
+ sequence_number?: number;
3956
+ updated_at?: string;
3957
+ };
3958
+ Update: {
3959
+ connection_id?: string;
3960
+ data?: Json;
3961
+ fetched_at?: string;
3962
+ floriday_id?: string;
3963
+ is_deleted?: boolean;
3964
+ sequence_number?: number;
3965
+ updated_at?: string;
3966
+ };
3967
+ Relationships: [
3968
+ {
3969
+ foreignKeyName: "floriday_delivery_condition_sets_cache_connection_id_fkey";
3970
+ columns: ["connection_id"];
3971
+ isOneToOne: false;
3972
+ referencedRelation: "floriday_connections";
3973
+ referencedColumns: ["id"];
3974
+ }
3975
+ ];
3976
+ };
3977
+ floriday_delivery_locations_cache: {
3978
+ Row: {
3979
+ connection_id: string;
3980
+ data: Json;
3981
+ fetched_at: string;
3982
+ floriday_id: string;
3983
+ gln_code: string | null;
3984
+ id: string;
3985
+ is_deleted: boolean;
3986
+ name: string | null;
3987
+ organization_id: string | null;
3988
+ updated_at: string;
3989
+ };
3990
+ Insert: {
3991
+ connection_id: string;
3992
+ data?: Json;
3993
+ fetched_at?: string;
3994
+ floriday_id: string;
3995
+ gln_code?: string | null;
3996
+ id?: string;
3997
+ is_deleted?: boolean;
3998
+ name?: string | null;
3999
+ organization_id?: string | null;
4000
+ updated_at?: string;
4001
+ };
4002
+ Update: {
4003
+ connection_id?: string;
4004
+ data?: Json;
4005
+ fetched_at?: string;
4006
+ floriday_id?: string;
4007
+ gln_code?: string | null;
4008
+ id?: string;
4009
+ is_deleted?: boolean;
4010
+ name?: string | null;
4011
+ organization_id?: string | null;
4012
+ updated_at?: string;
4013
+ };
4014
+ Relationships: [
4015
+ {
4016
+ foreignKeyName: "floriday_delivery_locations_cache_connection_id_fkey";
4017
+ columns: ["connection_id"];
4018
+ isOneToOne: false;
4019
+ referencedRelation: "floriday_connections";
4020
+ referencedColumns: ["id"];
4021
+ }
4022
+ ];
4023
+ };
4024
+ floriday_delivery_orders_cache: {
4025
+ Row: {
4026
+ auction_date: string | null;
4027
+ connection_id: string;
4028
+ data: Json;
4029
+ destination_warehouse_id: string | null;
4030
+ fetched_at: string;
4031
+ floriday_id: string;
4032
+ id: string;
4033
+ is_deleted: boolean;
4034
+ sequence_number: number;
4035
+ status: string | null;
4036
+ trade_item_id: string | null;
4037
+ updated_at: string;
4038
+ };
4039
+ Insert: {
4040
+ auction_date?: string | null;
4041
+ connection_id: string;
4042
+ data?: Json;
4043
+ destination_warehouse_id?: string | null;
4044
+ fetched_at?: string;
4045
+ floriday_id: string;
4046
+ id?: string;
4047
+ is_deleted?: boolean;
4048
+ sequence_number?: number;
4049
+ status?: string | null;
4050
+ trade_item_id?: string | null;
4051
+ updated_at?: string;
4052
+ };
4053
+ Update: {
4054
+ auction_date?: string | null;
4055
+ connection_id?: string;
4056
+ data?: Json;
4057
+ destination_warehouse_id?: string | null;
4058
+ fetched_at?: string;
4059
+ floriday_id?: string;
4060
+ id?: string;
4061
+ is_deleted?: boolean;
4062
+ sequence_number?: number;
4063
+ status?: string | null;
4064
+ trade_item_id?: string | null;
4065
+ updated_at?: string;
4066
+ };
4067
+ Relationships: [
4068
+ {
4069
+ foreignKeyName: "floriday_delivery_orders_cache_connection_id_fkey";
4070
+ columns: ["connection_id"];
4071
+ isOneToOne: false;
4072
+ referencedRelation: "floriday_connections";
4073
+ referencedColumns: ["id"];
4074
+ }
4075
+ ];
4076
+ };
4077
+ floriday_fulfillment_orders_cache: {
4078
+ Row: {
4079
+ auction_date: string | null;
4080
+ connection_id: string;
4081
+ data: Json;
4082
+ delivery_order_id: string | null;
4083
+ despatch_warehouse_id: string | null;
4084
+ destination_warehouse_id: string | null;
4085
+ fetched_at: string;
4086
+ floriday_id: string;
4087
+ id: string;
4088
+ is_deleted: boolean | null;
4089
+ latest_delivery_at: string | null;
4090
+ load_carrier_type: string | null;
4091
+ one_label_only: boolean | null;
4092
+ sequence_number: number;
4093
+ status: string | null;
4094
+ };
4095
+ Insert: {
4096
+ auction_date?: string | null;
4097
+ connection_id: string;
4098
+ data: Json;
4099
+ delivery_order_id?: string | null;
4100
+ despatch_warehouse_id?: string | null;
4101
+ destination_warehouse_id?: string | null;
4102
+ fetched_at?: string;
4103
+ floriday_id: string;
4104
+ id?: string;
4105
+ is_deleted?: boolean | null;
4106
+ latest_delivery_at?: string | null;
4107
+ load_carrier_type?: string | null;
4108
+ one_label_only?: boolean | null;
4109
+ sequence_number?: number;
4110
+ status?: string | null;
4111
+ };
4112
+ Update: {
4113
+ auction_date?: string | null;
4114
+ connection_id?: string;
4115
+ data?: Json;
4116
+ delivery_order_id?: string | null;
4117
+ despatch_warehouse_id?: string | null;
4118
+ destination_warehouse_id?: string | null;
4119
+ fetched_at?: string;
4120
+ floriday_id?: string;
4121
+ id?: string;
4122
+ is_deleted?: boolean | null;
4123
+ latest_delivery_at?: string | null;
4124
+ load_carrier_type?: string | null;
4125
+ one_label_only?: boolean | null;
4126
+ sequence_number?: number;
4127
+ status?: string | null;
4128
+ };
4129
+ Relationships: [
4130
+ {
4131
+ foreignKeyName: "floriday_fulfillment_orders_cache_connection_id_fkey";
4132
+ columns: ["connection_id"];
4133
+ isOneToOne: false;
4134
+ referencedRelation: "floriday_connections";
4135
+ referencedColumns: ["id"];
4136
+ }
4137
+ ];
4138
+ };
4139
+ floriday_invoices_cache: {
4140
+ Row: {
4141
+ buyer_organization_id: string | null;
4142
+ connection_id: string;
4143
+ currency: string | null;
4144
+ data: Json;
4145
+ fetched_at: string;
4146
+ floriday_id: string;
4147
+ id: string;
4148
+ invoice_date: string | null;
4149
+ invoice_number: string | null;
4150
+ is_deleted: boolean;
4151
+ sequence_number: number;
4152
+ total_amount: number | null;
4153
+ updated_at: string;
4154
+ };
4155
+ Insert: {
4156
+ buyer_organization_id?: string | null;
4157
+ connection_id: string;
4158
+ currency?: string | null;
4159
+ data?: Json;
4160
+ fetched_at?: string;
4161
+ floriday_id: string;
4162
+ id?: string;
4163
+ invoice_date?: string | null;
4164
+ invoice_number?: string | null;
4165
+ is_deleted?: boolean;
4166
+ sequence_number?: number;
4167
+ total_amount?: number | null;
4168
+ updated_at?: string;
4169
+ };
4170
+ Update: {
4171
+ buyer_organization_id?: string | null;
4172
+ connection_id?: string;
4173
+ currency?: string | null;
4174
+ data?: Json;
4175
+ fetched_at?: string;
4176
+ floriday_id?: string;
4177
+ id?: string;
4178
+ invoice_date?: string | null;
4179
+ invoice_number?: string | null;
4180
+ is_deleted?: boolean;
4181
+ sequence_number?: number;
4182
+ total_amount?: number | null;
4183
+ updated_at?: string;
4184
+ };
4185
+ Relationships: [
4186
+ {
4187
+ foreignKeyName: "floriday_invoices_cache_connection_id_fkey";
4188
+ columns: ["connection_id"];
4189
+ isOneToOne: false;
4190
+ referencedRelation: "floriday_connections";
4191
+ referencedColumns: ["id"];
4192
+ }
4193
+ ];
4194
+ };
4195
+ floriday_logistic_labels_cache: {
4196
+ Row: {
4197
+ byte_size: number | null;
4198
+ connection_id: string;
4199
+ content_type: string;
4200
+ fetched_at: string;
4201
+ fulfillment_order_id: string;
4202
+ id: string;
4203
+ logistic_label_code: string;
4204
+ storage_path: string;
4205
+ };
4206
+ Insert: {
4207
+ byte_size?: number | null;
4208
+ connection_id: string;
4209
+ content_type?: string;
4210
+ fetched_at?: string;
4211
+ fulfillment_order_id: string;
4212
+ id?: string;
4213
+ logistic_label_code: string;
4214
+ storage_path: string;
4215
+ };
4216
+ Update: {
4217
+ byte_size?: number | null;
4218
+ connection_id?: string;
4219
+ content_type?: string;
4220
+ fetched_at?: string;
4221
+ fulfillment_order_id?: string;
4222
+ id?: string;
4223
+ logistic_label_code?: string;
4224
+ storage_path?: string;
4225
+ };
4226
+ Relationships: [
4227
+ {
4228
+ foreignKeyName: "floriday_logistic_labels_cache_connection_id_fkey";
4229
+ columns: ["connection_id"];
4230
+ isOneToOne: false;
4231
+ referencedRelation: "floriday_connections";
4232
+ referencedColumns: ["id"];
4233
+ }
4234
+ ];
4235
+ };
4236
+ floriday_network_cache: {
4237
+ Row: {
4238
+ city: string | null;
4239
+ connection_id: string;
4240
+ country: string | null;
4241
+ data: Json;
4242
+ fetched_at: string;
4243
+ gln: string | null;
4244
+ organization_id: string;
4245
+ organization_name: string | null;
4246
+ };
4247
+ Insert: {
4248
+ city?: string | null;
4249
+ connection_id: string;
4250
+ country?: string | null;
4251
+ data?: Json;
4252
+ fetched_at?: string;
4253
+ gln?: string | null;
4254
+ organization_id: string;
4255
+ organization_name?: string | null;
4256
+ };
4257
+ Update: {
4258
+ city?: string | null;
4259
+ connection_id?: string;
4260
+ country?: string | null;
4261
+ data?: Json;
4262
+ fetched_at?: string;
4263
+ gln?: string | null;
4264
+ organization_id?: string;
4265
+ organization_name?: string | null;
4266
+ };
4267
+ Relationships: [];
4268
+ };
4269
+ floriday_network_sync_state: {
4270
+ Row: {
4271
+ connection_id: string;
4272
+ last_error: string | null;
4273
+ last_sequence_number: number;
4274
+ last_synced_at: string | null;
4275
+ updated_at: string;
4276
+ };
4277
+ Insert: {
4278
+ connection_id: string;
4279
+ last_error?: string | null;
4280
+ last_sequence_number?: number;
4281
+ last_synced_at?: string | null;
4282
+ updated_at?: string;
4283
+ };
4284
+ Update: {
4285
+ connection_id?: string;
4286
+ last_error?: string | null;
4287
+ last_sequence_number?: number;
4288
+ last_synced_at?: string | null;
4289
+ updated_at?: string;
4290
+ };
4291
+ Relationships: [];
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
+ };
4311
+ floriday_packings_cache: {
4312
+ Row: {
4313
+ connection_id: string;
4314
+ data: Json;
4315
+ fetched_at: string;
4316
+ floriday_id: string;
4317
+ id: string;
4318
+ is_deleted: boolean;
4319
+ sequence_number: number;
4320
+ updated_at: string;
4321
+ };
4322
+ Insert: {
4323
+ connection_id: string;
4324
+ data?: Json;
4325
+ fetched_at?: string;
4326
+ floriday_id: string;
4327
+ id?: string;
4328
+ is_deleted?: boolean;
4329
+ sequence_number?: number;
4330
+ updated_at?: string;
2793
4331
  };
2794
4332
  Update: {
2795
- buyer_organization_id?: string | null;
2796
- buyer_organization_name?: string | null;
2797
4333
  connection_id?: string;
2798
4334
  data?: Json;
2799
- floriday_connection_id?: string;
4335
+ fetched_at?: string;
4336
+ floriday_id?: string;
4337
+ id?: string;
2800
4338
  is_deleted?: boolean;
2801
4339
  sequence_number?: number;
2802
- status?: string | null;
2803
- synced_at?: string;
4340
+ updated_at?: string;
2804
4341
  };
2805
4342
  Relationships: [
2806
4343
  {
2807
- foreignKeyName: "floriday_connections_cache_connection_id_fkey";
4344
+ foreignKeyName: "floriday_packings_cache_connection_id_fkey";
2808
4345
  columns: ["connection_id"];
2809
4346
  isOneToOne: false;
2810
4347
  referencedRelation: "floriday_connections";
@@ -2812,28 +4349,37 @@ export type Database = {
2812
4349
  }
2813
4350
  ];
2814
4351
  };
2815
- floriday_customers_cache: {
4352
+ floriday_price_groups_cache: {
2816
4353
  Row: {
2817
- connection_id: string | null;
4354
+ connection_id: string;
2818
4355
  data: Json;
2819
4356
  fetched_at: string;
2820
- organization_id: string;
4357
+ floriday_id: string;
4358
+ is_deleted: boolean;
4359
+ sequence_number: number;
4360
+ updated_at: string;
2821
4361
  };
2822
4362
  Insert: {
2823
- connection_id?: string | null;
2824
- data?: Json;
4363
+ connection_id: string;
4364
+ data: Json;
2825
4365
  fetched_at?: string;
2826
- organization_id: string;
4366
+ floriday_id: string;
4367
+ is_deleted?: boolean;
4368
+ sequence_number?: number;
4369
+ updated_at?: string;
2827
4370
  };
2828
4371
  Update: {
2829
- connection_id?: string | null;
4372
+ connection_id?: string;
2830
4373
  data?: Json;
2831
4374
  fetched_at?: string;
2832
- organization_id?: string;
4375
+ floriday_id?: string;
4376
+ is_deleted?: boolean;
4377
+ sequence_number?: number;
4378
+ updated_at?: string;
2833
4379
  };
2834
4380
  Relationships: [
2835
4381
  {
2836
- foreignKeyName: "floriday_customers_cache_connection_id_fkey";
4382
+ foreignKeyName: "floriday_price_groups_cache_connection_id_fkey";
2837
4383
  columns: ["connection_id"];
2838
4384
  isOneToOne: false;
2839
4385
  referencedRelation: "floriday_connections";
@@ -2841,62 +4387,70 @@ export type Database = {
2841
4387
  }
2842
4388
  ];
2843
4389
  };
2844
- floriday_network_cache: {
4390
+ floriday_resource_schemas: {
2845
4391
  Row: {
2846
- city: string | null;
2847
- connection_id: string;
2848
- country: string | null;
2849
- data: Json;
4392
+ enums: Json;
2850
4393
  fetched_at: string;
2851
- gln: string | null;
2852
- organization_id: string;
2853
- organization_name: string | null;
4394
+ resource: string;
4395
+ schema: Json;
4396
+ source_url: string | null;
4397
+ version: string;
2854
4398
  };
2855
4399
  Insert: {
2856
- city?: string | null;
2857
- connection_id: string;
2858
- country?: string | null;
2859
- data?: Json;
4400
+ enums?: Json;
2860
4401
  fetched_at?: string;
2861
- gln?: string | null;
2862
- organization_id: string;
2863
- organization_name?: string | null;
4402
+ resource: string;
4403
+ schema: Json;
4404
+ source_url?: string | null;
4405
+ version: string;
2864
4406
  };
2865
4407
  Update: {
2866
- city?: string | null;
2867
- connection_id?: string;
2868
- country?: string | null;
2869
- data?: Json;
4408
+ enums?: Json;
2870
4409
  fetched_at?: string;
2871
- gln?: string | null;
2872
- organization_id?: string;
2873
- organization_name?: string | null;
4410
+ resource?: string;
4411
+ schema?: Json;
4412
+ source_url?: string | null;
4413
+ version?: string;
2874
4414
  };
2875
4415
  Relationships: [];
2876
4416
  };
2877
- floriday_network_sync_state: {
4417
+ floriday_sales_strategies_cache: {
2878
4418
  Row: {
2879
4419
  connection_id: string;
2880
- last_error: string | null;
2881
- last_sequence_number: number;
2882
- last_synced_at: string | null;
4420
+ data: Json;
4421
+ fetched_at: string;
4422
+ floriday_id: string;
4423
+ is_deleted: boolean;
4424
+ sequence_number: number;
2883
4425
  updated_at: string;
2884
4426
  };
2885
4427
  Insert: {
2886
4428
  connection_id: string;
2887
- last_error?: string | null;
2888
- last_sequence_number?: number;
2889
- last_synced_at?: string | null;
4429
+ data: Json;
4430
+ fetched_at?: string;
4431
+ floriday_id: string;
4432
+ is_deleted?: boolean;
4433
+ sequence_number?: number;
2890
4434
  updated_at?: string;
2891
4435
  };
2892
4436
  Update: {
2893
4437
  connection_id?: string;
2894
- last_error?: string | null;
2895
- last_sequence_number?: number;
2896
- last_synced_at?: string | null;
4438
+ data?: Json;
4439
+ fetched_at?: string;
4440
+ floriday_id?: string;
4441
+ is_deleted?: boolean;
4442
+ sequence_number?: number;
2897
4443
  updated_at?: string;
2898
4444
  };
2899
- Relationships: [];
4445
+ Relationships: [
4446
+ {
4447
+ foreignKeyName: "floriday_sales_strategies_cache_connection_id_fkey";
4448
+ columns: ["connection_id"];
4449
+ isOneToOne: false;
4450
+ referencedRelation: "floriday_connections";
4451
+ referencedColumns: ["id"];
4452
+ }
4453
+ ];
2900
4454
  };
2901
4455
  floriday_salesorders_cache: {
2902
4456
  Row: {
@@ -2965,7 +4519,9 @@ export type Database = {
2965
4519
  connection_id: string;
2966
4520
  entity_type: string;
2967
4521
  last_error: string | null;
4522
+ last_items_processed: number | null;
2968
4523
  last_sequence_number: number;
4524
+ last_success_at: string | null;
2969
4525
  last_synced_at: string | null;
2970
4526
  updated_at: string;
2971
4527
  };
@@ -2973,7 +4529,9 @@ export type Database = {
2973
4529
  connection_id: string;
2974
4530
  entity_type: string;
2975
4531
  last_error?: string | null;
4532
+ last_items_processed?: number | null;
2976
4533
  last_sequence_number?: number;
4534
+ last_success_at?: string | null;
2977
4535
  last_synced_at?: string | null;
2978
4536
  updated_at?: string;
2979
4537
  };
@@ -2981,7 +4539,9 @@ export type Database = {
2981
4539
  connection_id?: string;
2982
4540
  entity_type?: string;
2983
4541
  last_error?: string | null;
4542
+ last_items_processed?: number | null;
2984
4543
  last_sequence_number?: number;
4544
+ last_success_at?: string | null;
2985
4545
  last_synced_at?: string | null;
2986
4546
  updated_at?: string;
2987
4547
  };
@@ -3025,7 +4585,180 @@ export type Database = {
3025
4585
  };
3026
4586
  Relationships: [
3027
4587
  {
3028
- foreignKeyName: "floriday_token_refresh_log_connection_id_fkey";
4588
+ foreignKeyName: "floriday_token_refresh_log_connection_id_fkey";
4589
+ columns: ["connection_id"];
4590
+ isOneToOne: false;
4591
+ referencedRelation: "floriday_connections";
4592
+ referencedColumns: ["id"];
4593
+ }
4594
+ ];
4595
+ };
4596
+ floriday_trade_item_classifications_cache: {
4597
+ Row: {
4598
+ connection_id: string;
4599
+ data: Json;
4600
+ fetched_at: string;
4601
+ floriday_id: string;
4602
+ id: string;
4603
+ is_deleted: boolean;
4604
+ sequence_number: number;
4605
+ updated_at: string;
4606
+ };
4607
+ Insert: {
4608
+ connection_id: string;
4609
+ data: Json;
4610
+ fetched_at?: string;
4611
+ floriday_id: string;
4612
+ id?: string;
4613
+ is_deleted?: boolean;
4614
+ sequence_number?: number;
4615
+ updated_at?: string;
4616
+ };
4617
+ Update: {
4618
+ connection_id?: string;
4619
+ data?: Json;
4620
+ fetched_at?: string;
4621
+ floriday_id?: string;
4622
+ id?: string;
4623
+ is_deleted?: boolean;
4624
+ sequence_number?: number;
4625
+ updated_at?: string;
4626
+ };
4627
+ Relationships: [
4628
+ {
4629
+ foreignKeyName: "floriday_trade_item_classifications_cache_connection_id_fkey";
4630
+ columns: ["connection_id"];
4631
+ isOneToOne: false;
4632
+ referencedRelation: "floriday_connections";
4633
+ referencedColumns: ["id"];
4634
+ }
4635
+ ];
4636
+ };
4637
+ floriday_trade_items_cache: {
4638
+ Row: {
4639
+ connection_id: string;
4640
+ data: Json;
4641
+ fetched_at: string;
4642
+ floriday_id: string;
4643
+ is_deleted: boolean;
4644
+ sequence_number: number;
4645
+ };
4646
+ Insert: {
4647
+ connection_id: string;
4648
+ data?: Json;
4649
+ fetched_at?: string;
4650
+ floriday_id: string;
4651
+ is_deleted?: boolean;
4652
+ sequence_number?: number;
4653
+ };
4654
+ Update: {
4655
+ connection_id?: string;
4656
+ data?: Json;
4657
+ fetched_at?: string;
4658
+ floriday_id?: string;
4659
+ is_deleted?: boolean;
4660
+ sequence_number?: number;
4661
+ };
4662
+ Relationships: [
4663
+ {
4664
+ foreignKeyName: "floriday_trade_items_cache_connection_id_fkey";
4665
+ columns: ["connection_id"];
4666
+ isOneToOne: false;
4667
+ referencedRelation: "floriday_connections";
4668
+ referencedColumns: ["id"];
4669
+ }
4670
+ ];
4671
+ };
4672
+ floriday_trips_cache: {
4673
+ Row: {
4674
+ carrier_organization_id: string | null;
4675
+ connection_id: string;
4676
+ data: Json;
4677
+ fetched_at: string;
4678
+ floriday_id: string;
4679
+ id: string;
4680
+ is_deleted: boolean;
4681
+ sequence_number: number;
4682
+ status: string | null;
4683
+ trip_date: string | null;
4684
+ updated_at: string;
4685
+ };
4686
+ Insert: {
4687
+ carrier_organization_id?: string | null;
4688
+ connection_id: string;
4689
+ data?: Json;
4690
+ fetched_at?: string;
4691
+ floriday_id: string;
4692
+ id?: string;
4693
+ is_deleted?: boolean;
4694
+ sequence_number?: number;
4695
+ status?: string | null;
4696
+ trip_date?: string | null;
4697
+ updated_at?: string;
4698
+ };
4699
+ Update: {
4700
+ carrier_organization_id?: string | null;
4701
+ connection_id?: string;
4702
+ data?: Json;
4703
+ fetched_at?: string;
4704
+ floriday_id?: string;
4705
+ id?: string;
4706
+ is_deleted?: boolean;
4707
+ sequence_number?: number;
4708
+ status?: string | null;
4709
+ trip_date?: string | null;
4710
+ updated_at?: string;
4711
+ };
4712
+ Relationships: [
4713
+ {
4714
+ foreignKeyName: "floriday_trips_cache_connection_id_fkey";
4715
+ columns: ["connection_id"];
4716
+ isOneToOne: false;
4717
+ referencedRelation: "floriday_connections";
4718
+ referencedColumns: ["id"];
4719
+ }
4720
+ ];
4721
+ };
4722
+ floriday_warehouses_cache: {
4723
+ Row: {
4724
+ connection_id: string;
4725
+ data: Json;
4726
+ fetched_at: string;
4727
+ floriday_id: string;
4728
+ gln_code: string | null;
4729
+ id: string;
4730
+ is_default: boolean;
4731
+ is_deleted: boolean;
4732
+ name: string | null;
4733
+ updated_at: string;
4734
+ };
4735
+ Insert: {
4736
+ connection_id: string;
4737
+ data?: Json;
4738
+ fetched_at?: string;
4739
+ floriday_id: string;
4740
+ gln_code?: string | null;
4741
+ id?: string;
4742
+ is_default?: boolean;
4743
+ is_deleted?: boolean;
4744
+ name?: string | null;
4745
+ updated_at?: string;
4746
+ };
4747
+ Update: {
4748
+ connection_id?: string;
4749
+ data?: Json;
4750
+ fetched_at?: string;
4751
+ floriday_id?: string;
4752
+ gln_code?: string | null;
4753
+ id?: string;
4754
+ is_default?: boolean;
4755
+ is_deleted?: boolean;
4756
+ name?: string | null;
4757
+ updated_at?: string;
4758
+ };
4759
+ Relationships: [
4760
+ {
4761
+ foreignKeyName: "floriday_warehouses_cache_connection_id_fkey";
3029
4762
  columns: ["connection_id"];
3030
4763
  isOneToOne: false;
3031
4764
  referencedRelation: "floriday_connections";
@@ -3033,34 +4766,61 @@ export type Database = {
3033
4766
  }
3034
4767
  ];
3035
4768
  };
3036
- floriday_trade_items_cache: {
4769
+ floriday_write_log: {
3037
4770
  Row: {
3038
- connection_id: string;
3039
- data: Json;
3040
- fetched_at: string;
3041
- floriday_id: string;
3042
- is_deleted: boolean;
3043
- sequence_number: number;
4771
+ action: string;
4772
+ caller: string;
4773
+ connection_id: string | null;
4774
+ created_at: string;
4775
+ error: string | null;
4776
+ floriday_id: string | null;
4777
+ http_status: number | null;
4778
+ id: string;
4779
+ idempotency_key: string | null;
4780
+ module: string | null;
4781
+ ok: boolean;
4782
+ request: Json | null;
4783
+ resource: string;
4784
+ response: Json | null;
4785
+ user_id: string | null;
3044
4786
  };
3045
4787
  Insert: {
3046
- connection_id: string;
3047
- data?: Json;
3048
- fetched_at?: string;
3049
- floriday_id: string;
3050
- is_deleted?: boolean;
3051
- sequence_number?: number;
4788
+ action: string;
4789
+ caller?: string;
4790
+ connection_id?: string | null;
4791
+ created_at?: string;
4792
+ error?: string | null;
4793
+ floriday_id?: string | null;
4794
+ http_status?: number | null;
4795
+ id?: string;
4796
+ idempotency_key?: string | null;
4797
+ module?: string | null;
4798
+ ok: boolean;
4799
+ request?: Json | null;
4800
+ resource: string;
4801
+ response?: Json | null;
4802
+ user_id?: string | null;
3052
4803
  };
3053
4804
  Update: {
3054
- connection_id?: string;
3055
- data?: Json;
3056
- fetched_at?: string;
3057
- floriday_id?: string;
3058
- is_deleted?: boolean;
3059
- sequence_number?: number;
4805
+ action?: string;
4806
+ caller?: string;
4807
+ connection_id?: string | null;
4808
+ created_at?: string;
4809
+ error?: string | null;
4810
+ floriday_id?: string | null;
4811
+ http_status?: number | null;
4812
+ id?: string;
4813
+ idempotency_key?: string | null;
4814
+ module?: string | null;
4815
+ ok?: boolean;
4816
+ request?: Json | null;
4817
+ resource?: string;
4818
+ response?: Json | null;
4819
+ user_id?: string | null;
3060
4820
  };
3061
4821
  Relationships: [
3062
4822
  {
3063
- foreignKeyName: "floriday_trade_items_cache_connection_id_fkey";
4823
+ foreignKeyName: "floriday_write_log_connection_id_fkey";
3064
4824
  columns: ["connection_id"];
3065
4825
  isOneToOne: false;
3066
4826
  referencedRelation: "floriday_connections";
@@ -3427,6 +5187,7 @@ export type Database = {
3427
5187
  Row: {
3428
5188
  body_html: string | null;
3429
5189
  body_text: string | null;
5190
+ connection_id: string | null;
3430
5191
  created_at: string;
3431
5192
  error_message: string | null;
3432
5193
  external_id: string | null;
@@ -3445,6 +5206,7 @@ export type Database = {
3445
5206
  Insert: {
3446
5207
  body_html?: string | null;
3447
5208
  body_text?: string | null;
5209
+ connection_id?: string | null;
3448
5210
  created_at?: string;
3449
5211
  error_message?: string | null;
3450
5212
  external_id?: string | null;
@@ -3463,6 +5225,7 @@ export type Database = {
3463
5225
  Update: {
3464
5226
  body_html?: string | null;
3465
5227
  body_text?: string | null;
5228
+ connection_id?: string | null;
3466
5229
  created_at?: string;
3467
5230
  error_message?: string | null;
3468
5231
  external_id?: string | null;
@@ -3479,6 +5242,20 @@ export type Database = {
3479
5242
  updated_at?: string;
3480
5243
  };
3481
5244
  Relationships: [
5245
+ {
5246
+ foreignKeyName: "mailbox_messages_connection_id_fkey";
5247
+ columns: ["connection_id"];
5248
+ isOneToOne: false;
5249
+ referencedRelation: "email_auth_connections";
5250
+ referencedColumns: ["id"];
5251
+ },
5252
+ {
5253
+ foreignKeyName: "mailbox_messages_connection_id_fkey";
5254
+ columns: ["connection_id"];
5255
+ isOneToOne: false;
5256
+ referencedRelation: "email_auth_connections_safe";
5257
+ referencedColumns: ["id"];
5258
+ },
3482
5259
  {
3483
5260
  foreignKeyName: "mailbox_messages_profile_id_fkey";
3484
5261
  columns: ["profile_id"];
@@ -3758,6 +5535,97 @@ export type Database = {
3758
5535
  };
3759
5536
  Relationships: [];
3760
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
+ };
3761
5629
  monteurs: {
3762
5630
  Row: {
3763
5631
  avatar_url: string | null;
@@ -3773,6 +5641,7 @@ export type Database = {
3773
5641
  role: string;
3774
5642
  tenant_id: string;
3775
5643
  updated_at: string;
5644
+ user_id: string | null;
3776
5645
  };
3777
5646
  Insert: {
3778
5647
  avatar_url?: string | null;
@@ -3788,6 +5657,7 @@ export type Database = {
3788
5657
  role?: string;
3789
5658
  tenant_id: string;
3790
5659
  updated_at?: string;
5660
+ user_id?: string | null;
3791
5661
  };
3792
5662
  Update: {
3793
5663
  avatar_url?: string | null;
@@ -3803,6 +5673,7 @@ export type Database = {
3803
5673
  role?: string;
3804
5674
  tenant_id?: string;
3805
5675
  updated_at?: string;
5676
+ user_id?: string | null;
3806
5677
  };
3807
5678
  Relationships: [
3808
5679
  {
@@ -3944,13 +5815,6 @@ export type Database = {
3944
5815
  isOneToOne: false;
3945
5816
  referencedRelation: "offer_campaigns";
3946
5817
  referencedColumns: ["id"];
3947
- },
3948
- {
3949
- foreignKeyName: "offer_campaign_products_product_id_fkey";
3950
- columns: ["product_id"];
3951
- isOneToOne: false;
3952
- referencedRelation: "products";
3953
- referencedColumns: ["id"];
3954
5818
  }
3955
5819
  ];
3956
5820
  };
@@ -4238,6 +6102,105 @@ export type Database = {
4238
6102
  };
4239
6103
  Relationships: [];
4240
6104
  };
6105
+ order_cart_items: {
6106
+ Row: {
6107
+ cart_id: string;
6108
+ crates: number;
6109
+ crates_per_layer: number;
6110
+ created_at: string;
6111
+ id: string;
6112
+ order_item_id: string | null;
6113
+ plants_per_crate: number;
6114
+ product_id: string | null;
6115
+ product_name: string;
6116
+ };
6117
+ Insert: {
6118
+ cart_id: string;
6119
+ crates: number;
6120
+ crates_per_layer?: number;
6121
+ created_at?: string;
6122
+ id?: string;
6123
+ order_item_id?: string | null;
6124
+ plants_per_crate?: number;
6125
+ product_id?: string | null;
6126
+ product_name: string;
6127
+ };
6128
+ Update: {
6129
+ cart_id?: string;
6130
+ crates?: number;
6131
+ crates_per_layer?: number;
6132
+ created_at?: string;
6133
+ id?: string;
6134
+ order_item_id?: string | null;
6135
+ plants_per_crate?: number;
6136
+ product_id?: string | null;
6137
+ product_name?: string;
6138
+ };
6139
+ Relationships: [
6140
+ {
6141
+ foreignKeyName: "order_cart_items_cart_id_fkey";
6142
+ columns: ["cart_id"];
6143
+ isOneToOne: false;
6144
+ referencedRelation: "order_carts";
6145
+ referencedColumns: ["id"];
6146
+ },
6147
+ {
6148
+ foreignKeyName: "order_cart_items_order_item_id_fkey";
6149
+ columns: ["order_item_id"];
6150
+ isOneToOne: false;
6151
+ referencedRelation: "order_items";
6152
+ referencedColumns: ["id"];
6153
+ },
6154
+ {
6155
+ foreignKeyName: "order_cart_items_product_id_fkey";
6156
+ columns: ["product_id"];
6157
+ isOneToOne: false;
6158
+ referencedRelation: "products";
6159
+ referencedColumns: ["id"];
6160
+ }
6161
+ ];
6162
+ };
6163
+ order_carts: {
6164
+ Row: {
6165
+ cart_number: number;
6166
+ created_at: string;
6167
+ id: string;
6168
+ is_auto: boolean;
6169
+ is_complete: boolean;
6170
+ notes: string | null;
6171
+ order_id: string;
6172
+ updated_at: string;
6173
+ };
6174
+ Insert: {
6175
+ cart_number: number;
6176
+ created_at?: string;
6177
+ id?: string;
6178
+ is_auto?: boolean;
6179
+ is_complete?: boolean;
6180
+ notes?: string | null;
6181
+ order_id: string;
6182
+ updated_at?: string;
6183
+ };
6184
+ Update: {
6185
+ cart_number?: number;
6186
+ created_at?: string;
6187
+ id?: string;
6188
+ is_auto?: boolean;
6189
+ is_complete?: boolean;
6190
+ notes?: string | null;
6191
+ order_id?: string;
6192
+ updated_at?: string;
6193
+ };
6194
+ Relationships: [
6195
+ {
6196
+ foreignKeyName: "order_carts_order_id_fkey";
6197
+ columns: ["order_id"];
6198
+ isOneToOne: false;
6199
+ referencedRelation: "orders";
6200
+ referencedColumns: ["id"];
6201
+ }
6202
+ ];
6203
+ };
4241
6204
  order_field_options: {
4242
6205
  Row: {
4243
6206
  created_at: string;
@@ -4354,6 +6317,24 @@ export type Database = {
4354
6317
  }
4355
6318
  ];
4356
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
+ };
4357
6338
  orders: {
4358
6339
  Row: {
4359
6340
  created_at: string;
@@ -4366,6 +6347,7 @@ export type Database = {
4366
6347
  notes: string | null;
4367
6348
  order_date: string;
4368
6349
  order_number: string;
6350
+ order_source: string;
4369
6351
  status: string;
4370
6352
  total: string;
4371
6353
  updated_at: string;
@@ -4381,6 +6363,7 @@ export type Database = {
4381
6363
  notes?: string | null;
4382
6364
  order_date?: string;
4383
6365
  order_number: string;
6366
+ order_source?: string;
4384
6367
  status?: string;
4385
6368
  total?: string;
4386
6369
  updated_at?: string;
@@ -4396,6 +6379,7 @@ export type Database = {
4396
6379
  notes?: string | null;
4397
6380
  order_date?: string;
4398
6381
  order_number?: string;
6382
+ order_source?: string;
4399
6383
  status?: string;
4400
6384
  total?: string;
4401
6385
  updated_at?: string;
@@ -4634,17 +6618,82 @@ export type Database = {
4634
6618
  };
4635
6619
  Relationships: [];
4636
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
+ };
4637
6683
  products: {
4638
6684
  Row: {
4639
6685
  barcode: string | null;
4640
6686
  batch: string;
6687
+ crates_per_layer: number;
4641
6688
  created_at: string;
4642
6689
  custom_fields: Json;
4643
6690
  id: string;
4644
6691
  image_url: string | null;
4645
6692
  incoming_quantity: number;
6693
+ layers_per_cart: number;
4646
6694
  location: string;
4647
6695
  min_quantity: number;
6696
+ plants_per_crate: number;
4648
6697
  product: string;
4649
6698
  product_type: string;
4650
6699
  purchase_price: number | null;
@@ -4657,13 +6706,16 @@ export type Database = {
4657
6706
  Insert: {
4658
6707
  barcode?: string | null;
4659
6708
  batch: string;
6709
+ crates_per_layer?: number;
4660
6710
  created_at?: string;
4661
6711
  custom_fields?: Json;
4662
6712
  id?: string;
4663
6713
  image_url?: string | null;
4664
6714
  incoming_quantity?: number;
6715
+ layers_per_cart?: number;
4665
6716
  location: string;
4666
6717
  min_quantity?: number;
6718
+ plants_per_crate?: number;
4667
6719
  product: string;
4668
6720
  product_type?: string;
4669
6721
  purchase_price?: number | null;
@@ -4676,13 +6728,16 @@ export type Database = {
4676
6728
  Update: {
4677
6729
  barcode?: string | null;
4678
6730
  batch?: string;
6731
+ crates_per_layer?: number;
4679
6732
  created_at?: string;
4680
6733
  custom_fields?: Json;
4681
6734
  id?: string;
4682
6735
  image_url?: string | null;
4683
6736
  incoming_quantity?: number;
6737
+ layers_per_cart?: number;
4684
6738
  location?: string;
4685
6739
  min_quantity?: number;
6740
+ plants_per_crate?: number;
4686
6741
  product?: string;
4687
6742
  product_type?: string;
4688
6743
  purchase_price?: number | null;
@@ -5658,12 +7713,159 @@ export type Database = {
5658
7713
  };
5659
7714
  Relationships: [];
5660
7715
  };
7716
+ time_entries: {
7717
+ Row: {
7718
+ created_at: string;
7719
+ employee_id: string;
7720
+ entry_date: string;
7721
+ hours: number;
7722
+ id: string;
7723
+ notes: string | null;
7724
+ overtime: number;
7725
+ undertime: number;
7726
+ updated_at: string;
7727
+ };
7728
+ Insert: {
7729
+ created_at?: string;
7730
+ employee_id: string;
7731
+ entry_date: string;
7732
+ hours?: number;
7733
+ id?: string;
7734
+ notes?: string | null;
7735
+ overtime?: number;
7736
+ undertime?: number;
7737
+ updated_at?: string;
7738
+ };
7739
+ Update: {
7740
+ created_at?: string;
7741
+ employee_id?: string;
7742
+ entry_date?: string;
7743
+ hours?: number;
7744
+ id?: string;
7745
+ notes?: string | null;
7746
+ overtime?: number;
7747
+ undertime?: number;
7748
+ updated_at?: string;
7749
+ };
7750
+ Relationships: [
7751
+ {
7752
+ foreignKeyName: "time_entries_employee_id_fkey";
7753
+ columns: ["employee_id"];
7754
+ isOneToOne: false;
7755
+ referencedRelation: "monteurs";
7756
+ referencedColumns: ["id"];
7757
+ }
7758
+ ];
7759
+ };
7760
+ time_logs: {
7761
+ Row: {
7762
+ created_at: string;
7763
+ employee_id: string;
7764
+ end_time: string | null;
7765
+ id: string;
7766
+ notes: string | null;
7767
+ overtime_hours: number;
7768
+ overtime_type: string | null;
7769
+ regular_hours: number;
7770
+ start_time: string;
7771
+ travel_cost: number | null;
7772
+ travel_distance_km: number | null;
7773
+ type: string;
7774
+ updated_at: string;
7775
+ };
7776
+ Insert: {
7777
+ created_at?: string;
7778
+ employee_id: string;
7779
+ end_time?: string | null;
7780
+ id?: string;
7781
+ notes?: string | null;
7782
+ overtime_hours?: number;
7783
+ overtime_type?: string | null;
7784
+ regular_hours?: number;
7785
+ start_time?: string;
7786
+ travel_cost?: number | null;
7787
+ travel_distance_km?: number | null;
7788
+ type: string;
7789
+ updated_at?: string;
7790
+ };
7791
+ Update: {
7792
+ created_at?: string;
7793
+ employee_id?: string;
7794
+ end_time?: string | null;
7795
+ id?: string;
7796
+ notes?: string | null;
7797
+ overtime_hours?: number;
7798
+ overtime_type?: string | null;
7799
+ regular_hours?: number;
7800
+ start_time?: string;
7801
+ travel_cost?: number | null;
7802
+ travel_distance_km?: number | null;
7803
+ type?: string;
7804
+ updated_at?: string;
7805
+ };
7806
+ Relationships: [
7807
+ {
7808
+ foreignKeyName: "time_logs_employee_id_fkey";
7809
+ columns: ["employee_id"];
7810
+ isOneToOne: false;
7811
+ referencedRelation: "monteurs";
7812
+ referencedColumns: ["id"];
7813
+ }
7814
+ ];
7815
+ };
7816
+ time_off_entries: {
7817
+ Row: {
7818
+ created_at: string;
7819
+ employee_id: string;
7820
+ entry_date: string;
7821
+ hours: number;
7822
+ id: string;
7823
+ notes: string | null;
7824
+ type: string;
7825
+ updated_at: string;
7826
+ };
7827
+ Insert: {
7828
+ created_at?: string;
7829
+ employee_id: string;
7830
+ entry_date: string;
7831
+ hours?: number;
7832
+ id?: string;
7833
+ notes?: string | null;
7834
+ type: string;
7835
+ updated_at?: string;
7836
+ };
7837
+ Update: {
7838
+ created_at?: string;
7839
+ employee_id?: string;
7840
+ entry_date?: string;
7841
+ hours?: number;
7842
+ id?: string;
7843
+ notes?: string | null;
7844
+ type?: string;
7845
+ updated_at?: string;
7846
+ };
7847
+ Relationships: [
7848
+ {
7849
+ foreignKeyName: "time_off_entries_employee_id_fkey";
7850
+ columns: ["employee_id"];
7851
+ isOneToOne: false;
7852
+ referencedRelation: "monteurs";
7853
+ referencedColumns: ["id"];
7854
+ }
7855
+ ];
7856
+ };
5661
7857
  trade_item_drafts: {
5662
7858
  Row: {
5663
7859
  connection_id: string | null;
5664
7860
  created_at: string;
5665
7861
  data: Json;
7862
+ floriday_id: string | null;
7863
+ floriday_link_error: string | null;
7864
+ floriday_link_status: string;
5666
7865
  id: string;
7866
+ last_floriday_sync_at: string | null;
7867
+ missing_required_fields: string[];
7868
+ source: string;
5667
7869
  updated_at: string;
5668
7870
  user_id: string;
5669
7871
  };
@@ -5671,7 +7873,13 @@ export type Database = {
5671
7873
  connection_id?: string | null;
5672
7874
  created_at?: string;
5673
7875
  data?: Json;
7876
+ floriday_id?: string | null;
7877
+ floriday_link_error?: string | null;
7878
+ floriday_link_status?: string;
5674
7879
  id?: string;
7880
+ last_floriday_sync_at?: string | null;
7881
+ missing_required_fields?: string[];
7882
+ source?: string;
5675
7883
  updated_at?: string;
5676
7884
  user_id: string;
5677
7885
  };
@@ -5679,7 +7887,55 @@ export type Database = {
5679
7887
  connection_id?: string | null;
5680
7888
  created_at?: string;
5681
7889
  data?: Json;
7890
+ floriday_id?: string | null;
7891
+ floriday_link_error?: string | null;
7892
+ floriday_link_status?: string;
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;
5682
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;
5683
7939
  updated_at?: string;
5684
7940
  user_id?: string;
5685
7941
  };
@@ -6035,6 +8291,7 @@ export type Database = {
6035
8291
  };
6036
8292
  twinfield_invoice_sync_logs: {
6037
8293
  Row: {
8294
+ action_type: string | null;
6038
8295
  created_at: string;
6039
8296
  details: Json | null;
6040
8297
  duration_ms: number | null;
@@ -6047,6 +8304,7 @@ export type Database = {
6047
8304
  user_id: string;
6048
8305
  };
6049
8306
  Insert: {
8307
+ action_type?: string | null;
6050
8308
  created_at?: string;
6051
8309
  details?: Json | null;
6052
8310
  duration_ms?: number | null;
@@ -6059,6 +8317,7 @@ export type Database = {
6059
8317
  user_id: string;
6060
8318
  };
6061
8319
  Update: {
8320
+ action_type?: string | null;
6062
8321
  created_at?: string;
6063
8322
  details?: Json | null;
6064
8323
  duration_ms?: number | null;
@@ -6298,6 +8557,57 @@ export type Database = {
6298
8557
  }
6299
8558
  ];
6300
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
+ };
6301
8611
  twinfield_settings: {
6302
8612
  Row: {
6303
8613
  active_environment: string;
@@ -6415,6 +8725,117 @@ export type Database = {
6415
8725
  }
6416
8726
  ];
6417
8727
  };
8728
+ voorraad_media_upload_failures: {
8729
+ Row: {
8730
+ action: string;
8731
+ attempt_number: number;
8732
+ caller: string;
8733
+ client_user_id: string | null;
8734
+ content_type: string | null;
8735
+ created_at: string;
8736
+ environment: string;
8737
+ error_message: string | null;
8738
+ filename: string | null;
8739
+ id: string;
8740
+ idempotency_key: string | null;
8741
+ module: string;
8742
+ path: string;
8743
+ reference_id: string | null;
8744
+ request_body_hash: string | null;
8745
+ request_timestamp: number | null;
8746
+ response_content_type: string | null;
8747
+ response_status: number | null;
8748
+ size_bytes: number | null;
8749
+ };
8750
+ Insert: {
8751
+ action?: string;
8752
+ attempt_number?: number;
8753
+ caller?: string;
8754
+ client_user_id?: string | null;
8755
+ content_type?: string | null;
8756
+ created_at?: string;
8757
+ environment: string;
8758
+ error_message?: string | null;
8759
+ filename?: string | null;
8760
+ id?: string;
8761
+ idempotency_key?: string | null;
8762
+ module?: string;
8763
+ path: string;
8764
+ reference_id?: string | null;
8765
+ request_body_hash?: string | null;
8766
+ request_timestamp?: number | null;
8767
+ response_content_type?: string | null;
8768
+ response_status?: number | null;
8769
+ size_bytes?: number | null;
8770
+ };
8771
+ Update: {
8772
+ action?: string;
8773
+ attempt_number?: number;
8774
+ caller?: string;
8775
+ client_user_id?: string | null;
8776
+ content_type?: string | null;
8777
+ created_at?: string;
8778
+ environment?: string;
8779
+ error_message?: string | null;
8780
+ filename?: string | null;
8781
+ id?: string;
8782
+ idempotency_key?: string | null;
8783
+ module?: string;
8784
+ path?: string;
8785
+ reference_id?: string | null;
8786
+ request_body_hash?: string | null;
8787
+ request_timestamp?: number | null;
8788
+ response_content_type?: string | null;
8789
+ response_status?: number | null;
8790
+ size_bytes?: number | null;
8791
+ };
8792
+ Relationships: [];
8793
+ };
8794
+ voorraad_publish_attempts: {
8795
+ Row: {
8796
+ action: string;
8797
+ connection_id: string | null;
8798
+ created_at: string;
8799
+ error: string | null;
8800
+ gateway_attempt_id: string | null;
8801
+ gateway_status: number | null;
8802
+ id: string;
8803
+ intent: string;
8804
+ ok: boolean;
8805
+ request_summary: Json | null;
8806
+ trade_item_id: string | null;
8807
+ user_id: string;
8808
+ };
8809
+ Insert: {
8810
+ action: string;
8811
+ connection_id?: string | null;
8812
+ created_at?: string;
8813
+ error?: string | null;
8814
+ gateway_attempt_id?: string | null;
8815
+ gateway_status?: number | null;
8816
+ id?: string;
8817
+ intent: string;
8818
+ ok: boolean;
8819
+ request_summary?: Json | null;
8820
+ trade_item_id?: string | null;
8821
+ user_id: string;
8822
+ };
8823
+ Update: {
8824
+ action?: string;
8825
+ connection_id?: string | null;
8826
+ created_at?: string;
8827
+ error?: string | null;
8828
+ gateway_attempt_id?: string | null;
8829
+ gateway_status?: number | null;
8830
+ id?: string;
8831
+ intent?: string;
8832
+ ok?: boolean;
8833
+ request_summary?: Json | null;
8834
+ trade_item_id?: string | null;
8835
+ user_id?: string;
8836
+ };
8837
+ Relationships: [];
8838
+ };
6418
8839
  work_order_monteurs: {
6419
8840
  Row: {
6420
8841
  created_at: string;
@@ -6780,6 +9201,37 @@ export type Database = {
6780
9201
  };
6781
9202
  Relationships: [];
6782
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
+ };
6783
9235
  v_external_customers_exact: {
6784
9236
  Row: {
6785
9237
  account_number: string | null;
@@ -7033,13 +9485,81 @@ export type Database = {
7033
9485
  }
7034
9486
  ];
7035
9487
  };
7036
- };
7037
- Functions: {
7038
- call_exact_route: {
9488
+ };
9489
+ Functions: {
9490
+ _floriday_schedule_job: {
9491
+ Args: {
9492
+ p_apikey: string;
9493
+ p_jobname: string;
9494
+ p_schedule: string;
9495
+ p_timeout_ms: number;
9496
+ p_url: string;
9497
+ };
9498
+ Returns: number;
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
+ };
9523
+ call_exact_route: {
9524
+ Args: {
9525
+ path: string;
9526
+ };
9527
+ Returns: number;
9528
+ };
9529
+ cleanup_old_bookings: {
9530
+ Args: never;
9531
+ Returns: number;
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
+ };
9549
+ current_monteur_id: {
9550
+ Args: never;
9551
+ Returns: string;
9552
+ };
9553
+ dashboard_alert_counts: {
9554
+ Args: never;
9555
+ Returns: Json;
9556
+ };
9557
+ dashboard_alert_rows: {
7039
9558
  Args: {
7040
- path: string;
9559
+ check_id: string;
9560
+ row_limit?: number;
7041
9561
  };
7042
- Returns: number;
9562
+ Returns: Json;
7043
9563
  };
7044
9564
  dashboard_list_public_schema: {
7045
9565
  Args: never;
@@ -7121,6 +9641,13 @@ export type Database = {
7121
9641
  };
7122
9642
  Returns: boolean;
7123
9643
  };
9644
+ format_cart_number: {
9645
+ Args: {
9646
+ p_pick_date: string;
9647
+ p_seq: number;
9648
+ };
9649
+ Returns: string;
9650
+ };
7124
9651
  get_active_floriday_connection_public: {
7125
9652
  Args: never;
7126
9653
  Returns: {
@@ -7145,6 +9672,32 @@ export type Database = {
7145
9672
  office_code: string;
7146
9673
  }[];
7147
9674
  };
9675
+ get_floriday_agreements_active: {
9676
+ Args: {
9677
+ p_on_date?: string;
9678
+ };
9679
+ Returns: {
9680
+ buyer_organization_id: string;
9681
+ data: Json;
9682
+ floriday_id: string;
9683
+ status: string;
9684
+ valid_from: string;
9685
+ valid_until: string;
9686
+ }[];
9687
+ };
9688
+ get_floriday_clock_supplies_window: {
9689
+ Args: {
9690
+ p_from: string;
9691
+ p_to: string;
9692
+ };
9693
+ Returns: {
9694
+ auction_date: string;
9695
+ data: Json;
9696
+ floriday_id: string;
9697
+ status: string;
9698
+ trade_item_id: string;
9699
+ }[];
9700
+ };
7148
9701
  get_floriday_cron_jobs: {
7149
9702
  Args: never;
7150
9703
  Returns: {
@@ -7154,12 +9707,68 @@ export type Database = {
7154
9707
  url: string;
7155
9708
  }[];
7156
9709
  };
9710
+ get_floriday_delivery_locations: {
9711
+ Args: {
9712
+ p_organization_id: string;
9713
+ };
9714
+ Returns: {
9715
+ data: Json;
9716
+ floriday_id: string;
9717
+ gln_code: string;
9718
+ name: string;
9719
+ }[];
9720
+ };
9721
+ get_floriday_fulfillment_orders_window: {
9722
+ Args: {
9723
+ p_from: string;
9724
+ p_to: string;
9725
+ };
9726
+ Returns: {
9727
+ auction_date: string;
9728
+ data: Json;
9729
+ delivery_order_id: string;
9730
+ destination_warehouse_id: string;
9731
+ floriday_id: string;
9732
+ status: string;
9733
+ }[];
9734
+ };
9735
+ get_floriday_sales_orders_window: {
9736
+ Args: {
9737
+ p_from: string;
9738
+ p_to: string;
9739
+ };
9740
+ Returns: {
9741
+ buyer_organization_id: string;
9742
+ data: Json;
9743
+ floriday_id: string;
9744
+ status: string;
9745
+ updated_at: string;
9746
+ }[];
9747
+ };
9748
+ get_floriday_sync_health: {
9749
+ Args: never;
9750
+ Returns: {
9751
+ entity_type: string;
9752
+ last_error: string;
9753
+ last_items_processed: number;
9754
+ last_sequence_number: number;
9755
+ last_success_at: string;
9756
+ last_synced_at: string;
9757
+ minutes_since_success: number;
9758
+ }[];
9759
+ };
7157
9760
  get_offer_by_link_code: {
7158
9761
  Args: {
7159
9762
  p_code: string;
7160
9763
  };
7161
9764
  Returns: Json;
7162
9765
  };
9766
+ get_or_assign_floriday_order_number: {
9767
+ Args: {
9768
+ p_floriday_id: string;
9769
+ };
9770
+ Returns: string;
9771
+ };
7163
9772
  get_room_busy_windows: {
7164
9773
  Args: {
7165
9774
  p_from: string;
@@ -7206,6 +9815,12 @@ export type Database = {
7206
9815
  Args: never;
7207
9816
  Returns: boolean;
7208
9817
  };
9818
+ next_order_number: {
9819
+ Args: {
9820
+ p_prefix: string;
9821
+ };
9822
+ Returns: string;
9823
+ };
7209
9824
  next_work_order_number: {
7210
9825
  Args: {
7211
9826
  p_parent_work_order_id?: string;
@@ -7219,6 +9834,89 @@ export type Database = {
7219
9834
  };
7220
9835
  Returns: string;
7221
9836
  };
9837
+ pickstation_get_orders_raw: {
9838
+ Args: never;
9839
+ Returns: Json;
9840
+ };
9841
+ pickstation_get_settings: {
9842
+ Args: never;
9843
+ Returns: Json;
9844
+ };
9845
+ pickstation_log_print: {
9846
+ Args: {
9847
+ p_customer_name: string;
9848
+ p_documents: string[];
9849
+ p_ip_address: string;
9850
+ p_order_id: string;
9851
+ p_order_number: string;
9852
+ };
9853
+ Returns: undefined;
9854
+ };
9855
+ pickstation_set_cart_status: {
9856
+ Args: {
9857
+ p_cart_index: number;
9858
+ p_order_id: string;
9859
+ p_order_source: string;
9860
+ p_status: string;
9861
+ };
9862
+ Returns: undefined;
9863
+ };
9864
+ refresh_floricode_derived_code_lists: {
9865
+ Args: never;
9866
+ Returns: {
9867
+ environment: string;
9868
+ list_name: string;
9869
+ row_count: number;
9870
+ }[];
9871
+ };
9872
+ refresh_floricode_derived_for_product: {
9873
+ Args: {
9874
+ p_product_code: string;
9875
+ };
9876
+ Returns: number;
9877
+ };
9878
+ reset_floriday_sync_cursor: {
9879
+ Args: {
9880
+ p_connection_id: string;
9881
+ p_entity_type: string;
9882
+ };
9883
+ Returns: undefined;
9884
+ };
9885
+ schedule_floriday_additional_services_sync: {
9886
+ Args: {
9887
+ p_apikey: string;
9888
+ p_url: string;
9889
+ };
9890
+ Returns: number;
9891
+ };
9892
+ schedule_floriday_agreement_calloffs_sync: {
9893
+ Args: {
9894
+ p_apikey: string;
9895
+ p_url: string;
9896
+ };
9897
+ Returns: number;
9898
+ };
9899
+ schedule_floriday_agreements_sync: {
9900
+ Args: {
9901
+ p_apikey: string;
9902
+ p_url: string;
9903
+ };
9904
+ Returns: number;
9905
+ };
9906
+ schedule_floriday_base_items_sync: {
9907
+ Args: {
9908
+ p_apikey: string;
9909
+ p_url: string;
9910
+ };
9911
+ Returns: number;
9912
+ };
9913
+ schedule_floriday_blanket_orders_sync: {
9914
+ Args: {
9915
+ p_apikey: string;
9916
+ p_url: string;
9917
+ };
9918
+ Returns: number;
9919
+ };
7222
9920
  schedule_floriday_carriers_sync: {
7223
9921
  Args: {
7224
9922
  p_apikey: string;
@@ -7226,6 +9924,34 @@ export type Database = {
7226
9924
  };
7227
9925
  Returns: number;
7228
9926
  };
9927
+ schedule_floriday_clock_presales_sync: {
9928
+ Args: {
9929
+ p_apikey: string;
9930
+ p_url: string;
9931
+ };
9932
+ Returns: number;
9933
+ };
9934
+ schedule_floriday_clock_supplies_sync: {
9935
+ Args: {
9936
+ p_apikey: string;
9937
+ p_url: string;
9938
+ };
9939
+ Returns: number;
9940
+ };
9941
+ schedule_floriday_collections_sync: {
9942
+ Args: {
9943
+ p_apikey: string;
9944
+ p_url: string;
9945
+ };
9946
+ Returns: number;
9947
+ };
9948
+ schedule_floriday_commercial_service_types_sync: {
9949
+ Args: {
9950
+ p_apikey: string;
9951
+ p_url: string;
9952
+ };
9953
+ Returns: number;
9954
+ };
7229
9955
  schedule_floriday_connections_sync: {
7230
9956
  Args: {
7231
9957
  p_apikey: string;
@@ -7233,6 +9959,20 @@ export type Database = {
7233
9959
  };
7234
9960
  Returns: number;
7235
9961
  };
9962
+ schedule_floriday_contract_trade_item_groups_sync: {
9963
+ Args: {
9964
+ p_apikey: string;
9965
+ p_url: string;
9966
+ };
9967
+ Returns: number;
9968
+ };
9969
+ schedule_floriday_contracts_sync: {
9970
+ Args: {
9971
+ p_apikey: string;
9972
+ p_url: string;
9973
+ };
9974
+ Returns: number;
9975
+ };
7236
9976
  schedule_floriday_customer_organizations_sync: {
7237
9977
  Args: {
7238
9978
  p_apikey: string;
@@ -7240,6 +9980,48 @@ export type Database = {
7240
9980
  };
7241
9981
  Returns: number;
7242
9982
  };
9983
+ schedule_floriday_customer_stickers_sync: {
9984
+ Args: {
9985
+ p_apikey: string;
9986
+ p_url: string;
9987
+ };
9988
+ Returns: number;
9989
+ };
9990
+ schedule_floriday_delivery_condition_sets_sync: {
9991
+ Args: {
9992
+ p_apikey: string;
9993
+ p_url: string;
9994
+ };
9995
+ Returns: number;
9996
+ };
9997
+ schedule_floriday_delivery_locations_sync: {
9998
+ Args: {
9999
+ p_apikey: string;
10000
+ p_url: string;
10001
+ };
10002
+ Returns: number;
10003
+ };
10004
+ schedule_floriday_delivery_orders_sync: {
10005
+ Args: {
10006
+ p_apikey: string;
10007
+ p_url: string;
10008
+ };
10009
+ Returns: number;
10010
+ };
10011
+ schedule_floriday_fulfillment_orders_sync: {
10012
+ Args: {
10013
+ p_apikey: string;
10014
+ p_url: string;
10015
+ };
10016
+ Returns: number;
10017
+ };
10018
+ schedule_floriday_invoices_sync: {
10019
+ Args: {
10020
+ p_apikey: string;
10021
+ p_url: string;
10022
+ };
10023
+ Returns: number;
10024
+ };
7243
10025
  schedule_floriday_network_sync: {
7244
10026
  Args: {
7245
10027
  p_apikey: string;
@@ -7247,6 +10029,34 @@ export type Database = {
7247
10029
  };
7248
10030
  Returns: number;
7249
10031
  };
10032
+ schedule_floriday_packings_sync: {
10033
+ Args: {
10034
+ p_apikey: string;
10035
+ p_url: string;
10036
+ };
10037
+ Returns: number;
10038
+ };
10039
+ schedule_floriday_price_groups_sync: {
10040
+ Args: {
10041
+ p_apikey: string;
10042
+ p_url: string;
10043
+ };
10044
+ Returns: number;
10045
+ };
10046
+ schedule_floriday_reference_data_refresh: {
10047
+ Args: {
10048
+ p_apikey: string;
10049
+ p_url: string;
10050
+ };
10051
+ Returns: number;
10052
+ };
10053
+ schedule_floriday_sales_strategies_sync: {
10054
+ Args: {
10055
+ p_apikey: string;
10056
+ p_url: string;
10057
+ };
10058
+ Returns: number;
10059
+ };
7250
10060
  schedule_floriday_salesorders_sync: {
7251
10061
  Args: {
7252
10062
  p_apikey: string;
@@ -7261,6 +10071,13 @@ export type Database = {
7261
10071
  };
7262
10072
  Returns: number;
7263
10073
  };
10074
+ schedule_floriday_trade_item_classifications_sync: {
10075
+ Args: {
10076
+ p_apikey: string;
10077
+ p_url: string;
10078
+ };
10079
+ Returns: number;
10080
+ };
7264
10081
  schedule_floriday_trade_items_sync: {
7265
10082
  Args: {
7266
10083
  p_apikey: string;
@@ -7268,6 +10085,20 @@ export type Database = {
7268
10085
  };
7269
10086
  Returns: number;
7270
10087
  };
10088
+ schedule_floriday_trips_sync: {
10089
+ Args: {
10090
+ p_apikey: string;
10091
+ p_url: string;
10092
+ };
10093
+ Returns: number;
10094
+ };
10095
+ schedule_floriday_warehouses_sync: {
10096
+ Args: {
10097
+ p_apikey: string;
10098
+ p_url: string;
10099
+ };
10100
+ Returns: number;
10101
+ };
7271
10102
  schedule_twinfield_customers_sync: {
7272
10103
  Args: {
7273
10104
  p_apikey: string;
@@ -7342,7 +10173,7 @@ export type Database = {
7342
10173
  };
7343
10174
  };
7344
10175
  Enums: {
7345
- app_role: "admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie";
10176
+ app_role: "admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie" | "monteur";
7346
10177
  exact_env: "staging" | "live";
7347
10178
  exact_push_status: "pending" | "sent" | "error";
7348
10179
  quote_status: "concept" | "verzonden" | "bekeken" | "in_behandeling" | "geaccepteerd" | "afgewezen" | "verlopen" | "gearchiveerd";
@@ -7404,7 +10235,7 @@ export type CompositeTypes<PublicCompositeTypeNameOrOptions extends keyof Defaul
7404
10235
  export declare const Constants: {
7405
10236
  readonly public: {
7406
10237
  readonly Enums: {
7407
- readonly app_role: readonly ["admin", "manager", "warehouse", "sales", "developer", "receptie"];
10238
+ readonly app_role: readonly ["admin", "manager", "warehouse", "sales", "developer", "receptie", "monteur"];
7408
10239
  readonly exact_env: readonly ["staging", "live"];
7409
10240
  readonly exact_push_status: readonly ["pending", "sent", "error"];
7410
10241
  readonly quote_status: readonly ["concept", "verzonden", "bekeken", "in_behandeling", "geaccepteerd", "afgewezen", "verlopen", "gearchiveerd"];