@flowselections/floriday-voorraad 1.0.12 → 1.0.13

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 (32) hide show
  1. package/dist-lib/components/voorraad/ConnectionBadge.d.ts +6 -0
  2. package/dist-lib/components/voorraad/ConnectionBadge.d.ts.map +1 -0
  3. package/dist-lib/components/voorraad/ConnectionBadge.js +12 -0
  4. package/dist-lib/components/voorraad/VoorraadPage.d.ts.map +1 -1
  5. package/dist-lib/components/voorraad/VoorraadPage.js +18 -10
  6. package/dist-lib/components/voorraad/VoorraadTable.d.ts.map +1 -1
  7. package/dist-lib/components/voorraad/VoorraadTable.js +10 -2
  8. package/dist-lib/hooks/useFloridayConnection.d.ts +9 -4
  9. package/dist-lib/hooks/useFloridayConnection.d.ts.map +1 -1
  10. package/dist-lib/hooks/useFloridayConnection.js +23 -23
  11. package/dist-lib/hooks/useFlorydayCustomers.d.ts +17 -0
  12. package/dist-lib/hooks/useFlorydayCustomers.d.ts.map +1 -0
  13. package/dist-lib/hooks/useFlorydayCustomers.js +65 -0
  14. package/dist-lib/hooks/useLocalTradeItems.d.ts +22 -0
  15. package/dist-lib/hooks/useLocalTradeItems.d.ts.map +1 -0
  16. package/dist-lib/hooks/useLocalTradeItems.js +100 -0
  17. package/dist-lib/hooks/useVoorraadData.d.ts +5 -0
  18. package/dist-lib/hooks/useVoorraadData.d.ts.map +1 -1
  19. package/dist-lib/hooks/useVoorraadData.js +37 -10
  20. package/dist-lib/integrations/supabase/auth-middleware.d.ts +2493 -32
  21. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
  22. package/dist-lib/integrations/supabase/client.d.ts +2493 -32
  23. package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
  24. package/dist-lib/integrations/supabase/client.server.d.ts +2493 -32
  25. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
  26. package/dist-lib/integrations/supabase/types.d.ts +2606 -82
  27. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  28. package/dist-lib/integrations/supabase/types.js +10 -0
  29. package/dist-lib/lib/floriday-client.d.ts +10 -12
  30. package/dist-lib/lib/floriday-client.d.ts.map +1 -1
  31. package/dist-lib/lib/floriday-client.js +32 -15
  32. package/package.json +2 -2
