@flowselections/floriday-afhandeling-module 1.0.3 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,6 +7,192 @@ export type Database = {
7
7
  };
8
8
  public: {
9
9
  Tables: {
10
+ agenda_connections: {
11
+ Row: {
12
+ account_email: string | null;
13
+ created_at: string;
14
+ id: string;
15
+ last_error: string | null;
16
+ last_synced_at: string | null;
17
+ provider: string;
18
+ selected_calendars: Json;
19
+ status: string;
20
+ sync_mode: string;
21
+ updated_at: string;
22
+ user_id: string;
23
+ };
24
+ Insert: {
25
+ account_email?: string | null;
26
+ created_at?: string;
27
+ id?: string;
28
+ last_error?: string | null;
29
+ last_synced_at?: string | null;
30
+ provider: string;
31
+ selected_calendars?: Json;
32
+ status?: string;
33
+ sync_mode?: string;
34
+ updated_at?: string;
35
+ user_id: string;
36
+ };
37
+ Update: {
38
+ account_email?: string | null;
39
+ created_at?: string;
40
+ id?: string;
41
+ last_error?: string | null;
42
+ last_synced_at?: string | null;
43
+ provider?: string;
44
+ selected_calendars?: Json;
45
+ status?: string;
46
+ sync_mode?: string;
47
+ updated_at?: string;
48
+ user_id?: string;
49
+ };
50
+ Relationships: [];
51
+ };
52
+ agenda_events: {
53
+ Row: {
54
+ all_day: boolean;
55
+ calendar_id: string;
56
+ category: string | null;
57
+ color: string;
58
+ created_at: string;
59
+ description: string | null;
60
+ end_at: string;
61
+ external_id: string | null;
62
+ external_provider: string | null;
63
+ id: string;
64
+ linked_data: Json;
65
+ location: string | null;
66
+ notes: string | null;
67
+ recurrence: string | null;
68
+ reminders: Json;
69
+ source_id: string | null;
70
+ source_module: string;
71
+ source_type: string | null;
72
+ start_at: string;
73
+ status: string;
74
+ title: string;
75
+ updated_at: string;
76
+ user_id: string;
77
+ };
78
+ Insert: {
79
+ all_day?: boolean;
80
+ calendar_id?: string;
81
+ category?: string | null;
82
+ color?: string;
83
+ created_at?: string;
84
+ description?: string | null;
85
+ end_at: string;
86
+ external_id?: string | null;
87
+ external_provider?: string | null;
88
+ id?: string;
89
+ linked_data?: Json;
90
+ location?: string | null;
91
+ notes?: string | null;
92
+ recurrence?: string | null;
93
+ reminders?: Json;
94
+ source_id?: string | null;
95
+ source_module?: string;
96
+ source_type?: string | null;
97
+ start_at: string;
98
+ status?: string;
99
+ title: string;
100
+ updated_at?: string;
101
+ user_id: string;
102
+ };
103
+ Update: {
104
+ all_day?: boolean;
105
+ calendar_id?: string;
106
+ category?: string | null;
107
+ color?: string;
108
+ created_at?: string;
109
+ description?: string | null;
110
+ end_at?: string;
111
+ external_id?: string | null;
112
+ external_provider?: string | null;
113
+ id?: string;
114
+ linked_data?: Json;
115
+ location?: string | null;
116
+ notes?: string | null;
117
+ recurrence?: string | null;
118
+ reminders?: Json;
119
+ source_id?: string | null;
120
+ source_module?: string;
121
+ source_type?: string | null;
122
+ start_at?: string;
123
+ status?: string;
124
+ title?: string;
125
+ updated_at?: string;
126
+ user_id?: string;
127
+ };
128
+ Relationships: [];
129
+ };
130
+ agenda_oauth_tokens: {
131
+ Row: {
132
+ access_token: string | null;
133
+ created_at: string;
134
+ id: string;
135
+ provider: string;
136
+ refresh_token: string | null;
137
+ scope: string | null;
138
+ token_expires_at: string | null;
139
+ updated_at: string;
140
+ user_id: string;
141
+ };
142
+ Insert: {
143
+ access_token?: string | null;
144
+ created_at?: string;
145
+ id?: string;
146
+ provider: string;
147
+ refresh_token?: string | null;
148
+ scope?: string | null;
149
+ token_expires_at?: string | null;
150
+ updated_at?: string;
151
+ user_id: string;
152
+ };
153
+ Update: {
154
+ access_token?: string | null;
155
+ created_at?: string;
156
+ id?: string;
157
+ provider?: string;
158
+ refresh_token?: string | null;
159
+ scope?: string | null;
160
+ token_expires_at?: string | null;
161
+ updated_at?: string;
162
+ user_id?: string;
163
+ };
164
+ Relationships: [];
165
+ };
166
+ agenda_settings: {
167
+ Row: {
168
+ color_map: Json;
169
+ created_at: string;
170
+ default_calendar_id: string;
171
+ default_view: string;
172
+ settings: Json;
173
+ updated_at: string;
174
+ user_id: string;
175
+ };
176
+ Insert: {
177
+ color_map?: Json;
178
+ created_at?: string;
179
+ default_calendar_id?: string;
180
+ default_view?: string;
181
+ settings?: Json;
182
+ updated_at?: string;
183
+ user_id: string;
184
+ };
185
+ Update: {
186
+ color_map?: Json;
187
+ created_at?: string;
188
+ default_calendar_id?: string;
189
+ default_view?: string;
190
+ settings?: Json;
191
+ updated_at?: string;
192
+ user_id?: string;
193
+ };
194
+ Relationships: [];
195
+ };
10
196
  bugs: {
11
197
  Row: {
12
198
  attachment_url: string | null;
@@ -493,452 +679,2232 @@ export type Database = {
493
679
  };
494
680
  Relationships: [];
495
681
  };
496
- exact_connections: {
682
+ dashboard_ai_conversations: {
497
683
  Row: {
498
- access_token_encrypted: string;
499
- company_name: string | null;
500
- connected_at: string;
501
- connected_by: string | null;
502
- division_code: number | null;
503
- environment: Database["public"]["Enums"]["exact_env"];
504
- expires_at: string;
684
+ created_at: string;
505
685
  id: string;
506
- refresh_token_encrypted: string;
507
- status: string;
686
+ messages: Json;
687
+ page_id: string | null;
688
+ title: string | null;
508
689
  updated_at: string;
690
+ user_id: string;
509
691
  };
510
692
  Insert: {
511
- access_token_encrypted: string;
512
- company_name?: string | null;
513
- connected_at?: string;
514
- connected_by?: string | null;
515
- division_code?: number | null;
516
- environment: Database["public"]["Enums"]["exact_env"];
517
- expires_at: string;
693
+ created_at?: string;
518
694
  id?: string;
519
- refresh_token_encrypted: string;
520
- status?: string;
695
+ messages?: Json;
696
+ page_id?: string | null;
697
+ title?: string | null;
521
698
  updated_at?: string;
699
+ user_id: string;
522
700
  };
523
701
  Update: {
524
- access_token_encrypted?: string;
525
- company_name?: string | null;
526
- connected_at?: string;
527
- connected_by?: string | null;
528
- division_code?: number | null;
529
- environment?: Database["public"]["Enums"]["exact_env"];
530
- expires_at?: string;
702
+ created_at?: string;
531
703
  id?: string;
532
- refresh_token_encrypted?: string;
533
- status?: string;
704
+ messages?: Json;
705
+ page_id?: string | null;
706
+ title?: string | null;
534
707
  updated_at?: string;
708
+ user_id?: string;
535
709
  };
536
- Relationships: [];
710
+ Relationships: [
711
+ {
712
+ foreignKeyName: "dashboard_ai_conversations_page_id_fkey";
713
+ columns: ["page_id"];
714
+ isOneToOne: false;
715
+ referencedRelation: "dashboard_pages";
716
+ referencedColumns: ["id"];
717
+ }
718
+ ];
537
719
  };
538
- exact_credentials: {
720
+ dashboard_alert_events: {
539
721
  Row: {
540
- client_id: string;
541
- client_secret_encrypted: string;
722
+ acknowledged: boolean;
723
+ block_id: string;
542
724
  created_at: string;
543
- environment: Database["public"]["Enums"]["exact_env"];
544
725
  id: string;
545
- redirect_uri: string;
546
- updated_at: string;
726
+ message: string | null;
727
+ page_id: string;
728
+ severity: string;
729
+ threshold: number | null;
730
+ user_id: string;
731
+ value: number | null;
547
732
  };
548
733
  Insert: {
549
- client_id: string;
550
- client_secret_encrypted: string;
734
+ acknowledged?: boolean;
735
+ block_id: string;
551
736
  created_at?: string;
552
- environment: Database["public"]["Enums"]["exact_env"];
553
737
  id?: string;
554
- redirect_uri: string;
555
- updated_at?: string;
738
+ message?: string | null;
739
+ page_id: string;
740
+ severity?: string;
741
+ threshold?: number | null;
742
+ user_id: string;
743
+ value?: number | null;
556
744
  };
557
745
  Update: {
558
- client_id?: string;
559
- client_secret_encrypted?: string;
746
+ acknowledged?: boolean;
747
+ block_id?: string;
560
748
  created_at?: string;
561
- environment?: Database["public"]["Enums"]["exact_env"];
562
749
  id?: string;
563
- redirect_uri?: string;
564
- updated_at?: string;
750
+ message?: string | null;
751
+ page_id?: string;
752
+ severity?: string;
753
+ threshold?: number | null;
754
+ user_id?: string;
755
+ value?: number | null;
565
756
  };
566
- Relationships: [];
757
+ Relationships: [
758
+ {
759
+ foreignKeyName: "dashboard_alert_events_block_id_fkey";
760
+ columns: ["block_id"];
761
+ isOneToOne: false;
762
+ referencedRelation: "dashboard_blocks";
763
+ referencedColumns: ["id"];
764
+ },
765
+ {
766
+ foreignKeyName: "dashboard_alert_events_page_id_fkey";
767
+ columns: ["page_id"];
768
+ isOneToOne: false;
769
+ referencedRelation: "dashboard_pages";
770
+ referencedColumns: ["id"];
771
+ }
772
+ ];
567
773
  };
568
- exact_customers_cache: {
774
+ dashboard_block_templates: {
569
775
  Row: {
570
- connection_id: string;
571
- data: Json;
572
- exact_id: string;
573
- fetched_at: string;
776
+ config: Json;
777
+ created_at: string;
778
+ description: string | null;
779
+ id: string;
780
+ is_public: boolean;
781
+ name: string;
782
+ type: string;
783
+ updated_at: string;
784
+ user_id: string;
574
785
  };
575
786
  Insert: {
576
- connection_id: string;
577
- data?: Json;
578
- exact_id: string;
579
- fetched_at?: string;
787
+ config?: Json;
788
+ created_at?: string;
789
+ description?: string | null;
790
+ id?: string;
791
+ is_public?: boolean;
792
+ name: string;
793
+ type: string;
794
+ updated_at?: string;
795
+ user_id: string;
580
796
  };
581
797
  Update: {
582
- connection_id?: string;
583
- data?: Json;
584
- exact_id?: string;
585
- fetched_at?: string;
798
+ config?: Json;
799
+ created_at?: string;
800
+ description?: string | null;
801
+ id?: string;
802
+ is_public?: boolean;
803
+ name?: string;
804
+ type?: string;
805
+ updated_at?: string;
806
+ user_id?: string;
586
807
  };
587
808
  Relationships: [];
588
809
  };
589
- exact_sync_state: {
810
+ dashboard_blocks: {
590
811
  Row: {
591
- connection_id: string;
592
- last_error: string | null;
593
- last_modified_cursor: string | null;
594
- last_synced_at: string | null;
595
- status: string;
812
+ config: Json;
813
+ created_at: string;
814
+ filters: Json;
815
+ id: string;
816
+ layout: Json;
817
+ page_id: string;
818
+ permissions: Json;
819
+ sort_order: number;
820
+ title: string;
821
+ type: string;
596
822
  updated_at: string;
597
823
  };
598
824
  Insert: {
599
- connection_id: string;
600
- last_error?: string | null;
601
- last_modified_cursor?: string | null;
602
- last_synced_at?: string | null;
603
- status?: string;
825
+ config?: Json;
826
+ created_at?: string;
827
+ filters?: Json;
828
+ id?: string;
829
+ layout?: Json;
830
+ page_id: string;
831
+ permissions?: Json;
832
+ sort_order?: number;
833
+ title: string;
834
+ type: string;
604
835
  updated_at?: string;
605
836
  };
606
837
  Update: {
607
- connection_id?: string;
608
- last_error?: string | null;
609
- last_modified_cursor?: string | null;
610
- last_synced_at?: string | null;
611
- status?: string;
838
+ config?: Json;
839
+ created_at?: string;
840
+ filters?: Json;
841
+ id?: string;
842
+ layout?: Json;
843
+ page_id?: string;
844
+ permissions?: Json;
845
+ sort_order?: number;
846
+ title?: string;
847
+ type?: string;
612
848
  updated_at?: string;
613
849
  };
614
- Relationships: [];
850
+ Relationships: [
851
+ {
852
+ foreignKeyName: "dashboard_blocks_page_id_fkey";
853
+ columns: ["page_id"];
854
+ isOneToOne: false;
855
+ referencedRelation: "dashboard_pages";
856
+ referencedColumns: ["id"];
857
+ }
858
+ ];
615
859
  };
616
- floricode_connection_settings: {
860
+ dashboard_daily_reports: {
617
861
  Row: {
618
- catalog_key: string | null;
619
- catalog_url: string;
620
862
  created_at: string;
621
- id: number;
622
- last_meta: Json | null;
623
- last_test_at: string | null;
624
- last_test_error: string | null;
625
- last_test_ok: boolean | null;
626
- updated_at: string;
863
+ highlights: Json | null;
864
+ id: string;
865
+ page_id: string;
866
+ summary: string;
867
+ user_id: string;
627
868
  };
628
869
  Insert: {
629
- catalog_key?: string | null;
870
+ created_at?: string;
871
+ highlights?: Json | null;
872
+ id?: string;
873
+ page_id: string;
874
+ summary: string;
875
+ user_id: string;
876
+ };
877
+ Update: {
878
+ created_at?: string;
879
+ highlights?: Json | null;
880
+ id?: string;
881
+ page_id?: string;
882
+ summary?: string;
883
+ user_id?: string;
884
+ };
885
+ Relationships: [
886
+ {
887
+ foreignKeyName: "dashboard_daily_reports_page_id_fkey";
888
+ columns: ["page_id"];
889
+ isOneToOne: false;
890
+ referencedRelation: "dashboard_pages";
891
+ referencedColumns: ["id"];
892
+ }
893
+ ];
894
+ };
895
+ dashboard_pages: {
896
+ Row: {
897
+ created_at: string;
898
+ icon: string | null;
899
+ id: string;
900
+ is_default: boolean;
901
+ name: string;
902
+ shared_with: string[];
903
+ sort_order: number;
904
+ updated_at: string;
905
+ user_id: string;
906
+ };
907
+ Insert: {
908
+ created_at?: string;
909
+ icon?: string | null;
910
+ id?: string;
911
+ is_default?: boolean;
912
+ name: string;
913
+ shared_with?: string[];
914
+ sort_order?: number;
915
+ updated_at?: string;
916
+ user_id: string;
917
+ };
918
+ Update: {
919
+ created_at?: string;
920
+ icon?: string | null;
921
+ id?: string;
922
+ is_default?: boolean;
923
+ name?: string;
924
+ shared_with?: string[];
925
+ sort_order?: number;
926
+ updated_at?: string;
927
+ user_id?: string;
928
+ };
929
+ Relationships: [];
930
+ };
931
+ dashboard_saved_queries: {
932
+ Row: {
933
+ created_at: string;
934
+ description: string | null;
935
+ id: string;
936
+ name: string;
937
+ query_spec: Json;
938
+ updated_at: string;
939
+ user_id: string;
940
+ };
941
+ Insert: {
942
+ created_at?: string;
943
+ description?: string | null;
944
+ id?: string;
945
+ name: string;
946
+ query_spec: Json;
947
+ updated_at?: string;
948
+ user_id: string;
949
+ };
950
+ Update: {
951
+ created_at?: string;
952
+ description?: string | null;
953
+ id?: string;
954
+ name?: string;
955
+ query_spec?: Json;
956
+ updated_at?: string;
957
+ user_id?: string;
958
+ };
959
+ Relationships: [];
960
+ };
961
+ exact_account_analytics_cache: {
962
+ Row: {
963
+ account_id: string;
964
+ account_name: string | null;
965
+ avg_payment_days: number | null;
966
+ computed_at: string;
967
+ connection_id: string;
968
+ expires_at: string | null;
969
+ id: string;
970
+ invoice_count: number | null;
971
+ last_invoice_date: string | null;
972
+ last_payment_date: string | null;
973
+ open_balance: number | null;
974
+ overdue_balance: number | null;
975
+ total_revenue: number | null;
976
+ };
977
+ Insert: {
978
+ account_id: string;
979
+ account_name?: string | null;
980
+ avg_payment_days?: number | null;
981
+ computed_at?: string;
982
+ connection_id: string;
983
+ expires_at?: string | null;
984
+ id?: string;
985
+ invoice_count?: number | null;
986
+ last_invoice_date?: string | null;
987
+ last_payment_date?: string | null;
988
+ open_balance?: number | null;
989
+ overdue_balance?: number | null;
990
+ total_revenue?: number | null;
991
+ };
992
+ Update: {
993
+ account_id?: string;
994
+ account_name?: string | null;
995
+ avg_payment_days?: number | null;
996
+ computed_at?: string;
997
+ connection_id?: string;
998
+ expires_at?: string | null;
999
+ id?: string;
1000
+ invoice_count?: number | null;
1001
+ last_invoice_date?: string | null;
1002
+ last_payment_date?: string | null;
1003
+ open_balance?: number | null;
1004
+ overdue_balance?: number | null;
1005
+ total_revenue?: number | null;
1006
+ };
1007
+ Relationships: [
1008
+ {
1009
+ foreignKeyName: "exact_account_analytics_cache_connection_id_fkey";
1010
+ columns: ["connection_id"];
1011
+ isOneToOne: false;
1012
+ referencedRelation: "exact_connections";
1013
+ referencedColumns: ["id"];
1014
+ }
1015
+ ];
1016
+ };
1017
+ exact_analytics_cache: {
1018
+ Row: {
1019
+ analytics_type: string;
1020
+ avg_payment_days: number | null;
1021
+ computed_at: string;
1022
+ connection_id: string;
1023
+ data_raw: Json | null;
1024
+ expires_at: string | null;
1025
+ id: string;
1026
+ open_count: number | null;
1027
+ overdue_amount: number | null;
1028
+ paid_this_month: number | null;
1029
+ period_key: string;
1030
+ total_invoiced: number | null;
1031
+ total_open: number | null;
1032
+ };
1033
+ Insert: {
1034
+ analytics_type: string;
1035
+ avg_payment_days?: number | null;
1036
+ computed_at?: string;
1037
+ connection_id: string;
1038
+ data_raw?: Json | null;
1039
+ expires_at?: string | null;
1040
+ id?: string;
1041
+ open_count?: number | null;
1042
+ overdue_amount?: number | null;
1043
+ paid_this_month?: number | null;
1044
+ period_key: string;
1045
+ total_invoiced?: number | null;
1046
+ total_open?: number | null;
1047
+ };
1048
+ Update: {
1049
+ analytics_type?: string;
1050
+ avg_payment_days?: number | null;
1051
+ computed_at?: string;
1052
+ connection_id?: string;
1053
+ data_raw?: Json | null;
1054
+ expires_at?: string | null;
1055
+ id?: string;
1056
+ open_count?: number | null;
1057
+ overdue_amount?: number | null;
1058
+ paid_this_month?: number | null;
1059
+ period_key?: string;
1060
+ total_invoiced?: number | null;
1061
+ total_open?: number | null;
1062
+ };
1063
+ Relationships: [
1064
+ {
1065
+ foreignKeyName: "exact_analytics_cache_connection_id_fkey";
1066
+ columns: ["connection_id"];
1067
+ isOneToOne: false;
1068
+ referencedRelation: "exact_connections";
1069
+ referencedColumns: ["id"];
1070
+ }
1071
+ ];
1072
+ };
1073
+ exact_bulk_operation_items: {
1074
+ Row: {
1075
+ attempts: number;
1076
+ bulk_operation_id: string;
1077
+ created_at: string;
1078
+ error_message: string | null;
1079
+ id: string;
1080
+ invoice_cache_id: string | null;
1081
+ invoice_exact_id: string | null;
1082
+ processed_at: string | null;
1083
+ result_data: Json | null;
1084
+ status: string;
1085
+ };
1086
+ Insert: {
1087
+ attempts?: number;
1088
+ bulk_operation_id: string;
1089
+ created_at?: string;
1090
+ error_message?: string | null;
1091
+ id?: string;
1092
+ invoice_cache_id?: string | null;
1093
+ invoice_exact_id?: string | null;
1094
+ processed_at?: string | null;
1095
+ result_data?: Json | null;
1096
+ status?: string;
1097
+ };
1098
+ Update: {
1099
+ attempts?: number;
1100
+ bulk_operation_id?: string;
1101
+ created_at?: string;
1102
+ error_message?: string | null;
1103
+ id?: string;
1104
+ invoice_cache_id?: string | null;
1105
+ invoice_exact_id?: string | null;
1106
+ processed_at?: string | null;
1107
+ result_data?: Json | null;
1108
+ status?: string;
1109
+ };
1110
+ Relationships: [
1111
+ {
1112
+ foreignKeyName: "exact_bulk_operation_items_bulk_operation_id_fkey";
1113
+ columns: ["bulk_operation_id"];
1114
+ isOneToOne: false;
1115
+ referencedRelation: "exact_bulk_operations";
1116
+ referencedColumns: ["id"];
1117
+ },
1118
+ {
1119
+ foreignKeyName: "exact_bulk_operation_items_invoice_cache_id_fkey";
1120
+ columns: ["invoice_cache_id"];
1121
+ isOneToOne: false;
1122
+ referencedRelation: "exact_invoices_cache";
1123
+ referencedColumns: ["id"];
1124
+ }
1125
+ ];
1126
+ };
1127
+ exact_bulk_operations: {
1128
+ Row: {
1129
+ completed_at: string | null;
1130
+ connection_id: string;
1131
+ created_at: string;
1132
+ created_by: string | null;
1133
+ error_message: string | null;
1134
+ failed_count: number | null;
1135
+ id: string;
1136
+ operation_type: string;
1137
+ processed_count: number | null;
1138
+ result_data: Json | null;
1139
+ started_at: string | null;
1140
+ status: string;
1141
+ total_count: number | null;
1142
+ updated_at: string;
1143
+ };
1144
+ Insert: {
1145
+ completed_at?: string | null;
1146
+ connection_id: string;
1147
+ created_at?: string;
1148
+ created_by?: string | null;
1149
+ error_message?: string | null;
1150
+ failed_count?: number | null;
1151
+ id?: string;
1152
+ operation_type: string;
1153
+ processed_count?: number | null;
1154
+ result_data?: Json | null;
1155
+ started_at?: string | null;
1156
+ status?: string;
1157
+ total_count?: number | null;
1158
+ updated_at?: string;
1159
+ };
1160
+ Update: {
1161
+ completed_at?: string | null;
1162
+ connection_id?: string;
1163
+ created_at?: string;
1164
+ created_by?: string | null;
1165
+ error_message?: string | null;
1166
+ failed_count?: number | null;
1167
+ id?: string;
1168
+ operation_type?: string;
1169
+ processed_count?: number | null;
1170
+ result_data?: Json | null;
1171
+ started_at?: string | null;
1172
+ status?: string;
1173
+ total_count?: number | null;
1174
+ updated_at?: string;
1175
+ };
1176
+ Relationships: [
1177
+ {
1178
+ foreignKeyName: "exact_bulk_operations_connection_id_fkey";
1179
+ columns: ["connection_id"];
1180
+ isOneToOne: false;
1181
+ referencedRelation: "exact_connections";
1182
+ referencedColumns: ["id"];
1183
+ }
1184
+ ];
1185
+ };
1186
+ exact_connections: {
1187
+ Row: {
1188
+ access_token_encrypted: string;
1189
+ company_name: string | null;
1190
+ connected_at: string;
1191
+ connected_by: string | null;
1192
+ division_code: number | null;
1193
+ environment: Database["public"]["Enums"]["exact_env"];
1194
+ expires_at: string;
1195
+ id: string;
1196
+ last_error: string | null;
1197
+ last_refreshed_at: string | null;
1198
+ last_tested_at: string | null;
1199
+ refresh_token_encrypted: string;
1200
+ status: string;
1201
+ updated_at: string;
1202
+ };
1203
+ Insert: {
1204
+ access_token_encrypted: string;
1205
+ company_name?: string | null;
1206
+ connected_at?: string;
1207
+ connected_by?: string | null;
1208
+ division_code?: number | null;
1209
+ environment: Database["public"]["Enums"]["exact_env"];
1210
+ expires_at: string;
1211
+ id?: string;
1212
+ last_error?: string | null;
1213
+ last_refreshed_at?: string | null;
1214
+ last_tested_at?: string | null;
1215
+ refresh_token_encrypted: string;
1216
+ status?: string;
1217
+ updated_at?: string;
1218
+ };
1219
+ Update: {
1220
+ access_token_encrypted?: string;
1221
+ company_name?: string | null;
1222
+ connected_at?: string;
1223
+ connected_by?: string | null;
1224
+ division_code?: number | null;
1225
+ environment?: Database["public"]["Enums"]["exact_env"];
1226
+ expires_at?: string;
1227
+ id?: string;
1228
+ last_error?: string | null;
1229
+ last_refreshed_at?: string | null;
1230
+ last_tested_at?: string | null;
1231
+ refresh_token_encrypted?: string;
1232
+ status?: string;
1233
+ updated_at?: string;
1234
+ };
1235
+ Relationships: [];
1236
+ };
1237
+ exact_credentials: {
1238
+ Row: {
1239
+ client_id: string;
1240
+ client_secret_encrypted: string;
1241
+ created_at: string;
1242
+ environment: Database["public"]["Enums"]["exact_env"];
1243
+ id: string;
1244
+ redirect_uri: string;
1245
+ updated_at: string;
1246
+ };
1247
+ Insert: {
1248
+ client_id: string;
1249
+ client_secret_encrypted: string;
1250
+ created_at?: string;
1251
+ environment: Database["public"]["Enums"]["exact_env"];
1252
+ id?: string;
1253
+ redirect_uri?: string;
1254
+ updated_at?: string;
1255
+ };
1256
+ Update: {
1257
+ client_id?: string;
1258
+ client_secret_encrypted?: string;
1259
+ created_at?: string;
1260
+ environment?: Database["public"]["Enums"]["exact_env"];
1261
+ id?: string;
1262
+ redirect_uri?: string;
1263
+ updated_at?: string;
1264
+ };
1265
+ Relationships: [];
1266
+ };
1267
+ exact_customer_sync_queue: {
1268
+ Row: {
1269
+ attempts: number;
1270
+ connection_id: string;
1271
+ created_at: string;
1272
+ customer_exact_id: string | null;
1273
+ error_message: string | null;
1274
+ id: string;
1275
+ max_attempts: number;
1276
+ operation: string;
1277
+ payload: Json;
1278
+ process_at: string;
1279
+ processed_at: string | null;
1280
+ status: string;
1281
+ updated_at: string;
1282
+ };
1283
+ Insert: {
1284
+ attempts?: number;
1285
+ connection_id: string;
1286
+ created_at?: string;
1287
+ customer_exact_id?: string | null;
1288
+ error_message?: string | null;
1289
+ id?: string;
1290
+ max_attempts?: number;
1291
+ operation: string;
1292
+ payload?: Json;
1293
+ process_at?: string;
1294
+ processed_at?: string | null;
1295
+ status?: string;
1296
+ updated_at?: string;
1297
+ };
1298
+ Update: {
1299
+ attempts?: number;
1300
+ connection_id?: string;
1301
+ created_at?: string;
1302
+ customer_exact_id?: string | null;
1303
+ error_message?: string | null;
1304
+ id?: string;
1305
+ max_attempts?: number;
1306
+ operation?: string;
1307
+ payload?: Json;
1308
+ process_at?: string;
1309
+ processed_at?: string | null;
1310
+ status?: string;
1311
+ updated_at?: string;
1312
+ };
1313
+ Relationships: [
1314
+ {
1315
+ foreignKeyName: "exact_customer_sync_queue_connection_id_fkey";
1316
+ columns: ["connection_id"];
1317
+ isOneToOne: false;
1318
+ referencedRelation: "exact_connections";
1319
+ referencedColumns: ["id"];
1320
+ }
1321
+ ];
1322
+ };
1323
+ exact_customers_cache: {
1324
+ Row: {
1325
+ account_name: string | null;
1326
+ account_number: string | null;
1327
+ address_line1: string | null;
1328
+ address_line2: string | null;
1329
+ balance: number | null;
1330
+ city: string | null;
1331
+ connection_id: string;
1332
+ contact_name: string | null;
1333
+ country: string | null;
1334
+ credit_line: number | null;
1335
+ data_raw: Json | null;
1336
+ email: string | null;
1337
+ exact_id: string;
1338
+ expires_at: string | null;
1339
+ fetched_at: string;
1340
+ id: string;
1341
+ is_sales: boolean | null;
1342
+ is_supplier: boolean | null;
1343
+ phone: string | null;
1344
+ postal_code: string | null;
1345
+ search_text: string | null;
1346
+ status: string | null;
1347
+ updated_at: string;
1348
+ vat_number: string | null;
1349
+ };
1350
+ Insert: {
1351
+ account_name?: string | null;
1352
+ account_number?: string | null;
1353
+ address_line1?: string | null;
1354
+ address_line2?: string | null;
1355
+ balance?: number | null;
1356
+ city?: string | null;
1357
+ connection_id: string;
1358
+ contact_name?: string | null;
1359
+ country?: string | null;
1360
+ credit_line?: number | null;
1361
+ data_raw?: Json | null;
1362
+ email?: string | null;
1363
+ exact_id: string;
1364
+ expires_at?: string | null;
1365
+ fetched_at?: string;
1366
+ id?: string;
1367
+ is_sales?: boolean | null;
1368
+ is_supplier?: boolean | null;
1369
+ phone?: string | null;
1370
+ postal_code?: string | null;
1371
+ search_text?: string | null;
1372
+ status?: string | null;
1373
+ updated_at?: string;
1374
+ vat_number?: string | null;
1375
+ };
1376
+ Update: {
1377
+ account_name?: string | null;
1378
+ account_number?: string | null;
1379
+ address_line1?: string | null;
1380
+ address_line2?: string | null;
1381
+ balance?: number | null;
1382
+ city?: string | null;
1383
+ connection_id?: string;
1384
+ contact_name?: string | null;
1385
+ country?: string | null;
1386
+ credit_line?: number | null;
1387
+ data_raw?: Json | null;
1388
+ email?: string | null;
1389
+ exact_id?: string;
1390
+ expires_at?: string | null;
1391
+ fetched_at?: string;
1392
+ id?: string;
1393
+ is_sales?: boolean | null;
1394
+ is_supplier?: boolean | null;
1395
+ phone?: string | null;
1396
+ postal_code?: string | null;
1397
+ search_text?: string | null;
1398
+ status?: string | null;
1399
+ updated_at?: string;
1400
+ vat_number?: string | null;
1401
+ };
1402
+ Relationships: [
1403
+ {
1404
+ foreignKeyName: "exact_customers_cache_connection_id_fkey";
1405
+ columns: ["connection_id"];
1406
+ isOneToOne: false;
1407
+ referencedRelation: "exact_connections";
1408
+ referencedColumns: ["id"];
1409
+ }
1410
+ ];
1411
+ };
1412
+ exact_invoice_actions: {
1413
+ Row: {
1414
+ action_type: string;
1415
+ connection_id: string;
1416
+ created_at: string;
1417
+ created_by: string | null;
1418
+ error_message: string | null;
1419
+ id: string;
1420
+ invoice_cache_id: string | null;
1421
+ invoice_exact_id: string | null;
1422
+ rate_limit_remaining: number | null;
1423
+ response_data: Json | null;
1424
+ status: string;
1425
+ };
1426
+ Insert: {
1427
+ action_type: string;
1428
+ connection_id: string;
1429
+ created_at?: string;
1430
+ created_by?: string | null;
1431
+ error_message?: string | null;
1432
+ id?: string;
1433
+ invoice_cache_id?: string | null;
1434
+ invoice_exact_id?: string | null;
1435
+ rate_limit_remaining?: number | null;
1436
+ response_data?: Json | null;
1437
+ status: string;
1438
+ };
1439
+ Update: {
1440
+ action_type?: string;
1441
+ connection_id?: string;
1442
+ created_at?: string;
1443
+ created_by?: string | null;
1444
+ error_message?: string | null;
1445
+ id?: string;
1446
+ invoice_cache_id?: string | null;
1447
+ invoice_exact_id?: string | null;
1448
+ rate_limit_remaining?: number | null;
1449
+ response_data?: Json | null;
1450
+ status?: string;
1451
+ };
1452
+ Relationships: [
1453
+ {
1454
+ foreignKeyName: "exact_invoice_actions_connection_id_fkey";
1455
+ columns: ["connection_id"];
1456
+ isOneToOne: false;
1457
+ referencedRelation: "exact_connections";
1458
+ referencedColumns: ["id"];
1459
+ },
1460
+ {
1461
+ foreignKeyName: "exact_invoice_actions_invoice_cache_id_fkey";
1462
+ columns: ["invoice_cache_id"];
1463
+ isOneToOne: false;
1464
+ referencedRelation: "exact_invoices_cache";
1465
+ referencedColumns: ["id"];
1466
+ }
1467
+ ];
1468
+ };
1469
+ exact_invoice_lines_cache: {
1470
+ Row: {
1471
+ connection_id: string;
1472
+ created_at: string;
1473
+ data_raw: Json | null;
1474
+ description: string | null;
1475
+ discount: number | null;
1476
+ exact_line_id: string;
1477
+ gl_account_code: string | null;
1478
+ id: string;
1479
+ invoice_cache_id: string;
1480
+ item_code: string | null;
1481
+ line_total: number | null;
1482
+ quantity: number | null;
1483
+ unit_price: number | null;
1484
+ vat_code: string | null;
1485
+ };
1486
+ Insert: {
1487
+ connection_id: string;
1488
+ created_at?: string;
1489
+ data_raw?: Json | null;
1490
+ description?: string | null;
1491
+ discount?: number | null;
1492
+ exact_line_id: string;
1493
+ gl_account_code?: string | null;
1494
+ id?: string;
1495
+ invoice_cache_id: string;
1496
+ item_code?: string | null;
1497
+ line_total?: number | null;
1498
+ quantity?: number | null;
1499
+ unit_price?: number | null;
1500
+ vat_code?: string | null;
1501
+ };
1502
+ Update: {
1503
+ connection_id?: string;
1504
+ created_at?: string;
1505
+ data_raw?: Json | null;
1506
+ description?: string | null;
1507
+ discount?: number | null;
1508
+ exact_line_id?: string;
1509
+ gl_account_code?: string | null;
1510
+ id?: string;
1511
+ invoice_cache_id?: string;
1512
+ item_code?: string | null;
1513
+ line_total?: number | null;
1514
+ quantity?: number | null;
1515
+ unit_price?: number | null;
1516
+ vat_code?: string | null;
1517
+ };
1518
+ Relationships: [
1519
+ {
1520
+ foreignKeyName: "exact_invoice_lines_cache_connection_id_fkey";
1521
+ columns: ["connection_id"];
1522
+ isOneToOne: false;
1523
+ referencedRelation: "exact_connections";
1524
+ referencedColumns: ["id"];
1525
+ },
1526
+ {
1527
+ foreignKeyName: "exact_invoice_lines_cache_invoice_cache_id_fkey";
1528
+ columns: ["invoice_cache_id"];
1529
+ isOneToOne: false;
1530
+ referencedRelation: "exact_invoices_cache";
1531
+ referencedColumns: ["id"];
1532
+ }
1533
+ ];
1534
+ };
1535
+ exact_invoices_cache: {
1536
+ Row: {
1537
+ account_id: string | null;
1538
+ account_name: string | null;
1539
+ amount_excl_btw: number | null;
1540
+ btw_amount: number | null;
1541
+ connection_id: string;
1542
+ data_raw: Json | null;
1543
+ due_date: string | null;
1544
+ exact_id: string;
1545
+ expires_at: string | null;
1546
+ fetched_at: string;
1547
+ has_pdf: boolean | null;
1548
+ id: string;
1549
+ invoice_date: string | null;
1550
+ invoice_number: string | null;
1551
+ last_reminder_date: string | null;
1552
+ open_amount: number | null;
1553
+ paid_amount: number | null;
1554
+ paid_date: string | null;
1555
+ reminder_count: number | null;
1556
+ search_text: string | null;
1557
+ status: string | null;
1558
+ total_amount: number | null;
1559
+ updated_at: string;
1560
+ };
1561
+ Insert: {
1562
+ account_id?: string | null;
1563
+ account_name?: string | null;
1564
+ amount_excl_btw?: number | null;
1565
+ btw_amount?: number | null;
1566
+ connection_id: string;
1567
+ data_raw?: Json | null;
1568
+ due_date?: string | null;
1569
+ exact_id: string;
1570
+ expires_at?: string | null;
1571
+ fetched_at?: string;
1572
+ has_pdf?: boolean | null;
1573
+ id?: string;
1574
+ invoice_date?: string | null;
1575
+ invoice_number?: string | null;
1576
+ last_reminder_date?: string | null;
1577
+ open_amount?: number | null;
1578
+ paid_amount?: number | null;
1579
+ paid_date?: string | null;
1580
+ reminder_count?: number | null;
1581
+ search_text?: string | null;
1582
+ status?: string | null;
1583
+ total_amount?: number | null;
1584
+ updated_at?: string;
1585
+ };
1586
+ Update: {
1587
+ account_id?: string | null;
1588
+ account_name?: string | null;
1589
+ amount_excl_btw?: number | null;
1590
+ btw_amount?: number | null;
1591
+ connection_id?: string;
1592
+ data_raw?: Json | null;
1593
+ due_date?: string | null;
1594
+ exact_id?: string;
1595
+ expires_at?: string | null;
1596
+ fetched_at?: string;
1597
+ has_pdf?: boolean | null;
1598
+ id?: string;
1599
+ invoice_date?: string | null;
1600
+ invoice_number?: string | null;
1601
+ last_reminder_date?: string | null;
1602
+ open_amount?: number | null;
1603
+ paid_amount?: number | null;
1604
+ paid_date?: string | null;
1605
+ reminder_count?: number | null;
1606
+ search_text?: string | null;
1607
+ status?: string | null;
1608
+ total_amount?: number | null;
1609
+ updated_at?: string;
1610
+ };
1611
+ Relationships: [
1612
+ {
1613
+ foreignKeyName: "exact_invoices_cache_connection_id_fkey";
1614
+ columns: ["connection_id"];
1615
+ isOneToOne: false;
1616
+ referencedRelation: "exact_connections";
1617
+ referencedColumns: ["id"];
1618
+ }
1619
+ ];
1620
+ };
1621
+ exact_operation_logs: {
1622
+ Row: {
1623
+ connection_id: string | null;
1624
+ created_at: string;
1625
+ duration_ms: number | null;
1626
+ entity_id: string | null;
1627
+ entity_type: string | null;
1628
+ error_message: string | null;
1629
+ id: string;
1630
+ operation: string | null;
1631
+ rate_limit_remaining: number | null;
1632
+ request_data: Json | null;
1633
+ response_data: Json | null;
1634
+ status: string | null;
1635
+ };
1636
+ Insert: {
1637
+ connection_id?: string | null;
1638
+ created_at?: string;
1639
+ duration_ms?: number | null;
1640
+ entity_id?: string | null;
1641
+ entity_type?: string | null;
1642
+ error_message?: string | null;
1643
+ id?: string;
1644
+ operation?: string | null;
1645
+ rate_limit_remaining?: number | null;
1646
+ request_data?: Json | null;
1647
+ response_data?: Json | null;
1648
+ status?: string | null;
1649
+ };
1650
+ Update: {
1651
+ connection_id?: string | null;
1652
+ created_at?: string;
1653
+ duration_ms?: number | null;
1654
+ entity_id?: string | null;
1655
+ entity_type?: string | null;
1656
+ error_message?: string | null;
1657
+ id?: string;
1658
+ operation?: string | null;
1659
+ rate_limit_remaining?: number | null;
1660
+ request_data?: Json | null;
1661
+ response_data?: Json | null;
1662
+ status?: string | null;
1663
+ };
1664
+ Relationships: [
1665
+ {
1666
+ foreignKeyName: "exact_operation_logs_connection_id_fkey";
1667
+ columns: ["connection_id"];
1668
+ isOneToOne: false;
1669
+ referencedRelation: "exact_connections";
1670
+ referencedColumns: ["id"];
1671
+ }
1672
+ ];
1673
+ };
1674
+ exact_sync_state: {
1675
+ Row: {
1676
+ connection_id: string;
1677
+ last_error: string | null;
1678
+ last_modified_cursor: string | null;
1679
+ last_synced_at: string | null;
1680
+ status: string;
1681
+ updated_at: string;
1682
+ };
1683
+ Insert: {
1684
+ connection_id: string;
1685
+ last_error?: string | null;
1686
+ last_modified_cursor?: string | null;
1687
+ last_synced_at?: string | null;
1688
+ status?: string;
1689
+ updated_at?: string;
1690
+ };
1691
+ Update: {
1692
+ connection_id?: string;
1693
+ last_error?: string | null;
1694
+ last_modified_cursor?: string | null;
1695
+ last_synced_at?: string | null;
1696
+ status?: string;
1697
+ updated_at?: string;
1698
+ };
1699
+ Relationships: [];
1700
+ };
1701
+ floricode_connection_settings: {
1702
+ Row: {
1703
+ catalog_key: string | null;
1704
+ catalog_url: string;
1705
+ created_at: string;
1706
+ id: number;
1707
+ last_meta: Json | null;
1708
+ last_test_at: string | null;
1709
+ last_test_error: string | null;
1710
+ last_test_ok: boolean | null;
1711
+ updated_at: string;
1712
+ };
1713
+ Insert: {
1714
+ catalog_key?: string | null;
1715
+ catalog_url?: string;
1716
+ created_at?: string;
1717
+ id?: number;
1718
+ last_meta?: Json | null;
1719
+ last_test_at?: string | null;
1720
+ last_test_error?: string | null;
1721
+ last_test_ok?: boolean | null;
1722
+ updated_at?: string;
1723
+ };
1724
+ Update: {
1725
+ catalog_key?: string | null;
630
1726
  catalog_url?: string;
631
1727
  created_at?: string;
632
- id?: number;
633
- last_meta?: Json | null;
634
- last_test_at?: string | null;
635
- last_test_error?: string | null;
636
- last_test_ok?: boolean | null;
1728
+ id?: number;
1729
+ last_meta?: Json | null;
1730
+ last_test_at?: string | null;
1731
+ last_test_error?: string | null;
1732
+ last_test_ok?: boolean | null;
1733
+ updated_at?: string;
1734
+ };
1735
+ Relationships: [];
1736
+ };
1737
+ floricode_records: {
1738
+ Row: {
1739
+ change_date_time: string | null;
1740
+ data: Json;
1741
+ last_synced_at: string;
1742
+ record_id: string;
1743
+ resource: string;
1744
+ };
1745
+ Insert: {
1746
+ change_date_time?: string | null;
1747
+ data?: Json;
1748
+ last_synced_at?: string;
1749
+ record_id: string;
1750
+ resource: string;
1751
+ };
1752
+ Update: {
1753
+ change_date_time?: string | null;
1754
+ data?: Json;
1755
+ last_synced_at?: string;
1756
+ record_id?: string;
1757
+ resource?: string;
1758
+ };
1759
+ Relationships: [];
1760
+ };
1761
+ floricode_sync_state: {
1762
+ Row: {
1763
+ error_message: string | null;
1764
+ last_change_date_time: string | null;
1765
+ last_sequence_number: number;
1766
+ last_sync_at: string | null;
1767
+ resource: string;
1768
+ status: string;
1769
+ updated_at: string;
1770
+ };
1771
+ Insert: {
1772
+ error_message?: string | null;
1773
+ last_change_date_time?: string | null;
1774
+ last_sequence_number?: number;
1775
+ last_sync_at?: string | null;
1776
+ resource: string;
1777
+ status?: string;
1778
+ updated_at?: string;
1779
+ };
1780
+ Update: {
1781
+ error_message?: string | null;
1782
+ last_change_date_time?: string | null;
1783
+ last_sequence_number?: number;
1784
+ last_sync_at?: string | null;
1785
+ resource?: string;
1786
+ status?: string;
1787
+ updated_at?: string;
1788
+ };
1789
+ Relationships: [];
1790
+ };
1791
+ floriday_connections: {
1792
+ Row: {
1793
+ access_token: string | null;
1794
+ api_key: string;
1795
+ client_id: string;
1796
+ client_secret: string;
1797
+ created_at: string;
1798
+ customers_endpoint: string | null;
1799
+ environment: string;
1800
+ gln_code: string | null;
1801
+ id: string;
1802
+ is_active: boolean;
1803
+ label: string;
1804
+ organization_name: string | null;
1805
+ preferred_warehouse_id: string | null;
1806
+ preferred_warehouse_name: string | null;
1807
+ token_expires_at: string | null;
1808
+ updated_at: string;
1809
+ };
1810
+ Insert: {
1811
+ access_token?: string | null;
1812
+ api_key: string;
1813
+ client_id: string;
1814
+ client_secret: string;
1815
+ created_at?: string;
1816
+ customers_endpoint?: string | null;
1817
+ environment: string;
1818
+ gln_code?: string | null;
1819
+ id?: string;
1820
+ is_active?: boolean;
1821
+ label?: string;
1822
+ organization_name?: string | null;
1823
+ preferred_warehouse_id?: string | null;
1824
+ preferred_warehouse_name?: string | null;
1825
+ token_expires_at?: string | null;
1826
+ updated_at?: string;
1827
+ };
1828
+ Update: {
1829
+ access_token?: string | null;
1830
+ api_key?: string;
1831
+ client_id?: string;
1832
+ client_secret?: string;
1833
+ created_at?: string;
1834
+ customers_endpoint?: string | null;
1835
+ environment?: string;
1836
+ gln_code?: string | null;
1837
+ id?: string;
1838
+ is_active?: boolean;
1839
+ label?: string;
1840
+ organization_name?: string | null;
1841
+ preferred_warehouse_id?: string | null;
1842
+ preferred_warehouse_name?: string | null;
1843
+ token_expires_at?: string | null;
1844
+ updated_at?: string;
1845
+ };
1846
+ Relationships: [];
1847
+ };
1848
+ floriday_customers_cache: {
1849
+ Row: {
1850
+ connection_id: string | null;
1851
+ data: Json;
1852
+ fetched_at: string;
1853
+ organization_id: string;
1854
+ };
1855
+ Insert: {
1856
+ connection_id?: string | null;
1857
+ data?: Json;
1858
+ fetched_at?: string;
1859
+ organization_id: string;
1860
+ };
1861
+ Update: {
1862
+ connection_id?: string | null;
1863
+ data?: Json;
1864
+ fetched_at?: string;
1865
+ organization_id?: string;
1866
+ };
1867
+ Relationships: [
1868
+ {
1869
+ foreignKeyName: "floriday_customers_cache_connection_id_fkey";
1870
+ columns: ["connection_id"];
1871
+ isOneToOne: false;
1872
+ referencedRelation: "floriday_connections";
1873
+ referencedColumns: ["id"];
1874
+ }
1875
+ ];
1876
+ };
1877
+ floriday_network_cache: {
1878
+ Row: {
1879
+ city: string | null;
1880
+ connection_id: string;
1881
+ country: string | null;
1882
+ data: Json;
1883
+ fetched_at: string;
1884
+ gln: string | null;
1885
+ organization_id: string;
1886
+ organization_name: string | null;
1887
+ };
1888
+ Insert: {
1889
+ city?: string | null;
1890
+ connection_id: string;
1891
+ country?: string | null;
1892
+ data?: Json;
1893
+ fetched_at?: string;
1894
+ gln?: string | null;
1895
+ organization_id: string;
1896
+ organization_name?: string | null;
1897
+ };
1898
+ Update: {
1899
+ city?: string | null;
1900
+ connection_id?: string;
1901
+ country?: string | null;
1902
+ data?: Json;
1903
+ fetched_at?: string;
1904
+ gln?: string | null;
1905
+ organization_id?: string;
1906
+ organization_name?: string | null;
1907
+ };
1908
+ Relationships: [];
1909
+ };
1910
+ floriday_network_sync_state: {
1911
+ Row: {
1912
+ connection_id: string;
1913
+ last_error: string | null;
1914
+ last_sequence_number: number;
1915
+ last_synced_at: string | null;
1916
+ updated_at: string;
1917
+ };
1918
+ Insert: {
1919
+ connection_id: string;
1920
+ last_error?: string | null;
1921
+ last_sequence_number?: number;
1922
+ last_synced_at?: string | null;
1923
+ updated_at?: string;
1924
+ };
1925
+ Update: {
1926
+ connection_id?: string;
1927
+ last_error?: string | null;
1928
+ last_sequence_number?: number;
1929
+ last_synced_at?: string | null;
1930
+ updated_at?: string;
1931
+ };
1932
+ Relationships: [];
1933
+ };
1934
+ floriday_settings: {
1935
+ Row: {
1936
+ active_environment: string;
1937
+ id: number;
1938
+ updated_at: string;
1939
+ };
1940
+ Insert: {
1941
+ active_environment?: string;
1942
+ id?: number;
1943
+ updated_at?: string;
1944
+ };
1945
+ Update: {
1946
+ active_environment?: string;
1947
+ id?: number;
1948
+ updated_at?: string;
1949
+ };
1950
+ Relationships: [];
1951
+ };
1952
+ imap_accounts: {
1953
+ Row: {
1954
+ created_at: string;
1955
+ email: string | null;
1956
+ host: string;
1957
+ id: string;
1958
+ is_active: boolean;
1959
+ last_test_error: string | null;
1960
+ last_test_ok: boolean | null;
1961
+ last_tested_at: string | null;
1962
+ name: string;
1963
+ password: string | null;
1964
+ password_secret_name: string | null;
1965
+ port: number;
1966
+ updated_at: string;
1967
+ use_tls: boolean;
1968
+ username: string;
1969
+ };
1970
+ Insert: {
1971
+ created_at?: string;
1972
+ email?: string | null;
1973
+ host: string;
1974
+ id?: string;
1975
+ is_active?: boolean;
1976
+ last_test_error?: string | null;
1977
+ last_test_ok?: boolean | null;
1978
+ last_tested_at?: string | null;
1979
+ name: string;
1980
+ password?: string | null;
1981
+ password_secret_name?: string | null;
1982
+ port?: number;
1983
+ updated_at?: string;
1984
+ use_tls?: boolean;
1985
+ username: string;
1986
+ };
1987
+ Update: {
1988
+ created_at?: string;
1989
+ email?: string | null;
1990
+ host?: string;
1991
+ id?: string;
1992
+ is_active?: boolean;
1993
+ last_test_error?: string | null;
1994
+ last_test_ok?: boolean | null;
1995
+ last_tested_at?: string | null;
1996
+ name?: string;
1997
+ password?: string | null;
1998
+ password_secret_name?: string | null;
1999
+ port?: number;
2000
+ updated_at?: string;
2001
+ use_tls?: boolean;
2002
+ username?: string;
2003
+ };
2004
+ Relationships: [];
2005
+ };
2006
+ imap_profiles: {
2007
+ Row: {
2008
+ account_id: string | null;
2009
+ created_at: string;
2010
+ folder: string;
2011
+ id: string;
2012
+ last_error: string | null;
2013
+ last_polled_at: string | null;
2014
+ last_uid_seen: number;
2015
+ name: string;
2016
+ polling_enabled: boolean;
2017
+ profile_key: string;
2018
+ updated_at: string;
2019
+ };
2020
+ Insert: {
2021
+ account_id?: string | null;
2022
+ created_at?: string;
2023
+ folder?: string;
2024
+ id?: string;
2025
+ last_error?: string | null;
2026
+ last_polled_at?: string | null;
2027
+ last_uid_seen?: number;
2028
+ name: string;
2029
+ polling_enabled?: boolean;
2030
+ profile_key: string;
2031
+ updated_at?: string;
2032
+ };
2033
+ Update: {
2034
+ account_id?: string | null;
2035
+ created_at?: string;
2036
+ folder?: string;
2037
+ id?: string;
2038
+ last_error?: string | null;
2039
+ last_polled_at?: string | null;
2040
+ last_uid_seen?: number;
2041
+ name?: string;
2042
+ polling_enabled?: boolean;
2043
+ profile_key?: string;
2044
+ updated_at?: string;
2045
+ };
2046
+ Relationships: [
2047
+ {
2048
+ foreignKeyName: "imap_profiles_account_id_fkey";
2049
+ columns: ["account_id"];
2050
+ isOneToOne: false;
2051
+ referencedRelation: "imap_accounts";
2052
+ referencedColumns: ["id"];
2053
+ }
2054
+ ];
2055
+ };
2056
+ imap_sync_log: {
2057
+ Row: {
2058
+ account_id: string | null;
2059
+ details: Json | null;
2060
+ error: string | null;
2061
+ finished_at: string | null;
2062
+ id: string;
2063
+ inserted: number;
2064
+ ok: boolean | null;
2065
+ profile_id: string | null;
2066
+ started_at: string;
2067
+ };
2068
+ Insert: {
2069
+ account_id?: string | null;
2070
+ details?: Json | null;
2071
+ error?: string | null;
2072
+ finished_at?: string | null;
2073
+ id?: string;
2074
+ inserted?: number;
2075
+ ok?: boolean | null;
2076
+ profile_id?: string | null;
2077
+ started_at?: string;
2078
+ };
2079
+ Update: {
2080
+ account_id?: string | null;
2081
+ details?: Json | null;
2082
+ error?: string | null;
2083
+ finished_at?: string | null;
2084
+ id?: string;
2085
+ inserted?: number;
2086
+ ok?: boolean | null;
2087
+ profile_id?: string | null;
2088
+ started_at?: string;
2089
+ };
2090
+ Relationships: [
2091
+ {
2092
+ foreignKeyName: "imap_sync_log_account_id_fkey";
2093
+ columns: ["account_id"];
2094
+ isOneToOne: false;
2095
+ referencedRelation: "imap_accounts";
2096
+ referencedColumns: ["id"];
2097
+ },
2098
+ {
2099
+ foreignKeyName: "imap_sync_log_profile_id_fkey";
2100
+ columns: ["profile_id"];
2101
+ isOneToOne: false;
2102
+ referencedRelation: "imap_profiles";
2103
+ referencedColumns: ["id"];
2104
+ }
2105
+ ];
2106
+ };
2107
+ inventory_settings: {
2108
+ Row: {
2109
+ created_at: string;
2110
+ hierarchy_levels: string[];
2111
+ id: string;
2112
+ updated_at: string;
2113
+ visible_columns: string[];
2114
+ };
2115
+ Insert: {
2116
+ created_at?: string;
2117
+ hierarchy_levels?: string[];
2118
+ id?: string;
2119
+ updated_at?: string;
2120
+ visible_columns?: string[];
2121
+ };
2122
+ Update: {
2123
+ created_at?: string;
2124
+ hierarchy_levels?: string[];
2125
+ id?: string;
2126
+ updated_at?: string;
2127
+ visible_columns?: string[];
2128
+ };
2129
+ Relationships: [];
2130
+ };
2131
+ locations: {
2132
+ Row: {
2133
+ created_at: string;
2134
+ id: string;
2135
+ name: string;
2136
+ sort_order: number;
2137
+ updated_at: string;
2138
+ };
2139
+ Insert: {
2140
+ created_at?: string;
2141
+ id?: string;
2142
+ name: string;
2143
+ sort_order?: number;
2144
+ updated_at?: string;
2145
+ };
2146
+ Update: {
2147
+ created_at?: string;
2148
+ id?: string;
2149
+ name?: string;
2150
+ sort_order?: number;
2151
+ updated_at?: string;
2152
+ };
2153
+ Relationships: [];
2154
+ };
2155
+ mailbox_messages: {
2156
+ Row: {
2157
+ body_html: string | null;
2158
+ body_text: string | null;
2159
+ created_at: string;
2160
+ error_message: string | null;
2161
+ from_email: string | null;
2162
+ from_name: string | null;
2163
+ id: string;
2164
+ message_id: string | null;
2165
+ profile_id: string | null;
2166
+ raw_size: number | null;
2167
+ received_at: string | null;
2168
+ status: string;
2169
+ subject: string | null;
2170
+ uid: number;
2171
+ updated_at: string;
2172
+ };
2173
+ Insert: {
2174
+ body_html?: string | null;
2175
+ body_text?: string | null;
2176
+ created_at?: string;
2177
+ error_message?: string | null;
2178
+ from_email?: string | null;
2179
+ from_name?: string | null;
2180
+ id?: string;
2181
+ message_id?: string | null;
2182
+ profile_id?: string | null;
2183
+ raw_size?: number | null;
2184
+ received_at?: string | null;
2185
+ status?: string;
2186
+ subject?: string | null;
2187
+ uid: number;
2188
+ updated_at?: string;
2189
+ };
2190
+ Update: {
2191
+ body_html?: string | null;
2192
+ body_text?: string | null;
2193
+ created_at?: string;
2194
+ error_message?: string | null;
2195
+ from_email?: string | null;
2196
+ from_name?: string | null;
2197
+ id?: string;
2198
+ message_id?: string | null;
2199
+ profile_id?: string | null;
2200
+ raw_size?: number | null;
2201
+ received_at?: string | null;
2202
+ status?: string;
2203
+ subject?: string | null;
2204
+ uid?: number;
2205
+ updated_at?: string;
2206
+ };
2207
+ Relationships: [
2208
+ {
2209
+ foreignKeyName: "mailbox_messages_profile_id_fkey";
2210
+ columns: ["profile_id"];
2211
+ isOneToOne: false;
2212
+ referencedRelation: "imap_profiles";
2213
+ referencedColumns: ["id"];
2214
+ }
2215
+ ];
2216
+ };
2217
+ mailbox_order_proposals: {
2218
+ Row: {
2219
+ confidence: number | null;
2220
+ created_at: string;
2221
+ created_order_id: string | null;
2222
+ delivery_date: string | null;
2223
+ id: string;
2224
+ matched_customer_id: string | null;
2225
+ message_id: string;
2226
+ notes: string | null;
2227
+ parsed_payload: Json | null;
2228
+ reviewed_at: string | null;
2229
+ reviewed_by: string | null;
2230
+ status: string;
2231
+ updated_at: string;
2232
+ };
2233
+ Insert: {
2234
+ confidence?: number | null;
2235
+ created_at?: string;
2236
+ created_order_id?: string | null;
2237
+ delivery_date?: string | null;
2238
+ id?: string;
2239
+ matched_customer_id?: string | null;
2240
+ message_id: string;
2241
+ notes?: string | null;
2242
+ parsed_payload?: Json | null;
2243
+ reviewed_at?: string | null;
2244
+ reviewed_by?: string | null;
2245
+ status?: string;
2246
+ updated_at?: string;
2247
+ };
2248
+ Update: {
2249
+ confidence?: number | null;
2250
+ created_at?: string;
2251
+ created_order_id?: string | null;
2252
+ delivery_date?: string | null;
2253
+ id?: string;
2254
+ matched_customer_id?: string | null;
2255
+ message_id?: string;
2256
+ notes?: string | null;
2257
+ parsed_payload?: Json | null;
2258
+ reviewed_at?: string | null;
2259
+ reviewed_by?: string | null;
2260
+ status?: string;
2261
+ updated_at?: string;
2262
+ };
2263
+ Relationships: [
2264
+ {
2265
+ foreignKeyName: "mailbox_order_proposals_created_order_id_fkey";
2266
+ columns: ["created_order_id"];
2267
+ isOneToOne: false;
2268
+ referencedRelation: "orders";
2269
+ referencedColumns: ["id"];
2270
+ },
2271
+ {
2272
+ foreignKeyName: "mailbox_order_proposals_matched_customer_id_fkey";
2273
+ columns: ["matched_customer_id"];
2274
+ isOneToOne: false;
2275
+ referencedRelation: "customers";
2276
+ referencedColumns: ["id"];
2277
+ },
2278
+ {
2279
+ foreignKeyName: "mailbox_order_proposals_message_id_fkey";
2280
+ columns: ["message_id"];
2281
+ isOneToOne: false;
2282
+ referencedRelation: "mailbox_messages";
2283
+ referencedColumns: ["id"];
2284
+ }
2285
+ ];
2286
+ };
2287
+ mailbox_order_template_fields: {
2288
+ Row: {
2289
+ ai_enabled: boolean;
2290
+ ai_hint: string | null;
2291
+ created_at: string;
2292
+ default_value: Json | null;
2293
+ field_type: string;
2294
+ id: string;
2295
+ key: string;
2296
+ label: string;
2297
+ options: Json | null;
2298
+ required: boolean;
2299
+ sort_order: number;
2300
+ source: string;
2301
+ source_table: string | null;
2302
+ updated_at: string;
2303
+ visible: boolean;
2304
+ };
2305
+ Insert: {
2306
+ ai_enabled?: boolean;
2307
+ ai_hint?: string | null;
2308
+ created_at?: string;
2309
+ default_value?: Json | null;
2310
+ field_type: string;
2311
+ id?: string;
2312
+ key: string;
2313
+ label: string;
2314
+ options?: Json | null;
2315
+ required?: boolean;
2316
+ sort_order?: number;
2317
+ source?: string;
2318
+ source_table?: string | null;
637
2319
  updated_at?: string;
2320
+ visible?: boolean;
638
2321
  };
639
2322
  Update: {
640
- catalog_key?: string | null;
641
- catalog_url?: string;
2323
+ ai_enabled?: boolean;
2324
+ ai_hint?: string | null;
642
2325
  created_at?: string;
643
- id?: number;
644
- last_meta?: Json | null;
645
- last_test_at?: string | null;
646
- last_test_error?: string | null;
647
- last_test_ok?: boolean | null;
2326
+ default_value?: Json | null;
2327
+ field_type?: string;
2328
+ id?: string;
2329
+ key?: string;
2330
+ label?: string;
2331
+ options?: Json | null;
2332
+ required?: boolean;
2333
+ sort_order?: number;
2334
+ source?: string;
2335
+ source_table?: string | null;
648
2336
  updated_at?: string;
2337
+ visible?: boolean;
649
2338
  };
650
2339
  Relationships: [];
651
2340
  };
652
- floricode_records: {
2341
+ mailbox_proposal_field_values: {
653
2342
  Row: {
654
- change_date_time: string | null;
655
- data: Json;
656
- last_synced_at: string;
657
- record_id: string;
658
- resource: string;
2343
+ ai_confidence: number | null;
2344
+ ai_filled: boolean;
2345
+ created_at: string;
2346
+ field_key: string;
2347
+ id: string;
2348
+ needs_review: boolean;
2349
+ proposal_id: string;
2350
+ updated_at: string;
2351
+ value: Json | null;
659
2352
  };
660
2353
  Insert: {
661
- change_date_time?: string | null;
662
- data?: Json;
663
- last_synced_at?: string;
664
- record_id: string;
665
- resource: string;
2354
+ ai_confidence?: number | null;
2355
+ ai_filled?: boolean;
2356
+ created_at?: string;
2357
+ field_key: string;
2358
+ id?: string;
2359
+ needs_review?: boolean;
2360
+ proposal_id: string;
2361
+ updated_at?: string;
2362
+ value?: Json | null;
666
2363
  };
667
2364
  Update: {
668
- change_date_time?: string | null;
669
- data?: Json;
670
- last_synced_at?: string;
671
- record_id?: string;
672
- resource?: string;
2365
+ ai_confidence?: number | null;
2366
+ ai_filled?: boolean;
2367
+ created_at?: string;
2368
+ field_key?: string;
2369
+ id?: string;
2370
+ needs_review?: boolean;
2371
+ proposal_id?: string;
2372
+ updated_at?: string;
2373
+ value?: Json | null;
673
2374
  };
674
- Relationships: [];
2375
+ Relationships: [
2376
+ {
2377
+ foreignKeyName: "mailbox_proposal_field_values_proposal_id_fkey";
2378
+ columns: ["proposal_id"];
2379
+ isOneToOne: false;
2380
+ referencedRelation: "mailbox_order_proposals";
2381
+ referencedColumns: ["id"];
2382
+ }
2383
+ ];
675
2384
  };
676
- floricode_sync_state: {
2385
+ mailbox_proposal_lines: {
677
2386
  Row: {
678
- error_message: string | null;
679
- last_change_date_time: string | null;
680
- last_sequence_number: number;
681
- last_sync_at: string | null;
682
- resource: string;
683
- status: string;
2387
+ created_at: string;
2388
+ id: string;
2389
+ match_confidence: number | null;
2390
+ product_id: string | null;
2391
+ proposal_id: string;
2392
+ quantity: number | null;
2393
+ raw_product_text: string | null;
2394
+ sort_order: number;
2395
+ unit: string | null;
684
2396
  updated_at: string;
685
2397
  };
686
2398
  Insert: {
687
- error_message?: string | null;
688
- last_change_date_time?: string | null;
689
- last_sequence_number?: number;
690
- last_sync_at?: string | null;
691
- resource: string;
692
- status?: string;
2399
+ created_at?: string;
2400
+ id?: string;
2401
+ match_confidence?: number | null;
2402
+ product_id?: string | null;
2403
+ proposal_id: string;
2404
+ quantity?: number | null;
2405
+ raw_product_text?: string | null;
2406
+ sort_order?: number;
2407
+ unit?: string | null;
693
2408
  updated_at?: string;
694
2409
  };
695
2410
  Update: {
696
- error_message?: string | null;
697
- last_change_date_time?: string | null;
698
- last_sequence_number?: number;
699
- last_sync_at?: string | null;
700
- resource?: string;
701
- status?: string;
2411
+ created_at?: string;
2412
+ id?: string;
2413
+ match_confidence?: number | null;
2414
+ product_id?: string | null;
2415
+ proposal_id?: string;
2416
+ quantity?: number | null;
2417
+ raw_product_text?: string | null;
2418
+ sort_order?: number;
2419
+ unit?: string | null;
2420
+ updated_at?: string;
2421
+ };
2422
+ Relationships: [
2423
+ {
2424
+ foreignKeyName: "mailbox_proposal_lines_product_id_fkey";
2425
+ columns: ["product_id"];
2426
+ isOneToOne: false;
2427
+ referencedRelation: "products";
2428
+ referencedColumns: ["id"];
2429
+ },
2430
+ {
2431
+ foreignKeyName: "mailbox_proposal_lines_proposal_id_fkey";
2432
+ columns: ["proposal_id"];
2433
+ isOneToOne: false;
2434
+ referencedRelation: "mailbox_order_proposals";
2435
+ referencedColumns: ["id"];
2436
+ }
2437
+ ];
2438
+ };
2439
+ mailbox_settings: {
2440
+ Row: {
2441
+ created_at: string;
2442
+ folder: string;
2443
+ id: string;
2444
+ imap_host: string;
2445
+ imap_port: number;
2446
+ imap_use_tls: boolean;
2447
+ imap_username: string;
2448
+ last_error: string | null;
2449
+ last_polled_at: string | null;
2450
+ last_uid_seen: number;
2451
+ polling_enabled: boolean;
2452
+ singleton: boolean;
2453
+ updated_at: string;
2454
+ };
2455
+ Insert: {
2456
+ created_at?: string;
2457
+ folder?: string;
2458
+ id?: string;
2459
+ imap_host?: string;
2460
+ imap_port?: number;
2461
+ imap_use_tls?: boolean;
2462
+ imap_username?: string;
2463
+ last_error?: string | null;
2464
+ last_polled_at?: string | null;
2465
+ last_uid_seen?: number;
2466
+ polling_enabled?: boolean;
2467
+ singleton?: boolean;
2468
+ updated_at?: string;
2469
+ };
2470
+ Update: {
2471
+ created_at?: string;
2472
+ folder?: string;
2473
+ id?: string;
2474
+ imap_host?: string;
2475
+ imap_port?: number;
2476
+ imap_use_tls?: boolean;
2477
+ imap_username?: string;
2478
+ last_error?: string | null;
2479
+ last_polled_at?: string | null;
2480
+ last_uid_seen?: number;
2481
+ polling_enabled?: boolean;
2482
+ singleton?: boolean;
702
2483
  updated_at?: string;
703
2484
  };
704
2485
  Relationships: [];
705
2486
  };
706
- floriday_connections: {
2487
+ notifications: {
707
2488
  Row: {
708
- access_token: string | null;
709
- api_key: string;
710
- client_id: string;
711
- client_secret: string;
712
2489
  created_at: string;
713
- customers_endpoint: string | null;
714
- environment: string;
715
- gln_code: string | null;
716
2490
  id: string;
717
- is_active: boolean;
718
- label: string;
719
- organization_name: string | null;
720
- preferred_warehouse_id: string | null;
721
- preferred_warehouse_name: string | null;
722
- token_expires_at: string | null;
2491
+ message: string | null;
2492
+ read: boolean;
2493
+ title: string;
723
2494
  updated_at: string;
2495
+ user_id: string;
724
2496
  };
725
2497
  Insert: {
726
- access_token?: string | null;
727
- api_key: string;
728
- client_id: string;
729
- client_secret: string;
730
2498
  created_at?: string;
731
- customers_endpoint?: string | null;
732
- environment: string;
733
- gln_code?: string | null;
734
2499
  id?: string;
735
- is_active?: boolean;
736
- label?: string;
737
- organization_name?: string | null;
738
- preferred_warehouse_id?: string | null;
739
- preferred_warehouse_name?: string | null;
740
- token_expires_at?: string | null;
2500
+ message?: string | null;
2501
+ read?: boolean;
2502
+ title: string;
741
2503
  updated_at?: string;
2504
+ user_id: string;
742
2505
  };
743
2506
  Update: {
744
- access_token?: string | null;
745
- api_key?: string;
746
- client_id?: string;
747
- client_secret?: string;
748
2507
  created_at?: string;
749
- customers_endpoint?: string | null;
750
- environment?: string;
751
- gln_code?: string | null;
752
2508
  id?: string;
753
- is_active?: boolean;
754
- label?: string;
755
- organization_name?: string | null;
756
- preferred_warehouse_id?: string | null;
757
- preferred_warehouse_name?: string | null;
758
- token_expires_at?: string | null;
2509
+ message?: string | null;
2510
+ read?: boolean;
2511
+ title?: string;
759
2512
  updated_at?: string;
2513
+ user_id?: string;
760
2514
  };
761
2515
  Relationships: [];
762
2516
  };
763
- floriday_customers_cache: {
2517
+ offer_campaign_product_tiers: {
764
2518
  Row: {
765
- connection_id: string | null;
766
- data: Json;
767
- fetched_at: string;
768
- organization_id: string;
2519
+ campaign_product_id: string;
2520
+ created_at: string;
2521
+ id: string;
2522
+ min_crates: number;
2523
+ price_per_crate: number;
2524
+ sort_order: number;
769
2525
  };
770
2526
  Insert: {
771
- connection_id?: string | null;
772
- data?: Json;
773
- fetched_at?: string;
774
- organization_id: string;
2527
+ campaign_product_id: string;
2528
+ created_at?: string;
2529
+ id?: string;
2530
+ min_crates?: number;
2531
+ price_per_crate?: number;
2532
+ sort_order?: number;
775
2533
  };
776
2534
  Update: {
777
- connection_id?: string | null;
778
- data?: Json;
779
- fetched_at?: string;
780
- organization_id?: string;
2535
+ campaign_product_id?: string;
2536
+ created_at?: string;
2537
+ id?: string;
2538
+ min_crates?: number;
2539
+ price_per_crate?: number;
2540
+ sort_order?: number;
781
2541
  };
782
2542
  Relationships: [
783
2543
  {
784
- foreignKeyName: "floriday_customers_cache_connection_id_fkey";
785
- columns: ["connection_id"];
2544
+ foreignKeyName: "offer_campaign_product_tiers_campaign_product_id_fkey";
2545
+ columns: ["campaign_product_id"];
786
2546
  isOneToOne: false;
787
- referencedRelation: "floriday_connections";
2547
+ referencedRelation: "offer_campaign_products";
788
2548
  referencedColumns: ["id"];
789
2549
  }
790
2550
  ];
791
2551
  };
792
- floriday_network_cache: {
2552
+ offer_campaign_products: {
793
2553
  Row: {
794
- city: string | null;
795
- connection_id: string;
796
- country: string | null;
797
- data: Json;
798
- fetched_at: string;
799
- gln: string | null;
800
- organization_id: string;
801
- organization_name: string | null;
2554
+ available_stock: number;
2555
+ barcode: string | null;
2556
+ belading: string | null;
2557
+ campaign_id: string;
2558
+ crate_price: number | null;
2559
+ created_at: string;
2560
+ description: string | null;
2561
+ discount_price: number;
2562
+ id: string;
2563
+ image_url: string | null;
2564
+ normal_price: number;
2565
+ plants_per_crate: number | null;
2566
+ product_id: string | null;
2567
+ product_name: string;
2568
+ sort_order: number;
2569
+ sticker_available: boolean;
2570
+ sticker_cost: number | null;
802
2571
  };
803
2572
  Insert: {
804
- city?: string | null;
805
- connection_id: string;
806
- country?: string | null;
807
- data?: Json;
808
- fetched_at?: string;
809
- gln?: string | null;
810
- organization_id: string;
811
- organization_name?: string | null;
2573
+ available_stock?: number;
2574
+ barcode?: string | null;
2575
+ belading?: string | null;
2576
+ campaign_id: string;
2577
+ crate_price?: number | null;
2578
+ created_at?: string;
2579
+ description?: string | null;
2580
+ discount_price?: number;
2581
+ id?: string;
2582
+ image_url?: string | null;
2583
+ normal_price?: number;
2584
+ plants_per_crate?: number | null;
2585
+ product_id?: string | null;
2586
+ product_name: string;
2587
+ sort_order?: number;
2588
+ sticker_available?: boolean;
2589
+ sticker_cost?: number | null;
812
2590
  };
813
2591
  Update: {
814
- city?: string | null;
815
- connection_id?: string;
816
- country?: string | null;
817
- data?: Json;
818
- fetched_at?: string;
819
- gln?: string | null;
820
- organization_id?: string;
821
- organization_name?: string | null;
2592
+ available_stock?: number;
2593
+ barcode?: string | null;
2594
+ belading?: string | null;
2595
+ campaign_id?: string;
2596
+ crate_price?: number | null;
2597
+ created_at?: string;
2598
+ description?: string | null;
2599
+ discount_price?: number;
2600
+ id?: string;
2601
+ image_url?: string | null;
2602
+ normal_price?: number;
2603
+ plants_per_crate?: number | null;
2604
+ product_id?: string | null;
2605
+ product_name?: string;
2606
+ sort_order?: number;
2607
+ sticker_available?: boolean;
2608
+ sticker_cost?: number | null;
822
2609
  };
823
- Relationships: [];
2610
+ Relationships: [
2611
+ {
2612
+ foreignKeyName: "offer_campaign_products_campaign_id_fkey";
2613
+ columns: ["campaign_id"];
2614
+ isOneToOne: false;
2615
+ referencedRelation: "offer_campaigns";
2616
+ referencedColumns: ["id"];
2617
+ },
2618
+ {
2619
+ foreignKeyName: "offer_campaign_products_product_id_fkey";
2620
+ columns: ["product_id"];
2621
+ isOneToOne: false;
2622
+ referencedRelation: "products";
2623
+ referencedColumns: ["id"];
2624
+ }
2625
+ ];
824
2626
  };
825
- floriday_network_sync_state: {
2627
+ offer_campaigns: {
826
2628
  Row: {
827
- connection_id: string;
828
- last_error: string | null;
829
- last_sequence_number: number;
830
- last_synced_at: string | null;
2629
+ created_at: string;
2630
+ created_by: string | null;
2631
+ from_email: string;
2632
+ from_name: string;
2633
+ id: string;
2634
+ intro_message: string | null;
2635
+ name: string;
2636
+ scheduled_at: string | null;
2637
+ sent_at: string | null;
2638
+ status: string;
2639
+ subject: string;
831
2640
  updated_at: string;
832
2641
  };
833
2642
  Insert: {
834
- connection_id: string;
835
- last_error?: string | null;
836
- last_sequence_number?: number;
837
- last_synced_at?: string | null;
2643
+ created_at?: string;
2644
+ created_by?: string | null;
2645
+ from_email: string;
2646
+ from_name: string;
2647
+ id?: string;
2648
+ intro_message?: string | null;
2649
+ name: string;
2650
+ scheduled_at?: string | null;
2651
+ sent_at?: string | null;
2652
+ status?: string;
2653
+ subject: string;
838
2654
  updated_at?: string;
839
2655
  };
840
2656
  Update: {
841
- connection_id?: string;
842
- last_error?: string | null;
843
- last_sequence_number?: number;
844
- last_synced_at?: string | null;
2657
+ created_at?: string;
2658
+ created_by?: string | null;
2659
+ from_email?: string;
2660
+ from_name?: string;
2661
+ id?: string;
2662
+ intro_message?: string | null;
2663
+ name?: string;
2664
+ scheduled_at?: string | null;
2665
+ sent_at?: string | null;
2666
+ status?: string;
2667
+ subject?: string;
845
2668
  updated_at?: string;
846
2669
  };
847
2670
  Relationships: [];
848
2671
  };
849
- floriday_settings: {
2672
+ offer_events: {
850
2673
  Row: {
851
- active_environment: string;
852
- id: number;
853
- updated_at: string;
2674
+ campaign_id: string;
2675
+ created_at: string;
2676
+ event_type: string;
2677
+ id: string;
2678
+ metadata: Json;
2679
+ recipient_id: string;
854
2680
  };
855
2681
  Insert: {
856
- active_environment?: string;
857
- id?: number;
858
- updated_at?: string;
2682
+ campaign_id: string;
2683
+ created_at?: string;
2684
+ event_type: string;
2685
+ id?: string;
2686
+ metadata?: Json;
2687
+ recipient_id: string;
859
2688
  };
860
2689
  Update: {
861
- active_environment?: string;
862
- id?: number;
863
- updated_at?: string;
2690
+ campaign_id?: string;
2691
+ created_at?: string;
2692
+ event_type?: string;
2693
+ id?: string;
2694
+ metadata?: Json;
2695
+ recipient_id?: string;
864
2696
  };
865
- Relationships: [];
2697
+ Relationships: [
2698
+ {
2699
+ foreignKeyName: "offer_events_campaign_id_fkey";
2700
+ columns: ["campaign_id"];
2701
+ isOneToOne: false;
2702
+ referencedRelation: "offer_campaigns";
2703
+ referencedColumns: ["id"];
2704
+ },
2705
+ {
2706
+ foreignKeyName: "offer_events_recipient_id_fkey";
2707
+ columns: ["recipient_id"];
2708
+ isOneToOne: false;
2709
+ referencedRelation: "offer_recipients";
2710
+ referencedColumns: ["id"];
2711
+ }
2712
+ ];
866
2713
  };
867
- inventory_settings: {
2714
+ offer_orders: {
868
2715
  Row: {
2716
+ campaign_id: string;
869
2717
  created_at: string;
870
- hierarchy_levels: string[];
2718
+ customer_email: string;
2719
+ customer_id: string | null;
2720
+ customer_name: string;
2721
+ customer_phone: string | null;
871
2722
  id: string;
872
- updated_at: string;
873
- visible_columns: string[];
2723
+ items: Json;
2724
+ notes: string | null;
2725
+ recipient_id: string;
2726
+ total_amount: number;
874
2727
  };
875
2728
  Insert: {
2729
+ campaign_id: string;
876
2730
  created_at?: string;
877
- hierarchy_levels?: string[];
2731
+ customer_email: string;
2732
+ customer_id?: string | null;
2733
+ customer_name: string;
2734
+ customer_phone?: string | null;
878
2735
  id?: string;
879
- updated_at?: string;
880
- visible_columns?: string[];
2736
+ items?: Json;
2737
+ notes?: string | null;
2738
+ recipient_id: string;
2739
+ total_amount?: number;
881
2740
  };
882
2741
  Update: {
2742
+ campaign_id?: string;
883
2743
  created_at?: string;
884
- hierarchy_levels?: string[];
2744
+ customer_email?: string;
2745
+ customer_id?: string | null;
2746
+ customer_name?: string;
2747
+ customer_phone?: string | null;
885
2748
  id?: string;
886
- updated_at?: string;
887
- visible_columns?: string[];
2749
+ items?: Json;
2750
+ notes?: string | null;
2751
+ recipient_id?: string;
2752
+ total_amount?: number;
888
2753
  };
889
- Relationships: [];
2754
+ Relationships: [
2755
+ {
2756
+ foreignKeyName: "offer_orders_campaign_id_fkey";
2757
+ columns: ["campaign_id"];
2758
+ isOneToOne: false;
2759
+ referencedRelation: "offer_campaigns";
2760
+ referencedColumns: ["id"];
2761
+ },
2762
+ {
2763
+ foreignKeyName: "offer_orders_customer_id_fkey";
2764
+ columns: ["customer_id"];
2765
+ isOneToOne: false;
2766
+ referencedRelation: "customers";
2767
+ referencedColumns: ["id"];
2768
+ },
2769
+ {
2770
+ foreignKeyName: "offer_orders_recipient_id_fkey";
2771
+ columns: ["recipient_id"];
2772
+ isOneToOne: false;
2773
+ referencedRelation: "offer_recipients";
2774
+ referencedColumns: ["id"];
2775
+ }
2776
+ ];
890
2777
  };
891
- locations: {
2778
+ offer_recipients: {
892
2779
  Row: {
2780
+ campaign_id: string;
2781
+ clicked_at: string | null;
2782
+ contact_id: string | null;
893
2783
  created_at: string;
2784
+ customer_id: string | null;
894
2785
  id: string;
895
- name: string;
896
- sort_order: number;
897
- updated_at: string;
2786
+ link_code: string;
2787
+ opened_at: string | null;
2788
+ ordered_at: string | null;
2789
+ recipient_email: string;
2790
+ recipient_name: string;
2791
+ sent_at: string | null;
898
2792
  };
899
2793
  Insert: {
2794
+ campaign_id: string;
2795
+ clicked_at?: string | null;
2796
+ contact_id?: string | null;
900
2797
  created_at?: string;
2798
+ customer_id?: string | null;
901
2799
  id?: string;
902
- name: string;
903
- sort_order?: number;
904
- updated_at?: string;
2800
+ link_code?: string;
2801
+ opened_at?: string | null;
2802
+ ordered_at?: string | null;
2803
+ recipient_email: string;
2804
+ recipient_name: string;
2805
+ sent_at?: string | null;
905
2806
  };
906
2807
  Update: {
2808
+ campaign_id?: string;
2809
+ clicked_at?: string | null;
2810
+ contact_id?: string | null;
907
2811
  created_at?: string;
2812
+ customer_id?: string | null;
908
2813
  id?: string;
909
- name?: string;
910
- sort_order?: number;
911
- updated_at?: string;
2814
+ link_code?: string;
2815
+ opened_at?: string | null;
2816
+ ordered_at?: string | null;
2817
+ recipient_email?: string;
2818
+ recipient_name?: string;
2819
+ sent_at?: string | null;
912
2820
  };
913
- Relationships: [];
2821
+ Relationships: [
2822
+ {
2823
+ foreignKeyName: "offer_recipients_campaign_id_fkey";
2824
+ columns: ["campaign_id"];
2825
+ isOneToOne: false;
2826
+ referencedRelation: "offer_campaigns";
2827
+ referencedColumns: ["id"];
2828
+ },
2829
+ {
2830
+ foreignKeyName: "offer_recipients_contact_id_fkey";
2831
+ columns: ["contact_id"];
2832
+ isOneToOne: false;
2833
+ referencedRelation: "customer_contacts";
2834
+ referencedColumns: ["id"];
2835
+ },
2836
+ {
2837
+ foreignKeyName: "offer_recipients_customer_id_fkey";
2838
+ columns: ["customer_id"];
2839
+ isOneToOne: false;
2840
+ referencedRelation: "customers";
2841
+ referencedColumns: ["id"];
2842
+ }
2843
+ ];
914
2844
  };
915
- notifications: {
2845
+ offer_settings: {
916
2846
  Row: {
2847
+ button_color: string;
917
2848
  created_at: string;
2849
+ default_countries: string[];
2850
+ default_customer_classes: string[];
2851
+ default_intro: string;
2852
+ default_sticker_cost: number;
2853
+ default_subject: string;
2854
+ discount_display: string;
2855
+ excluded_contact_ids: string[];
2856
+ excluded_customer_ids: string[];
2857
+ from_email: string;
2858
+ from_name: string;
918
2859
  id: string;
919
- message: string | null;
920
- read: boolean;
921
- title: string;
2860
+ logo_url: string | null;
2861
+ primary_color: string;
2862
+ show_customer_classes: boolean;
2863
+ singleton: boolean;
2864
+ tracking_enabled: boolean;
922
2865
  updated_at: string;
923
- user_id: string;
924
2866
  };
925
2867
  Insert: {
2868
+ button_color?: string;
926
2869
  created_at?: string;
2870
+ default_countries?: string[];
2871
+ default_customer_classes?: string[];
2872
+ default_intro?: string;
2873
+ default_sticker_cost?: number;
2874
+ default_subject?: string;
2875
+ discount_display?: string;
2876
+ excluded_contact_ids?: string[];
2877
+ excluded_customer_ids?: string[];
2878
+ from_email?: string;
2879
+ from_name?: string;
927
2880
  id?: string;
928
- message?: string | null;
929
- read?: boolean;
930
- title: string;
2881
+ logo_url?: string | null;
2882
+ primary_color?: string;
2883
+ show_customer_classes?: boolean;
2884
+ singleton?: boolean;
2885
+ tracking_enabled?: boolean;
931
2886
  updated_at?: string;
932
- user_id: string;
933
2887
  };
934
2888
  Update: {
2889
+ button_color?: string;
935
2890
  created_at?: string;
2891
+ default_countries?: string[];
2892
+ default_customer_classes?: string[];
2893
+ default_intro?: string;
2894
+ default_sticker_cost?: number;
2895
+ default_subject?: string;
2896
+ discount_display?: string;
2897
+ excluded_contact_ids?: string[];
2898
+ excluded_customer_ids?: string[];
2899
+ from_email?: string;
2900
+ from_name?: string;
936
2901
  id?: string;
937
- message?: string | null;
938
- read?: boolean;
939
- title?: string;
2902
+ logo_url?: string | null;
2903
+ primary_color?: string;
2904
+ show_customer_classes?: boolean;
2905
+ singleton?: boolean;
2906
+ tracking_enabled?: boolean;
940
2907
  updated_at?: string;
941
- user_id?: string;
942
2908
  };
943
2909
  Relationships: [];
944
2910
  };
@@ -1058,61 +3024,154 @@ export type Database = {
1058
3024
  }
1059
3025
  ];
1060
3026
  };
1061
- orders: {
3027
+ orders: {
3028
+ Row: {
3029
+ created_at: string;
3030
+ custom_fields: Json;
3031
+ customer_id: string | null;
3032
+ customer_name: string;
3033
+ deleted_at: string | null;
3034
+ delivery_date: string;
3035
+ id: string;
3036
+ notes: string | null;
3037
+ order_date: string;
3038
+ order_number: string;
3039
+ status: string;
3040
+ total: string;
3041
+ updated_at: string;
3042
+ };
3043
+ Insert: {
3044
+ created_at?: string;
3045
+ custom_fields?: Json;
3046
+ customer_id?: string | null;
3047
+ customer_name?: string;
3048
+ deleted_at?: string | null;
3049
+ delivery_date: string;
3050
+ id?: string;
3051
+ notes?: string | null;
3052
+ order_date?: string;
3053
+ order_number: string;
3054
+ status?: string;
3055
+ total?: string;
3056
+ updated_at?: string;
3057
+ };
3058
+ Update: {
3059
+ created_at?: string;
3060
+ custom_fields?: Json;
3061
+ customer_id?: string | null;
3062
+ customer_name?: string;
3063
+ deleted_at?: string | null;
3064
+ delivery_date?: string;
3065
+ id?: string;
3066
+ notes?: string | null;
3067
+ order_date?: string;
3068
+ order_number?: string;
3069
+ status?: string;
3070
+ total?: string;
3071
+ updated_at?: string;
3072
+ };
3073
+ Relationships: [
3074
+ {
3075
+ foreignKeyName: "orders_customer_id_fkey";
3076
+ columns: ["customer_id"];
3077
+ isOneToOne: false;
3078
+ referencedRelation: "customers";
3079
+ referencedColumns: ["id"];
3080
+ }
3081
+ ];
3082
+ };
3083
+ packages: {
3084
+ Row: {
3085
+ color: string;
3086
+ created_at: string;
3087
+ description: string | null;
3088
+ id: string;
3089
+ is_active: boolean;
3090
+ name: string;
3091
+ sort_order: number;
3092
+ updated_at: string;
3093
+ value: number;
3094
+ };
3095
+ Insert: {
3096
+ color?: string;
3097
+ created_at?: string;
3098
+ description?: string | null;
3099
+ id?: string;
3100
+ is_active?: boolean;
3101
+ name: string;
3102
+ sort_order?: number;
3103
+ updated_at?: string;
3104
+ value?: number;
3105
+ };
3106
+ Update: {
3107
+ color?: string;
3108
+ created_at?: string;
3109
+ description?: string | null;
3110
+ id?: string;
3111
+ is_active?: boolean;
3112
+ name?: string;
3113
+ sort_order?: number;
3114
+ updated_at?: string;
3115
+ value?: number;
3116
+ };
3117
+ Relationships: [];
3118
+ };
3119
+ pipeline_settings: {
3120
+ Row: {
3121
+ created_at: string;
3122
+ id: string;
3123
+ key: string;
3124
+ updated_at: string;
3125
+ value: string | null;
3126
+ };
3127
+ Insert: {
3128
+ created_at?: string;
3129
+ id?: string;
3130
+ key: string;
3131
+ updated_at?: string;
3132
+ value?: string | null;
3133
+ };
3134
+ Update: {
3135
+ created_at?: string;
3136
+ id?: string;
3137
+ key?: string;
3138
+ updated_at?: string;
3139
+ value?: string | null;
3140
+ };
3141
+ Relationships: [];
3142
+ };
3143
+ pipeline_stages: {
1062
3144
  Row: {
3145
+ automation_type: string;
3146
+ color: string;
1063
3147
  created_at: string;
1064
- custom_fields: Json;
1065
- customer_id: string | null;
1066
- customer_name: string;
1067
- deleted_at: string | null;
1068
- delivery_date: string;
1069
3148
  id: string;
1070
- notes: string | null;
1071
- order_date: string;
1072
- order_number: string;
1073
- status: string;
1074
- total: string;
3149
+ is_active: boolean;
3150
+ name: string;
3151
+ sort_order: number;
1075
3152
  updated_at: string;
1076
3153
  };
1077
3154
  Insert: {
3155
+ automation_type?: string;
3156
+ color?: string;
1078
3157
  created_at?: string;
1079
- custom_fields?: Json;
1080
- customer_id?: string | null;
1081
- customer_name?: string;
1082
- deleted_at?: string | null;
1083
- delivery_date: string;
1084
3158
  id?: string;
1085
- notes?: string | null;
1086
- order_date?: string;
1087
- order_number: string;
1088
- status?: string;
1089
- total?: string;
3159
+ is_active?: boolean;
3160
+ name: string;
3161
+ sort_order?: number;
1090
3162
  updated_at?: string;
1091
3163
  };
1092
3164
  Update: {
3165
+ automation_type?: string;
3166
+ color?: string;
1093
3167
  created_at?: string;
1094
- custom_fields?: Json;
1095
- customer_id?: string | null;
1096
- customer_name?: string;
1097
- deleted_at?: string | null;
1098
- delivery_date?: string;
1099
3168
  id?: string;
1100
- notes?: string | null;
1101
- order_date?: string;
1102
- order_number?: string;
1103
- status?: string;
1104
- total?: string;
3169
+ is_active?: boolean;
3170
+ name?: string;
3171
+ sort_order?: number;
1105
3172
  updated_at?: string;
1106
3173
  };
1107
- Relationships: [
1108
- {
1109
- foreignKeyName: "orders_customer_id_fkey";
1110
- columns: ["customer_id"];
1111
- isOneToOne: false;
1112
- referencedRelation: "customers";
1113
- referencedColumns: ["id"];
1114
- }
1115
- ];
3174
+ Relationships: [];
1116
3175
  };
1117
3176
  product_categories: {
1118
3177
  Row: {
@@ -1302,6 +3361,180 @@ export type Database = {
1302
3361
  };
1303
3362
  Relationships: [];
1304
3363
  };
3364
+ projects: {
3365
+ Row: {
3366
+ contact_name: string | null;
3367
+ created_at: string;
3368
+ email: string | null;
3369
+ id: string;
3370
+ name: string;
3371
+ notes: string | null;
3372
+ order_value: number;
3373
+ package_id: string | null;
3374
+ package_name: string | null;
3375
+ phone: string | null;
3376
+ prospect_id: string | null;
3377
+ status: string;
3378
+ updated_at: string;
3379
+ };
3380
+ Insert: {
3381
+ contact_name?: string | null;
3382
+ created_at?: string;
3383
+ email?: string | null;
3384
+ id?: string;
3385
+ name: string;
3386
+ notes?: string | null;
3387
+ order_value?: number;
3388
+ package_id?: string | null;
3389
+ package_name?: string | null;
3390
+ phone?: string | null;
3391
+ prospect_id?: string | null;
3392
+ status?: string;
3393
+ updated_at?: string;
3394
+ };
3395
+ Update: {
3396
+ contact_name?: string | null;
3397
+ created_at?: string;
3398
+ email?: string | null;
3399
+ id?: string;
3400
+ name?: string;
3401
+ notes?: string | null;
3402
+ order_value?: number;
3403
+ package_id?: string | null;
3404
+ package_name?: string | null;
3405
+ phone?: string | null;
3406
+ prospect_id?: string | null;
3407
+ status?: string;
3408
+ updated_at?: string;
3409
+ };
3410
+ Relationships: [
3411
+ {
3412
+ foreignKeyName: "projects_package_id_fkey";
3413
+ columns: ["package_id"];
3414
+ isOneToOne: false;
3415
+ referencedRelation: "packages";
3416
+ referencedColumns: ["id"];
3417
+ },
3418
+ {
3419
+ foreignKeyName: "projects_prospect_id_fkey";
3420
+ columns: ["prospect_id"];
3421
+ isOneToOne: false;
3422
+ referencedRelation: "prospects";
3423
+ referencedColumns: ["id"];
3424
+ }
3425
+ ];
3426
+ };
3427
+ prospect_field_settings: {
3428
+ Row: {
3429
+ created_at: string;
3430
+ field_key: string;
3431
+ field_type: string;
3432
+ id: string;
3433
+ label: string;
3434
+ required: boolean;
3435
+ sort_order: number;
3436
+ updated_at: string;
3437
+ visible: boolean;
3438
+ };
3439
+ Insert: {
3440
+ created_at?: string;
3441
+ field_key: string;
3442
+ field_type?: string;
3443
+ id?: string;
3444
+ label: string;
3445
+ required?: boolean;
3446
+ sort_order?: number;
3447
+ updated_at?: string;
3448
+ visible?: boolean;
3449
+ };
3450
+ Update: {
3451
+ created_at?: string;
3452
+ field_key?: string;
3453
+ field_type?: string;
3454
+ id?: string;
3455
+ label?: string;
3456
+ required?: boolean;
3457
+ sort_order?: number;
3458
+ updated_at?: string;
3459
+ visible?: boolean;
3460
+ };
3461
+ Relationships: [];
3462
+ };
3463
+ prospects: {
3464
+ Row: {
3465
+ address: string | null;
3466
+ company_name: string;
3467
+ contact_name: string | null;
3468
+ created_at: string;
3469
+ email: string | null;
3470
+ id: string;
3471
+ industry: string | null;
3472
+ notes: string | null;
3473
+ order_value: number;
3474
+ package_id: string | null;
3475
+ phone: string | null;
3476
+ source: string | null;
3477
+ stage_id: string | null;
3478
+ status: string;
3479
+ updated_at: string;
3480
+ value_mode: string;
3481
+ website: string | null;
3482
+ };
3483
+ Insert: {
3484
+ address?: string | null;
3485
+ company_name: string;
3486
+ contact_name?: string | null;
3487
+ created_at?: string;
3488
+ email?: string | null;
3489
+ id?: string;
3490
+ industry?: string | null;
3491
+ notes?: string | null;
3492
+ order_value?: number;
3493
+ package_id?: string | null;
3494
+ phone?: string | null;
3495
+ source?: string | null;
3496
+ stage_id?: string | null;
3497
+ status?: string;
3498
+ updated_at?: string;
3499
+ value_mode?: string;
3500
+ website?: string | null;
3501
+ };
3502
+ Update: {
3503
+ address?: string | null;
3504
+ company_name?: string;
3505
+ contact_name?: string | null;
3506
+ created_at?: string;
3507
+ email?: string | null;
3508
+ id?: string;
3509
+ industry?: string | null;
3510
+ notes?: string | null;
3511
+ order_value?: number;
3512
+ package_id?: string | null;
3513
+ phone?: string | null;
3514
+ source?: string | null;
3515
+ stage_id?: string | null;
3516
+ status?: string;
3517
+ updated_at?: string;
3518
+ value_mode?: string;
3519
+ website?: string | null;
3520
+ };
3521
+ Relationships: [
3522
+ {
3523
+ foreignKeyName: "prospects_package_id_fkey";
3524
+ columns: ["package_id"];
3525
+ isOneToOne: false;
3526
+ referencedRelation: "packages";
3527
+ referencedColumns: ["id"];
3528
+ },
3529
+ {
3530
+ foreignKeyName: "prospects_stage_id_fkey";
3531
+ columns: ["stage_id"];
3532
+ isOneToOne: false;
3533
+ referencedRelation: "pipeline_stages";
3534
+ referencedColumns: ["id"];
3535
+ }
3536
+ ];
3537
+ };
1305
3538
  purchase_order_items: {
1306
3539
  Row: {
1307
3540
  created_at: string;
@@ -1398,6 +3631,88 @@ export type Database = {
1398
3631
  }
1399
3632
  ];
1400
3633
  };
3634
+ quote_items: {
3635
+ Row: {
3636
+ created_at: string;
3637
+ description: string;
3638
+ id: string;
3639
+ quantity: number;
3640
+ quote_id: string;
3641
+ sort_order: number;
3642
+ unit_price: number;
3643
+ };
3644
+ Insert: {
3645
+ created_at?: string;
3646
+ description?: string;
3647
+ id?: string;
3648
+ quantity?: number;
3649
+ quote_id: string;
3650
+ sort_order?: number;
3651
+ unit_price?: number;
3652
+ };
3653
+ Update: {
3654
+ created_at?: string;
3655
+ description?: string;
3656
+ id?: string;
3657
+ quantity?: number;
3658
+ quote_id?: string;
3659
+ sort_order?: number;
3660
+ unit_price?: number;
3661
+ };
3662
+ Relationships: [
3663
+ {
3664
+ foreignKeyName: "quote_items_quote_id_fkey";
3665
+ columns: ["quote_id"];
3666
+ isOneToOne: false;
3667
+ referencedRelation: "quotes";
3668
+ referencedColumns: ["id"];
3669
+ }
3670
+ ];
3671
+ };
3672
+ quotes: {
3673
+ Row: {
3674
+ created_at: string;
3675
+ id: string;
3676
+ notes: string | null;
3677
+ prospect_id: string | null;
3678
+ quote_number: string | null;
3679
+ status: string;
3680
+ title: string;
3681
+ updated_at: string;
3682
+ valid_until: string | null;
3683
+ };
3684
+ Insert: {
3685
+ created_at?: string;
3686
+ id?: string;
3687
+ notes?: string | null;
3688
+ prospect_id?: string | null;
3689
+ quote_number?: string | null;
3690
+ status?: string;
3691
+ title?: string;
3692
+ updated_at?: string;
3693
+ valid_until?: string | null;
3694
+ };
3695
+ Update: {
3696
+ created_at?: string;
3697
+ id?: string;
3698
+ notes?: string | null;
3699
+ prospect_id?: string | null;
3700
+ quote_number?: string | null;
3701
+ status?: string;
3702
+ title?: string;
3703
+ updated_at?: string;
3704
+ valid_until?: string | null;
3705
+ };
3706
+ Relationships: [
3707
+ {
3708
+ foreignKeyName: "quotes_prospect_id_fkey";
3709
+ columns: ["prospect_id"];
3710
+ isOneToOne: false;
3711
+ referencedRelation: "prospects";
3712
+ referencedColumns: ["id"];
3713
+ }
3714
+ ];
3715
+ };
1401
3716
  supplier_products: {
1402
3717
  Row: {
1403
3718
  article_number: string | null;
@@ -1554,6 +3869,32 @@ export type Database = {
1554
3869
  [_ in never]: never;
1555
3870
  };
1556
3871
  Functions: {
3872
+ dashboard_list_public_schema: {
3873
+ Args: never;
3874
+ Returns: {
3875
+ column_name: string;
3876
+ data_type: string;
3877
+ table_name: string;
3878
+ }[];
3879
+ };
3880
+ exact_decrypt: {
3881
+ Args: {
3882
+ cipher: string;
3883
+ };
3884
+ Returns: string;
3885
+ };
3886
+ exact_encrypt: {
3887
+ Args: {
3888
+ plain: string;
3889
+ };
3890
+ Returns: string;
3891
+ };
3892
+ get_offer_by_link_code: {
3893
+ Args: {
3894
+ p_code: string;
3895
+ };
3896
+ Returns: Json;
3897
+ };
1557
3898
  has_role: {
1558
3899
  Args: {
1559
3900
  _role: Database["public"]["Enums"]["app_role"];