@@ -2,6 +2,192 @@ import type { Database } from './types';
2
2
  export declare const requireSupabaseAuth: import("@tanstack/start-client-core").FunctionMiddlewareAfterServer<{}, unknown, undefined, {
3
3
  supabase: import("@supabase/supabase-js").SupabaseClient<Database, "public", "public", {
4
4
  Tables: {
5
+ agenda_connections: {
6
+ Row: {
7
+ account_email: string | null;
8
+ created_at: string;
9
+ id: string;
10
+ last_error: string | null;
11
+ last_synced_at: string | null;
12
+ provider: string;
13
+ selected_calendars: import("./types").Json;
14
+ status: string;
15
+ sync_mode: string;
16
+ updated_at: string;
17
+ user_id: string;
18
+ };
19
+ Insert: {
20
+ account_email?: string | null;
21
+ created_at?: string;
22
+ id?: string;
23
+ last_error?: string | null;
24
+ last_synced_at?: string | null;
25
+ provider: string;
26
+ selected_calendars?: import("./types").Json;
27
+ status?: string;
28
+ sync_mode?: string;
29
+ updated_at?: string;
30
+ user_id: string;
31
+ };
32
+ Update: {
33
+ account_email?: string | null;
34
+ created_at?: string;
35
+ id?: string;
36
+ last_error?: string | null;
37
+ last_synced_at?: string | null;
38
+ provider?: string;
39
+ selected_calendars?: import("./types").Json;
40
+ status?: string;
41
+ sync_mode?: string;
42
+ updated_at?: string;
43
+ user_id?: string;
44
+ };
45
+ Relationships: [];
46
+ };
47
+ agenda_events: {
48
+ Row: {
49
+ all_day: boolean;
50
+ calendar_id: string;
51
+ category: string | null;
52
+ color: string;
53
+ created_at: string;
54
+ description: string | null;
55
+ end_at: string;
56
+ external_id: string | null;
57
+ external_provider: string | null;
58
+ id: string;
59
+ linked_data: import("./types").Json;
60
+ location: string | null;
61
+ notes: string | null;
62
+ recurrence: string | null;
63
+ reminders: import("./types").Json;
64
+ source_id: string | null;
65
+ source_module: string;
66
+ source_type: string | null;
67
+ start_at: string;
68
+ status: string;
69
+ title: string;
70
+ updated_at: string;
71
+ user_id: string;
72
+ };
73
+ Insert: {
74
+ all_day?: boolean;
75
+ calendar_id?: string;
76
+ category?: string | null;
77
+ color?: string;
78
+ created_at?: string;
79
+ description?: string | null;
80
+ end_at: string;
81
+ external_id?: string | null;
82
+ external_provider?: string | null;
83
+ id?: string;
84
+ linked_data?: import("./types").Json;
85
+ location?: string | null;
86
+ notes?: string | null;
87
+ recurrence?: string | null;
88
+ reminders?: import("./types").Json;
89
+ source_id?: string | null;
90
+ source_module?: string;
91
+ source_type?: string | null;
92
+ start_at: string;
93
+ status?: string;
94
+ title: string;
95
+ updated_at?: string;
96
+ user_id: string;
97
+ };
98
+ Update: {
99
+ all_day?: boolean;
100
+ calendar_id?: string;
101
+ category?: string | null;
102
+ color?: string;
103
+ created_at?: string;
104
+ description?: string | null;
105
+ end_at?: string;
106
+ external_id?: string | null;
107
+ external_provider?: string | null;
108
+ id?: string;
109
+ linked_data?: import("./types").Json;
110
+ location?: string | null;
111
+ notes?: string | null;
112
+ recurrence?: string | null;
113
+ reminders?: import("./types").Json;
114
+ source_id?: string | null;
115
+ source_module?: string;
116
+ source_type?: string | null;
117
+ start_at?: string;
118
+ status?: string;
119
+ title?: string;
120
+ updated_at?: string;
121
+ user_id?: string;
122
+ };
123
+ Relationships: [];
124
+ };
125
+ agenda_oauth_tokens: {
126
+ Row: {
127
+ access_token: string | null;
128
+ created_at: string;
129
+ id: string;
130
+ provider: string;
131
+ refresh_token: string | null;
132
+ scope: string | null;
133
+ token_expires_at: string | null;
134
+ updated_at: string;
135
+ user_id: string;
136
+ };
137
+ Insert: {
138
+ access_token?: string | null;
139
+ created_at?: string;
140
+ id?: string;
141
+ provider: string;
142
+ refresh_token?: string | null;
143
+ scope?: string | null;
144
+ token_expires_at?: string | null;
145
+ updated_at?: string;
146
+ user_id: string;
147
+ };
148
+ Update: {
149
+ access_token?: string | null;
150
+ created_at?: string;
151
+ id?: string;
152
+ provider?: string;
153
+ refresh_token?: string | null;
154
+ scope?: string | null;
155
+ token_expires_at?: string | null;
156
+ updated_at?: string;
157
+ user_id?: string;
158
+ };
159
+ Relationships: [];
160
+ };
161
+ agenda_settings: {
162
+ Row: {
163
+ color_map: import("./types").Json;
164
+ created_at: string;
165
+ default_calendar_id: string;
166
+ default_view: string;
167
+ settings: import("./types").Json;
168
+ updated_at: string;
169
+ user_id: string;
170
+ };
171
+ Insert: {
172
+ color_map?: import("./types").Json;
173
+ created_at?: string;
174
+ default_calendar_id?: string;
175
+ default_view?: string;
176
+ settings?: import("./types").Json;
177
+ updated_at?: string;
178
+ user_id: string;
179
+ };
180
+ Update: {
181
+ color_map?: import("./types").Json;
182
+ created_at?: string;
183
+ default_calendar_id?: string;
184
+ default_view?: string;
185
+ settings?: import("./types").Json;
186
+ updated_at?: string;
187
+ user_id?: string;
188
+ };
189
+ Relationships: [];
190
+ };
5
191
  bugs: {
6
192
  Row: {
7
193
  attachment_url: string | null;
@@ -746,6 +932,315 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
746
932
  };
747
933
  Relationships: [];
748
934
  };
935
+ email_auth_connections: {
936
+ Row: {
937
+ access_token_encrypted: string | null;
938
+ account_email: string | null;
939
+ client_id_encrypted: string | null;
940
+ client_secret_encrypted: string | null;
941
+ created_at: string;
942
+ created_by: string | null;
943
+ display_name: string | null;
944
+ id: string;
945
+ imap_host: string | null;
946
+ imap_password_encrypted: string | null;
947
+ imap_port: number | null;
948
+ imap_secure: boolean | null;
949
+ imap_username: string | null;
950
+ is_active: boolean;
951
+ last_error: string | null;
952
+ last_verified_at: string | null;
953
+ oauth_mode: string | null;
954
+ provider: string;
955
+ refresh_token_encrypted: string | null;
956
+ scopes: string[] | null;
957
+ smtp_host: string | null;
958
+ smtp_password_encrypted: string | null;
959
+ smtp_port: number | null;
960
+ smtp_secure: boolean | null;
961
+ smtp_username: string | null;
962
+ status: string;
963
+ token_expires_at: string | null;
964
+ updated_at: string;
965
+ };
966
+ Insert: {
967
+ access_token_encrypted?: string | null;
968
+ account_email?: string | null;
969
+ client_id_encrypted?: string | null;
970
+ client_secret_encrypted?: string | null;
971
+ created_at?: string;
972
+ created_by?: string | null;
973
+ display_name?: string | null;
974
+ id?: string;
975
+ imap_host?: string | null;
976
+ imap_password_encrypted?: string | null;
977
+ imap_port?: number | null;
978
+ imap_secure?: boolean | null;
979
+ imap_username?: string | null;
980
+ is_active?: boolean;
981
+ last_error?: string | null;
982
+ last_verified_at?: string | null;
983
+ oauth_mode?: string | null;
984
+ provider: string;
985
+ refresh_token_encrypted?: string | null;
986
+ scopes?: string[] | null;
987
+ smtp_host?: string | null;
988
+ smtp_password_encrypted?: string | null;
989
+ smtp_port?: number | null;
990
+ smtp_secure?: boolean | null;
991
+ smtp_username?: string | null;
992
+ status?: string;
993
+ token_expires_at?: string | null;
994
+ updated_at?: string;
995
+ };
996
+ Update: {
997
+ access_token_encrypted?: string | null;
998
+ account_email?: string | null;
999
+ client_id_encrypted?: string | null;
1000
+ client_secret_encrypted?: string | null;
1001
+ created_at?: string;
1002
+ created_by?: string | null;
1003
+ display_name?: string | null;
1004
+ id?: string;
1005
+ imap_host?: string | null;
1006
+ imap_password_encrypted?: string | null;
1007
+ imap_port?: number | null;
1008
+ imap_secure?: boolean | null;
1009
+ imap_username?: string | null;
1010
+ is_active?: boolean;
1011
+ last_error?: string | null;
1012
+ last_verified_at?: string | null;
1013
+ oauth_mode?: string | null;
1014
+ provider?: string;
1015
+ refresh_token_encrypted?: string | null;
1016
+ scopes?: string[] | null;
1017
+ smtp_host?: string | null;
1018
+ smtp_password_encrypted?: string | null;
1019
+ smtp_port?: number | null;
1020
+ smtp_secure?: boolean | null;
1021
+ smtp_username?: string | null;
1022
+ status?: string;
1023
+ token_expires_at?: string | null;
1024
+ updated_at?: string;
1025
+ };
1026
+ Relationships: [];
1027
+ };
1028
+ exact_account_analytics_cache: {
1029
+ Row: {
1030
+ account_id: string;
1031
+ account_name: string | null;
1032
+ avg_payment_days: number | null;
1033
+ computed_at: string;
1034
+ connection_id: string;
1035
+ expires_at: string | null;
1036
+ id: string;
1037
+ invoice_count: number | null;
1038
+ last_invoice_date: string | null;
1039
+ last_payment_date: string | null;
1040
+ open_balance: number | null;
1041
+ overdue_balance: number | null;
1042
+ total_revenue: number | null;
1043
+ };
1044
+ Insert: {
1045
+ account_id: string;
1046
+ account_name?: string | null;
1047
+ avg_payment_days?: number | null;
1048
+ computed_at?: string;
1049
+ connection_id: string;
1050
+ expires_at?: string | null;
1051
+ id?: string;
1052
+ invoice_count?: number | null;
1053
+ last_invoice_date?: string | null;
1054
+ last_payment_date?: string | null;
1055
+ open_balance?: number | null;
1056
+ overdue_balance?: number | null;
1057
+ total_revenue?: number | null;
1058
+ };
1059
+ Update: {
1060
+ account_id?: string;
1061
+ account_name?: string | null;
1062
+ avg_payment_days?: number | null;
1063
+ computed_at?: string;
1064
+ connection_id?: string;
1065
+ expires_at?: string | null;
1066
+ id?: string;
1067
+ invoice_count?: number | null;
1068
+ last_invoice_date?: string | null;
1069
+ last_payment_date?: string | null;
1070
+ open_balance?: number | null;
1071
+ overdue_balance?: number | null;
1072
+ total_revenue?: number | null;
1073
+ };
1074
+ Relationships: [{
1075
+ foreignKeyName: "exact_account_analytics_cache_connection_id_fkey";
1076
+ columns: ["connection_id"];
1077
+ isOneToOne: false;
1078
+ referencedRelation: "exact_connections";
1079
+ referencedColumns: ["id"];
1080
+ }];
1081
+ };
1082
+ exact_analytics_cache: {
1083
+ Row: {
1084
+ analytics_type: string;
1085
+ avg_payment_days: number | null;
1086
+ computed_at: string;
1087
+ connection_id: string;
1088
+ data_raw: import("./types").Json | null;
1089
+ expires_at: string | null;
1090
+ id: string;
1091
+ open_count: number | null;
1092
+ overdue_amount: number | null;
1093
+ paid_this_month: number | null;
1094
+ period_key: string;
1095
+ total_invoiced: number | null;
1096
+ total_open: number | null;
1097
+ };
1098
+ Insert: {
1099
+ analytics_type: string;
1100
+ avg_payment_days?: number | null;
1101
+ computed_at?: string;
1102
+ connection_id: string;
1103
+ data_raw?: import("./types").Json | null;
1104
+ expires_at?: string | null;
1105
+ id?: string;
1106
+ open_count?: number | null;
1107
+ overdue_amount?: number | null;
1108
+ paid_this_month?: number | null;
1109
+ period_key: string;
1110
+ total_invoiced?: number | null;
1111
+ total_open?: number | null;
1112
+ };
1113
+ Update: {
1114
+ analytics_type?: string;
1115
+ avg_payment_days?: number | null;
1116
+ computed_at?: string;
1117
+ connection_id?: string;
1118
+ data_raw?: import("./types").Json | null;
1119
+ expires_at?: string | null;
1120
+ id?: string;
1121
+ open_count?: number | null;
1122
+ overdue_amount?: number | null;
1123
+ paid_this_month?: number | null;
1124
+ period_key?: string;
1125
+ total_invoiced?: number | null;
1126
+ total_open?: number | null;
1127
+ };
1128
+ Relationships: [{
1129
+ foreignKeyName: "exact_analytics_cache_connection_id_fkey";
1130
+ columns: ["connection_id"];
1131
+ isOneToOne: false;
1132
+ referencedRelation: "exact_connections";
1133
+ referencedColumns: ["id"];
1134
+ }];
1135
+ };
1136
+ exact_bulk_operation_items: {
1137
+ Row: {
1138
+ attempts: number;
1139
+ bulk_operation_id: string;
1140
+ created_at: string;
1141
+ error_message: string | null;
1142
+ id: string;
1143
+ invoice_cache_id: string | null;
1144
+ invoice_exact_id: string | null;
1145
+ processed_at: string | null;
1146
+ result_data: import("./types").Json | null;
1147
+ status: string;
1148
+ };
1149
+ Insert: {
1150
+ attempts?: number;
1151
+ bulk_operation_id: string;
1152
+ created_at?: string;
1153
+ error_message?: string | null;
1154
+ id?: string;
1155
+ invoice_cache_id?: string | null;
1156
+ invoice_exact_id?: string | null;
1157
+ processed_at?: string | null;
1158
+ result_data?: import("./types").Json | null;
1159
+ status?: string;
1160
+ };
1161
+ Update: {
1162
+ attempts?: number;
1163
+ bulk_operation_id?: string;
1164
+ created_at?: string;
1165
+ error_message?: string | null;
1166
+ id?: string;
1167
+ invoice_cache_id?: string | null;
1168
+ invoice_exact_id?: string | null;
1169
+ processed_at?: string | null;
1170
+ result_data?: import("./types").Json | null;
1171
+ status?: string;
1172
+ };
1173
+ Relationships: [{
1174
+ foreignKeyName: "exact_bulk_operation_items_bulk_operation_id_fkey";
1175
+ columns: ["bulk_operation_id"];
1176
+ isOneToOne: false;
1177
+ referencedRelation: "exact_bulk_operations";
1178
+ referencedColumns: ["id"];
1179
+ }, {
1180
+ foreignKeyName: "exact_bulk_operation_items_invoice_cache_id_fkey";
1181
+ columns: ["invoice_cache_id"];
1182
+ isOneToOne: false;
1183
+ referencedRelation: "exact_invoices_cache";
1184
+ referencedColumns: ["id"];
1185
+ }];
1186
+ };
1187
+ exact_bulk_operations: {
1188
+ Row: {
1189
+ completed_at: string | null;
1190
+ connection_id: string;
1191
+ created_at: string;
1192
+ created_by: string | null;
1193
+ error_message: string | null;
1194
+ failed_count: number | null;
1195
+ id: string;
1196
+ operation_type: string;
1197
+ processed_count: number | null;
1198
+ result_data: import("./types").Json | null;
1199
+ started_at: string | null;
1200
+ status: string;
1201
+ total_count: number | null;
1202
+ updated_at: string;
1203
+ };
1204
+ Insert: {
1205
+ completed_at?: string | null;
1206
+ connection_id: string;
1207
+ created_at?: string;
1208
+ created_by?: string | null;
1209
+ error_message?: string | null;
1210
+ failed_count?: number | null;
1211
+ id?: string;
1212
+ operation_type: string;
1213
+ processed_count?: number | null;
1214
+ result_data?: import("./types").Json | null;
1215
+ started_at?: string | null;
1216
+ status?: string;
1217
+ total_count?: number | null;
1218
+ updated_at?: string;
1219
+ };
1220
+ Update: {
1221
+ completed_at?: string | null;
1222
+ connection_id?: string;
1223
+ created_at?: string;
1224
+ created_by?: string | null;
1225
+ error_message?: string | null;
1226
+ failed_count?: number | null;
1227
+ id?: string;
1228
+ operation_type?: string;
1229
+ processed_count?: number | null;
1230
+ result_data?: import("./types").Json | null;
1231
+ started_at?: string | null;
1232
+ status?: string;
1233
+ total_count?: number | null;
1234
+ updated_at?: string;
1235
+ };
1236
+ Relationships: [{
1237
+ foreignKeyName: "exact_bulk_operations_connection_id_fkey";
1238
+ columns: ["connection_id"];
1239
+ isOneToOne: false;
1240
+ referencedRelation: "exact_connections";
1241
+ referencedColumns: ["id"];
1242
+ }];
1243
+ };
749
1244
  exact_connections: {
750
1245
  Row: {
751
1246
  access_token_encrypted: string;
@@ -827,24 +1322,450 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
827
1322
  };
828
1323
  Relationships: [];
829
1324
  };
830
- exact_customers_cache: {
1325
+ exact_customer_sync_queue: {
831
1326
  Row: {
1327
+ attempts: number;
832
1328
  connection_id: string;
833
- data: import("./types").Json;
834
- exact_id: string;
835
- fetched_at: string;
1329
+ created_at: string;
1330
+ customer_exact_id: string | null;
1331
+ error_message: string | null;
1332
+ id: string;
1333
+ max_attempts: number;
1334
+ operation: string;
1335
+ payload: import("./types").Json;
1336
+ process_at: string;
1337
+ processed_at: string | null;
1338
+ status: string;
1339
+ updated_at: string;
836
1340
  };
837
1341
  Insert: {
1342
+ attempts?: number;
838
1343
  connection_id: string;
839
- data?: import("./types").Json;
840
- exact_id: string;
841
- fetched_at?: string;
842
- };
843
- Update: {
844
- connection_id?: string;
845
- data?: import("./types").Json;
1344
+ created_at?: string;
1345
+ customer_exact_id?: string | null;
1346
+ error_message?: string | null;
1347
+ id?: string;
1348
+ max_attempts?: number;
1349
+ operation: string;
1350
+ payload?: import("./types").Json;
1351
+ process_at?: string;
1352
+ processed_at?: string | null;
1353
+ status?: string;
1354
+ updated_at?: string;
1355
+ };
1356
+ Update: {
1357
+ attempts?: number;
1358
+ connection_id?: string;
1359
+ created_at?: string;
1360
+ customer_exact_id?: string | null;
1361
+ error_message?: string | null;
1362
+ id?: string;
1363
+ max_attempts?: number;
1364
+ operation?: string;
1365
+ payload?: import("./types").Json;
1366
+ process_at?: string;
1367
+ processed_at?: string | null;
1368
+ status?: string;
1369
+ updated_at?: string;
1370
+ };
1371
+ Relationships: [{
1372
+ foreignKeyName: "exact_customer_sync_queue_connection_id_fkey";
1373
+ columns: ["connection_id"];
1374
+ isOneToOne: false;
1375
+ referencedRelation: "exact_connections";
1376
+ referencedColumns: ["id"];
1377
+ }];
1378
+ };
1379
+ exact_customers_cache: {
1380
+ Row: {
1381
+ account_name: string | null;
1382
+ account_number: string | null;
1383
+ address_line1: string | null;
1384
+ address_line2: string | null;
1385
+ balance: number | null;
1386
+ chamber_of_commerce: string | null;
1387
+ city: string | null;
1388
+ classification_description: string | null;
1389
+ connection_id: string;
1390
+ contact_name: string | null;
1391
+ country: string | null;
1392
+ created_at_exact: string | null;
1393
+ credit_line: number | null;
1394
+ currency: string | null;
1395
+ data_raw: import("./types").Json | null;
1396
+ email: string | null;
1397
+ exact_id: string;
1398
+ expires_at: string | null;
1399
+ fetched_at: string;
1400
+ id: string;
1401
+ is_sales: boolean | null;
1402
+ is_supplier: boolean | null;
1403
+ language: string | null;
1404
+ modified_at_exact: string | null;
1405
+ payment_condition_description: string | null;
1406
+ payment_condition_sales: string | null;
1407
+ phone: string | null;
1408
+ postal_code: string | null;
1409
+ remarks: string | null;
1410
+ search_text: string | null;
1411
+ status: string | null;
1412
+ updated_at: string;
1413
+ vat_number: string | null;
1414
+ website: string | null;
1415
+ };
1416
+ Insert: {
1417
+ account_name?: string | null;
1418
+ account_number?: string | null;
1419
+ address_line1?: string | null;
1420
+ address_line2?: string | null;
1421
+ balance?: number | null;
1422
+ chamber_of_commerce?: string | null;
1423
+ city?: string | null;
1424
+ classification_description?: string | null;
1425
+ connection_id: string;
1426
+ contact_name?: string | null;
1427
+ country?: string | null;
1428
+ created_at_exact?: string | null;
1429
+ credit_line?: number | null;
1430
+ currency?: string | null;
1431
+ data_raw?: import("./types").Json | null;
1432
+ email?: string | null;
1433
+ exact_id: string;
1434
+ expires_at?: string | null;
1435
+ fetched_at?: string;
1436
+ id?: string;
1437
+ is_sales?: boolean | null;
1438
+ is_supplier?: boolean | null;
1439
+ language?: string | null;
1440
+ modified_at_exact?: string | null;
1441
+ payment_condition_description?: string | null;
1442
+ payment_condition_sales?: string | null;
1443
+ phone?: string | null;
1444
+ postal_code?: string | null;
1445
+ remarks?: string | null;
1446
+ search_text?: string | null;
1447
+ status?: string | null;
1448
+ updated_at?: string;
1449
+ vat_number?: string | null;
1450
+ website?: string | null;
1451
+ };
1452
+ Update: {
1453
+ account_name?: string | null;
1454
+ account_number?: string | null;
1455
+ address_line1?: string | null;
1456
+ address_line2?: string | null;
1457
+ balance?: number | null;
1458
+ chamber_of_commerce?: string | null;
1459
+ city?: string | null;
1460
+ classification_description?: string | null;
1461
+ connection_id?: string;
1462
+ contact_name?: string | null;
1463
+ country?: string | null;
1464
+ created_at_exact?: string | null;
1465
+ credit_line?: number | null;
1466
+ currency?: string | null;
1467
+ data_raw?: import("./types").Json | null;
1468
+ email?: string | null;
1469
+ exact_id?: string;
1470
+ expires_at?: string | null;
1471
+ fetched_at?: string;
1472
+ id?: string;
1473
+ is_sales?: boolean | null;
1474
+ is_supplier?: boolean | null;
1475
+ language?: string | null;
1476
+ modified_at_exact?: string | null;
1477
+ payment_condition_description?: string | null;
1478
+ payment_condition_sales?: string | null;
1479
+ phone?: string | null;
1480
+ postal_code?: string | null;
1481
+ remarks?: string | null;
1482
+ search_text?: string | null;
1483
+ status?: string | null;
1484
+ updated_at?: string;
1485
+ vat_number?: string | null;
1486
+ website?: string | null;
1487
+ };
1488
+ Relationships: [{
1489
+ foreignKeyName: "exact_customers_cache_connection_id_fkey";
1490
+ columns: ["connection_id"];
1491
+ isOneToOne: false;
1492
+ referencedRelation: "exact_connections";
1493
+ referencedColumns: ["id"];
1494
+ }];
1495
+ };
1496
+ exact_invoice_actions: {
1497
+ Row: {
1498
+ action_type: string;
1499
+ connection_id: string;
1500
+ created_at: string;
1501
+ created_by: string | null;
1502
+ error_message: string | null;
1503
+ id: string;
1504
+ invoice_cache_id: string | null;
1505
+ invoice_exact_id: string | null;
1506
+ rate_limit_remaining: number | null;
1507
+ response_data: import("./types").Json | null;
1508
+ status: string;
1509
+ };
1510
+ Insert: {
1511
+ action_type: string;
1512
+ connection_id: string;
1513
+ created_at?: string;
1514
+ created_by?: string | null;
1515
+ error_message?: string | null;
1516
+ id?: string;
1517
+ invoice_cache_id?: string | null;
1518
+ invoice_exact_id?: string | null;
1519
+ rate_limit_remaining?: number | null;
1520
+ response_data?: import("./types").Json | null;
1521
+ status: string;
1522
+ };
1523
+ Update: {
1524
+ action_type?: string;
1525
+ connection_id?: string;
1526
+ created_at?: string;
1527
+ created_by?: string | null;
1528
+ error_message?: string | null;
1529
+ id?: string;
1530
+ invoice_cache_id?: string | null;
1531
+ invoice_exact_id?: string | null;
1532
+ rate_limit_remaining?: number | null;
1533
+ response_data?: import("./types").Json | null;
1534
+ status?: string;
1535
+ };
1536
+ Relationships: [{
1537
+ foreignKeyName: "exact_invoice_actions_connection_id_fkey";
1538
+ columns: ["connection_id"];
1539
+ isOneToOne: false;
1540
+ referencedRelation: "exact_connections";
1541
+ referencedColumns: ["id"];
1542
+ }, {
1543
+ foreignKeyName: "exact_invoice_actions_invoice_cache_id_fkey";
1544
+ columns: ["invoice_cache_id"];
1545
+ isOneToOne: false;
1546
+ referencedRelation: "exact_invoices_cache";
1547
+ referencedColumns: ["id"];
1548
+ }];
1549
+ };
1550
+ exact_invoice_lines_cache: {
1551
+ Row: {
1552
+ connection_id: string;
1553
+ created_at: string;
1554
+ data_raw: import("./types").Json | null;
1555
+ description: string | null;
1556
+ discount: number | null;
1557
+ exact_line_id: string;
1558
+ gl_account_code: string | null;
1559
+ id: string;
1560
+ invoice_cache_id: string;
1561
+ item_code: string | null;
1562
+ line_total: number | null;
1563
+ quantity: number | null;
1564
+ unit_price: number | null;
1565
+ vat_code: string | null;
1566
+ };
1567
+ Insert: {
1568
+ connection_id: string;
1569
+ created_at?: string;
1570
+ data_raw?: import("./types").Json | null;
1571
+ description?: string | null;
1572
+ discount?: number | null;
1573
+ exact_line_id: string;
1574
+ gl_account_code?: string | null;
1575
+ id?: string;
1576
+ invoice_cache_id: string;
1577
+ item_code?: string | null;
1578
+ line_total?: number | null;
1579
+ quantity?: number | null;
1580
+ unit_price?: number | null;
1581
+ vat_code?: string | null;
1582
+ };
1583
+ Update: {
1584
+ connection_id?: string;
1585
+ created_at?: string;
1586
+ data_raw?: import("./types").Json | null;
1587
+ description?: string | null;
1588
+ discount?: number | null;
1589
+ exact_line_id?: string;
1590
+ gl_account_code?: string | null;
1591
+ id?: string;
1592
+ invoice_cache_id?: string;
1593
+ item_code?: string | null;
1594
+ line_total?: number | null;
1595
+ quantity?: number | null;
1596
+ unit_price?: number | null;
1597
+ vat_code?: string | null;
1598
+ };
1599
+ Relationships: [{
1600
+ foreignKeyName: "exact_invoice_lines_cache_connection_id_fkey";
1601
+ columns: ["connection_id"];
1602
+ isOneToOne: false;
1603
+ referencedRelation: "exact_connections";
1604
+ referencedColumns: ["id"];
1605
+ }, {
1606
+ foreignKeyName: "exact_invoice_lines_cache_invoice_cache_id_fkey";
1607
+ columns: ["invoice_cache_id"];
1608
+ isOneToOne: false;
1609
+ referencedRelation: "exact_invoices_cache";
1610
+ referencedColumns: ["id"];
1611
+ }];
1612
+ };
1613
+ exact_invoices_cache: {
1614
+ Row: {
1615
+ account_id: string | null;
1616
+ account_name: string | null;
1617
+ amount_excl_btw: number | null;
1618
+ btw_amount: number | null;
1619
+ connection_id: string;
1620
+ data_raw: import("./types").Json | null;
1621
+ due_date: string | null;
1622
+ entry_id: string | null;
1623
+ exact_id: string;
1624
+ expires_at: string | null;
1625
+ fetched_at: string;
1626
+ has_pdf: boolean | null;
1627
+ id: string;
1628
+ invoice_date: string | null;
1629
+ invoice_number: string | null;
1630
+ last_reminder_date: string | null;
1631
+ open_amount: number | null;
1632
+ paid_amount: number | null;
1633
+ paid_date: string | null;
1634
+ reminder_count: number | null;
1635
+ search_text: string | null;
1636
+ status: string | null;
1637
+ total_amount: number | null;
1638
+ updated_at: string;
1639
+ };
1640
+ Insert: {
1641
+ account_id?: string | null;
1642
+ account_name?: string | null;
1643
+ amount_excl_btw?: number | null;
1644
+ btw_amount?: number | null;
1645
+ connection_id: string;
1646
+ data_raw?: import("./types").Json | null;
1647
+ due_date?: string | null;
1648
+ entry_id?: string | null;
1649
+ exact_id: string;
1650
+ expires_at?: string | null;
1651
+ fetched_at?: string;
1652
+ has_pdf?: boolean | null;
1653
+ id?: string;
1654
+ invoice_date?: string | null;
1655
+ invoice_number?: string | null;
1656
+ last_reminder_date?: string | null;
1657
+ open_amount?: number | null;
1658
+ paid_amount?: number | null;
1659
+ paid_date?: string | null;
1660
+ reminder_count?: number | null;
1661
+ search_text?: string | null;
1662
+ status?: string | null;
1663
+ total_amount?: number | null;
1664
+ updated_at?: string;
1665
+ };
1666
+ Update: {
1667
+ account_id?: string | null;
1668
+ account_name?: string | null;
1669
+ amount_excl_btw?: number | null;
1670
+ btw_amount?: number | null;
1671
+ connection_id?: string;
1672
+ data_raw?: import("./types").Json | null;
1673
+ due_date?: string | null;
1674
+ entry_id?: string | null;
846
1675
  exact_id?: string;
1676
+ expires_at?: string | null;
847
1677
  fetched_at?: string;
1678
+ has_pdf?: boolean | null;
1679
+ id?: string;
1680
+ invoice_date?: string | null;
1681
+ invoice_number?: string | null;
1682
+ last_reminder_date?: string | null;
1683
+ open_amount?: number | null;
1684
+ paid_amount?: number | null;
1685
+ paid_date?: string | null;
1686
+ reminder_count?: number | null;
1687
+ search_text?: string | null;
1688
+ status?: string | null;
1689
+ total_amount?: number | null;
1690
+ updated_at?: string;
1691
+ };
1692
+ Relationships: [{
1693
+ foreignKeyName: "exact_invoices_cache_connection_id_fkey";
1694
+ columns: ["connection_id"];
1695
+ isOneToOne: false;
1696
+ referencedRelation: "exact_connections";
1697
+ referencedColumns: ["id"];
1698
+ }];
1699
+ };
1700
+ exact_operation_logs: {
1701
+ Row: {
1702
+ connection_id: string | null;
1703
+ created_at: string;
1704
+ duration_ms: number | null;
1705
+ entity_id: string | null;
1706
+ entity_type: string | null;
1707
+ error_message: string | null;
1708
+ id: string;
1709
+ operation: string | null;
1710
+ rate_limit_remaining: number | null;
1711
+ request_data: import("./types").Json | null;
1712
+ response_data: import("./types").Json | null;
1713
+ status: string | null;
1714
+ };
1715
+ Insert: {
1716
+ connection_id?: string | null;
1717
+ created_at?: string;
1718
+ duration_ms?: number | null;
1719
+ entity_id?: string | null;
1720
+ entity_type?: string | null;
1721
+ error_message?: string | null;
1722
+ id?: string;
1723
+ operation?: string | null;
1724
+ rate_limit_remaining?: number | null;
1725
+ request_data?: import("./types").Json | null;
1726
+ response_data?: import("./types").Json | null;
1727
+ status?: string | null;
1728
+ };
1729
+ Update: {
1730
+ connection_id?: string | null;
1731
+ created_at?: string;
1732
+ duration_ms?: number | null;
1733
+ entity_id?: string | null;
1734
+ entity_type?: string | null;
1735
+ error_message?: string | null;
1736
+ id?: string;
1737
+ operation?: string | null;
1738
+ rate_limit_remaining?: number | null;
1739
+ request_data?: import("./types").Json | null;
1740
+ response_data?: import("./types").Json | null;
1741
+ status?: string | null;
1742
+ };
1743
+ Relationships: [{
1744
+ foreignKeyName: "exact_operation_logs_connection_id_fkey";
1745
+ columns: ["connection_id"];
1746
+ isOneToOne: false;
1747
+ referencedRelation: "exact_connections";
1748
+ referencedColumns: ["id"];
1749
+ }];
1750
+ };
1751
+ exact_refresh_locks: {
1752
+ Row: {
1753
+ environment: Database["public"]["Enums"]["exact_env"];
1754
+ locked_by: string;
1755
+ locked_until: string;
1756
+ updated_at: string;
1757
+ };
1758
+ Insert: {
1759
+ environment: Database["public"]["Enums"]["exact_env"];
1760
+ locked_by: string;
1761
+ locked_until: string;
1762
+ updated_at?: string;
1763
+ };
1764
+ Update: {
1765
+ environment?: Database["public"]["Enums"]["exact_env"];
1766
+ locked_by?: string;
1767
+ locked_until?: string;
1768
+ updated_at?: string;
848
1769
  };
849
1770
  Relationships: [];
850
1771
  };
@@ -1022,6 +1943,48 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
1022
1943
  };
1023
1944
  Relationships: [];
1024
1945
  };
1946
+ floriday_connections_cache: {
1947
+ Row: {
1948
+ buyer_organization_id: string | null;
1949
+ buyer_organization_name: string | null;
1950
+ connection_id: string;
1951
+ data: import("./types").Json;
1952
+ floriday_connection_id: string;
1953
+ is_deleted: boolean;
1954
+ sequence_number: number;
1955
+ status: string | null;
1956
+ synced_at: string;
1957
+ };
1958
+ Insert: {
1959
+ buyer_organization_id?: string | null;
1960
+ buyer_organization_name?: string | null;
1961
+ connection_id: string;
1962
+ data: import("./types").Json;
1963
+ floriday_connection_id: string;
1964
+ is_deleted?: boolean;
1965
+ sequence_number: number;
1966
+ status?: string | null;
1967
+ synced_at?: string;
1968
+ };
1969
+ Update: {
1970
+ buyer_organization_id?: string | null;
1971
+ buyer_organization_name?: string | null;
1972
+ connection_id?: string;
1973
+ data?: import("./types").Json;
1974
+ floriday_connection_id?: string;
1975
+ is_deleted?: boolean;
1976
+ sequence_number?: number;
1977
+ status?: string | null;
1978
+ synced_at?: string;
1979
+ };
1980
+ Relationships: [{
1981
+ foreignKeyName: "floriday_connections_cache_connection_id_fkey";
1982
+ columns: ["connection_id"];
1983
+ isOneToOne: false;
1984
+ referencedRelation: "floriday_connections";
1985
+ referencedColumns: ["id"];
1986
+ }];
1987
+ };
1025
1988
  floriday_customers_cache: {
1026
1989
  Row: {
1027
1990
  connection_id: string | null;
@@ -1106,6 +2069,48 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
1106
2069
  };
1107
2070
  Relationships: [];
1108
2071
  };
2072
+ floriday_salesorders_cache: {
2073
+ Row: {
2074
+ buyer_organization_id: string | null;
2075
+ connection_id: string;
2076
+ created_at: string;
2077
+ data: import("./types").Json;
2078
+ floriday_id: string;
2079
+ is_deleted: boolean;
2080
+ sequence_number: number;
2081
+ status: string | null;
2082
+ updated_at: string;
2083
+ };
2084
+ Insert: {
2085
+ buyer_organization_id?: string | null;
2086
+ connection_id: string;
2087
+ created_at?: string;
2088
+ data: import("./types").Json;
2089
+ floriday_id: string;
2090
+ is_deleted?: boolean;
2091
+ sequence_number: number;
2092
+ status?: string | null;
2093
+ updated_at?: string;
2094
+ };
2095
+ Update: {
2096
+ buyer_organization_id?: string | null;
2097
+ connection_id?: string;
2098
+ created_at?: string;
2099
+ data?: import("./types").Json;
2100
+ floriday_id?: string;
2101
+ is_deleted?: boolean;
2102
+ sequence_number?: number;
2103
+ status?: string | null;
2104
+ updated_at?: string;
2105
+ };
2106
+ Relationships: [{
2107
+ foreignKeyName: "floriday_salesorders_cache_connection_id_fkey";
2108
+ columns: ["connection_id"];
2109
+ isOneToOne: false;
2110
+ referencedRelation: "floriday_connections";
2111
+ referencedColumns: ["id"];
2112
+ }];
2113
+ };
1109
2114
  floriday_settings: {
1110
2115
  Row: {
1111
2116
  active_environment: string;
@@ -1124,20 +2129,272 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
1124
2129
  };
1125
2130
  Relationships: [];
1126
2131
  };
1127
- inventory_settings: {
2132
+ floriday_sync_state: {
1128
2133
  Row: {
1129
- created_at: string;
1130
- hierarchy_levels: string[];
1131
- id: string;
2134
+ connection_id: string;
2135
+ entity_type: string;
2136
+ last_error: string | null;
2137
+ last_sequence_number: number;
2138
+ last_synced_at: string | null;
1132
2139
  updated_at: string;
1133
- visible_columns: string[];
1134
2140
  };
1135
2141
  Insert: {
1136
- created_at?: string;
1137
- hierarchy_levels?: string[];
1138
- id?: string;
2142
+ connection_id: string;
2143
+ entity_type: string;
2144
+ last_error?: string | null;
2145
+ last_sequence_number?: number;
2146
+ last_synced_at?: string | null;
1139
2147
  updated_at?: string;
1140
- visible_columns?: string[];
2148
+ };
2149
+ Update: {
2150
+ connection_id?: string;
2151
+ entity_type?: string;
2152
+ last_error?: string | null;
2153
+ last_sequence_number?: number;
2154
+ last_synced_at?: string | null;
2155
+ updated_at?: string;
2156
+ };
2157
+ Relationships: [{
2158
+ foreignKeyName: "floriday_sync_state_connection_id_fkey";
2159
+ columns: ["connection_id"];
2160
+ isOneToOne: false;
2161
+ referencedRelation: "floriday_connections";
2162
+ referencedColumns: ["id"];
2163
+ }];
2164
+ };
2165
+ floriday_token_refresh_log: {
2166
+ Row: {
2167
+ attempted_at: string;
2168
+ connection_id: string | null;
2169
+ environment: string;
2170
+ error: string | null;
2171
+ expires_at: string | null;
2172
+ id: string;
2173
+ ok: boolean;
2174
+ };
2175
+ Insert: {
2176
+ attempted_at?: string;
2177
+ connection_id?: string | null;
2178
+ environment: string;
2179
+ error?: string | null;
2180
+ expires_at?: string | null;
2181
+ id?: string;
2182
+ ok: boolean;
2183
+ };
2184
+ Update: {
2185
+ attempted_at?: string;
2186
+ connection_id?: string | null;
2187
+ environment?: string;
2188
+ error?: string | null;
2189
+ expires_at?: string | null;
2190
+ id?: string;
2191
+ ok?: boolean;
2192
+ };
2193
+ Relationships: [{
2194
+ foreignKeyName: "floriday_token_refresh_log_connection_id_fkey";
2195
+ columns: ["connection_id"];
2196
+ isOneToOne: false;
2197
+ referencedRelation: "floriday_connections";
2198
+ referencedColumns: ["id"];
2199
+ }];
2200
+ };
2201
+ floriday_trade_items_cache: {
2202
+ Row: {
2203
+ connection_id: string;
2204
+ data: import("./types").Json;
2205
+ fetched_at: string;
2206
+ floriday_id: string;
2207
+ is_deleted: boolean;
2208
+ sequence_number: number;
2209
+ };
2210
+ Insert: {
2211
+ connection_id: string;
2212
+ data?: import("./types").Json;
2213
+ fetched_at?: string;
2214
+ floriday_id: string;
2215
+ is_deleted?: boolean;
2216
+ sequence_number?: number;
2217
+ };
2218
+ Update: {
2219
+ connection_id?: string;
2220
+ data?: import("./types").Json;
2221
+ fetched_at?: string;
2222
+ floriday_id?: string;
2223
+ is_deleted?: boolean;
2224
+ sequence_number?: number;
2225
+ };
2226
+ Relationships: [{
2227
+ foreignKeyName: "floriday_trade_items_cache_connection_id_fkey";
2228
+ columns: ["connection_id"];
2229
+ isOneToOne: false;
2230
+ referencedRelation: "floriday_connections";
2231
+ referencedColumns: ["id"];
2232
+ }];
2233
+ };
2234
+ imap_accounts: {
2235
+ Row: {
2236
+ created_at: string;
2237
+ email: string | null;
2238
+ host: string;
2239
+ id: string;
2240
+ is_active: boolean;
2241
+ last_test_error: string | null;
2242
+ last_test_ok: boolean | null;
2243
+ last_tested_at: string | null;
2244
+ name: string;
2245
+ password: string | null;
2246
+ password_secret_name: string | null;
2247
+ port: number;
2248
+ updated_at: string;
2249
+ use_tls: boolean;
2250
+ username: string;
2251
+ };
2252
+ Insert: {
2253
+ created_at?: string;
2254
+ email?: string | null;
2255
+ host: string;
2256
+ id?: string;
2257
+ is_active?: boolean;
2258
+ last_test_error?: string | null;
2259
+ last_test_ok?: boolean | null;
2260
+ last_tested_at?: string | null;
2261
+ name: string;
2262
+ password?: string | null;
2263
+ password_secret_name?: string | null;
2264
+ port?: number;
2265
+ updated_at?: string;
2266
+ use_tls?: boolean;
2267
+ username: string;
2268
+ };
2269
+ Update: {
2270
+ created_at?: string;
2271
+ email?: string | null;
2272
+ host?: string;
2273
+ id?: string;
2274
+ is_active?: boolean;
2275
+ last_test_error?: string | null;
2276
+ last_test_ok?: boolean | null;
2277
+ last_tested_at?: string | null;
2278
+ name?: string;
2279
+ password?: string | null;
2280
+ password_secret_name?: string | null;
2281
+ port?: number;
2282
+ updated_at?: string;
2283
+ use_tls?: boolean;
2284
+ username?: string;
2285
+ };
2286
+ Relationships: [];
2287
+ };
2288
+ imap_profiles: {
2289
+ Row: {
2290
+ account_id: string | null;
2291
+ created_at: string;
2292
+ folder: string;
2293
+ id: string;
2294
+ last_error: string | null;
2295
+ last_polled_at: string | null;
2296
+ last_uid_seen: number;
2297
+ name: string;
2298
+ polling_enabled: boolean;
2299
+ profile_key: string;
2300
+ updated_at: string;
2301
+ };
2302
+ Insert: {
2303
+ account_id?: string | null;
2304
+ created_at?: string;
2305
+ folder?: string;
2306
+ id?: string;
2307
+ last_error?: string | null;
2308
+ last_polled_at?: string | null;
2309
+ last_uid_seen?: number;
2310
+ name: string;
2311
+ polling_enabled?: boolean;
2312
+ profile_key: string;
2313
+ updated_at?: string;
2314
+ };
2315
+ Update: {
2316
+ account_id?: string | null;
2317
+ created_at?: string;
2318
+ folder?: string;
2319
+ id?: string;
2320
+ last_error?: string | null;
2321
+ last_polled_at?: string | null;
2322
+ last_uid_seen?: number;
2323
+ name?: string;
2324
+ polling_enabled?: boolean;
2325
+ profile_key?: string;
2326
+ updated_at?: string;
2327
+ };
2328
+ Relationships: [{
2329
+ foreignKeyName: "imap_profiles_account_id_fkey";
2330
+ columns: ["account_id"];
2331
+ isOneToOne: false;
2332
+ referencedRelation: "imap_accounts";
2333
+ referencedColumns: ["id"];
2334
+ }];
2335
+ };
2336
+ imap_sync_log: {
2337
+ Row: {
2338
+ account_id: string | null;
2339
+ details: import("./types").Json | null;
2340
+ error: string | null;
2341
+ finished_at: string | null;
2342
+ id: string;
2343
+ inserted: number;
2344
+ ok: boolean | null;
2345
+ profile_id: string | null;
2346
+ started_at: string;
2347
+ };
2348
+ Insert: {
2349
+ account_id?: string | null;
2350
+ details?: import("./types").Json | null;
2351
+ error?: string | null;
2352
+ finished_at?: string | null;
2353
+ id?: string;
2354
+ inserted?: number;
2355
+ ok?: boolean | null;
2356
+ profile_id?: string | null;
2357
+ started_at?: string;
2358
+ };
2359
+ Update: {
2360
+ account_id?: string | null;
2361
+ details?: import("./types").Json | null;
2362
+ error?: string | null;
2363
+ finished_at?: string | null;
2364
+ id?: string;
2365
+ inserted?: number;
2366
+ ok?: boolean | null;
2367
+ profile_id?: string | null;
2368
+ started_at?: string;
2369
+ };
2370
+ Relationships: [{
2371
+ foreignKeyName: "imap_sync_log_account_id_fkey";
2372
+ columns: ["account_id"];
2373
+ isOneToOne: false;
2374
+ referencedRelation: "imap_accounts";
2375
+ referencedColumns: ["id"];
2376
+ }, {
2377
+ foreignKeyName: "imap_sync_log_profile_id_fkey";
2378
+ columns: ["profile_id"];
2379
+ isOneToOne: false;
2380
+ referencedRelation: "imap_profiles";
2381
+ referencedColumns: ["id"];
2382
+ }];
2383
+ };
2384
+ inventory_settings: {
2385
+ Row: {
2386
+ created_at: string;
2387
+ hierarchy_levels: string[];
2388
+ id: string;
2389
+ updated_at: string;
2390
+ visible_columns: string[];
2391
+ };
2392
+ Insert: {
2393
+ created_at?: string;
2394
+ hierarchy_levels?: string[];
2395
+ id?: string;
2396
+ updated_at?: string;
2397
+ visible_columns?: string[];
1141
2398
  };
1142
2399
  Update: {
1143
2400
  created_at?: string;
@@ -1182,6 +2439,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
1182
2439
  from_name: string | null;
1183
2440
  id: string;
1184
2441
  message_id: string | null;
2442
+ profile_id: string | null;
1185
2443
  raw_size: number | null;
1186
2444
  received_at: string | null;
1187
2445
  status: string;
@@ -1198,6 +2456,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
1198
2456
  from_name?: string | null;
1199
2457
  id?: string;
1200
2458
  message_id?: string | null;
2459
+ profile_id?: string | null;
1201
2460
  raw_size?: number | null;
1202
2461
  received_at?: string | null;
1203
2462
  status?: string;
@@ -1214,6 +2473,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
1214
2473
  from_name?: string | null;
1215
2474
  id?: string;
1216
2475
  message_id?: string | null;
2476
+ profile_id?: string | null;
1217
2477
  raw_size?: number | null;
1218
2478
  received_at?: string | null;
1219
2479
  status?: string;
@@ -1221,7 +2481,13 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
1221
2481
  uid?: number;
1222
2482
  updated_at?: string;
1223
2483
  };
1224
- Relationships: [];
2484
+ Relationships: [{
2485
+ foreignKeyName: "mailbox_messages_profile_id_fkey";
2486
+ columns: ["profile_id"];
2487
+ isOneToOne: false;
2488
+ referencedRelation: "imap_profiles";
2489
+ referencedColumns: ["id"];
2490
+ }];
1225
2491
  };
1226
2492
  mailbox_order_proposals: {
1227
2493
  Row: {
@@ -2057,6 +3323,99 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
2057
3323
  referencedColumns: ["id"];
2058
3324
  }];
2059
3325
  };
3326
+ packages: {
3327
+ Row: {
3328
+ color: string;
3329
+ created_at: string;
3330
+ description: string | null;
3331
+ id: string;
3332
+ is_active: boolean;
3333
+ name: string;
3334
+ sort_order: number;
3335
+ updated_at: string;
3336
+ value: number;
3337
+ };
3338
+ Insert: {
3339
+ color?: string;
3340
+ created_at?: string;
3341
+ description?: string | null;
3342
+ id?: string;
3343
+ is_active?: boolean;
3344
+ name: string;
3345
+ sort_order?: number;
3346
+ updated_at?: string;
3347
+ value?: number;
3348
+ };
3349
+ Update: {
3350
+ color?: string;
3351
+ created_at?: string;
3352
+ description?: string | null;
3353
+ id?: string;
3354
+ is_active?: boolean;
3355
+ name?: string;
3356
+ sort_order?: number;
3357
+ updated_at?: string;
3358
+ value?: number;
3359
+ };
3360
+ Relationships: [];
3361
+ };
3362
+ pipeline_settings: {
3363
+ Row: {
3364
+ created_at: string;
3365
+ id: string;
3366
+ key: string;
3367
+ updated_at: string;
3368
+ value: string | null;
3369
+ };
3370
+ Insert: {
3371
+ created_at?: string;
3372
+ id?: string;
3373
+ key: string;
3374
+ updated_at?: string;
3375
+ value?: string | null;
3376
+ };
3377
+ Update: {
3378
+ created_at?: string;
3379
+ id?: string;
3380
+ key?: string;
3381
+ updated_at?: string;
3382
+ value?: string | null;
3383
+ };
3384
+ Relationships: [];
3385
+ };
3386
+ pipeline_stages: {
3387
+ Row: {
3388
+ automation_type: string;
3389
+ color: string;
3390
+ created_at: string;
3391
+ id: string;
3392
+ is_active: boolean;
3393
+ name: string;
3394
+ sort_order: number;
3395
+ updated_at: string;
3396
+ };
3397
+ Insert: {
3398
+ automation_type?: string;
3399
+ color?: string;
3400
+ created_at?: string;
3401
+ id?: string;
3402
+ is_active?: boolean;
3403
+ name: string;
3404
+ sort_order?: number;
3405
+ updated_at?: string;
3406
+ };
3407
+ Update: {
3408
+ automation_type?: string;
3409
+ color?: string;
3410
+ created_at?: string;
3411
+ id?: string;
3412
+ is_active?: boolean;
3413
+ name?: string;
3414
+ sort_order?: number;
3415
+ updated_at?: string;
3416
+ };
3417
+ Relationships: [];
3418
+ };
2060
3419
  product_categories: {
2061
3420
  Row: {
2062
3421
  color: string;
@@ -2243,15 +3602,183 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
2243
3602
  };
2244
3603
  Relationships: [];
2245
3604
  };
2246
- purchase_order_items: {
3605
+ projects: {
2247
3606
  Row: {
3607
+ contact_name: string | null;
2248
3608
  created_at: string;
3609
+ email: string | null;
2249
3610
  id: string;
2250
- product_id: string | null;
2251
- product_type: string;
2252
- purchase_order_id: string;
2253
- quantity: number;
2254
- };
3611
+ name: string;
3612
+ notes: string | null;
3613
+ order_value: number;
3614
+ package_id: string | null;
3615
+ package_name: string | null;
3616
+ phone: string | null;
3617
+ prospect_id: string | null;
3618
+ status: string;
3619
+ updated_at: string;
3620
+ };
3621
+ Insert: {
3622
+ contact_name?: string | null;
3623
+ created_at?: string;
3624
+ email?: string | null;
3625
+ id?: string;
3626
+ name: string;
3627
+ notes?: string | null;
3628
+ order_value?: number;
3629
+ package_id?: string | null;
3630
+ package_name?: string | null;
3631
+ phone?: string | null;
3632
+ prospect_id?: string | null;
3633
+ status?: string;
3634
+ updated_at?: string;
3635
+ };
3636
+ Update: {
3637
+ contact_name?: string | null;
3638
+ created_at?: string;
3639
+ email?: string | null;
3640
+ id?: string;
3641
+ name?: string;
3642
+ notes?: string | null;
3643
+ order_value?: number;
3644
+ package_id?: string | null;
3645
+ package_name?: string | null;
3646
+ phone?: string | null;
3647
+ prospect_id?: string | null;
3648
+ status?: string;
3649
+ updated_at?: string;
3650
+ };
3651
+ Relationships: [{
3652
+ foreignKeyName: "projects_package_id_fkey";
3653
+ columns: ["package_id"];
3654
+ isOneToOne: false;
3655
+ referencedRelation: "packages";
3656
+ referencedColumns: ["id"];
3657
+ }, {
3658
+ foreignKeyName: "projects_prospect_id_fkey";
3659
+ columns: ["prospect_id"];
3660
+ isOneToOne: false;
3661
+ referencedRelation: "prospects";
3662
+ referencedColumns: ["id"];
3663
+ }];
3664
+ };
3665
+ prospect_field_settings: {
3666
+ Row: {
3667
+ created_at: string;
3668
+ field_key: string;
3669
+ field_type: string;
3670
+ id: string;
3671
+ label: string;
3672
+ required: boolean;
3673
+ sort_order: number;
3674
+ updated_at: string;
3675
+ visible: boolean;
3676
+ };
3677
+ Insert: {
3678
+ created_at?: string;
3679
+ field_key: string;
3680
+ field_type?: string;
3681
+ id?: string;
3682
+ label: string;
3683
+ required?: boolean;
3684
+ sort_order?: number;
3685
+ updated_at?: string;
3686
+ visible?: boolean;
3687
+ };
3688
+ Update: {
3689
+ created_at?: string;
3690
+ field_key?: string;
3691
+ field_type?: string;
3692
+ id?: string;
3693
+ label?: string;
3694
+ required?: boolean;
3695
+ sort_order?: number;
3696
+ updated_at?: string;
3697
+ visible?: boolean;
3698
+ };
3699
+ Relationships: [];
3700
+ };
3701
+ prospects: {
3702
+ Row: {
3703
+ address: string | null;
3704
+ company_name: string;
3705
+ contact_name: string | null;
3706
+ created_at: string;
3707
+ email: string | null;
3708
+ id: string;
3709
+ industry: string | null;
3710
+ notes: string | null;
3711
+ order_value: number;
3712
+ package_id: string | null;
3713
+ phone: string | null;
3714
+ source: string | null;
3715
+ stage_id: string | null;
3716
+ status: string;
3717
+ updated_at: string;
3718
+ value_mode: string;
3719
+ website: string | null;
3720
+ };
3721
+ Insert: {
3722
+ address?: string | null;
3723
+ company_name: string;
3724
+ contact_name?: string | null;
3725
+ created_at?: string;
3726
+ email?: string | null;
3727
+ id?: string;
3728
+ industry?: string | null;
3729
+ notes?: string | null;
3730
+ order_value?: number;
3731
+ package_id?: string | null;
3732
+ phone?: string | null;
3733
+ source?: string | null;
3734
+ stage_id?: string | null;
3735
+ status?: string;
3736
+ updated_at?: string;
3737
+ value_mode?: string;
3738
+ website?: string | null;
3739
+ };
3740
+ Update: {
3741
+ address?: string | null;
3742
+ company_name?: string;
3743
+ contact_name?: string | null;
3744
+ created_at?: string;
3745
+ email?: string | null;
3746
+ id?: string;
3747
+ industry?: string | null;
3748
+ notes?: string | null;
3749
+ order_value?: number;
3750
+ package_id?: string | null;
3751
+ phone?: string | null;
3752
+ source?: string | null;
3753
+ stage_id?: string | null;
3754
+ status?: string;
3755
+ updated_at?: string;
3756
+ value_mode?: string;
3757
+ website?: string | null;
3758
+ };
3759
+ Relationships: [{
3760
+ foreignKeyName: "prospects_package_id_fkey";
3761
+ columns: ["package_id"];
3762
+ isOneToOne: false;
3763
+ referencedRelation: "packages";
3764
+ referencedColumns: ["id"];
3765
+ }, {
3766
+ foreignKeyName: "prospects_stage_id_fkey";
3767
+ columns: ["stage_id"];
3768
+ isOneToOne: false;
3769
+ referencedRelation: "pipeline_stages";
3770
+ referencedColumns: ["id"];
3771
+ }];
3772
+ };
3773
+ purchase_order_items: {
3774
+ Row: {
3775
+ created_at: string;
3776
+ id: string;
3777
+ product_id: string | null;
3778
+ product_type: string;
3779
+ purchase_order_id: string;
3780
+ quantity: number;
3781
+ };
2255
3782
  Insert: {
2256
3783
  created_at?: string;
2257
3784
  id?: string;
@@ -2323,13 +3850,457 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
2323
3850
  foreignKeyName: "purchase_orders_location_id_fkey";
2324
3851
  columns: ["location_id"];
2325
3852
  isOneToOne: false;
2326
- referencedRelation: "locations";
3853
+ referencedRelation: "locations";
3854
+ referencedColumns: ["id"];
3855
+ }, {
3856
+ foreignKeyName: "purchase_orders_supplier_id_fkey";
3857
+ columns: ["supplier_id"];
3858
+ isOneToOne: false;
3859
+ referencedRelation: "suppliers";
3860
+ referencedColumns: ["id"];
3861
+ }];
3862
+ };
3863
+ quote_activities: {
3864
+ Row: {
3865
+ created_at: string;
3866
+ event_type: string;
3867
+ id: string;
3868
+ metadata: import("./types").Json;
3869
+ quote_id: string;
3870
+ user_id: string | null;
3871
+ };
3872
+ Insert: {
3873
+ created_at?: string;
3874
+ event_type: string;
3875
+ id?: string;
3876
+ metadata?: import("./types").Json;
3877
+ quote_id: string;
3878
+ user_id?: string | null;
3879
+ };
3880
+ Update: {
3881
+ created_at?: string;
3882
+ event_type?: string;
3883
+ id?: string;
3884
+ metadata?: import("./types").Json;
3885
+ quote_id?: string;
3886
+ user_id?: string | null;
3887
+ };
3888
+ Relationships: [{
3889
+ foreignKeyName: "quote_activities_quote_id_fkey";
3890
+ columns: ["quote_id"];
3891
+ isOneToOne: false;
3892
+ referencedRelation: "quotes";
3893
+ referencedColumns: ["id"];
3894
+ }];
3895
+ };
3896
+ quote_attachments: {
3897
+ Row: {
3898
+ created_at: string;
3899
+ file_name: string;
3900
+ file_size: number | null;
3901
+ file_url: string;
3902
+ id: string;
3903
+ mime_type: string | null;
3904
+ quote_id: string;
3905
+ };
3906
+ Insert: {
3907
+ created_at?: string;
3908
+ file_name: string;
3909
+ file_size?: number | null;
3910
+ file_url: string;
3911
+ id?: string;
3912
+ mime_type?: string | null;
3913
+ quote_id: string;
3914
+ };
3915
+ Update: {
3916
+ created_at?: string;
3917
+ file_name?: string;
3918
+ file_size?: number | null;
3919
+ file_url?: string;
3920
+ id?: string;
3921
+ mime_type?: string | null;
3922
+ quote_id?: string;
3923
+ };
3924
+ Relationships: [{
3925
+ foreignKeyName: "quote_attachments_quote_id_fkey";
3926
+ columns: ["quote_id"];
3927
+ isOneToOne: false;
3928
+ referencedRelation: "quotes";
3929
+ referencedColumns: ["id"];
3930
+ }];
3931
+ };
3932
+ quote_field_options: {
3933
+ Row: {
3934
+ created_at: string;
3935
+ field_id: string;
3936
+ id: string;
3937
+ label: string;
3938
+ sort_order: number;
3939
+ value: string;
3940
+ };
3941
+ Insert: {
3942
+ created_at?: string;
3943
+ field_id: string;
3944
+ id?: string;
3945
+ label: string;
3946
+ sort_order?: number;
3947
+ value: string;
3948
+ };
3949
+ Update: {
3950
+ created_at?: string;
3951
+ field_id?: string;
3952
+ id?: string;
3953
+ label?: string;
3954
+ sort_order?: number;
3955
+ value?: string;
3956
+ };
3957
+ Relationships: [{
3958
+ foreignKeyName: "quote_field_options_field_id_fkey";
3959
+ columns: ["field_id"];
3960
+ isOneToOne: false;
3961
+ referencedRelation: "quote_field_settings";
3962
+ referencedColumns: ["id"];
3963
+ }];
3964
+ };
3965
+ quote_field_settings: {
3966
+ Row: {
3967
+ created_at: string;
3968
+ default_value: string | null;
3969
+ field_key: string;
3970
+ field_type: string;
3971
+ id: string;
3972
+ is_system: boolean;
3973
+ label: string;
3974
+ required: boolean;
3975
+ sort_order: number;
3976
+ updated_at: string;
3977
+ visible: boolean;
3978
+ };
3979
+ Insert: {
3980
+ created_at?: string;
3981
+ default_value?: string | null;
3982
+ field_key: string;
3983
+ field_type: string;
3984
+ id?: string;
3985
+ is_system?: boolean;
3986
+ label: string;
3987
+ required?: boolean;
3988
+ sort_order?: number;
3989
+ updated_at?: string;
3990
+ visible?: boolean;
3991
+ };
3992
+ Update: {
3993
+ created_at?: string;
3994
+ default_value?: string | null;
3995
+ field_key?: string;
3996
+ field_type?: string;
3997
+ id?: string;
3998
+ is_system?: boolean;
3999
+ label?: string;
4000
+ required?: boolean;
4001
+ sort_order?: number;
4002
+ updated_at?: string;
4003
+ visible?: boolean;
4004
+ };
4005
+ Relationships: [];
4006
+ };
4007
+ quote_items: {
4008
+ Row: {
4009
+ category: string | null;
4010
+ created_at: string;
4011
+ description: string;
4012
+ id: string;
4013
+ line_total: number;
4014
+ module_id: string | null;
4015
+ name: string | null;
4016
+ quantity: number;
4017
+ quote_id: string;
4018
+ sort_order: number;
4019
+ unit_price: number;
4020
+ };
4021
+ Insert: {
4022
+ category?: string | null;
4023
+ created_at?: string;
4024
+ description?: string;
4025
+ id?: string;
4026
+ line_total?: number;
4027
+ module_id?: string | null;
4028
+ name?: string | null;
4029
+ quantity?: number;
4030
+ quote_id: string;
4031
+ sort_order?: number;
4032
+ unit_price?: number;
4033
+ };
4034
+ Update: {
4035
+ category?: string | null;
4036
+ created_at?: string;
4037
+ description?: string;
4038
+ id?: string;
4039
+ line_total?: number;
4040
+ module_id?: string | null;
4041
+ name?: string | null;
4042
+ quantity?: number;
4043
+ quote_id?: string;
4044
+ sort_order?: number;
4045
+ unit_price?: number;
4046
+ };
4047
+ Relationships: [{
4048
+ foreignKeyName: "quote_items_module_id_fkey";
4049
+ columns: ["module_id"];
4050
+ isOneToOne: false;
4051
+ referencedRelation: "quote_modules";
4052
+ referencedColumns: ["id"];
4053
+ }, {
4054
+ foreignKeyName: "quote_items_quote_id_fkey";
4055
+ columns: ["quote_id"];
4056
+ isOneToOne: false;
4057
+ referencedRelation: "quotes";
4058
+ referencedColumns: ["id"];
4059
+ }];
4060
+ };
4061
+ quote_modules: {
4062
+ Row: {
4063
+ category: string | null;
4064
+ created_at: string;
4065
+ description: string | null;
4066
+ id: string;
4067
+ is_active: boolean;
4068
+ name: string;
4069
+ price: number;
4070
+ sort_order: number;
4071
+ updated_at: string;
4072
+ };
4073
+ Insert: {
4074
+ category?: string | null;
4075
+ created_at?: string;
4076
+ description?: string | null;
4077
+ id?: string;
4078
+ is_active?: boolean;
4079
+ name: string;
4080
+ price?: number;
4081
+ sort_order?: number;
4082
+ updated_at?: string;
4083
+ };
4084
+ Update: {
4085
+ category?: string | null;
4086
+ created_at?: string;
4087
+ description?: string | null;
4088
+ id?: string;
4089
+ is_active?: boolean;
4090
+ name?: string;
4091
+ price?: number;
4092
+ sort_order?: number;
4093
+ updated_at?: string;
4094
+ };
4095
+ Relationships: [];
4096
+ };
4097
+ quote_templates: {
4098
+ Row: {
4099
+ created_at: string;
4100
+ description: string | null;
4101
+ field_values: import("./types").Json;
4102
+ id: string;
4103
+ is_default: boolean;
4104
+ items: import("./types").Json;
4105
+ name: string;
4106
+ updated_at: string;
4107
+ vat_rate: number;
4108
+ };
4109
+ Insert: {
4110
+ created_at?: string;
4111
+ description?: string | null;
4112
+ field_values?: import("./types").Json;
4113
+ id?: string;
4114
+ is_default?: boolean;
4115
+ items?: import("./types").Json;
4116
+ name: string;
4117
+ updated_at?: string;
4118
+ vat_rate?: number;
4119
+ };
4120
+ Update: {
4121
+ created_at?: string;
4122
+ description?: string | null;
4123
+ field_values?: import("./types").Json;
4124
+ id?: string;
4125
+ is_default?: boolean;
4126
+ items?: import("./types").Json;
4127
+ name?: string;
4128
+ updated_at?: string;
4129
+ vat_rate?: number;
4130
+ };
4131
+ Relationships: [];
4132
+ };
4133
+ quote_terms: {
4134
+ Row: {
4135
+ content: string | null;
4136
+ created_at: string;
4137
+ file_url: string | null;
4138
+ id: string;
4139
+ is_active: boolean;
4140
+ name: string;
4141
+ published_at: string | null;
4142
+ updated_at: string;
4143
+ version: string;
4144
+ };
4145
+ Insert: {
4146
+ content?: string | null;
4147
+ created_at?: string;
4148
+ file_url?: string | null;
4149
+ id?: string;
4150
+ is_active?: boolean;
4151
+ name: string;
4152
+ published_at?: string | null;
4153
+ updated_at?: string;
4154
+ version?: string;
4155
+ };
4156
+ Update: {
4157
+ content?: string | null;
4158
+ created_at?: string;
4159
+ file_url?: string | null;
4160
+ id?: string;
4161
+ is_active?: boolean;
4162
+ name?: string;
4163
+ published_at?: string | null;
4164
+ updated_at?: string;
4165
+ version?: string;
4166
+ };
4167
+ Relationships: [];
4168
+ };
4169
+ quotes: {
4170
+ Row: {
4171
+ accepted_at: string | null;
4172
+ archived_at: string | null;
4173
+ contact_id: string | null;
4174
+ created_at: string;
4175
+ customer_id: string | null;
4176
+ discount: number;
4177
+ expires_at: string | null;
4178
+ field_values: import("./types").Json;
4179
+ id: string;
4180
+ notes: string | null;
4181
+ owner_id: string | null;
4182
+ personal_message: string | null;
4183
+ project_id: string | null;
4184
+ prospect_id: string | null;
4185
+ public_token: string;
4186
+ quote_number: string | null;
4187
+ recipient_email: string | null;
4188
+ recipient_name: string | null;
4189
+ rejected_at: string | null;
4190
+ sent_at: string | null;
4191
+ status: string;
4192
+ subtotal: number;
4193
+ template_id: string | null;
4194
+ terms_id: string | null;
4195
+ title: string;
4196
+ total: number;
4197
+ updated_at: string;
4198
+ valid_until: string | null;
4199
+ vat_amount: number;
4200
+ vat_rate: number;
4201
+ viewed_at: string | null;
4202
+ };
4203
+ Insert: {
4204
+ accepted_at?: string | null;
4205
+ archived_at?: string | null;
4206
+ contact_id?: string | null;
4207
+ created_at?: string;
4208
+ customer_id?: string | null;
4209
+ discount?: number;
4210
+ expires_at?: string | null;
4211
+ field_values?: import("./types").Json;
4212
+ id?: string;
4213
+ notes?: string | null;
4214
+ owner_id?: string | null;
4215
+ personal_message?: string | null;
4216
+ project_id?: string | null;
4217
+ prospect_id?: string | null;
4218
+ public_token?: string;
4219
+ quote_number?: string | null;
4220
+ recipient_email?: string | null;
4221
+ recipient_name?: string | null;
4222
+ rejected_at?: string | null;
4223
+ sent_at?: string | null;
4224
+ status?: string;
4225
+ subtotal?: number;
4226
+ template_id?: string | null;
4227
+ terms_id?: string | null;
4228
+ title?: string;
4229
+ total?: number;
4230
+ updated_at?: string;
4231
+ valid_until?: string | null;
4232
+ vat_amount?: number;
4233
+ vat_rate?: number;
4234
+ viewed_at?: string | null;
4235
+ };
4236
+ Update: {
4237
+ accepted_at?: string | null;
4238
+ archived_at?: string | null;
4239
+ contact_id?: string | null;
4240
+ created_at?: string;
4241
+ customer_id?: string | null;
4242
+ discount?: number;
4243
+ expires_at?: string | null;
4244
+ field_values?: import("./types").Json;
4245
+ id?: string;
4246
+ notes?: string | null;
4247
+ owner_id?: string | null;
4248
+ personal_message?: string | null;
4249
+ project_id?: string | null;
4250
+ prospect_id?: string | null;
4251
+ public_token?: string;
4252
+ quote_number?: string | null;
4253
+ recipient_email?: string | null;
4254
+ recipient_name?: string | null;
4255
+ rejected_at?: string | null;
4256
+ sent_at?: string | null;
4257
+ status?: string;
4258
+ subtotal?: number;
4259
+ template_id?: string | null;
4260
+ terms_id?: string | null;
4261
+ title?: string;
4262
+ total?: number;
4263
+ updated_at?: string;
4264
+ valid_until?: string | null;
4265
+ vat_amount?: number;
4266
+ vat_rate?: number;
4267
+ viewed_at?: string | null;
4268
+ };
4269
+ Relationships: [{
4270
+ foreignKeyName: "quotes_contact_id_fkey";
4271
+ columns: ["contact_id"];
4272
+ isOneToOne: false;
4273
+ referencedRelation: "customer_contacts";
4274
+ referencedColumns: ["id"];
4275
+ }, {
4276
+ foreignKeyName: "quotes_customer_id_fkey";
4277
+ columns: ["customer_id"];
4278
+ isOneToOne: false;
4279
+ referencedRelation: "customers";
4280
+ referencedColumns: ["id"];
4281
+ }, {
4282
+ foreignKeyName: "quotes_project_id_fkey";
4283
+ columns: ["project_id"];
4284
+ isOneToOne: false;
4285
+ referencedRelation: "projects";
4286
+ referencedColumns: ["id"];
4287
+ }, {
4288
+ foreignKeyName: "quotes_prospect_id_fkey";
4289
+ columns: ["prospect_id"];
4290
+ isOneToOne: false;
4291
+ referencedRelation: "prospects";
4292
+ referencedColumns: ["id"];
4293
+ }, {
4294
+ foreignKeyName: "quotes_template_id_fkey";
4295
+ columns: ["template_id"];
4296
+ isOneToOne: false;
4297
+ referencedRelation: "quote_templates";
2327
4298
  referencedColumns: ["id"];
2328
4299
  }, {
2329
- foreignKeyName: "purchase_orders_supplier_id_fkey";
2330
- columns: ["supplier_id"];
4300
+ foreignKeyName: "quotes_terms_id_fkey";
4301
+ columns: ["terms_id"];
2331
4302
  isOneToOne: false;
2332
- referencedRelation: "suppliers";
4303
+ referencedRelation: "quote_terms";
2333
4304
  referencedColumns: ["id"];
2334
4305
  }];
2335
4306
  };
@@ -2453,6 +4424,318 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
2453
4424
  };
2454
4425
  Relationships: [];
2455
4426
  };
4427
+ twinfield_credentials: {
4428
+ Row: {
4429
+ administration_code: string | null;
4430
+ client_id: string | null;
4431
+ client_secret: string | null;
4432
+ cluster: string | null;
4433
+ connected_at: string | null;
4434
+ created_at: string;
4435
+ environment: string | null;
4436
+ id: string;
4437
+ redirect_uri: string | null;
4438
+ refresh_token: string | null;
4439
+ updated_at: string;
4440
+ user_id: string;
4441
+ };
4442
+ Insert: {
4443
+ administration_code?: string | null;
4444
+ client_id?: string | null;
4445
+ client_secret?: string | null;
4446
+ cluster?: string | null;
4447
+ connected_at?: string | null;
4448
+ created_at?: string;
4449
+ environment?: string | null;
4450
+ id?: string;
4451
+ redirect_uri?: string | null;
4452
+ refresh_token?: string | null;
4453
+ updated_at?: string;
4454
+ user_id: string;
4455
+ };
4456
+ Update: {
4457
+ administration_code?: string | null;
4458
+ client_id?: string | null;
4459
+ client_secret?: string | null;
4460
+ cluster?: string | null;
4461
+ connected_at?: string | null;
4462
+ created_at?: string;
4463
+ environment?: string | null;
4464
+ id?: string;
4465
+ redirect_uri?: string | null;
4466
+ refresh_token?: string | null;
4467
+ updated_at?: string;
4468
+ user_id?: string;
4469
+ };
4470
+ Relationships: [];
4471
+ };
4472
+ twinfield_customers: {
4473
+ Row: {
4474
+ address: string | null;
4475
+ city: string | null;
4476
+ country: string | null;
4477
+ created_at: string;
4478
+ email: string | null;
4479
+ id: string;
4480
+ last_synced_at: string | null;
4481
+ name: string;
4482
+ phone: string | null;
4483
+ postal_code: string | null;
4484
+ status: string;
4485
+ sync_error: string | null;
4486
+ sync_status: string;
4487
+ twinfield_code: string | null;
4488
+ updated_at: string;
4489
+ user_id: string;
4490
+ };
4491
+ Insert: {
4492
+ address?: string | null;
4493
+ city?: string | null;
4494
+ country?: string | null;
4495
+ created_at?: string;
4496
+ email?: string | null;
4497
+ id?: string;
4498
+ last_synced_at?: string | null;
4499
+ name: string;
4500
+ phone?: string | null;
4501
+ postal_code?: string | null;
4502
+ status?: string;
4503
+ sync_error?: string | null;
4504
+ sync_status?: string;
4505
+ twinfield_code?: string | null;
4506
+ updated_at?: string;
4507
+ user_id: string;
4508
+ };
4509
+ Update: {
4510
+ address?: string | null;
4511
+ city?: string | null;
4512
+ country?: string | null;
4513
+ created_at?: string;
4514
+ email?: string | null;
4515
+ id?: string;
4516
+ last_synced_at?: string | null;
4517
+ name?: string;
4518
+ phone?: string | null;
4519
+ postal_code?: string | null;
4520
+ status?: string;
4521
+ sync_error?: string | null;
4522
+ sync_status?: string;
4523
+ twinfield_code?: string | null;
4524
+ updated_at?: string;
4525
+ user_id?: string;
4526
+ };
4527
+ Relationships: [];
4528
+ };
4529
+ twinfield_invoice_lines: {
4530
+ Row: {
4531
+ article_code: string | null;
4532
+ created_at: string;
4533
+ description: string | null;
4534
+ gl_account: string | null;
4535
+ id: string;
4536
+ invoice_id: string;
4537
+ line_number: number | null;
4538
+ line_total: number;
4539
+ quantity: number;
4540
+ unit_price: number;
4541
+ user_id: string;
4542
+ vat_code: string | null;
4543
+ vat_rate: number;
4544
+ };
4545
+ Insert: {
4546
+ article_code?: string | null;
4547
+ created_at?: string;
4548
+ description?: string | null;
4549
+ gl_account?: string | null;
4550
+ id?: string;
4551
+ invoice_id: string;
4552
+ line_number?: number | null;
4553
+ line_total?: number;
4554
+ quantity?: number;
4555
+ unit_price?: number;
4556
+ user_id: string;
4557
+ vat_code?: string | null;
4558
+ vat_rate?: number;
4559
+ };
4560
+ Update: {
4561
+ article_code?: string | null;
4562
+ created_at?: string;
4563
+ description?: string | null;
4564
+ gl_account?: string | null;
4565
+ id?: string;
4566
+ invoice_id?: string;
4567
+ line_number?: number | null;
4568
+ line_total?: number;
4569
+ quantity?: number;
4570
+ unit_price?: number;
4571
+ user_id?: string;
4572
+ vat_code?: string | null;
4573
+ vat_rate?: number;
4574
+ };
4575
+ Relationships: [{
4576
+ foreignKeyName: "twinfield_invoice_lines_invoice_id_fkey";
4577
+ columns: ["invoice_id"];
4578
+ isOneToOne: false;
4579
+ referencedRelation: "twinfield_invoices";
4580
+ referencedColumns: ["id"];
4581
+ }];
4582
+ };
4583
+ twinfield_invoice_settings: {
4584
+ Row: {
4585
+ created_at: string;
4586
+ default_gl_account: string;
4587
+ default_invoice_type: string;
4588
+ default_payment_term_days: number;
4589
+ default_vat_code: string;
4590
+ updated_at: string;
4591
+ user_id: string;
4592
+ };
4593
+ Insert: {
4594
+ created_at?: string;
4595
+ default_gl_account?: string;
4596
+ default_invoice_type?: string;
4597
+ default_payment_term_days?: number;
4598
+ default_vat_code?: string;
4599
+ updated_at?: string;
4600
+ user_id: string;
4601
+ };
4602
+ Update: {
4603
+ created_at?: string;
4604
+ default_gl_account?: string;
4605
+ default_invoice_type?: string;
4606
+ default_payment_term_days?: number;
4607
+ default_vat_code?: string;
4608
+ updated_at?: string;
4609
+ user_id?: string;
4610
+ };
4611
+ Relationships: [];
4612
+ };
4613
+ twinfield_invoice_sync_logs: {
4614
+ Row: {
4615
+ created_at: string;
4616
+ details: import("./types").Json | null;
4617
+ duration_ms: number | null;
4618
+ id: string;
4619
+ invoice_lines_fetched: number | null;
4620
+ invoices_fetched: number | null;
4621
+ message: string | null;
4622
+ status: string;
4623
+ step: string | null;
4624
+ user_id: string;
4625
+ };
4626
+ Insert: {
4627
+ created_at?: string;
4628
+ details?: import("./types").Json | null;
4629
+ duration_ms?: number | null;
4630
+ id?: string;
4631
+ invoice_lines_fetched?: number | null;
4632
+ invoices_fetched?: number | null;
4633
+ message?: string | null;
4634
+ status: string;
4635
+ step?: string | null;
4636
+ user_id: string;
4637
+ };
4638
+ Update: {
4639
+ created_at?: string;
4640
+ details?: import("./types").Json | null;
4641
+ duration_ms?: number | null;
4642
+ id?: string;
4643
+ invoice_lines_fetched?: number | null;
4644
+ invoices_fetched?: number | null;
4645
+ message?: string | null;
4646
+ status?: string;
4647
+ step?: string | null;
4648
+ user_id?: string;
4649
+ };
4650
+ Relationships: [];
4651
+ };
4652
+ twinfield_invoices: {
4653
+ Row: {
4654
+ administration_code: string | null;
4655
+ created_at: string;
4656
+ currency: string | null;
4657
+ customer_code: string | null;
4658
+ customer_email: string | null;
4659
+ customer_name: string | null;
4660
+ customer_phone: string | null;
4661
+ due_date: string | null;
4662
+ id: string;
4663
+ invoice_date: string | null;
4664
+ last_synced_at: string;
4665
+ local_invoice_number: string | null;
4666
+ outstanding_amount: number;
4667
+ paid_amount: number;
4668
+ payment_date: string | null;
4669
+ raw_payload: import("./types").Json | null;
4670
+ status: string;
4671
+ subtotal: number;
4672
+ sync_error: string | null;
4673
+ sync_status: string;
4674
+ total: number;
4675
+ twinfield_invoice_number: string;
4676
+ twinfield_transaction_number: string | null;
4677
+ updated_at: string;
4678
+ user_id: string;
4679
+ vat_amount: number;
4680
+ };
4681
+ Insert: {
4682
+ administration_code?: string | null;
4683
+ created_at?: string;
4684
+ currency?: string | null;
4685
+ customer_code?: string | null;
4686
+ customer_email?: string | null;
4687
+ customer_name?: string | null;
4688
+ customer_phone?: string | null;
4689
+ due_date?: string | null;
4690
+ id?: string;
4691
+ invoice_date?: string | null;
4692
+ last_synced_at?: string;
4693
+ local_invoice_number?: string | null;
4694
+ outstanding_amount?: number;
4695
+ paid_amount?: number;
4696
+ payment_date?: string | null;
4697
+ raw_payload?: import("./types").Json | null;
4698
+ status?: string;
4699
+ subtotal?: number;
4700
+ sync_error?: string | null;
4701
+ sync_status?: string;
4702
+ total?: number;
4703
+ twinfield_invoice_number: string;
4704
+ twinfield_transaction_number?: string | null;
4705
+ updated_at?: string;
4706
+ user_id: string;
4707
+ vat_amount?: number;
4708
+ };
4709
+ Update: {
4710
+ administration_code?: string | null;
4711
+ created_at?: string;
4712
+ currency?: string | null;
4713
+ customer_code?: string | null;
4714
+ customer_email?: string | null;
4715
+ customer_name?: string | null;
4716
+ customer_phone?: string | null;
4717
+ due_date?: string | null;
4718
+ id?: string;
4719
+ invoice_date?: string | null;
4720
+ last_synced_at?: string;
4721
+ local_invoice_number?: string | null;
4722
+ outstanding_amount?: number;
4723
+ paid_amount?: number;
4724
+ payment_date?: string | null;
4725
+ raw_payload?: import("./types").Json | null;
4726
+ status?: string;
4727
+ subtotal?: number;
4728
+ sync_error?: string | null;
4729
+ sync_status?: string;
4730
+ total?: number;
4731
+ twinfield_invoice_number?: string;
4732
+ twinfield_transaction_number?: string | null;
4733
+ updated_at?: string;
4734
+ user_id?: string;
4735
+ vat_amount?: number;
4736
+ };
4737
+ Relationships: [];
4738
+ };
2456
4739
  user_roles: {
2457
4740
  Row: {
2458
4741
  created_at: string;
@@ -2481,7 +4764,101 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
2481
4764
  }];
2482
4765
  };
2483
4766
  };
2484
- Views: { [_ in never]: never; };
4767
+ Views: {
4768
+ email_auth_connections_safe: {
4769
+ Row: {
4770
+ account_email: string | null;
4771
+ created_at: string | null;
4772
+ created_by: string | null;
4773
+ display_name: string | null;
4774
+ has_access_token: boolean | null;
4775
+ has_client_id: boolean | null;
4776
+ has_client_secret: boolean | null;
4777
+ has_imap_password: boolean | null;
4778
+ has_refresh_token: boolean | null;
4779
+ has_smtp_password: boolean | null;
4780
+ id: string | null;
4781
+ imap_host: string | null;
4782
+ imap_port: number | null;
4783
+ imap_secure: boolean | null;
4784
+ imap_username: string | null;
4785
+ is_active: boolean | null;
4786
+ last_error: string | null;
4787
+ last_verified_at: string | null;
4788
+ oauth_mode: string | null;
4789
+ provider: string | null;
4790
+ scopes: string[] | null;
4791
+ smtp_host: string | null;
4792
+ smtp_port: number | null;
4793
+ smtp_secure: boolean | null;
4794
+ smtp_username: string | null;
4795
+ status: string | null;
4796
+ token_expires_at: string | null;
4797
+ updated_at: string | null;
4798
+ };
4799
+ Insert: {
4800
+ account_email?: string | null;
4801
+ created_at?: string | null;
4802
+ created_by?: string | null;
4803
+ display_name?: string | null;
4804
+ has_access_token?: never;
4805
+ has_client_id?: never;
4806
+ has_client_secret?: never;
4807
+ has_imap_password?: never;
4808
+ has_refresh_token?: never;
4809
+ has_smtp_password?: never;
4810
+ id?: string | null;
4811
+ imap_host?: string | null;
4812
+ imap_port?: number | null;
4813
+ imap_secure?: boolean | null;
4814
+ imap_username?: string | null;
4815
+ is_active?: boolean | null;
4816
+ last_error?: string | null;
4817
+ last_verified_at?: string | null;
4818
+ oauth_mode?: string | null;
4819
+ provider?: string | null;
4820
+ scopes?: string[] | null;
4821
+ smtp_host?: string | null;
4822
+ smtp_port?: number | null;
4823
+ smtp_secure?: boolean | null;
4824
+ smtp_username?: string | null;
4825
+ status?: string | null;
4826
+ token_expires_at?: string | null;
4827
+ updated_at?: string | null;
4828
+ };
4829
+ Update: {
4830
+ account_email?: string | null;
4831
+ created_at?: string | null;
4832
+ created_by?: string | null;
4833
+ display_name?: string | null;
4834
+ has_access_token?: never;
4835
+ has_client_id?: never;
4836
+ has_client_secret?: never;
4837
+ has_imap_password?: never;
4838
+ has_refresh_token?: never;
4839
+ has_smtp_password?: never;
4840
+ id?: string | null;
4841
+ imap_host?: string | null;
4842
+ imap_port?: number | null;
4843
+ imap_secure?: boolean | null;
4844
+ imap_username?: string | null;
4845
+ is_active?: boolean | null;
4846
+ last_error?: string | null;
4847
+ last_verified_at?: string | null;
4848
+ oauth_mode?: string | null;
4849
+ provider?: string | null;
4850
+ scopes?: string[] | null;
4851
+ smtp_host?: string | null;
4852
+ smtp_port?: number | null;
4853
+ smtp_secure?: boolean | null;
4854
+ smtp_username?: string | null;
4855
+ status?: string | null;
4856
+ token_expires_at?: string | null;
4857
+ updated_at?: string | null;
4858
+ };
4859
+ Relationships: [];
4860
+ };
4861
+ };
2485
4862
  Functions: {
2486
4863
  dashboard_list_public_schema: {
2487
4864
  Args: never;
@@ -2491,6 +4868,18 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
2491
4868
  table_name: string;
2492
4869
  }[];
2493
4870
  };
4871
+ email_auth_decrypt: {
4872
+ Args: {
4873
+ cipher: string;
4874
+ };
4875
+ Returns: string;
4876
+ };
4877
+ email_auth_encrypt: {
4878
+ Args: {
4879
+ plain: string;
4880
+ };
4881
+ Returns: string;
4882
+ };
2494
4883
  exact_decrypt: {
2495
4884
  Args: {
2496
4885
  cipher: string;
@@ -2503,6 +4892,49 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
2503
4892
  };
2504
4893
  Returns: string;
2505
4894
  };
4895
+ exact_lock_environment: {
4896
+ Args: {
4897
+ _environment: string;
4898
+ };
4899
+ Returns: undefined;
4900
+ };
4901
+ exact_release_refresh_lock: {
4902
+ Args: {
4903
+ _environment: Database["public"]["Enums"]["exact_env"];
4904
+ _locked_by: string;
4905
+ };
4906
+ Returns: undefined;
4907
+ };
4908
+ exact_try_acquire_refresh_lock: {
4909
+ Args: {
4910
+ _environment: Database["public"]["Enums"]["exact_env"];
4911
+ _lease_seconds?: number;
4912
+ _locked_by?: string;
4913
+ };
4914
+ Returns: boolean;
4915
+ };
4916
+ get_active_floriday_connection_public: {
4917
+ Args: never;
4918
+ Returns: {
4919
+ active_environment: string;
4920
+ environment: string;
4921
+ gln_code: string;
4922
+ id: string;
4923
+ label: string;
4924
+ organization_name: string;
4925
+ preferred_warehouse_id: string;
4926
+ preferred_warehouse_name: string;
4927
+ }[];
4928
+ };
4929
+ get_floriday_cron_jobs: {
4930
+ Args: never;
4931
+ Returns: {
4932
+ active: boolean;
4933
+ jobname: string;
4934
+ schedule: string;
4935
+ url: string;
4936
+ }[];
4937
+ };
2506
4938
  get_offer_by_link_code: {
2507
4939
  Args: {
2508
4940
  p_code: string;
@@ -2516,6 +4948,20 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
2516
4948
  };
2517
4949
  Returns: boolean;
2518
4950
  };
4951
+ schedule_floriday_connections_sync: {
4952
+ Args: {
4953
+ p_apikey: string;
4954
+ p_url: string;
4955
+ };
4956
+ Returns: number;
4957
+ };
4958
+ schedule_floriday_customer_organizations_sync: {
4959
+ Args: {
4960
+ p_apikey: string;
4961
+ p_url: string;
4962
+ };
4963
+ Returns: number;
4964
+ };
2519
4965
  schedule_floriday_network_sync: {
2520
4966
  Args: {
2521
4967
  p_apikey: string;
@@ -2523,6 +4969,13 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
2523
4969
  };
2524
4970
  Returns: number;
2525
4971
  };
4972
+ schedule_floriday_salesorders_sync: {
4973
+ Args: {
4974
+ p_apikey: string;
4975
+ p_url: string;
4976
+ };
4977
+ Returns: number;
4978
+ };
2526
4979
  schedule_floriday_token_refresh: {
2527
4980
  Args: {
2528
4981
  p_apikey: string;
@@ -2530,6 +4983,13 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
2530
4983
  };
2531
4984
  Returns: number;
2532
4985
  };
4986
+ schedule_floriday_trade_items_sync: {
4987
+ Args: {
4988
+ p_apikey: string;
4989
+ p_url: string;
4990
+ };
4991
+ Returns: number;
4992
+ };
2533
4993
  show_limit: {
2534
4994
  Args: never;
2535
4995
  Returns: number;
@@ -2544,6 +5004,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
2544
5004
  Enums: {
2545
5005
  app_role: "admin" | "manager" | "warehouse" | "sales" | "developer";
2546
5006
  exact_env: "staging" | "live";
5007
+ quote_status: "concept" | "verzonden" | "bekeken" | "in_behandeling" | "geaccepteerd" | "afgewezen" | "verlopen" | "gearchiveerd";
2547
5008
  };
2548
5009
  CompositeTypes: { [_ in never]: never; };
2549
5010
  }, {