@flowselections/floriday-klanten-module 1.0.7 → 1.0.8

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.
@@ -188,6 +188,156 @@ export declare const listAccountingProviders: import("@tanstack/start-client-cor
188
188
  };
189
189
  Relationships: [];
190
190
  };
191
+ app_settings: {
192
+ Row: {
193
+ created_at: string;
194
+ id: string;
195
+ key: string;
196
+ updated_at: string;
197
+ value: string | null;
198
+ };
199
+ Insert: {
200
+ created_at?: string;
201
+ id?: string;
202
+ key: string;
203
+ updated_at?: string;
204
+ value?: string | null;
205
+ };
206
+ Update: {
207
+ created_at?: string;
208
+ id?: string;
209
+ key?: string;
210
+ updated_at?: string;
211
+ value?: string | null;
212
+ };
213
+ Relationships: [];
214
+ };
215
+ booking_items: {
216
+ Row: {
217
+ booking_id: string;
218
+ created_at: string;
219
+ extra_id: string;
220
+ id: string;
221
+ quantity: number;
222
+ total_price: number;
223
+ unit_price: number;
224
+ };
225
+ Insert: {
226
+ booking_id: string;
227
+ created_at?: string;
228
+ extra_id: string;
229
+ id?: string;
230
+ quantity?: number;
231
+ total_price?: number;
232
+ unit_price?: number;
233
+ };
234
+ Update: {
235
+ booking_id?: string;
236
+ created_at?: string;
237
+ extra_id?: string;
238
+ id?: string;
239
+ quantity?: number;
240
+ total_price?: number;
241
+ unit_price?: number;
242
+ };
243
+ Relationships: [{
244
+ foreignKeyName: "booking_items_booking_id_fkey";
245
+ columns: ["booking_id"];
246
+ isOneToOne: false;
247
+ referencedRelation: "bookings";
248
+ referencedColumns: ["id"];
249
+ }, {
250
+ foreignKeyName: "booking_items_extra_id_fkey";
251
+ columns: ["extra_id"];
252
+ isOneToOne: false;
253
+ referencedRelation: "extras";
254
+ referencedColumns: ["id"];
255
+ }];
256
+ };
257
+ bookings: {
258
+ Row: {
259
+ company_name: string | null;
260
+ conflict_checked_at: string | null;
261
+ conflict_reason: string | null;
262
+ created_at: string;
263
+ created_by_role: string | null;
264
+ customer_email: string | null;
265
+ customer_name: string | null;
266
+ end_time: string;
267
+ exact_debiteur_id: string | null;
268
+ has_conflict: boolean;
269
+ id: string;
270
+ invoice_run_id: string | null;
271
+ invoice_status: string | null;
272
+ invoiced_at: string | null;
273
+ notes: string | null;
274
+ number_of_people: number;
275
+ room_id: string;
276
+ start_time: string;
277
+ status: string;
278
+ total_excl_vat: number | null;
279
+ total_incl_vat: number | null;
280
+ user_id: string | null;
281
+ vat_amount: number | null;
282
+ };
283
+ Insert: {
284
+ company_name?: string | null;
285
+ conflict_checked_at?: string | null;
286
+ conflict_reason?: string | null;
287
+ created_at?: string;
288
+ created_by_role?: string | null;
289
+ customer_email?: string | null;
290
+ customer_name?: string | null;
291
+ end_time: string;
292
+ exact_debiteur_id?: string | null;
293
+ has_conflict?: boolean;
294
+ id?: string;
295
+ invoice_run_id?: string | null;
296
+ invoice_status?: string | null;
297
+ invoiced_at?: string | null;
298
+ notes?: string | null;
299
+ number_of_people?: number;
300
+ room_id: string;
301
+ start_time: string;
302
+ status?: string;
303
+ total_excl_vat?: number | null;
304
+ total_incl_vat?: number | null;
305
+ user_id?: string | null;
306
+ vat_amount?: number | null;
307
+ };
308
+ Update: {
309
+ company_name?: string | null;
310
+ conflict_checked_at?: string | null;
311
+ conflict_reason?: string | null;
312
+ created_at?: string;
313
+ created_by_role?: string | null;
314
+ customer_email?: string | null;
315
+ customer_name?: string | null;
316
+ end_time?: string;
317
+ exact_debiteur_id?: string | null;
318
+ has_conflict?: boolean;
319
+ id?: string;
320
+ invoice_run_id?: string | null;
321
+ invoice_status?: string | null;
322
+ invoiced_at?: string | null;
323
+ notes?: string | null;
324
+ number_of_people?: number;
325
+ room_id?: string;
326
+ start_time?: string;
327
+ status?: string;
328
+ total_excl_vat?: number | null;
329
+ total_incl_vat?: number | null;
330
+ user_id?: string | null;
331
+ vat_amount?: number | null;
332
+ };
333
+ Relationships: [{
334
+ foreignKeyName: "bookings_room_id_fkey";
335
+ columns: ["room_id"];
336
+ isOneToOne: false;
337
+ referencedRelation: "rooms";
338
+ referencedColumns: ["id"];
339
+ }];
340
+ };
191
341
  bugs: {
192
342
  Row: {
193
343
  attachment_url: string | null;
@@ -1019,17 +1169,26 @@ export declare const listAccountingProviders: import("@tanstack/start-client-cor
1019
1169
  created_at: string;
1020
1170
  created_by: string | null;
1021
1171
  display_name: string | null;
1172
+ gmail_history_id: string | null;
1173
+ gmail_watch_expires_at: string | null;
1174
+ graph_subscription_expires_at: string | null;
1175
+ graph_subscription_id: string | null;
1022
1176
  id: string;
1023
1177
  imap_host: string | null;
1178
+ imap_last_uid: number | null;
1024
1179
  imap_password_encrypted: string | null;
1025
1180
  imap_port: number | null;
1026
1181
  imap_secure: boolean | null;
1182
+ imap_uid_validity: number | null;
1027
1183
  imap_username: string | null;
1028
1184
  is_active: boolean;
1029
1185
  last_error: string | null;
1186
+ last_event_at: string | null;
1030
1187
  last_verified_at: string | null;
1031
1188
  oauth_mode: string | null;
1032
1189
  provider: string;
1190
+ purpose_assignments: import("../integrations/supabase/types").Json;
1191
+ realtime_mode: string;
1033
1192
  refresh_token_encrypted: string | null;
1034
1193
  scopes: string[] | null;
1035
1194
  smtp_host: string | null;
@@ -1049,17 +1208,26 @@ export declare const listAccountingProviders: import("@tanstack/start-client-cor
1049
1208
  created_at?: string;
1050
1209
  created_by?: string | null;
1051
1210
  display_name?: string | null;
1211
+ gmail_history_id?: string | null;
1212
+ gmail_watch_expires_at?: string | null;
1213
+ graph_subscription_expires_at?: string | null;
1214
+ graph_subscription_id?: string | null;
1052
1215
  id?: string;
1053
1216
  imap_host?: string | null;
1217
+ imap_last_uid?: number | null;
1054
1218
  imap_password_encrypted?: string | null;
1055
1219
  imap_port?: number | null;
1056
1220
  imap_secure?: boolean | null;
1221
+ imap_uid_validity?: number | null;
1057
1222
  imap_username?: string | null;
1058
1223
  is_active?: boolean;
1059
1224
  last_error?: string | null;
1225
+ last_event_at?: string | null;
1060
1226
  last_verified_at?: string | null;
1061
1227
  oauth_mode?: string | null;
1062
1228
  provider: string;
1229
+ purpose_assignments?: import("../integrations/supabase/types").Json;
1230
+ realtime_mode?: string;
1063
1231
  refresh_token_encrypted?: string | null;
1064
1232
  scopes?: string[] | null;
1065
1233
  smtp_host?: string | null;
@@ -1079,17 +1247,26 @@ export declare const listAccountingProviders: import("@tanstack/start-client-cor
1079
1247
  created_at?: string;
1080
1248
  created_by?: string | null;
1081
1249
  display_name?: string | null;
1250
+ gmail_history_id?: string | null;
1251
+ gmail_watch_expires_at?: string | null;
1252
+ graph_subscription_expires_at?: string | null;
1253
+ graph_subscription_id?: string | null;
1082
1254
  id?: string;
1083
1255
  imap_host?: string | null;
1256
+ imap_last_uid?: number | null;
1084
1257
  imap_password_encrypted?: string | null;
1085
1258
  imap_port?: number | null;
1086
1259
  imap_secure?: boolean | null;
1260
+ imap_uid_validity?: number | null;
1087
1261
  imap_username?: string | null;
1088
1262
  is_active?: boolean;
1089
1263
  last_error?: string | null;
1264
+ last_event_at?: string | null;
1090
1265
  last_verified_at?: string | null;
1091
1266
  oauth_mode?: string | null;
1092
1267
  provider?: string;
1268
+ purpose_assignments?: import("../integrations/supabase/types").Json;
1269
+ realtime_mode?: string;
1093
1270
  refresh_token_encrypted?: string | null;
1094
1271
  scopes?: string[] | null;
1095
1272
  smtp_host?: string | null;
@@ -1103,6 +1280,195 @@ export declare const listAccountingProviders: import("@tanstack/start-client-cor
1103
1280
  };
1104
1281
  Relationships: [];
1105
1282
  };
1283
+ email_auth_events: {
1284
+ Row: {
1285
+ connection_id: string;
1286
+ consumed_at: string | null;
1287
+ created_at: string;
1288
+ event_type: string;
1289
+ external_id: string | null;
1290
+ id: string;
1291
+ payload: import("../integrations/supabase/types").Json;
1292
+ provider: string;
1293
+ received_at: string;
1294
+ };
1295
+ Insert: {
1296
+ connection_id: string;
1297
+ consumed_at?: string | null;
1298
+ created_at?: string;
1299
+ event_type: string;
1300
+ external_id?: string | null;
1301
+ id?: string;
1302
+ payload?: import("../integrations/supabase/types").Json;
1303
+ provider: string;
1304
+ received_at?: string;
1305
+ };
1306
+ Update: {
1307
+ connection_id?: string;
1308
+ consumed_at?: string | null;
1309
+ created_at?: string;
1310
+ event_type?: string;
1311
+ external_id?: string | null;
1312
+ id?: string;
1313
+ payload?: import("../integrations/supabase/types").Json;
1314
+ provider?: string;
1315
+ received_at?: string;
1316
+ };
1317
+ Relationships: [{
1318
+ foreignKeyName: "email_auth_events_connection_id_fkey";
1319
+ columns: ["connection_id"];
1320
+ isOneToOne: false;
1321
+ referencedRelation: "email_auth_connections";
1322
+ referencedColumns: ["id"];
1323
+ }, {
1324
+ foreignKeyName: "email_auth_events_connection_id_fkey";
1325
+ columns: ["connection_id"];
1326
+ isOneToOne: false;
1327
+ referencedRelation: "email_auth_connections_safe";
1328
+ referencedColumns: ["id"];
1329
+ }];
1330
+ };
1331
+ email_auth_outbox: {
1332
+ Row: {
1333
+ attempts: number;
1334
+ bcc_addresses: string[];
1335
+ cc_addresses: string[];
1336
+ connection_id: string | null;
1337
+ created_at: string;
1338
+ created_by: string | null;
1339
+ external_message_id: string | null;
1340
+ headers: import("../integrations/supabase/types").Json;
1341
+ html_body: string | null;
1342
+ id: string;
1343
+ last_error: string | null;
1344
+ purpose: string;
1345
+ reply_to: string | null;
1346
+ scheduled_at: string;
1347
+ sent_at: string | null;
1348
+ status: string;
1349
+ subject: string;
1350
+ text_body: string | null;
1351
+ to_addresses: string[];
1352
+ updated_at: string;
1353
+ };
1354
+ Insert: {
1355
+ attempts?: number;
1356
+ bcc_addresses?: string[];
1357
+ cc_addresses?: string[];
1358
+ connection_id?: string | null;
1359
+ created_at?: string;
1360
+ created_by?: string | null;
1361
+ external_message_id?: string | null;
1362
+ headers?: import("../integrations/supabase/types").Json;
1363
+ html_body?: string | null;
1364
+ id?: string;
1365
+ last_error?: string | null;
1366
+ purpose: string;
1367
+ reply_to?: string | null;
1368
+ scheduled_at?: string;
1369
+ sent_at?: string | null;
1370
+ status?: string;
1371
+ subject: string;
1372
+ text_body?: string | null;
1373
+ to_addresses: string[];
1374
+ updated_at?: string;
1375
+ };
1376
+ Update: {
1377
+ attempts?: number;
1378
+ bcc_addresses?: string[];
1379
+ cc_addresses?: string[];
1380
+ connection_id?: string | null;
1381
+ created_at?: string;
1382
+ created_by?: string | null;
1383
+ external_message_id?: string | null;
1384
+ headers?: import("../integrations/supabase/types").Json;
1385
+ html_body?: string | null;
1386
+ id?: string;
1387
+ last_error?: string | null;
1388
+ purpose?: string;
1389
+ reply_to?: string | null;
1390
+ scheduled_at?: string;
1391
+ sent_at?: string | null;
1392
+ status?: string;
1393
+ subject?: string;
1394
+ text_body?: string | null;
1395
+ to_addresses?: string[];
1396
+ updated_at?: string;
1397
+ };
1398
+ Relationships: [{
1399
+ foreignKeyName: "email_auth_outbox_connection_id_fkey";
1400
+ columns: ["connection_id"];
1401
+ isOneToOne: false;
1402
+ referencedRelation: "email_auth_connections";
1403
+ referencedColumns: ["id"];
1404
+ }, {
1405
+ foreignKeyName: "email_auth_outbox_connection_id_fkey";
1406
+ columns: ["connection_id"];
1407
+ isOneToOne: false;
1408
+ referencedRelation: "email_auth_connections_safe";
1409
+ referencedColumns: ["id"];
1410
+ }];
1411
+ };
1412
+ email_auth_purpose_settings: {
1413
+ Row: {
1414
+ purpose: string;
1415
+ reply_to: string | null;
1416
+ updated_at: string;
1417
+ updated_by: string | null;
1418
+ };
1419
+ Insert: {
1420
+ purpose: string;
1421
+ reply_to?: string | null;
1422
+ updated_at?: string;
1423
+ updated_by?: string | null;
1424
+ };
1425
+ Update: {
1426
+ purpose?: string;
1427
+ reply_to?: string | null;
1428
+ updated_at?: string;
1429
+ updated_by?: string | null;
1430
+ };
1431
+ Relationships: [];
1432
+ };
1433
+ email_auth_token_refresh_log: {
1434
+ Row: {
1435
+ connection_id: string;
1436
+ error_message: string | null;
1437
+ id: string;
1438
+ refreshed_at: string;
1439
+ success: boolean;
1440
+ trigger_source: string;
1441
+ };
1442
+ Insert: {
1443
+ connection_id: string;
1444
+ error_message?: string | null;
1445
+ id?: string;
1446
+ refreshed_at?: string;
1447
+ success: boolean;
1448
+ trigger_source: string;
1449
+ };
1450
+ Update: {
1451
+ connection_id?: string;
1452
+ error_message?: string | null;
1453
+ id?: string;
1454
+ refreshed_at?: string;
1455
+ success?: boolean;
1456
+ trigger_source?: string;
1457
+ };
1458
+ Relationships: [{
1459
+ foreignKeyName: "email_auth_token_refresh_log_connection_id_fkey";
1460
+ columns: ["connection_id"];
1461
+ isOneToOne: false;
1462
+ referencedRelation: "email_auth_connections";
1463
+ referencedColumns: ["id"];
1464
+ }, {
1465
+ foreignKeyName: "email_auth_token_refresh_log_connection_id_fkey";
1466
+ columns: ["connection_id"];
1467
+ isOneToOne: false;
1468
+ referencedRelation: "email_auth_connections_safe";
1469
+ referencedColumns: ["id"];
1470
+ }];
1471
+ };
1106
1472
  exact_account_analytics_cache: {
1107
1473
  Row: {
1108
1474
  account_id: string;
@@ -1847,6 +2213,42 @@ export declare const listAccountingProviders: import("@tanstack/start-client-cor
1847
2213
  };
1848
2214
  Relationships: [];
1849
2215
  };
2216
+ exact_settings: {
2217
+ Row: {
2218
+ client_id: string | null;
2219
+ client_secret: string | null;
2220
+ connection_status: string;
2221
+ created_at: string;
2222
+ division_id: string | null;
2223
+ id: string;
2224
+ last_sync_at: string | null;
2225
+ redirect_uri: string | null;
2226
+ updated_at: string;
2227
+ };
2228
+ Insert: {
2229
+ client_id?: string | null;
2230
+ client_secret?: string | null;
2231
+ connection_status?: string;
2232
+ created_at?: string;
2233
+ division_id?: string | null;
2234
+ id?: string;
2235
+ last_sync_at?: string | null;
2236
+ redirect_uri?: string | null;
2237
+ updated_at?: string;
2238
+ };
2239
+ Update: {
2240
+ client_id?: string | null;
2241
+ client_secret?: string | null;
2242
+ connection_status?: string;
2243
+ created_at?: string;
2244
+ division_id?: string | null;
2245
+ id?: string;
2246
+ last_sync_at?: string | null;
2247
+ redirect_uri?: string | null;
2248
+ updated_at?: string;
2249
+ };
2250
+ Relationships: [];
2251
+ };
1850
2252
  exact_sync_state: {
1851
2253
  Row: {
1852
2254
  connection_id: string;
@@ -1910,27 +2312,84 @@ export declare const listAccountingProviders: import("@tanstack/start-client-cor
1910
2312
  };
1911
2313
  Relationships: [];
1912
2314
  };
1913
- floricode_connection_settings: {
2315
+ extra_categories: {
1914
2316
  Row: {
1915
- catalog_key: string | null;
1916
- catalog_url: string;
1917
2317
  created_at: string;
1918
- id: number;
1919
- last_meta: import("../integrations/supabase/types").Json | null;
1920
- last_test_at: string | null;
1921
- last_test_error: string | null;
1922
- last_test_ok: boolean | null;
2318
+ id: string;
2319
+ name: string;
2320
+ sort_order: number;
1923
2321
  updated_at: string;
1924
2322
  };
1925
2323
  Insert: {
1926
- catalog_key?: string | null;
1927
- catalog_url?: string;
1928
2324
  created_at?: string;
1929
- id?: number;
1930
- last_meta?: import("../integrations/supabase/types").Json | null;
1931
- last_test_at?: string | null;
1932
- last_test_error?: string | null;
1933
- last_test_ok?: boolean | null;
2325
+ id?: string;
2326
+ name: string;
2327
+ sort_order?: number;
2328
+ updated_at?: string;
2329
+ };
2330
+ Update: {
2331
+ created_at?: string;
2332
+ id?: string;
2333
+ name?: string;
2334
+ sort_order?: number;
2335
+ updated_at?: string;
2336
+ };
2337
+ Relationships: [];
2338
+ };
2339
+ extras: {
2340
+ Row: {
2341
+ category: string;
2342
+ created_at: string;
2343
+ exact_article_id: string | null;
2344
+ id: string;
2345
+ is_active: boolean;
2346
+ name: string;
2347
+ price: number;
2348
+ pricing_type: string;
2349
+ };
2350
+ Insert: {
2351
+ category: string;
2352
+ created_at?: string;
2353
+ exact_article_id?: string | null;
2354
+ id?: string;
2355
+ is_active?: boolean;
2356
+ name: string;
2357
+ price?: number;
2358
+ pricing_type?: string;
2359
+ };
2360
+ Update: {
2361
+ category?: string;
2362
+ created_at?: string;
2363
+ exact_article_id?: string | null;
2364
+ id?: string;
2365
+ is_active?: boolean;
2366
+ name?: string;
2367
+ price?: number;
2368
+ pricing_type?: string;
2369
+ };
2370
+ Relationships: [];
2371
+ };
2372
+ floricode_connection_settings: {
2373
+ Row: {
2374
+ catalog_key: string | null;
2375
+ catalog_url: string;
2376
+ created_at: string;
2377
+ id: number;
2378
+ last_meta: import("../integrations/supabase/types").Json | null;
2379
+ last_test_at: string | null;
2380
+ last_test_error: string | null;
2381
+ last_test_ok: boolean | null;
2382
+ updated_at: string;
2383
+ };
2384
+ Insert: {
2385
+ catalog_key?: string | null;
2386
+ catalog_url?: string;
2387
+ created_at?: string;
2388
+ id?: number;
2389
+ last_meta?: import("../integrations/supabase/types").Json | null;
2390
+ last_test_at?: string | null;
2391
+ last_test_error?: string | null;
2392
+ last_test_ok?: boolean | null;
1934
2393
  updated_at?: string;
1935
2394
  };
1936
2395
  Update: {
@@ -2561,6 +3020,102 @@ export declare const listAccountingProviders: import("@tanstack/start-client-cor
2561
3020
  };
2562
3021
  Relationships: [];
2563
3022
  };
3023
+ invoice_run_items: {
3024
+ Row: {
3025
+ booking_id: string | null;
3026
+ company_name: string | null;
3027
+ created_at: string;
3028
+ customer_email: string | null;
3029
+ description: string | null;
3030
+ exact_article_id: string | null;
3031
+ id: string;
3032
+ invoice_run_id: string | null;
3033
+ quantity: number | null;
3034
+ total_excl_vat: number | null;
3035
+ total_incl_vat: number | null;
3036
+ unit_price: number | null;
3037
+ vat_amount: number | null;
3038
+ };
3039
+ Insert: {
3040
+ booking_id?: string | null;
3041
+ company_name?: string | null;
3042
+ created_at?: string;
3043
+ customer_email?: string | null;
3044
+ description?: string | null;
3045
+ exact_article_id?: string | null;
3046
+ id?: string;
3047
+ invoice_run_id?: string | null;
3048
+ quantity?: number | null;
3049
+ total_excl_vat?: number | null;
3050
+ total_incl_vat?: number | null;
3051
+ unit_price?: number | null;
3052
+ vat_amount?: number | null;
3053
+ };
3054
+ Update: {
3055
+ booking_id?: string | null;
3056
+ company_name?: string | null;
3057
+ created_at?: string;
3058
+ customer_email?: string | null;
3059
+ description?: string | null;
3060
+ exact_article_id?: string | null;
3061
+ id?: string;
3062
+ invoice_run_id?: string | null;
3063
+ quantity?: number | null;
3064
+ total_excl_vat?: number | null;
3065
+ total_incl_vat?: number | null;
3066
+ unit_price?: number | null;
3067
+ vat_amount?: number | null;
3068
+ };
3069
+ Relationships: [{
3070
+ foreignKeyName: "invoice_run_items_booking_id_fkey";
3071
+ columns: ["booking_id"];
3072
+ isOneToOne: false;
3073
+ referencedRelation: "bookings";
3074
+ referencedColumns: ["id"];
3075
+ }, {
3076
+ foreignKeyName: "invoice_run_items_invoice_run_id_fkey";
3077
+ columns: ["invoice_run_id"];
3078
+ isOneToOne: false;
3079
+ referencedRelation: "invoice_runs";
3080
+ referencedColumns: ["id"];
3081
+ }];
3082
+ };
3083
+ invoice_runs: {
3084
+ Row: {
3085
+ created_at: string;
3086
+ created_by: string | null;
3087
+ id: string;
3088
+ period_end: string;
3089
+ period_start: string;
3090
+ status: string;
3091
+ total_excl_vat: number | null;
3092
+ total_incl_vat: number | null;
3093
+ vat_amount: number | null;
3094
+ };
3095
+ Insert: {
3096
+ created_at?: string;
3097
+ created_by?: string | null;
3098
+ id?: string;
3099
+ period_end: string;
3100
+ period_start: string;
3101
+ status?: string;
3102
+ total_excl_vat?: number | null;
3103
+ total_incl_vat?: number | null;
3104
+ vat_amount?: number | null;
3105
+ };
3106
+ Update: {
3107
+ created_at?: string;
3108
+ created_by?: string | null;
3109
+ id?: string;
3110
+ period_end?: string;
3111
+ period_start?: string;
3112
+ status?: string;
3113
+ total_excl_vat?: number | null;
3114
+ total_incl_vat?: number | null;
3115
+ vat_amount?: number | null;
3116
+ };
3117
+ Relationships: [];
3118
+ };
2564
3119
  locations: {
2565
3120
  Row: {
2566
3121
  created_at: string;
@@ -2591,6 +3146,7 @@ export declare const listAccountingProviders: import("@tanstack/start-client-cor
2591
3146
  body_text: string | null;
2592
3147
  created_at: string;
2593
3148
  error_message: string | null;
3149
+ external_id: string | null;
2594
3150
  from_email: string | null;
2595
3151
  from_name: string | null;
2596
3152
  id: string;
@@ -2600,7 +3156,7 @@ export declare const listAccountingProviders: import("@tanstack/start-client-cor
2600
3156
  received_at: string | null;
2601
3157
  status: string;
2602
3158
  subject: string | null;
2603
- uid: number;
3159
+ uid: number | null;
2604
3160
  updated_at: string;
2605
3161
  };
2606
3162
  Insert: {
@@ -2608,6 +3164,7 @@ export declare const listAccountingProviders: import("@tanstack/start-client-cor
2608
3164
  body_text?: string | null;
2609
3165
  created_at?: string;
2610
3166
  error_message?: string | null;
3167
+ external_id?: string | null;
2611
3168
  from_email?: string | null;
2612
3169
  from_name?: string | null;
2613
3170
  id?: string;
@@ -2617,7 +3174,7 @@ export declare const listAccountingProviders: import("@tanstack/start-client-cor
2617
3174
  received_at?: string | null;
2618
3175
  status?: string;
2619
3176
  subject?: string | null;
2620
- uid: number;
3177
+ uid?: number | null;
2621
3178
  updated_at?: string;
2622
3179
  };
2623
3180
  Update: {
@@ -2625,6 +3182,7 @@ export declare const listAccountingProviders: import("@tanstack/start-client-cor
2625
3182
  body_text?: string | null;
2626
3183
  created_at?: string;
2627
3184
  error_message?: string | null;
3185
+ external_id?: string | null;
2628
3186
  from_email?: string | null;
2629
3187
  from_name?: string | null;
2630
3188
  id?: string;
@@ -2634,7 +3192,7 @@ export declare const listAccountingProviders: import("@tanstack/start-client-cor
2634
3192
  received_at?: string | null;
2635
3193
  status?: string;
2636
3194
  subject?: string | null;
2637
- uid?: number;
3195
+ uid?: number | null;
2638
3196
  updated_at?: string;
2639
3197
  };
2640
3198
  Relationships: [{
@@ -2906,6 +3464,60 @@ export declare const listAccountingProviders: import("@tanstack/start-client-cor
2906
3464
  };
2907
3465
  Relationships: [];
2908
3466
  };
3467
+ monteurs: {
3468
+ Row: {
3469
+ avatar_url: string | null;
3470
+ color: string | null;
3471
+ created_at: string;
3472
+ email: string | null;
3473
+ id: string;
3474
+ is_active: boolean;
3475
+ leave_balance_hours: number;
3476
+ name: string;
3477
+ persnr: number | null;
3478
+ phone: string | null;
3479
+ role: string;
3480
+ tenant_id: string;
3481
+ updated_at: string;
3482
+ };
3483
+ Insert: {
3484
+ avatar_url?: string | null;
3485
+ color?: string | null;
3486
+ created_at?: string;
3487
+ email?: string | null;
3488
+ id?: string;
3489
+ is_active?: boolean;
3490
+ leave_balance_hours?: number;
3491
+ name: string;
3492
+ persnr?: number | null;
3493
+ phone?: string | null;
3494
+ role?: string;
3495
+ tenant_id: string;
3496
+ updated_at?: string;
3497
+ };
3498
+ Update: {
3499
+ avatar_url?: string | null;
3500
+ color?: string | null;
3501
+ created_at?: string;
3502
+ email?: string | null;
3503
+ id?: string;
3504
+ is_active?: boolean;
3505
+ leave_balance_hours?: number;
3506
+ name?: string;
3507
+ persnr?: number | null;
3508
+ phone?: string | null;
3509
+ role?: string;
3510
+ tenant_id?: string;
3511
+ updated_at?: string;
3512
+ };
3513
+ Relationships: [{
3514
+ foreignKeyName: "monteurs_tenant_id_fkey";
3515
+ columns: ["tenant_id"];
3516
+ isOneToOne: false;
3517
+ referencedRelation: "tenants";
3518
+ referencedColumns: ["id"];
3519
+ }];
3520
+ };
2909
3521
  notifications: {
2910
3522
  Row: {
2911
3523
  created_at: string;
@@ -3738,6 +4350,7 @@ export declare const listAccountingProviders: import("@tanstack/start-client-cor
3738
4350
  email: string | null;
3739
4351
  id: string;
3740
4352
  notification_preferences: import("../integrations/supabase/types").Json;
4353
+ tenant_id: string | null;
3741
4354
  updated_at: string;
3742
4355
  };
3743
4356
  Insert: {
@@ -3746,6 +4359,7 @@ export declare const listAccountingProviders: import("@tanstack/start-client-cor
3746
4359
  email?: string | null;
3747
4360
  id: string;
3748
4361
  notification_preferences?: import("../integrations/supabase/types").Json;
4362
+ tenant_id?: string | null;
3749
4363
  updated_at?: string;
3750
4364
  };
3751
4365
  Update: {
@@ -3754,9 +4368,16 @@ export declare const listAccountingProviders: import("@tanstack/start-client-cor
3754
4368
  email?: string | null;
3755
4369
  id?: string;
3756
4370
  notification_preferences?: import("../integrations/supabase/types").Json;
4371
+ tenant_id?: string | null;
3757
4372
  updated_at?: string;
3758
4373
  };
3759
- Relationships: [];
4374
+ Relationships: [{
4375
+ foreignKeyName: "profiles_tenant_id_fkey";
4376
+ columns: ["tenant_id"];
4377
+ isOneToOne: false;
4378
+ referencedRelation: "tenants";
4379
+ referencedColumns: ["id"];
4380
+ }];
3760
4381
  };
3761
4382
  projects: {
3762
4383
  Row: {
@@ -4460,6 +5081,81 @@ export declare const listAccountingProviders: import("@tanstack/start-client-cor
4460
5081
  referencedColumns: ["id"];
4461
5082
  }];
4462
5083
  };
5084
+ reception_notifications: {
5085
+ Row: {
5086
+ booking_id: string | null;
5087
+ created_at: string;
5088
+ id: string;
5089
+ is_read: boolean;
5090
+ message: string;
5091
+ recipient_email: string | null;
5092
+ title: string;
5093
+ type: string;
5094
+ };
5095
+ Insert: {
5096
+ booking_id?: string | null;
5097
+ created_at?: string;
5098
+ id?: string;
5099
+ is_read?: boolean;
5100
+ message: string;
5101
+ recipient_email?: string | null;
5102
+ title: string;
5103
+ type: string;
5104
+ };
5105
+ Update: {
5106
+ booking_id?: string | null;
5107
+ created_at?: string;
5108
+ id?: string;
5109
+ is_read?: boolean;
5110
+ message?: string;
5111
+ recipient_email?: string | null;
5112
+ title?: string;
5113
+ type?: string;
5114
+ };
5115
+ Relationships: [{
5116
+ foreignKeyName: "reception_notifications_booking_id_fkey";
5117
+ columns: ["booking_id"];
5118
+ isOneToOne: false;
5119
+ referencedRelation: "bookings";
5120
+ referencedColumns: ["id"];
5121
+ }];
5122
+ };
5123
+ rooms: {
5124
+ Row: {
5125
+ capacity: number;
5126
+ color_code: string | null;
5127
+ created_at: string;
5128
+ description: string | null;
5129
+ hourly_rate: number;
5130
+ id: string;
5131
+ image_url: string | null;
5132
+ is_active: boolean;
5133
+ name: string;
5134
+ };
5135
+ Insert: {
5136
+ capacity?: number;
5137
+ color_code?: string | null;
5138
+ created_at?: string;
5139
+ description?: string | null;
5140
+ hourly_rate?: number;
5141
+ id?: string;
5142
+ image_url?: string | null;
5143
+ is_active?: boolean;
5144
+ name: string;
5145
+ };
5146
+ Update: {
5147
+ capacity?: number;
5148
+ color_code?: string | null;
5149
+ created_at?: string;
5150
+ description?: string | null;
5151
+ hourly_rate?: number;
5152
+ id?: string;
5153
+ image_url?: string | null;
5154
+ is_active?: boolean;
5155
+ name?: string;
5156
+ };
5157
+ Relationships: [];
5158
+ };
4463
5159
  supplier_products: {
4464
5160
  Row: {
4465
5161
  article_number: string | null;
@@ -4553,6 +5249,30 @@ export declare const listAccountingProviders: import("@tanstack/start-client-cor
4553
5249
  };
4554
5250
  Relationships: [];
4555
5251
  };
5252
+ tenants: {
5253
+ Row: {
5254
+ created_at: string;
5255
+ id: string;
5256
+ name: string;
5257
+ slug: string | null;
5258
+ updated_at: string;
5259
+ };
5260
+ Insert: {
5261
+ created_at?: string;
5262
+ id?: string;
5263
+ name?: string;
5264
+ slug?: string | null;
5265
+ updated_at?: string;
5266
+ };
5267
+ Update: {
5268
+ created_at?: string;
5269
+ id?: string;
5270
+ name?: string;
5271
+ slug?: string | null;
5272
+ updated_at?: string;
5273
+ };
5274
+ Relationships: [];
5275
+ };
4556
5276
  trade_item_drafts: {
4557
5277
  Row: {
4558
5278
  connection_id: string | null;
@@ -5228,35 +5948,198 @@ export declare const listAccountingProviders: import("@tanstack/start-client-cor
5228
5948
  referencedColumns: ["id"];
5229
5949
  }];
5230
5950
  };
5231
- };
5232
- Views: {
5233
- email_auth_connections_safe: {
5951
+ work_order_monteurs: {
5234
5952
  Row: {
5235
- account_email: string | null;
5236
- created_at: string | null;
5237
- created_by: string | null;
5238
- display_name: string | null;
5239
- has_access_token: boolean | null;
5240
- has_client_id: boolean | null;
5241
- has_client_secret: boolean | null;
5242
- has_imap_password: boolean | null;
5243
- has_refresh_token: boolean | null;
5244
- has_smtp_password: boolean | null;
5245
- id: string | null;
5246
- imap_host: string | null;
5247
- imap_port: number | null;
5248
- imap_secure: boolean | null;
5249
- imap_username: string | null;
5250
- is_active: boolean | null;
5251
- last_error: string | null;
5252
- last_verified_at: string | null;
5253
- oauth_mode: string | null;
5254
- provider: string | null;
5255
- scopes: string[] | null;
5256
- smtp_host: string | null;
5257
- smtp_port: number | null;
5258
- smtp_secure: boolean | null;
5259
- smtp_username: string | null;
5953
+ created_at: string;
5954
+ id: string;
5955
+ monteur_id: string;
5956
+ work_order_id: string;
5957
+ };
5958
+ Insert: {
5959
+ created_at?: string;
5960
+ id?: string;
5961
+ monteur_id: string;
5962
+ work_order_id: string;
5963
+ };
5964
+ Update: {
5965
+ created_at?: string;
5966
+ id?: string;
5967
+ monteur_id?: string;
5968
+ work_order_id?: string;
5969
+ };
5970
+ Relationships: [{
5971
+ foreignKeyName: "work_order_monteurs_monteur_id_fkey";
5972
+ columns: ["monteur_id"];
5973
+ isOneToOne: false;
5974
+ referencedRelation: "monteurs";
5975
+ referencedColumns: ["id"];
5976
+ }, {
5977
+ foreignKeyName: "work_order_monteurs_work_order_id_fkey";
5978
+ columns: ["work_order_id"];
5979
+ isOneToOne: false;
5980
+ referencedRelation: "work_orders";
5981
+ referencedColumns: ["id"];
5982
+ }];
5983
+ };
5984
+ work_orders: {
5985
+ Row: {
5986
+ assigned_to: string | null;
5987
+ city: string | null;
5988
+ contact_person: string | null;
5989
+ created_at: string;
5990
+ custom_fields: import("../integrations/supabase/types").Json;
5991
+ customer_name: string;
5992
+ description: string;
5993
+ email: string | null;
5994
+ email_source: string | null;
5995
+ estimated_duration_hours: number | null;
5996
+ external_reference: string | null;
5997
+ follow_up_needed: boolean;
5998
+ id: string;
5999
+ mandate: string;
6000
+ mandate_budget: number;
6001
+ mandate_used: number;
6002
+ order_number: string;
6003
+ parent_work_order_id: string | null;
6004
+ pdf_url: string | null;
6005
+ phone: string | null;
6006
+ postal_code: string;
6007
+ priority: string;
6008
+ project_number: string | null;
6009
+ report_validated: boolean;
6010
+ room_number: string;
6011
+ scheduled_date: string | null;
6012
+ scheduled_end_time: string | null;
6013
+ scheduled_start_time: string | null;
6014
+ status: string;
6015
+ tenant_id: string;
6016
+ total_hours_worked: number | null;
6017
+ total_price: number | null;
6018
+ travel_time_minutes: number | null;
6019
+ updated_at: string;
6020
+ work_address: string;
6021
+ work_report: string | null;
6022
+ };
6023
+ Insert: {
6024
+ assigned_to?: string | null;
6025
+ city?: string | null;
6026
+ contact_person?: string | null;
6027
+ created_at?: string;
6028
+ custom_fields?: import("../integrations/supabase/types").Json;
6029
+ customer_name?: string;
6030
+ description?: string;
6031
+ email?: string | null;
6032
+ email_source?: string | null;
6033
+ estimated_duration_hours?: number | null;
6034
+ external_reference?: string | null;
6035
+ follow_up_needed?: boolean;
6036
+ id?: string;
6037
+ mandate?: string;
6038
+ mandate_budget?: number;
6039
+ mandate_used?: number;
6040
+ order_number?: string;
6041
+ parent_work_order_id?: string | null;
6042
+ pdf_url?: string | null;
6043
+ phone?: string | null;
6044
+ postal_code?: string;
6045
+ priority?: string;
6046
+ project_number?: string | null;
6047
+ report_validated?: boolean;
6048
+ room_number?: string;
6049
+ scheduled_date?: string | null;
6050
+ scheduled_end_time?: string | null;
6051
+ scheduled_start_time?: string | null;
6052
+ status?: string;
6053
+ tenant_id: string;
6054
+ total_hours_worked?: number | null;
6055
+ total_price?: number | null;
6056
+ travel_time_minutes?: number | null;
6057
+ updated_at?: string;
6058
+ work_address?: string;
6059
+ work_report?: string | null;
6060
+ };
6061
+ Update: {
6062
+ assigned_to?: string | null;
6063
+ city?: string | null;
6064
+ contact_person?: string | null;
6065
+ created_at?: string;
6066
+ custom_fields?: import("../integrations/supabase/types").Json;
6067
+ customer_name?: string;
6068
+ description?: string;
6069
+ email?: string | null;
6070
+ email_source?: string | null;
6071
+ estimated_duration_hours?: number | null;
6072
+ external_reference?: string | null;
6073
+ follow_up_needed?: boolean;
6074
+ id?: string;
6075
+ mandate?: string;
6076
+ mandate_budget?: number;
6077
+ mandate_used?: number;
6078
+ order_number?: string;
6079
+ parent_work_order_id?: string | null;
6080
+ pdf_url?: string | null;
6081
+ phone?: string | null;
6082
+ postal_code?: string;
6083
+ priority?: string;
6084
+ project_number?: string | null;
6085
+ report_validated?: boolean;
6086
+ room_number?: string;
6087
+ scheduled_date?: string | null;
6088
+ scheduled_end_time?: string | null;
6089
+ scheduled_start_time?: string | null;
6090
+ status?: string;
6091
+ tenant_id?: string;
6092
+ total_hours_worked?: number | null;
6093
+ total_price?: number | null;
6094
+ travel_time_minutes?: number | null;
6095
+ updated_at?: string;
6096
+ work_address?: string;
6097
+ work_report?: string | null;
6098
+ };
6099
+ Relationships: [{
6100
+ foreignKeyName: "work_orders_parent_work_order_id_fkey";
6101
+ columns: ["parent_work_order_id"];
6102
+ isOneToOne: false;
6103
+ referencedRelation: "work_orders";
6104
+ referencedColumns: ["id"];
6105
+ }, {
6106
+ foreignKeyName: "work_orders_tenant_id_fkey";
6107
+ columns: ["tenant_id"];
6108
+ isOneToOne: false;
6109
+ referencedRelation: "tenants";
6110
+ referencedColumns: ["id"];
6111
+ }];
6112
+ };
6113
+ };
6114
+ Views: {
6115
+ email_auth_connections_safe: {
6116
+ Row: {
6117
+ account_email: string | null;
6118
+ created_at: string | null;
6119
+ created_by: string | null;
6120
+ display_name: string | null;
6121
+ has_access_token: boolean | null;
6122
+ has_client_id: boolean | null;
6123
+ has_client_secret: boolean | null;
6124
+ has_imap_password: boolean | null;
6125
+ has_refresh_token: boolean | null;
6126
+ has_smtp_password: boolean | null;
6127
+ id: string | null;
6128
+ imap_host: string | null;
6129
+ imap_port: number | null;
6130
+ imap_secure: boolean | null;
6131
+ imap_username: string | null;
6132
+ is_active: boolean | null;
6133
+ last_error: string | null;
6134
+ last_verified_at: string | null;
6135
+ oauth_mode: string | null;
6136
+ provider: string | null;
6137
+ purpose_assignments: import("../integrations/supabase/types").Json | null;
6138
+ scopes: string[] | null;
6139
+ smtp_host: string | null;
6140
+ smtp_port: number | null;
6141
+ smtp_secure: boolean | null;
6142
+ smtp_username: string | null;
5260
6143
  status: string | null;
5261
6144
  token_expires_at: string | null;
5262
6145
  updated_at: string | null;
@@ -5282,6 +6165,7 @@ export declare const listAccountingProviders: import("@tanstack/start-client-cor
5282
6165
  last_verified_at?: string | null;
5283
6166
  oauth_mode?: string | null;
5284
6167
  provider?: string | null;
6168
+ purpose_assignments?: import("../integrations/supabase/types").Json | null;
5285
6169
  scopes?: string[] | null;
5286
6170
  smtp_host?: string | null;
5287
6171
  smtp_port?: number | null;
@@ -5312,6 +6196,7 @@ export declare const listAccountingProviders: import("@tanstack/start-client-cor
5312
6196
  last_verified_at?: string | null;
5313
6197
  oauth_mode?: string | null;
5314
6198
  provider?: string | null;
6199
+ purpose_assignments?: import("../integrations/supabase/types").Json | null;
5315
6200
  scopes?: string[] | null;
5316
6201
  smtp_host?: string | null;
5317
6202
  smtp_port?: number | null;
@@ -5462,6 +6347,33 @@ export declare const listAccountingProviders: import("@tanstack/start-client-cor
5462
6347
  };
5463
6348
  Returns: string;
5464
6349
  };
6350
+ email_auth_fetch_message: {
6351
+ Args: {
6352
+ _connection_id: string;
6353
+ _external_id: string;
6354
+ };
6355
+ Returns: import("../integrations/supabase/types").Json;
6356
+ };
6357
+ email_auth_for_purpose: {
6358
+ Args: {
6359
+ _direction: string;
6360
+ _purpose: string;
6361
+ };
6362
+ Returns: {
6363
+ account_email: string;
6364
+ display_name: string;
6365
+ id: string;
6366
+ last_error: string;
6367
+ last_verified_at: string;
6368
+ needs_reauth: boolean;
6369
+ provider: string;
6370
+ status: string;
6371
+ }[];
6372
+ };
6373
+ ensure_user_tenant: {
6374
+ Args: never;
6375
+ Returns: string;
6376
+ };
5465
6377
  exact_decrypt: {
5466
6378
  Args: {
5467
6379
  cipher: string;
@@ -5534,6 +6446,18 @@ export declare const listAccountingProviders: import("@tanstack/start-client-cor
5534
6446
  };
5535
6447
  Returns: import("../integrations/supabase/types").Json;
5536
6448
  };
6449
+ get_room_busy_windows: {
6450
+ Args: {
6451
+ p_from: string;
6452
+ p_to: string;
6453
+ };
6454
+ Returns: {
6455
+ end_time: string;
6456
+ room_id: string;
6457
+ start_time: string;
6458
+ status: string;
6459
+ }[];
6460
+ };
5537
6461
  get_twinfield_cron_jobs: {
5538
6462
  Args: never;
5539
6463
  Returns: {
@@ -5543,6 +6467,16 @@ export declare const listAccountingProviders: import("@tanstack/start-client-cor
5543
6467
  url: string;
5544
6468
  }[];
5545
6469
  };
6470
+ get_user_tenant_id: {
6471
+ Args: never;
6472
+ Returns: string;
6473
+ };
6474
+ get_work_order_tenant_id: {
6475
+ Args: {
6476
+ wo_id: string;
6477
+ };
6478
+ Returns: string;
6479
+ };
5546
6480
  has_role: {
5547
6481
  Args: {
5548
6482
  _role: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
@@ -5550,6 +6484,21 @@ export declare const listAccountingProviders: import("@tanstack/start-client-cor
5550
6484
  };
5551
6485
  Returns: boolean;
5552
6486
  };
6487
+ is_authenticated: {
6488
+ Args: never;
6489
+ Returns: boolean;
6490
+ };
6491
+ is_developer: {
6492
+ Args: never;
6493
+ Returns: boolean;
6494
+ };
6495
+ next_work_order_number: {
6496
+ Args: {
6497
+ p_parent_work_order_id?: string;
6498
+ p_tenant_id: string;
6499
+ };
6500
+ Returns: string;
6501
+ };
5553
6502
  normalize_vat: {
5554
6503
  Args: {
5555
6504
  v: string;
@@ -5671,7 +6620,7 @@ export declare const listAccountingProviders: import("@tanstack/start-client-cor
5671
6620
  };
5672
6621
  };
5673
6622
  Enums: {
5674
- app_role: "admin" | "manager" | "warehouse" | "sales" | "developer";
6623
+ app_role: "admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie";
5675
6624
  exact_env: "staging" | "live";
5676
6625
  quote_status: "concept" | "verzonden" | "bekeken" | "in_behandeling" | "geaccepteerd" | "afgewezen" | "verlopen" | "gearchiveerd";
5677
6626
  };
@@ -5873,6 +6822,156 @@ export declare const syncAccountingProvider: import("@tanstack/start-client-core
5873
6822
  };
5874
6823
  Relationships: [];
5875
6824
  };
6825
+ app_settings: {
6826
+ Row: {
6827
+ created_at: string;
6828
+ id: string;
6829
+ key: string;
6830
+ updated_at: string;
6831
+ value: string | null;
6832
+ };
6833
+ Insert: {
6834
+ created_at?: string;
6835
+ id?: string;
6836
+ key: string;
6837
+ updated_at?: string;
6838
+ value?: string | null;
6839
+ };
6840
+ Update: {
6841
+ created_at?: string;
6842
+ id?: string;
6843
+ key?: string;
6844
+ updated_at?: string;
6845
+ value?: string | null;
6846
+ };
6847
+ Relationships: [];
6848
+ };
6849
+ booking_items: {
6850
+ Row: {
6851
+ booking_id: string;
6852
+ created_at: string;
6853
+ extra_id: string;
6854
+ id: string;
6855
+ quantity: number;
6856
+ total_price: number;
6857
+ unit_price: number;
6858
+ };
6859
+ Insert: {
6860
+ booking_id: string;
6861
+ created_at?: string;
6862
+ extra_id: string;
6863
+ id?: string;
6864
+ quantity?: number;
6865
+ total_price?: number;
6866
+ unit_price?: number;
6867
+ };
6868
+ Update: {
6869
+ booking_id?: string;
6870
+ created_at?: string;
6871
+ extra_id?: string;
6872
+ id?: string;
6873
+ quantity?: number;
6874
+ total_price?: number;
6875
+ unit_price?: number;
6876
+ };
6877
+ Relationships: [{
6878
+ foreignKeyName: "booking_items_booking_id_fkey";
6879
+ columns: ["booking_id"];
6880
+ isOneToOne: false;
6881
+ referencedRelation: "bookings";
6882
+ referencedColumns: ["id"];
6883
+ }, {
6884
+ foreignKeyName: "booking_items_extra_id_fkey";
6885
+ columns: ["extra_id"];
6886
+ isOneToOne: false;
6887
+ referencedRelation: "extras";
6888
+ referencedColumns: ["id"];
6889
+ }];
6890
+ };
6891
+ bookings: {
6892
+ Row: {
6893
+ company_name: string | null;
6894
+ conflict_checked_at: string | null;
6895
+ conflict_reason: string | null;
6896
+ created_at: string;
6897
+ created_by_role: string | null;
6898
+ customer_email: string | null;
6899
+ customer_name: string | null;
6900
+ end_time: string;
6901
+ exact_debiteur_id: string | null;
6902
+ has_conflict: boolean;
6903
+ id: string;
6904
+ invoice_run_id: string | null;
6905
+ invoice_status: string | null;
6906
+ invoiced_at: string | null;
6907
+ notes: string | null;
6908
+ number_of_people: number;
6909
+ room_id: string;
6910
+ start_time: string;
6911
+ status: string;
6912
+ total_excl_vat: number | null;
6913
+ total_incl_vat: number | null;
6914
+ user_id: string | null;
6915
+ vat_amount: number | null;
6916
+ };
6917
+ Insert: {
6918
+ company_name?: string | null;
6919
+ conflict_checked_at?: string | null;
6920
+ conflict_reason?: string | null;
6921
+ created_at?: string;
6922
+ created_by_role?: string | null;
6923
+ customer_email?: string | null;
6924
+ customer_name?: string | null;
6925
+ end_time: string;
6926
+ exact_debiteur_id?: string | null;
6927
+ has_conflict?: boolean;
6928
+ id?: string;
6929
+ invoice_run_id?: string | null;
6930
+ invoice_status?: string | null;
6931
+ invoiced_at?: string | null;
6932
+ notes?: string | null;
6933
+ number_of_people?: number;
6934
+ room_id: string;
6935
+ start_time: string;
6936
+ status?: string;
6937
+ total_excl_vat?: number | null;
6938
+ total_incl_vat?: number | null;
6939
+ user_id?: string | null;
6940
+ vat_amount?: number | null;
6941
+ };
6942
+ Update: {
6943
+ company_name?: string | null;
6944
+ conflict_checked_at?: string | null;
6945
+ conflict_reason?: string | null;
6946
+ created_at?: string;
6947
+ created_by_role?: string | null;
6948
+ customer_email?: string | null;
6949
+ customer_name?: string | null;
6950
+ end_time?: string;
6951
+ exact_debiteur_id?: string | null;
6952
+ has_conflict?: boolean;
6953
+ id?: string;
6954
+ invoice_run_id?: string | null;
6955
+ invoice_status?: string | null;
6956
+ invoiced_at?: string | null;
6957
+ notes?: string | null;
6958
+ number_of_people?: number;
6959
+ room_id?: string;
6960
+ start_time?: string;
6961
+ status?: string;
6962
+ total_excl_vat?: number | null;
6963
+ total_incl_vat?: number | null;
6964
+ user_id?: string | null;
6965
+ vat_amount?: number | null;
6966
+ };
6967
+ Relationships: [{
6968
+ foreignKeyName: "bookings_room_id_fkey";
6969
+ columns: ["room_id"];
6970
+ isOneToOne: false;
6971
+ referencedRelation: "rooms";
6972
+ referencedColumns: ["id"];
6973
+ }];
6974
+ };
5876
6975
  bugs: {
5877
6976
  Row: {
5878
6977
  attachment_url: string | null;
@@ -6704,17 +7803,26 @@ export declare const syncAccountingProvider: import("@tanstack/start-client-core
6704
7803
  created_at: string;
6705
7804
  created_by: string | null;
6706
7805
  display_name: string | null;
7806
+ gmail_history_id: string | null;
7807
+ gmail_watch_expires_at: string | null;
7808
+ graph_subscription_expires_at: string | null;
7809
+ graph_subscription_id: string | null;
6707
7810
  id: string;
6708
7811
  imap_host: string | null;
7812
+ imap_last_uid: number | null;
6709
7813
  imap_password_encrypted: string | null;
6710
7814
  imap_port: number | null;
6711
7815
  imap_secure: boolean | null;
7816
+ imap_uid_validity: number | null;
6712
7817
  imap_username: string | null;
6713
7818
  is_active: boolean;
6714
7819
  last_error: string | null;
7820
+ last_event_at: string | null;
6715
7821
  last_verified_at: string | null;
6716
7822
  oauth_mode: string | null;
6717
7823
  provider: string;
7824
+ purpose_assignments: import("../integrations/supabase/types").Json;
7825
+ realtime_mode: string;
6718
7826
  refresh_token_encrypted: string | null;
6719
7827
  scopes: string[] | null;
6720
7828
  smtp_host: string | null;
@@ -6734,17 +7842,26 @@ export declare const syncAccountingProvider: import("@tanstack/start-client-core
6734
7842
  created_at?: string;
6735
7843
  created_by?: string | null;
6736
7844
  display_name?: string | null;
7845
+ gmail_history_id?: string | null;
7846
+ gmail_watch_expires_at?: string | null;
7847
+ graph_subscription_expires_at?: string | null;
7848
+ graph_subscription_id?: string | null;
6737
7849
  id?: string;
6738
7850
  imap_host?: string | null;
7851
+ imap_last_uid?: number | null;
6739
7852
  imap_password_encrypted?: string | null;
6740
7853
  imap_port?: number | null;
6741
7854
  imap_secure?: boolean | null;
7855
+ imap_uid_validity?: number | null;
6742
7856
  imap_username?: string | null;
6743
7857
  is_active?: boolean;
6744
7858
  last_error?: string | null;
7859
+ last_event_at?: string | null;
6745
7860
  last_verified_at?: string | null;
6746
7861
  oauth_mode?: string | null;
6747
7862
  provider: string;
7863
+ purpose_assignments?: import("../integrations/supabase/types").Json;
7864
+ realtime_mode?: string;
6748
7865
  refresh_token_encrypted?: string | null;
6749
7866
  scopes?: string[] | null;
6750
7867
  smtp_host?: string | null;
@@ -6764,17 +7881,26 @@ export declare const syncAccountingProvider: import("@tanstack/start-client-core
6764
7881
  created_at?: string;
6765
7882
  created_by?: string | null;
6766
7883
  display_name?: string | null;
7884
+ gmail_history_id?: string | null;
7885
+ gmail_watch_expires_at?: string | null;
7886
+ graph_subscription_expires_at?: string | null;
7887
+ graph_subscription_id?: string | null;
6767
7888
  id?: string;
6768
7889
  imap_host?: string | null;
7890
+ imap_last_uid?: number | null;
6769
7891
  imap_password_encrypted?: string | null;
6770
7892
  imap_port?: number | null;
6771
7893
  imap_secure?: boolean | null;
7894
+ imap_uid_validity?: number | null;
6772
7895
  imap_username?: string | null;
6773
7896
  is_active?: boolean;
6774
7897
  last_error?: string | null;
7898
+ last_event_at?: string | null;
6775
7899
  last_verified_at?: string | null;
6776
7900
  oauth_mode?: string | null;
6777
7901
  provider?: string;
7902
+ purpose_assignments?: import("../integrations/supabase/types").Json;
7903
+ realtime_mode?: string;
6778
7904
  refresh_token_encrypted?: string | null;
6779
7905
  scopes?: string[] | null;
6780
7906
  smtp_host?: string | null;
@@ -6788,41 +7914,230 @@ export declare const syncAccountingProvider: import("@tanstack/start-client-core
6788
7914
  };
6789
7915
  Relationships: [];
6790
7916
  };
6791
- exact_account_analytics_cache: {
7917
+ email_auth_events: {
6792
7918
  Row: {
6793
- account_id: string;
6794
- account_name: string | null;
6795
- avg_payment_days: number | null;
6796
- computed_at: string;
6797
7919
  connection_id: string;
6798
- expires_at: string | null;
7920
+ consumed_at: string | null;
7921
+ created_at: string;
7922
+ event_type: string;
7923
+ external_id: string | null;
6799
7924
  id: string;
6800
- invoice_count: number | null;
6801
- last_invoice_date: string | null;
6802
- last_payment_date: string | null;
6803
- open_balance: number | null;
6804
- overdue_balance: number | null;
6805
- total_revenue: number | null;
7925
+ payload: import("../integrations/supabase/types").Json;
7926
+ provider: string;
7927
+ received_at: string;
6806
7928
  };
6807
7929
  Insert: {
6808
- account_id: string;
6809
- account_name?: string | null;
6810
- avg_payment_days?: number | null;
6811
- computed_at?: string;
6812
7930
  connection_id: string;
6813
- expires_at?: string | null;
7931
+ consumed_at?: string | null;
7932
+ created_at?: string;
7933
+ event_type: string;
7934
+ external_id?: string | null;
6814
7935
  id?: string;
6815
- invoice_count?: number | null;
6816
- last_invoice_date?: string | null;
6817
- last_payment_date?: string | null;
6818
- open_balance?: number | null;
6819
- overdue_balance?: number | null;
6820
- total_revenue?: number | null;
7936
+ payload?: import("../integrations/supabase/types").Json;
7937
+ provider: string;
7938
+ received_at?: string;
6821
7939
  };
6822
7940
  Update: {
6823
- account_id?: string;
6824
- account_name?: string | null;
6825
- avg_payment_days?: number | null;
7941
+ connection_id?: string;
7942
+ consumed_at?: string | null;
7943
+ created_at?: string;
7944
+ event_type?: string;
7945
+ external_id?: string | null;
7946
+ id?: string;
7947
+ payload?: import("../integrations/supabase/types").Json;
7948
+ provider?: string;
7949
+ received_at?: string;
7950
+ };
7951
+ Relationships: [{
7952
+ foreignKeyName: "email_auth_events_connection_id_fkey";
7953
+ columns: ["connection_id"];
7954
+ isOneToOne: false;
7955
+ referencedRelation: "email_auth_connections";
7956
+ referencedColumns: ["id"];
7957
+ }, {
7958
+ foreignKeyName: "email_auth_events_connection_id_fkey";
7959
+ columns: ["connection_id"];
7960
+ isOneToOne: false;
7961
+ referencedRelation: "email_auth_connections_safe";
7962
+ referencedColumns: ["id"];
7963
+ }];
7964
+ };
7965
+ email_auth_outbox: {
7966
+ Row: {
7967
+ attempts: number;
7968
+ bcc_addresses: string[];
7969
+ cc_addresses: string[];
7970
+ connection_id: string | null;
7971
+ created_at: string;
7972
+ created_by: string | null;
7973
+ external_message_id: string | null;
7974
+ headers: import("../integrations/supabase/types").Json;
7975
+ html_body: string | null;
7976
+ id: string;
7977
+ last_error: string | null;
7978
+ purpose: string;
7979
+ reply_to: string | null;
7980
+ scheduled_at: string;
7981
+ sent_at: string | null;
7982
+ status: string;
7983
+ subject: string;
7984
+ text_body: string | null;
7985
+ to_addresses: string[];
7986
+ updated_at: string;
7987
+ };
7988
+ Insert: {
7989
+ attempts?: number;
7990
+ bcc_addresses?: string[];
7991
+ cc_addresses?: string[];
7992
+ connection_id?: string | null;
7993
+ created_at?: string;
7994
+ created_by?: string | null;
7995
+ external_message_id?: string | null;
7996
+ headers?: import("../integrations/supabase/types").Json;
7997
+ html_body?: string | null;
7998
+ id?: string;
7999
+ last_error?: string | null;
8000
+ purpose: string;
8001
+ reply_to?: string | null;
8002
+ scheduled_at?: string;
8003
+ sent_at?: string | null;
8004
+ status?: string;
8005
+ subject: string;
8006
+ text_body?: string | null;
8007
+ to_addresses: string[];
8008
+ updated_at?: string;
8009
+ };
8010
+ Update: {
8011
+ attempts?: number;
8012
+ bcc_addresses?: string[];
8013
+ cc_addresses?: string[];
8014
+ connection_id?: string | null;
8015
+ created_at?: string;
8016
+ created_by?: string | null;
8017
+ external_message_id?: string | null;
8018
+ headers?: import("../integrations/supabase/types").Json;
8019
+ html_body?: string | null;
8020
+ id?: string;
8021
+ last_error?: string | null;
8022
+ purpose?: string;
8023
+ reply_to?: string | null;
8024
+ scheduled_at?: string;
8025
+ sent_at?: string | null;
8026
+ status?: string;
8027
+ subject?: string;
8028
+ text_body?: string | null;
8029
+ to_addresses?: string[];
8030
+ updated_at?: string;
8031
+ };
8032
+ Relationships: [{
8033
+ foreignKeyName: "email_auth_outbox_connection_id_fkey";
8034
+ columns: ["connection_id"];
8035
+ isOneToOne: false;
8036
+ referencedRelation: "email_auth_connections";
8037
+ referencedColumns: ["id"];
8038
+ }, {
8039
+ foreignKeyName: "email_auth_outbox_connection_id_fkey";
8040
+ columns: ["connection_id"];
8041
+ isOneToOne: false;
8042
+ referencedRelation: "email_auth_connections_safe";
8043
+ referencedColumns: ["id"];
8044
+ }];
8045
+ };
8046
+ email_auth_purpose_settings: {
8047
+ Row: {
8048
+ purpose: string;
8049
+ reply_to: string | null;
8050
+ updated_at: string;
8051
+ updated_by: string | null;
8052
+ };
8053
+ Insert: {
8054
+ purpose: string;
8055
+ reply_to?: string | null;
8056
+ updated_at?: string;
8057
+ updated_by?: string | null;
8058
+ };
8059
+ Update: {
8060
+ purpose?: string;
8061
+ reply_to?: string | null;
8062
+ updated_at?: string;
8063
+ updated_by?: string | null;
8064
+ };
8065
+ Relationships: [];
8066
+ };
8067
+ email_auth_token_refresh_log: {
8068
+ Row: {
8069
+ connection_id: string;
8070
+ error_message: string | null;
8071
+ id: string;
8072
+ refreshed_at: string;
8073
+ success: boolean;
8074
+ trigger_source: string;
8075
+ };
8076
+ Insert: {
8077
+ connection_id: string;
8078
+ error_message?: string | null;
8079
+ id?: string;
8080
+ refreshed_at?: string;
8081
+ success: boolean;
8082
+ trigger_source: string;
8083
+ };
8084
+ Update: {
8085
+ connection_id?: string;
8086
+ error_message?: string | null;
8087
+ id?: string;
8088
+ refreshed_at?: string;
8089
+ success?: boolean;
8090
+ trigger_source?: string;
8091
+ };
8092
+ Relationships: [{
8093
+ foreignKeyName: "email_auth_token_refresh_log_connection_id_fkey";
8094
+ columns: ["connection_id"];
8095
+ isOneToOne: false;
8096
+ referencedRelation: "email_auth_connections";
8097
+ referencedColumns: ["id"];
8098
+ }, {
8099
+ foreignKeyName: "email_auth_token_refresh_log_connection_id_fkey";
8100
+ columns: ["connection_id"];
8101
+ isOneToOne: false;
8102
+ referencedRelation: "email_auth_connections_safe";
8103
+ referencedColumns: ["id"];
8104
+ }];
8105
+ };
8106
+ exact_account_analytics_cache: {
8107
+ Row: {
8108
+ account_id: string;
8109
+ account_name: string | null;
8110
+ avg_payment_days: number | null;
8111
+ computed_at: string;
8112
+ connection_id: string;
8113
+ expires_at: string | null;
8114
+ id: string;
8115
+ invoice_count: number | null;
8116
+ last_invoice_date: string | null;
8117
+ last_payment_date: string | null;
8118
+ open_balance: number | null;
8119
+ overdue_balance: number | null;
8120
+ total_revenue: number | null;
8121
+ };
8122
+ Insert: {
8123
+ account_id: string;
8124
+ account_name?: string | null;
8125
+ avg_payment_days?: number | null;
8126
+ computed_at?: string;
8127
+ connection_id: string;
8128
+ expires_at?: string | null;
8129
+ id?: string;
8130
+ invoice_count?: number | null;
8131
+ last_invoice_date?: string | null;
8132
+ last_payment_date?: string | null;
8133
+ open_balance?: number | null;
8134
+ overdue_balance?: number | null;
8135
+ total_revenue?: number | null;
8136
+ };
8137
+ Update: {
8138
+ account_id?: string;
8139
+ account_name?: string | null;
8140
+ avg_payment_days?: number | null;
6826
8141
  computed_at?: string;
6827
8142
  connection_id?: string;
6828
8143
  expires_at?: string | null;
@@ -7532,6 +8847,42 @@ export declare const syncAccountingProvider: import("@tanstack/start-client-core
7532
8847
  };
7533
8848
  Relationships: [];
7534
8849
  };
8850
+ exact_settings: {
8851
+ Row: {
8852
+ client_id: string | null;
8853
+ client_secret: string | null;
8854
+ connection_status: string;
8855
+ created_at: string;
8856
+ division_id: string | null;
8857
+ id: string;
8858
+ last_sync_at: string | null;
8859
+ redirect_uri: string | null;
8860
+ updated_at: string;
8861
+ };
8862
+ Insert: {
8863
+ client_id?: string | null;
8864
+ client_secret?: string | null;
8865
+ connection_status?: string;
8866
+ created_at?: string;
8867
+ division_id?: string | null;
8868
+ id?: string;
8869
+ last_sync_at?: string | null;
8870
+ redirect_uri?: string | null;
8871
+ updated_at?: string;
8872
+ };
8873
+ Update: {
8874
+ client_id?: string | null;
8875
+ client_secret?: string | null;
8876
+ connection_status?: string;
8877
+ created_at?: string;
8878
+ division_id?: string | null;
8879
+ id?: string;
8880
+ last_sync_at?: string | null;
8881
+ redirect_uri?: string | null;
8882
+ updated_at?: string;
8883
+ };
8884
+ Relationships: [];
8885
+ };
7535
8886
  exact_sync_state: {
7536
8887
  Row: {
7537
8888
  connection_id: string;
@@ -7595,6 +8946,63 @@ export declare const syncAccountingProvider: import("@tanstack/start-client-core
7595
8946
  };
7596
8947
  Relationships: [];
7597
8948
  };
8949
+ extra_categories: {
8950
+ Row: {
8951
+ created_at: string;
8952
+ id: string;
8953
+ name: string;
8954
+ sort_order: number;
8955
+ updated_at: string;
8956
+ };
8957
+ Insert: {
8958
+ created_at?: string;
8959
+ id?: string;
8960
+ name: string;
8961
+ sort_order?: number;
8962
+ updated_at?: string;
8963
+ };
8964
+ Update: {
8965
+ created_at?: string;
8966
+ id?: string;
8967
+ name?: string;
8968
+ sort_order?: number;
8969
+ updated_at?: string;
8970
+ };
8971
+ Relationships: [];
8972
+ };
8973
+ extras: {
8974
+ Row: {
8975
+ category: string;
8976
+ created_at: string;
8977
+ exact_article_id: string | null;
8978
+ id: string;
8979
+ is_active: boolean;
8980
+ name: string;
8981
+ price: number;
8982
+ pricing_type: string;
8983
+ };
8984
+ Insert: {
8985
+ category: string;
8986
+ created_at?: string;
8987
+ exact_article_id?: string | null;
8988
+ id?: string;
8989
+ is_active?: boolean;
8990
+ name: string;
8991
+ price?: number;
8992
+ pricing_type?: string;
8993
+ };
8994
+ Update: {
8995
+ category?: string;
8996
+ created_at?: string;
8997
+ exact_article_id?: string | null;
8998
+ id?: string;
8999
+ is_active?: boolean;
9000
+ name?: string;
9001
+ price?: number;
9002
+ pricing_type?: string;
9003
+ };
9004
+ Relationships: [];
9005
+ };
7598
9006
  floricode_connection_settings: {
7599
9007
  Row: {
7600
9008
  catalog_key: string | null;
@@ -8246,38 +9654,135 @@ export declare const syncAccountingProvider: import("@tanstack/start-client-core
8246
9654
  };
8247
9655
  Relationships: [];
8248
9656
  };
8249
- locations: {
9657
+ invoice_run_items: {
8250
9658
  Row: {
9659
+ booking_id: string | null;
9660
+ company_name: string | null;
8251
9661
  created_at: string;
9662
+ customer_email: string | null;
9663
+ description: string | null;
9664
+ exact_article_id: string | null;
8252
9665
  id: string;
8253
- name: string;
8254
- sort_order: number;
8255
- updated_at: string;
9666
+ invoice_run_id: string | null;
9667
+ quantity: number | null;
9668
+ total_excl_vat: number | null;
9669
+ total_incl_vat: number | null;
9670
+ unit_price: number | null;
9671
+ vat_amount: number | null;
8256
9672
  };
8257
9673
  Insert: {
9674
+ booking_id?: string | null;
9675
+ company_name?: string | null;
8258
9676
  created_at?: string;
9677
+ customer_email?: string | null;
9678
+ description?: string | null;
9679
+ exact_article_id?: string | null;
8259
9680
  id?: string;
8260
- name: string;
8261
- sort_order?: number;
8262
- updated_at?: string;
9681
+ invoice_run_id?: string | null;
9682
+ quantity?: number | null;
9683
+ total_excl_vat?: number | null;
9684
+ total_incl_vat?: number | null;
9685
+ unit_price?: number | null;
9686
+ vat_amount?: number | null;
8263
9687
  };
8264
9688
  Update: {
9689
+ booking_id?: string | null;
9690
+ company_name?: string | null;
8265
9691
  created_at?: string;
9692
+ customer_email?: string | null;
9693
+ description?: string | null;
9694
+ exact_article_id?: string | null;
8266
9695
  id?: string;
8267
- name?: string;
8268
- sort_order?: number;
8269
- updated_at?: string;
9696
+ invoice_run_id?: string | null;
9697
+ quantity?: number | null;
9698
+ total_excl_vat?: number | null;
9699
+ total_incl_vat?: number | null;
9700
+ unit_price?: number | null;
9701
+ vat_amount?: number | null;
8270
9702
  };
8271
- Relationships: [];
9703
+ Relationships: [{
9704
+ foreignKeyName: "invoice_run_items_booking_id_fkey";
9705
+ columns: ["booking_id"];
9706
+ isOneToOne: false;
9707
+ referencedRelation: "bookings";
9708
+ referencedColumns: ["id"];
9709
+ }, {
9710
+ foreignKeyName: "invoice_run_items_invoice_run_id_fkey";
9711
+ columns: ["invoice_run_id"];
9712
+ isOneToOne: false;
9713
+ referencedRelation: "invoice_runs";
9714
+ referencedColumns: ["id"];
9715
+ }];
8272
9716
  };
8273
- mailbox_messages: {
9717
+ invoice_runs: {
8274
9718
  Row: {
8275
- body_html: string | null;
8276
- body_text: string | null;
8277
9719
  created_at: string;
8278
- error_message: string | null;
8279
- from_email: string | null;
8280
- from_name: string | null;
9720
+ created_by: string | null;
9721
+ id: string;
9722
+ period_end: string;
9723
+ period_start: string;
9724
+ status: string;
9725
+ total_excl_vat: number | null;
9726
+ total_incl_vat: number | null;
9727
+ vat_amount: number | null;
9728
+ };
9729
+ Insert: {
9730
+ created_at?: string;
9731
+ created_by?: string | null;
9732
+ id?: string;
9733
+ period_end: string;
9734
+ period_start: string;
9735
+ status?: string;
9736
+ total_excl_vat?: number | null;
9737
+ total_incl_vat?: number | null;
9738
+ vat_amount?: number | null;
9739
+ };
9740
+ Update: {
9741
+ created_at?: string;
9742
+ created_by?: string | null;
9743
+ id?: string;
9744
+ period_end?: string;
9745
+ period_start?: string;
9746
+ status?: string;
9747
+ total_excl_vat?: number | null;
9748
+ total_incl_vat?: number | null;
9749
+ vat_amount?: number | null;
9750
+ };
9751
+ Relationships: [];
9752
+ };
9753
+ locations: {
9754
+ Row: {
9755
+ created_at: string;
9756
+ id: string;
9757
+ name: string;
9758
+ sort_order: number;
9759
+ updated_at: string;
9760
+ };
9761
+ Insert: {
9762
+ created_at?: string;
9763
+ id?: string;
9764
+ name: string;
9765
+ sort_order?: number;
9766
+ updated_at?: string;
9767
+ };
9768
+ Update: {
9769
+ created_at?: string;
9770
+ id?: string;
9771
+ name?: string;
9772
+ sort_order?: number;
9773
+ updated_at?: string;
9774
+ };
9775
+ Relationships: [];
9776
+ };
9777
+ mailbox_messages: {
9778
+ Row: {
9779
+ body_html: string | null;
9780
+ body_text: string | null;
9781
+ created_at: string;
9782
+ error_message: string | null;
9783
+ external_id: string | null;
9784
+ from_email: string | null;
9785
+ from_name: string | null;
8281
9786
  id: string;
8282
9787
  message_id: string | null;
8283
9788
  profile_id: string | null;
@@ -8285,7 +9790,7 @@ export declare const syncAccountingProvider: import("@tanstack/start-client-core
8285
9790
  received_at: string | null;
8286
9791
  status: string;
8287
9792
  subject: string | null;
8288
- uid: number;
9793
+ uid: number | null;
8289
9794
  updated_at: string;
8290
9795
  };
8291
9796
  Insert: {
@@ -8293,6 +9798,7 @@ export declare const syncAccountingProvider: import("@tanstack/start-client-core
8293
9798
  body_text?: string | null;
8294
9799
  created_at?: string;
8295
9800
  error_message?: string | null;
9801
+ external_id?: string | null;
8296
9802
  from_email?: string | null;
8297
9803
  from_name?: string | null;
8298
9804
  id?: string;
@@ -8302,7 +9808,7 @@ export declare const syncAccountingProvider: import("@tanstack/start-client-core
8302
9808
  received_at?: string | null;
8303
9809
  status?: string;
8304
9810
  subject?: string | null;
8305
- uid: number;
9811
+ uid?: number | null;
8306
9812
  updated_at?: string;
8307
9813
  };
8308
9814
  Update: {
@@ -8310,6 +9816,7 @@ export declare const syncAccountingProvider: import("@tanstack/start-client-core
8310
9816
  body_text?: string | null;
8311
9817
  created_at?: string;
8312
9818
  error_message?: string | null;
9819
+ external_id?: string | null;
8313
9820
  from_email?: string | null;
8314
9821
  from_name?: string | null;
8315
9822
  id?: string;
@@ -8319,7 +9826,7 @@ export declare const syncAccountingProvider: import("@tanstack/start-client-core
8319
9826
  received_at?: string | null;
8320
9827
  status?: string;
8321
9828
  subject?: string | null;
8322
- uid?: number;
9829
+ uid?: number | null;
8323
9830
  updated_at?: string;
8324
9831
  };
8325
9832
  Relationships: [{
@@ -8591,6 +10098,60 @@ export declare const syncAccountingProvider: import("@tanstack/start-client-core
8591
10098
  };
8592
10099
  Relationships: [];
8593
10100
  };
10101
+ monteurs: {
10102
+ Row: {
10103
+ avatar_url: string | null;
10104
+ color: string | null;
10105
+ created_at: string;
10106
+ email: string | null;
10107
+ id: string;
10108
+ is_active: boolean;
10109
+ leave_balance_hours: number;
10110
+ name: string;
10111
+ persnr: number | null;
10112
+ phone: string | null;
10113
+ role: string;
10114
+ tenant_id: string;
10115
+ updated_at: string;
10116
+ };
10117
+ Insert: {
10118
+ avatar_url?: string | null;
10119
+ color?: string | null;
10120
+ created_at?: string;
10121
+ email?: string | null;
10122
+ id?: string;
10123
+ is_active?: boolean;
10124
+ leave_balance_hours?: number;
10125
+ name: string;
10126
+ persnr?: number | null;
10127
+ phone?: string | null;
10128
+ role?: string;
10129
+ tenant_id: string;
10130
+ updated_at?: string;
10131
+ };
10132
+ Update: {
10133
+ avatar_url?: string | null;
10134
+ color?: string | null;
10135
+ created_at?: string;
10136
+ email?: string | null;
10137
+ id?: string;
10138
+ is_active?: boolean;
10139
+ leave_balance_hours?: number;
10140
+ name?: string;
10141
+ persnr?: number | null;
10142
+ phone?: string | null;
10143
+ role?: string;
10144
+ tenant_id?: string;
10145
+ updated_at?: string;
10146
+ };
10147
+ Relationships: [{
10148
+ foreignKeyName: "monteurs_tenant_id_fkey";
10149
+ columns: ["tenant_id"];
10150
+ isOneToOne: false;
10151
+ referencedRelation: "tenants";
10152
+ referencedColumns: ["id"];
10153
+ }];
10154
+ };
8594
10155
  notifications: {
8595
10156
  Row: {
8596
10157
  created_at: string;
@@ -9423,6 +10984,7 @@ export declare const syncAccountingProvider: import("@tanstack/start-client-core
9423
10984
  email: string | null;
9424
10985
  id: string;
9425
10986
  notification_preferences: import("../integrations/supabase/types").Json;
10987
+ tenant_id: string | null;
9426
10988
  updated_at: string;
9427
10989
  };
9428
10990
  Insert: {
@@ -9431,6 +10993,7 @@ export declare const syncAccountingProvider: import("@tanstack/start-client-core
9431
10993
  email?: string | null;
9432
10994
  id: string;
9433
10995
  notification_preferences?: import("../integrations/supabase/types").Json;
10996
+ tenant_id?: string | null;
9434
10997
  updated_at?: string;
9435
10998
  };
9436
10999
  Update: {
@@ -9439,9 +11002,16 @@ export declare const syncAccountingProvider: import("@tanstack/start-client-core
9439
11002
  email?: string | null;
9440
11003
  id?: string;
9441
11004
  notification_preferences?: import("../integrations/supabase/types").Json;
11005
+ tenant_id?: string | null;
9442
11006
  updated_at?: string;
9443
11007
  };
9444
- Relationships: [];
11008
+ Relationships: [{
11009
+ foreignKeyName: "profiles_tenant_id_fkey";
11010
+ columns: ["tenant_id"];
11011
+ isOneToOne: false;
11012
+ referencedRelation: "tenants";
11013
+ referencedColumns: ["id"];
11014
+ }];
9445
11015
  };
9446
11016
  projects: {
9447
11017
  Row: {
@@ -10145,6 +11715,81 @@ export declare const syncAccountingProvider: import("@tanstack/start-client-core
10145
11715
  referencedColumns: ["id"];
10146
11716
  }];
10147
11717
  };
11718
+ reception_notifications: {
11719
+ Row: {
11720
+ booking_id: string | null;
11721
+ created_at: string;
11722
+ id: string;
11723
+ is_read: boolean;
11724
+ message: string;
11725
+ recipient_email: string | null;
11726
+ title: string;
11727
+ type: string;
11728
+ };
11729
+ Insert: {
11730
+ booking_id?: string | null;
11731
+ created_at?: string;
11732
+ id?: string;
11733
+ is_read?: boolean;
11734
+ message: string;
11735
+ recipient_email?: string | null;
11736
+ title: string;
11737
+ type: string;
11738
+ };
11739
+ Update: {
11740
+ booking_id?: string | null;
11741
+ created_at?: string;
11742
+ id?: string;
11743
+ is_read?: boolean;
11744
+ message?: string;
11745
+ recipient_email?: string | null;
11746
+ title?: string;
11747
+ type?: string;
11748
+ };
11749
+ Relationships: [{
11750
+ foreignKeyName: "reception_notifications_booking_id_fkey";
11751
+ columns: ["booking_id"];
11752
+ isOneToOne: false;
11753
+ referencedRelation: "bookings";
11754
+ referencedColumns: ["id"];
11755
+ }];
11756
+ };
11757
+ rooms: {
11758
+ Row: {
11759
+ capacity: number;
11760
+ color_code: string | null;
11761
+ created_at: string;
11762
+ description: string | null;
11763
+ hourly_rate: number;
11764
+ id: string;
11765
+ image_url: string | null;
11766
+ is_active: boolean;
11767
+ name: string;
11768
+ };
11769
+ Insert: {
11770
+ capacity?: number;
11771
+ color_code?: string | null;
11772
+ created_at?: string;
11773
+ description?: string | null;
11774
+ hourly_rate?: number;
11775
+ id?: string;
11776
+ image_url?: string | null;
11777
+ is_active?: boolean;
11778
+ name: string;
11779
+ };
11780
+ Update: {
11781
+ capacity?: number;
11782
+ color_code?: string | null;
11783
+ created_at?: string;
11784
+ description?: string | null;
11785
+ hourly_rate?: number;
11786
+ id?: string;
11787
+ image_url?: string | null;
11788
+ is_active?: boolean;
11789
+ name?: string;
11790
+ };
11791
+ Relationships: [];
11792
+ };
10148
11793
  supplier_products: {
10149
11794
  Row: {
10150
11795
  article_number: string | null;
@@ -10238,6 +11883,30 @@ export declare const syncAccountingProvider: import("@tanstack/start-client-core
10238
11883
  };
10239
11884
  Relationships: [];
10240
11885
  };
11886
+ tenants: {
11887
+ Row: {
11888
+ created_at: string;
11889
+ id: string;
11890
+ name: string;
11891
+ slug: string | null;
11892
+ updated_at: string;
11893
+ };
11894
+ Insert: {
11895
+ created_at?: string;
11896
+ id?: string;
11897
+ name?: string;
11898
+ slug?: string | null;
11899
+ updated_at?: string;
11900
+ };
11901
+ Update: {
11902
+ created_at?: string;
11903
+ id?: string;
11904
+ name?: string;
11905
+ slug?: string | null;
11906
+ updated_at?: string;
11907
+ };
11908
+ Relationships: [];
11909
+ };
10241
11910
  trade_item_drafts: {
10242
11911
  Row: {
10243
11912
  connection_id: string | null;
@@ -10913,6 +12582,168 @@ export declare const syncAccountingProvider: import("@tanstack/start-client-core
10913
12582
  referencedColumns: ["id"];
10914
12583
  }];
10915
12584
  };
12585
+ work_order_monteurs: {
12586
+ Row: {
12587
+ created_at: string;
12588
+ id: string;
12589
+ monteur_id: string;
12590
+ work_order_id: string;
12591
+ };
12592
+ Insert: {
12593
+ created_at?: string;
12594
+ id?: string;
12595
+ monteur_id: string;
12596
+ work_order_id: string;
12597
+ };
12598
+ Update: {
12599
+ created_at?: string;
12600
+ id?: string;
12601
+ monteur_id?: string;
12602
+ work_order_id?: string;
12603
+ };
12604
+ Relationships: [{
12605
+ foreignKeyName: "work_order_monteurs_monteur_id_fkey";
12606
+ columns: ["monteur_id"];
12607
+ isOneToOne: false;
12608
+ referencedRelation: "monteurs";
12609
+ referencedColumns: ["id"];
12610
+ }, {
12611
+ foreignKeyName: "work_order_monteurs_work_order_id_fkey";
12612
+ columns: ["work_order_id"];
12613
+ isOneToOne: false;
12614
+ referencedRelation: "work_orders";
12615
+ referencedColumns: ["id"];
12616
+ }];
12617
+ };
12618
+ work_orders: {
12619
+ Row: {
12620
+ assigned_to: string | null;
12621
+ city: string | null;
12622
+ contact_person: string | null;
12623
+ created_at: string;
12624
+ custom_fields: import("../integrations/supabase/types").Json;
12625
+ customer_name: string;
12626
+ description: string;
12627
+ email: string | null;
12628
+ email_source: string | null;
12629
+ estimated_duration_hours: number | null;
12630
+ external_reference: string | null;
12631
+ follow_up_needed: boolean;
12632
+ id: string;
12633
+ mandate: string;
12634
+ mandate_budget: number;
12635
+ mandate_used: number;
12636
+ order_number: string;
12637
+ parent_work_order_id: string | null;
12638
+ pdf_url: string | null;
12639
+ phone: string | null;
12640
+ postal_code: string;
12641
+ priority: string;
12642
+ project_number: string | null;
12643
+ report_validated: boolean;
12644
+ room_number: string;
12645
+ scheduled_date: string | null;
12646
+ scheduled_end_time: string | null;
12647
+ scheduled_start_time: string | null;
12648
+ status: string;
12649
+ tenant_id: string;
12650
+ total_hours_worked: number | null;
12651
+ total_price: number | null;
12652
+ travel_time_minutes: number | null;
12653
+ updated_at: string;
12654
+ work_address: string;
12655
+ work_report: string | null;
12656
+ };
12657
+ Insert: {
12658
+ assigned_to?: string | null;
12659
+ city?: string | null;
12660
+ contact_person?: string | null;
12661
+ created_at?: string;
12662
+ custom_fields?: import("../integrations/supabase/types").Json;
12663
+ customer_name?: string;
12664
+ description?: string;
12665
+ email?: string | null;
12666
+ email_source?: string | null;
12667
+ estimated_duration_hours?: number | null;
12668
+ external_reference?: string | null;
12669
+ follow_up_needed?: boolean;
12670
+ id?: string;
12671
+ mandate?: string;
12672
+ mandate_budget?: number;
12673
+ mandate_used?: number;
12674
+ order_number?: string;
12675
+ parent_work_order_id?: string | null;
12676
+ pdf_url?: string | null;
12677
+ phone?: string | null;
12678
+ postal_code?: string;
12679
+ priority?: string;
12680
+ project_number?: string | null;
12681
+ report_validated?: boolean;
12682
+ room_number?: string;
12683
+ scheduled_date?: string | null;
12684
+ scheduled_end_time?: string | null;
12685
+ scheduled_start_time?: string | null;
12686
+ status?: string;
12687
+ tenant_id: string;
12688
+ total_hours_worked?: number | null;
12689
+ total_price?: number | null;
12690
+ travel_time_minutes?: number | null;
12691
+ updated_at?: string;
12692
+ work_address?: string;
12693
+ work_report?: string | null;
12694
+ };
12695
+ Update: {
12696
+ assigned_to?: string | null;
12697
+ city?: string | null;
12698
+ contact_person?: string | null;
12699
+ created_at?: string;
12700
+ custom_fields?: import("../integrations/supabase/types").Json;
12701
+ customer_name?: string;
12702
+ description?: string;
12703
+ email?: string | null;
12704
+ email_source?: string | null;
12705
+ estimated_duration_hours?: number | null;
12706
+ external_reference?: string | null;
12707
+ follow_up_needed?: boolean;
12708
+ id?: string;
12709
+ mandate?: string;
12710
+ mandate_budget?: number;
12711
+ mandate_used?: number;
12712
+ order_number?: string;
12713
+ parent_work_order_id?: string | null;
12714
+ pdf_url?: string | null;
12715
+ phone?: string | null;
12716
+ postal_code?: string;
12717
+ priority?: string;
12718
+ project_number?: string | null;
12719
+ report_validated?: boolean;
12720
+ room_number?: string;
12721
+ scheduled_date?: string | null;
12722
+ scheduled_end_time?: string | null;
12723
+ scheduled_start_time?: string | null;
12724
+ status?: string;
12725
+ tenant_id?: string;
12726
+ total_hours_worked?: number | null;
12727
+ total_price?: number | null;
12728
+ travel_time_minutes?: number | null;
12729
+ updated_at?: string;
12730
+ work_address?: string;
12731
+ work_report?: string | null;
12732
+ };
12733
+ Relationships: [{
12734
+ foreignKeyName: "work_orders_parent_work_order_id_fkey";
12735
+ columns: ["parent_work_order_id"];
12736
+ isOneToOne: false;
12737
+ referencedRelation: "work_orders";
12738
+ referencedColumns: ["id"];
12739
+ }, {
12740
+ foreignKeyName: "work_orders_tenant_id_fkey";
12741
+ columns: ["tenant_id"];
12742
+ isOneToOne: false;
12743
+ referencedRelation: "tenants";
12744
+ referencedColumns: ["id"];
12745
+ }];
12746
+ };
10916
12747
  };
10917
12748
  Views: {
10918
12749
  email_auth_connections_safe: {
@@ -10937,6 +12768,7 @@ export declare const syncAccountingProvider: import("@tanstack/start-client-core
10937
12768
  last_verified_at: string | null;
10938
12769
  oauth_mode: string | null;
10939
12770
  provider: string | null;
12771
+ purpose_assignments: import("../integrations/supabase/types").Json | null;
10940
12772
  scopes: string[] | null;
10941
12773
  smtp_host: string | null;
10942
12774
  smtp_port: number | null;
@@ -10967,6 +12799,7 @@ export declare const syncAccountingProvider: import("@tanstack/start-client-core
10967
12799
  last_verified_at?: string | null;
10968
12800
  oauth_mode?: string | null;
10969
12801
  provider?: string | null;
12802
+ purpose_assignments?: import("../integrations/supabase/types").Json | null;
10970
12803
  scopes?: string[] | null;
10971
12804
  smtp_host?: string | null;
10972
12805
  smtp_port?: number | null;
@@ -10997,6 +12830,7 @@ export declare const syncAccountingProvider: import("@tanstack/start-client-core
10997
12830
  last_verified_at?: string | null;
10998
12831
  oauth_mode?: string | null;
10999
12832
  provider?: string | null;
12833
+ purpose_assignments?: import("../integrations/supabase/types").Json | null;
11000
12834
  scopes?: string[] | null;
11001
12835
  smtp_host?: string | null;
11002
12836
  smtp_port?: number | null;
@@ -11147,6 +12981,33 @@ export declare const syncAccountingProvider: import("@tanstack/start-client-core
11147
12981
  };
11148
12982
  Returns: string;
11149
12983
  };
12984
+ email_auth_fetch_message: {
12985
+ Args: {
12986
+ _connection_id: string;
12987
+ _external_id: string;
12988
+ };
12989
+ Returns: import("../integrations/supabase/types").Json;
12990
+ };
12991
+ email_auth_for_purpose: {
12992
+ Args: {
12993
+ _direction: string;
12994
+ _purpose: string;
12995
+ };
12996
+ Returns: {
12997
+ account_email: string;
12998
+ display_name: string;
12999
+ id: string;
13000
+ last_error: string;
13001
+ last_verified_at: string;
13002
+ needs_reauth: boolean;
13003
+ provider: string;
13004
+ status: string;
13005
+ }[];
13006
+ };
13007
+ ensure_user_tenant: {
13008
+ Args: never;
13009
+ Returns: string;
13010
+ };
11150
13011
  exact_decrypt: {
11151
13012
  Args: {
11152
13013
  cipher: string;
@@ -11219,6 +13080,18 @@ export declare const syncAccountingProvider: import("@tanstack/start-client-core
11219
13080
  };
11220
13081
  Returns: import("../integrations/supabase/types").Json;
11221
13082
  };
13083
+ get_room_busy_windows: {
13084
+ Args: {
13085
+ p_from: string;
13086
+ p_to: string;
13087
+ };
13088
+ Returns: {
13089
+ end_time: string;
13090
+ room_id: string;
13091
+ start_time: string;
13092
+ status: string;
13093
+ }[];
13094
+ };
11222
13095
  get_twinfield_cron_jobs: {
11223
13096
  Args: never;
11224
13097
  Returns: {
@@ -11228,13 +13101,38 @@ export declare const syncAccountingProvider: import("@tanstack/start-client-core
11228
13101
  url: string;
11229
13102
  }[];
11230
13103
  };
11231
- has_role: {
13104
+ get_user_tenant_id: {
13105
+ Args: never;
13106
+ Returns: string;
13107
+ };
13108
+ get_work_order_tenant_id: {
13109
+ Args: {
13110
+ wo_id: string;
13111
+ };
13112
+ Returns: string;
13113
+ };
13114
+ has_role: {
11232
13115
  Args: {
11233
13116
  _role: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
11234
13117
  _user_id: string;
11235
13118
  };
11236
13119
  Returns: boolean;
11237
13120
  };
13121
+ is_authenticated: {
13122
+ Args: never;
13123
+ Returns: boolean;
13124
+ };
13125
+ is_developer: {
13126
+ Args: never;
13127
+ Returns: boolean;
13128
+ };
13129
+ next_work_order_number: {
13130
+ Args: {
13131
+ p_parent_work_order_id?: string;
13132
+ p_tenant_id: string;
13133
+ };
13134
+ Returns: string;
13135
+ };
11238
13136
  normalize_vat: {
11239
13137
  Args: {
11240
13138
  v: string;
@@ -11356,7 +13254,7 @@ export declare const syncAccountingProvider: import("@tanstack/start-client-core
11356
13254
  };
11357
13255
  };
11358
13256
  Enums: {
11359
- app_role: "admin" | "manager" | "warehouse" | "sales" | "developer";
13257
+ app_role: "admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie";
11360
13258
  exact_env: "staging" | "live";
11361
13259
  quote_status: "concept" | "verzonden" | "bekeken" | "in_behandeling" | "geaccepteerd" | "afgewezen" | "verlopen" | "gearchiveerd";
11362
13260
  };
@@ -11558,6 +13456,156 @@ export declare const syncAllAccountingProviders: import("@tanstack/start-client-
11558
13456
  };
11559
13457
  Relationships: [];
11560
13458
  };
13459
+ app_settings: {
13460
+ Row: {
13461
+ created_at: string;
13462
+ id: string;
13463
+ key: string;
13464
+ updated_at: string;
13465
+ value: string | null;
13466
+ };
13467
+ Insert: {
13468
+ created_at?: string;
13469
+ id?: string;
13470
+ key: string;
13471
+ updated_at?: string;
13472
+ value?: string | null;
13473
+ };
13474
+ Update: {
13475
+ created_at?: string;
13476
+ id?: string;
13477
+ key?: string;
13478
+ updated_at?: string;
13479
+ value?: string | null;
13480
+ };
13481
+ Relationships: [];
13482
+ };
13483
+ booking_items: {
13484
+ Row: {
13485
+ booking_id: string;
13486
+ created_at: string;
13487
+ extra_id: string;
13488
+ id: string;
13489
+ quantity: number;
13490
+ total_price: number;
13491
+ unit_price: number;
13492
+ };
13493
+ Insert: {
13494
+ booking_id: string;
13495
+ created_at?: string;
13496
+ extra_id: string;
13497
+ id?: string;
13498
+ quantity?: number;
13499
+ total_price?: number;
13500
+ unit_price?: number;
13501
+ };
13502
+ Update: {
13503
+ booking_id?: string;
13504
+ created_at?: string;
13505
+ extra_id?: string;
13506
+ id?: string;
13507
+ quantity?: number;
13508
+ total_price?: number;
13509
+ unit_price?: number;
13510
+ };
13511
+ Relationships: [{
13512
+ foreignKeyName: "booking_items_booking_id_fkey";
13513
+ columns: ["booking_id"];
13514
+ isOneToOne: false;
13515
+ referencedRelation: "bookings";
13516
+ referencedColumns: ["id"];
13517
+ }, {
13518
+ foreignKeyName: "booking_items_extra_id_fkey";
13519
+ columns: ["extra_id"];
13520
+ isOneToOne: false;
13521
+ referencedRelation: "extras";
13522
+ referencedColumns: ["id"];
13523
+ }];
13524
+ };
13525
+ bookings: {
13526
+ Row: {
13527
+ company_name: string | null;
13528
+ conflict_checked_at: string | null;
13529
+ conflict_reason: string | null;
13530
+ created_at: string;
13531
+ created_by_role: string | null;
13532
+ customer_email: string | null;
13533
+ customer_name: string | null;
13534
+ end_time: string;
13535
+ exact_debiteur_id: string | null;
13536
+ has_conflict: boolean;
13537
+ id: string;
13538
+ invoice_run_id: string | null;
13539
+ invoice_status: string | null;
13540
+ invoiced_at: string | null;
13541
+ notes: string | null;
13542
+ number_of_people: number;
13543
+ room_id: string;
13544
+ start_time: string;
13545
+ status: string;
13546
+ total_excl_vat: number | null;
13547
+ total_incl_vat: number | null;
13548
+ user_id: string | null;
13549
+ vat_amount: number | null;
13550
+ };
13551
+ Insert: {
13552
+ company_name?: string | null;
13553
+ conflict_checked_at?: string | null;
13554
+ conflict_reason?: string | null;
13555
+ created_at?: string;
13556
+ created_by_role?: string | null;
13557
+ customer_email?: string | null;
13558
+ customer_name?: string | null;
13559
+ end_time: string;
13560
+ exact_debiteur_id?: string | null;
13561
+ has_conflict?: boolean;
13562
+ id?: string;
13563
+ invoice_run_id?: string | null;
13564
+ invoice_status?: string | null;
13565
+ invoiced_at?: string | null;
13566
+ notes?: string | null;
13567
+ number_of_people?: number;
13568
+ room_id: string;
13569
+ start_time: string;
13570
+ status?: string;
13571
+ total_excl_vat?: number | null;
13572
+ total_incl_vat?: number | null;
13573
+ user_id?: string | null;
13574
+ vat_amount?: number | null;
13575
+ };
13576
+ Update: {
13577
+ company_name?: string | null;
13578
+ conflict_checked_at?: string | null;
13579
+ conflict_reason?: string | null;
13580
+ created_at?: string;
13581
+ created_by_role?: string | null;
13582
+ customer_email?: string | null;
13583
+ customer_name?: string | null;
13584
+ end_time?: string;
13585
+ exact_debiteur_id?: string | null;
13586
+ has_conflict?: boolean;
13587
+ id?: string;
13588
+ invoice_run_id?: string | null;
13589
+ invoice_status?: string | null;
13590
+ invoiced_at?: string | null;
13591
+ notes?: string | null;
13592
+ number_of_people?: number;
13593
+ room_id?: string;
13594
+ start_time?: string;
13595
+ status?: string;
13596
+ total_excl_vat?: number | null;
13597
+ total_incl_vat?: number | null;
13598
+ user_id?: string | null;
13599
+ vat_amount?: number | null;
13600
+ };
13601
+ Relationships: [{
13602
+ foreignKeyName: "bookings_room_id_fkey";
13603
+ columns: ["room_id"];
13604
+ isOneToOne: false;
13605
+ referencedRelation: "rooms";
13606
+ referencedColumns: ["id"];
13607
+ }];
13608
+ };
11561
13609
  bugs: {
11562
13610
  Row: {
11563
13611
  attachment_url: string | null;
@@ -12389,17 +14437,26 @@ export declare const syncAllAccountingProviders: import("@tanstack/start-client-
12389
14437
  created_at: string;
12390
14438
  created_by: string | null;
12391
14439
  display_name: string | null;
14440
+ gmail_history_id: string | null;
14441
+ gmail_watch_expires_at: string | null;
14442
+ graph_subscription_expires_at: string | null;
14443
+ graph_subscription_id: string | null;
12392
14444
  id: string;
12393
14445
  imap_host: string | null;
14446
+ imap_last_uid: number | null;
12394
14447
  imap_password_encrypted: string | null;
12395
14448
  imap_port: number | null;
12396
14449
  imap_secure: boolean | null;
14450
+ imap_uid_validity: number | null;
12397
14451
  imap_username: string | null;
12398
14452
  is_active: boolean;
12399
14453
  last_error: string | null;
14454
+ last_event_at: string | null;
12400
14455
  last_verified_at: string | null;
12401
14456
  oauth_mode: string | null;
12402
14457
  provider: string;
14458
+ purpose_assignments: import("../integrations/supabase/types").Json;
14459
+ realtime_mode: string;
12403
14460
  refresh_token_encrypted: string | null;
12404
14461
  scopes: string[] | null;
12405
14462
  smtp_host: string | null;
@@ -12419,17 +14476,26 @@ export declare const syncAllAccountingProviders: import("@tanstack/start-client-
12419
14476
  created_at?: string;
12420
14477
  created_by?: string | null;
12421
14478
  display_name?: string | null;
14479
+ gmail_history_id?: string | null;
14480
+ gmail_watch_expires_at?: string | null;
14481
+ graph_subscription_expires_at?: string | null;
14482
+ graph_subscription_id?: string | null;
12422
14483
  id?: string;
12423
14484
  imap_host?: string | null;
14485
+ imap_last_uid?: number | null;
12424
14486
  imap_password_encrypted?: string | null;
12425
14487
  imap_port?: number | null;
12426
14488
  imap_secure?: boolean | null;
14489
+ imap_uid_validity?: number | null;
12427
14490
  imap_username?: string | null;
12428
14491
  is_active?: boolean;
12429
14492
  last_error?: string | null;
14493
+ last_event_at?: string | null;
12430
14494
  last_verified_at?: string | null;
12431
14495
  oauth_mode?: string | null;
12432
14496
  provider: string;
14497
+ purpose_assignments?: import("../integrations/supabase/types").Json;
14498
+ realtime_mode?: string;
12433
14499
  refresh_token_encrypted?: string | null;
12434
14500
  scopes?: string[] | null;
12435
14501
  smtp_host?: string | null;
@@ -12449,17 +14515,26 @@ export declare const syncAllAccountingProviders: import("@tanstack/start-client-
12449
14515
  created_at?: string;
12450
14516
  created_by?: string | null;
12451
14517
  display_name?: string | null;
14518
+ gmail_history_id?: string | null;
14519
+ gmail_watch_expires_at?: string | null;
14520
+ graph_subscription_expires_at?: string | null;
14521
+ graph_subscription_id?: string | null;
12452
14522
  id?: string;
12453
14523
  imap_host?: string | null;
14524
+ imap_last_uid?: number | null;
12454
14525
  imap_password_encrypted?: string | null;
12455
14526
  imap_port?: number | null;
12456
14527
  imap_secure?: boolean | null;
14528
+ imap_uid_validity?: number | null;
12457
14529
  imap_username?: string | null;
12458
14530
  is_active?: boolean;
12459
14531
  last_error?: string | null;
14532
+ last_event_at?: string | null;
12460
14533
  last_verified_at?: string | null;
12461
14534
  oauth_mode?: string | null;
12462
14535
  provider?: string;
14536
+ purpose_assignments?: import("../integrations/supabase/types").Json;
14537
+ realtime_mode?: string;
12463
14538
  refresh_token_encrypted?: string | null;
12464
14539
  scopes?: string[] | null;
12465
14540
  smtp_host?: string | null;
@@ -12473,6 +14548,195 @@ export declare const syncAllAccountingProviders: import("@tanstack/start-client-
12473
14548
  };
12474
14549
  Relationships: [];
12475
14550
  };
14551
+ email_auth_events: {
14552
+ Row: {
14553
+ connection_id: string;
14554
+ consumed_at: string | null;
14555
+ created_at: string;
14556
+ event_type: string;
14557
+ external_id: string | null;
14558
+ id: string;
14559
+ payload: import("../integrations/supabase/types").Json;
14560
+ provider: string;
14561
+ received_at: string;
14562
+ };
14563
+ Insert: {
14564
+ connection_id: string;
14565
+ consumed_at?: string | null;
14566
+ created_at?: string;
14567
+ event_type: string;
14568
+ external_id?: string | null;
14569
+ id?: string;
14570
+ payload?: import("../integrations/supabase/types").Json;
14571
+ provider: string;
14572
+ received_at?: string;
14573
+ };
14574
+ Update: {
14575
+ connection_id?: string;
14576
+ consumed_at?: string | null;
14577
+ created_at?: string;
14578
+ event_type?: string;
14579
+ external_id?: string | null;
14580
+ id?: string;
14581
+ payload?: import("../integrations/supabase/types").Json;
14582
+ provider?: string;
14583
+ received_at?: string;
14584
+ };
14585
+ Relationships: [{
14586
+ foreignKeyName: "email_auth_events_connection_id_fkey";
14587
+ columns: ["connection_id"];
14588
+ isOneToOne: false;
14589
+ referencedRelation: "email_auth_connections";
14590
+ referencedColumns: ["id"];
14591
+ }, {
14592
+ foreignKeyName: "email_auth_events_connection_id_fkey";
14593
+ columns: ["connection_id"];
14594
+ isOneToOne: false;
14595
+ referencedRelation: "email_auth_connections_safe";
14596
+ referencedColumns: ["id"];
14597
+ }];
14598
+ };
14599
+ email_auth_outbox: {
14600
+ Row: {
14601
+ attempts: number;
14602
+ bcc_addresses: string[];
14603
+ cc_addresses: string[];
14604
+ connection_id: string | null;
14605
+ created_at: string;
14606
+ created_by: string | null;
14607
+ external_message_id: string | null;
14608
+ headers: import("../integrations/supabase/types").Json;
14609
+ html_body: string | null;
14610
+ id: string;
14611
+ last_error: string | null;
14612
+ purpose: string;
14613
+ reply_to: string | null;
14614
+ scheduled_at: string;
14615
+ sent_at: string | null;
14616
+ status: string;
14617
+ subject: string;
14618
+ text_body: string | null;
14619
+ to_addresses: string[];
14620
+ updated_at: string;
14621
+ };
14622
+ Insert: {
14623
+ attempts?: number;
14624
+ bcc_addresses?: string[];
14625
+ cc_addresses?: string[];
14626
+ connection_id?: string | null;
14627
+ created_at?: string;
14628
+ created_by?: string | null;
14629
+ external_message_id?: string | null;
14630
+ headers?: import("../integrations/supabase/types").Json;
14631
+ html_body?: string | null;
14632
+ id?: string;
14633
+ last_error?: string | null;
14634
+ purpose: string;
14635
+ reply_to?: string | null;
14636
+ scheduled_at?: string;
14637
+ sent_at?: string | null;
14638
+ status?: string;
14639
+ subject: string;
14640
+ text_body?: string | null;
14641
+ to_addresses: string[];
14642
+ updated_at?: string;
14643
+ };
14644
+ Update: {
14645
+ attempts?: number;
14646
+ bcc_addresses?: string[];
14647
+ cc_addresses?: string[];
14648
+ connection_id?: string | null;
14649
+ created_at?: string;
14650
+ created_by?: string | null;
14651
+ external_message_id?: string | null;
14652
+ headers?: import("../integrations/supabase/types").Json;
14653
+ html_body?: string | null;
14654
+ id?: string;
14655
+ last_error?: string | null;
14656
+ purpose?: string;
14657
+ reply_to?: string | null;
14658
+ scheduled_at?: string;
14659
+ sent_at?: string | null;
14660
+ status?: string;
14661
+ subject?: string;
14662
+ text_body?: string | null;
14663
+ to_addresses?: string[];
14664
+ updated_at?: string;
14665
+ };
14666
+ Relationships: [{
14667
+ foreignKeyName: "email_auth_outbox_connection_id_fkey";
14668
+ columns: ["connection_id"];
14669
+ isOneToOne: false;
14670
+ referencedRelation: "email_auth_connections";
14671
+ referencedColumns: ["id"];
14672
+ }, {
14673
+ foreignKeyName: "email_auth_outbox_connection_id_fkey";
14674
+ columns: ["connection_id"];
14675
+ isOneToOne: false;
14676
+ referencedRelation: "email_auth_connections_safe";
14677
+ referencedColumns: ["id"];
14678
+ }];
14679
+ };
14680
+ email_auth_purpose_settings: {
14681
+ Row: {
14682
+ purpose: string;
14683
+ reply_to: string | null;
14684
+ updated_at: string;
14685
+ updated_by: string | null;
14686
+ };
14687
+ Insert: {
14688
+ purpose: string;
14689
+ reply_to?: string | null;
14690
+ updated_at?: string;
14691
+ updated_by?: string | null;
14692
+ };
14693
+ Update: {
14694
+ purpose?: string;
14695
+ reply_to?: string | null;
14696
+ updated_at?: string;
14697
+ updated_by?: string | null;
14698
+ };
14699
+ Relationships: [];
14700
+ };
14701
+ email_auth_token_refresh_log: {
14702
+ Row: {
14703
+ connection_id: string;
14704
+ error_message: string | null;
14705
+ id: string;
14706
+ refreshed_at: string;
14707
+ success: boolean;
14708
+ trigger_source: string;
14709
+ };
14710
+ Insert: {
14711
+ connection_id: string;
14712
+ error_message?: string | null;
14713
+ id?: string;
14714
+ refreshed_at?: string;
14715
+ success: boolean;
14716
+ trigger_source: string;
14717
+ };
14718
+ Update: {
14719
+ connection_id?: string;
14720
+ error_message?: string | null;
14721
+ id?: string;
14722
+ refreshed_at?: string;
14723
+ success?: boolean;
14724
+ trigger_source?: string;
14725
+ };
14726
+ Relationships: [{
14727
+ foreignKeyName: "email_auth_token_refresh_log_connection_id_fkey";
14728
+ columns: ["connection_id"];
14729
+ isOneToOne: false;
14730
+ referencedRelation: "email_auth_connections";
14731
+ referencedColumns: ["id"];
14732
+ }, {
14733
+ foreignKeyName: "email_auth_token_refresh_log_connection_id_fkey";
14734
+ columns: ["connection_id"];
14735
+ isOneToOne: false;
14736
+ referencedRelation: "email_auth_connections_safe";
14737
+ referencedColumns: ["id"];
14738
+ }];
14739
+ };
12476
14740
  exact_account_analytics_cache: {
12477
14741
  Row: {
12478
14742
  account_id: string;
@@ -13217,6 +15481,42 @@ export declare const syncAllAccountingProviders: import("@tanstack/start-client-
13217
15481
  };
13218
15482
  Relationships: [];
13219
15483
  };
15484
+ exact_settings: {
15485
+ Row: {
15486
+ client_id: string | null;
15487
+ client_secret: string | null;
15488
+ connection_status: string;
15489
+ created_at: string;
15490
+ division_id: string | null;
15491
+ id: string;
15492
+ last_sync_at: string | null;
15493
+ redirect_uri: string | null;
15494
+ updated_at: string;
15495
+ };
15496
+ Insert: {
15497
+ client_id?: string | null;
15498
+ client_secret?: string | null;
15499
+ connection_status?: string;
15500
+ created_at?: string;
15501
+ division_id?: string | null;
15502
+ id?: string;
15503
+ last_sync_at?: string | null;
15504
+ redirect_uri?: string | null;
15505
+ updated_at?: string;
15506
+ };
15507
+ Update: {
15508
+ client_id?: string | null;
15509
+ client_secret?: string | null;
15510
+ connection_status?: string;
15511
+ created_at?: string;
15512
+ division_id?: string | null;
15513
+ id?: string;
15514
+ last_sync_at?: string | null;
15515
+ redirect_uri?: string | null;
15516
+ updated_at?: string;
15517
+ };
15518
+ Relationships: [];
15519
+ };
13220
15520
  exact_sync_state: {
13221
15521
  Row: {
13222
15522
  connection_id: string;
@@ -13280,6 +15580,63 @@ export declare const syncAllAccountingProviders: import("@tanstack/start-client-
13280
15580
  };
13281
15581
  Relationships: [];
13282
15582
  };
15583
+ extra_categories: {
15584
+ Row: {
15585
+ created_at: string;
15586
+ id: string;
15587
+ name: string;
15588
+ sort_order: number;
15589
+ updated_at: string;
15590
+ };
15591
+ Insert: {
15592
+ created_at?: string;
15593
+ id?: string;
15594
+ name: string;
15595
+ sort_order?: number;
15596
+ updated_at?: string;
15597
+ };
15598
+ Update: {
15599
+ created_at?: string;
15600
+ id?: string;
15601
+ name?: string;
15602
+ sort_order?: number;
15603
+ updated_at?: string;
15604
+ };
15605
+ Relationships: [];
15606
+ };
15607
+ extras: {
15608
+ Row: {
15609
+ category: string;
15610
+ created_at: string;
15611
+ exact_article_id: string | null;
15612
+ id: string;
15613
+ is_active: boolean;
15614
+ name: string;
15615
+ price: number;
15616
+ pricing_type: string;
15617
+ };
15618
+ Insert: {
15619
+ category: string;
15620
+ created_at?: string;
15621
+ exact_article_id?: string | null;
15622
+ id?: string;
15623
+ is_active?: boolean;
15624
+ name: string;
15625
+ price?: number;
15626
+ pricing_type?: string;
15627
+ };
15628
+ Update: {
15629
+ category?: string;
15630
+ created_at?: string;
15631
+ exact_article_id?: string | null;
15632
+ id?: string;
15633
+ is_active?: boolean;
15634
+ name?: string;
15635
+ price?: number;
15636
+ pricing_type?: string;
15637
+ };
15638
+ Relationships: [];
15639
+ };
13283
15640
  floricode_connection_settings: {
13284
15641
  Row: {
13285
15642
  catalog_key: string | null;
@@ -13888,46 +16245,142 @@ export declare const syncAllAccountingProviders: import("@tanstack/start-client-
13888
16245
  error?: string | null;
13889
16246
  finished_at?: string | null;
13890
16247
  id?: string;
13891
- inserted?: number;
13892
- ok?: boolean | null;
13893
- profile_id?: string | null;
13894
- started_at?: string;
16248
+ inserted?: number;
16249
+ ok?: boolean | null;
16250
+ profile_id?: string | null;
16251
+ started_at?: string;
16252
+ };
16253
+ Relationships: [{
16254
+ foreignKeyName: "imap_sync_log_account_id_fkey";
16255
+ columns: ["account_id"];
16256
+ isOneToOne: false;
16257
+ referencedRelation: "imap_accounts";
16258
+ referencedColumns: ["id"];
16259
+ }, {
16260
+ foreignKeyName: "imap_sync_log_profile_id_fkey";
16261
+ columns: ["profile_id"];
16262
+ isOneToOne: false;
16263
+ referencedRelation: "imap_profiles";
16264
+ referencedColumns: ["id"];
16265
+ }];
16266
+ };
16267
+ inventory_settings: {
16268
+ Row: {
16269
+ created_at: string;
16270
+ hierarchy_levels: string[];
16271
+ id: string;
16272
+ updated_at: string;
16273
+ visible_columns: string[];
16274
+ };
16275
+ Insert: {
16276
+ created_at?: string;
16277
+ hierarchy_levels?: string[];
16278
+ id?: string;
16279
+ updated_at?: string;
16280
+ visible_columns?: string[];
16281
+ };
16282
+ Update: {
16283
+ created_at?: string;
16284
+ hierarchy_levels?: string[];
16285
+ id?: string;
16286
+ updated_at?: string;
16287
+ visible_columns?: string[];
16288
+ };
16289
+ Relationships: [];
16290
+ };
16291
+ invoice_run_items: {
16292
+ Row: {
16293
+ booking_id: string | null;
16294
+ company_name: string | null;
16295
+ created_at: string;
16296
+ customer_email: string | null;
16297
+ description: string | null;
16298
+ exact_article_id: string | null;
16299
+ id: string;
16300
+ invoice_run_id: string | null;
16301
+ quantity: number | null;
16302
+ total_excl_vat: number | null;
16303
+ total_incl_vat: number | null;
16304
+ unit_price: number | null;
16305
+ vat_amount: number | null;
16306
+ };
16307
+ Insert: {
16308
+ booking_id?: string | null;
16309
+ company_name?: string | null;
16310
+ created_at?: string;
16311
+ customer_email?: string | null;
16312
+ description?: string | null;
16313
+ exact_article_id?: string | null;
16314
+ id?: string;
16315
+ invoice_run_id?: string | null;
16316
+ quantity?: number | null;
16317
+ total_excl_vat?: number | null;
16318
+ total_incl_vat?: number | null;
16319
+ unit_price?: number | null;
16320
+ vat_amount?: number | null;
16321
+ };
16322
+ Update: {
16323
+ booking_id?: string | null;
16324
+ company_name?: string | null;
16325
+ created_at?: string;
16326
+ customer_email?: string | null;
16327
+ description?: string | null;
16328
+ exact_article_id?: string | null;
16329
+ id?: string;
16330
+ invoice_run_id?: string | null;
16331
+ quantity?: number | null;
16332
+ total_excl_vat?: number | null;
16333
+ total_incl_vat?: number | null;
16334
+ unit_price?: number | null;
16335
+ vat_amount?: number | null;
13895
16336
  };
13896
16337
  Relationships: [{
13897
- foreignKeyName: "imap_sync_log_account_id_fkey";
13898
- columns: ["account_id"];
16338
+ foreignKeyName: "invoice_run_items_booking_id_fkey";
16339
+ columns: ["booking_id"];
13899
16340
  isOneToOne: false;
13900
- referencedRelation: "imap_accounts";
16341
+ referencedRelation: "bookings";
13901
16342
  referencedColumns: ["id"];
13902
16343
  }, {
13903
- foreignKeyName: "imap_sync_log_profile_id_fkey";
13904
- columns: ["profile_id"];
16344
+ foreignKeyName: "invoice_run_items_invoice_run_id_fkey";
16345
+ columns: ["invoice_run_id"];
13905
16346
  isOneToOne: false;
13906
- referencedRelation: "imap_profiles";
16347
+ referencedRelation: "invoice_runs";
13907
16348
  referencedColumns: ["id"];
13908
16349
  }];
13909
16350
  };
13910
- inventory_settings: {
16351
+ invoice_runs: {
13911
16352
  Row: {
13912
16353
  created_at: string;
13913
- hierarchy_levels: string[];
16354
+ created_by: string | null;
13914
16355
  id: string;
13915
- updated_at: string;
13916
- visible_columns: string[];
16356
+ period_end: string;
16357
+ period_start: string;
16358
+ status: string;
16359
+ total_excl_vat: number | null;
16360
+ total_incl_vat: number | null;
16361
+ vat_amount: number | null;
13917
16362
  };
13918
16363
  Insert: {
13919
16364
  created_at?: string;
13920
- hierarchy_levels?: string[];
16365
+ created_by?: string | null;
13921
16366
  id?: string;
13922
- updated_at?: string;
13923
- visible_columns?: string[];
16367
+ period_end: string;
16368
+ period_start: string;
16369
+ status?: string;
16370
+ total_excl_vat?: number | null;
16371
+ total_incl_vat?: number | null;
16372
+ vat_amount?: number | null;
13924
16373
  };
13925
16374
  Update: {
13926
16375
  created_at?: string;
13927
- hierarchy_levels?: string[];
16376
+ created_by?: string | null;
13928
16377
  id?: string;
13929
- updated_at?: string;
13930
- visible_columns?: string[];
16378
+ period_end?: string;
16379
+ period_start?: string;
16380
+ status?: string;
16381
+ total_excl_vat?: number | null;
16382
+ total_incl_vat?: number | null;
16383
+ vat_amount?: number | null;
13931
16384
  };
13932
16385
  Relationships: [];
13933
16386
  };
@@ -13961,6 +16414,7 @@ export declare const syncAllAccountingProviders: import("@tanstack/start-client-
13961
16414
  body_text: string | null;
13962
16415
  created_at: string;
13963
16416
  error_message: string | null;
16417
+ external_id: string | null;
13964
16418
  from_email: string | null;
13965
16419
  from_name: string | null;
13966
16420
  id: string;
@@ -13970,7 +16424,7 @@ export declare const syncAllAccountingProviders: import("@tanstack/start-client-
13970
16424
  received_at: string | null;
13971
16425
  status: string;
13972
16426
  subject: string | null;
13973
- uid: number;
16427
+ uid: number | null;
13974
16428
  updated_at: string;
13975
16429
  };
13976
16430
  Insert: {
@@ -13978,6 +16432,7 @@ export declare const syncAllAccountingProviders: import("@tanstack/start-client-
13978
16432
  body_text?: string | null;
13979
16433
  created_at?: string;
13980
16434
  error_message?: string | null;
16435
+ external_id?: string | null;
13981
16436
  from_email?: string | null;
13982
16437
  from_name?: string | null;
13983
16438
  id?: string;
@@ -13987,7 +16442,7 @@ export declare const syncAllAccountingProviders: import("@tanstack/start-client-
13987
16442
  received_at?: string | null;
13988
16443
  status?: string;
13989
16444
  subject?: string | null;
13990
- uid: number;
16445
+ uid?: number | null;
13991
16446
  updated_at?: string;
13992
16447
  };
13993
16448
  Update: {
@@ -13995,6 +16450,7 @@ export declare const syncAllAccountingProviders: import("@tanstack/start-client-
13995
16450
  body_text?: string | null;
13996
16451
  created_at?: string;
13997
16452
  error_message?: string | null;
16453
+ external_id?: string | null;
13998
16454
  from_email?: string | null;
13999
16455
  from_name?: string | null;
14000
16456
  id?: string;
@@ -14004,7 +16460,7 @@ export declare const syncAllAccountingProviders: import("@tanstack/start-client-
14004
16460
  received_at?: string | null;
14005
16461
  status?: string;
14006
16462
  subject?: string | null;
14007
- uid?: number;
16463
+ uid?: number | null;
14008
16464
  updated_at?: string;
14009
16465
  };
14010
16466
  Relationships: [{
@@ -14276,6 +16732,60 @@ export declare const syncAllAccountingProviders: import("@tanstack/start-client-
14276
16732
  };
14277
16733
  Relationships: [];
14278
16734
  };
16735
+ monteurs: {
16736
+ Row: {
16737
+ avatar_url: string | null;
16738
+ color: string | null;
16739
+ created_at: string;
16740
+ email: string | null;
16741
+ id: string;
16742
+ is_active: boolean;
16743
+ leave_balance_hours: number;
16744
+ name: string;
16745
+ persnr: number | null;
16746
+ phone: string | null;
16747
+ role: string;
16748
+ tenant_id: string;
16749
+ updated_at: string;
16750
+ };
16751
+ Insert: {
16752
+ avatar_url?: string | null;
16753
+ color?: string | null;
16754
+ created_at?: string;
16755
+ email?: string | null;
16756
+ id?: string;
16757
+ is_active?: boolean;
16758
+ leave_balance_hours?: number;
16759
+ name: string;
16760
+ persnr?: number | null;
16761
+ phone?: string | null;
16762
+ role?: string;
16763
+ tenant_id: string;
16764
+ updated_at?: string;
16765
+ };
16766
+ Update: {
16767
+ avatar_url?: string | null;
16768
+ color?: string | null;
16769
+ created_at?: string;
16770
+ email?: string | null;
16771
+ id?: string;
16772
+ is_active?: boolean;
16773
+ leave_balance_hours?: number;
16774
+ name?: string;
16775
+ persnr?: number | null;
16776
+ phone?: string | null;
16777
+ role?: string;
16778
+ tenant_id?: string;
16779
+ updated_at?: string;
16780
+ };
16781
+ Relationships: [{
16782
+ foreignKeyName: "monteurs_tenant_id_fkey";
16783
+ columns: ["tenant_id"];
16784
+ isOneToOne: false;
16785
+ referencedRelation: "tenants";
16786
+ referencedColumns: ["id"];
16787
+ }];
16788
+ };
14279
16789
  notifications: {
14280
16790
  Row: {
14281
16791
  created_at: string;
@@ -15108,6 +17618,7 @@ export declare const syncAllAccountingProviders: import("@tanstack/start-client-
15108
17618
  email: string | null;
15109
17619
  id: string;
15110
17620
  notification_preferences: import("../integrations/supabase/types").Json;
17621
+ tenant_id: string | null;
15111
17622
  updated_at: string;
15112
17623
  };
15113
17624
  Insert: {
@@ -15116,6 +17627,7 @@ export declare const syncAllAccountingProviders: import("@tanstack/start-client-
15116
17627
  email?: string | null;
15117
17628
  id: string;
15118
17629
  notification_preferences?: import("../integrations/supabase/types").Json;
17630
+ tenant_id?: string | null;
15119
17631
  updated_at?: string;
15120
17632
  };
15121
17633
  Update: {
@@ -15124,9 +17636,16 @@ export declare const syncAllAccountingProviders: import("@tanstack/start-client-
15124
17636
  email?: string | null;
15125
17637
  id?: string;
15126
17638
  notification_preferences?: import("../integrations/supabase/types").Json;
17639
+ tenant_id?: string | null;
15127
17640
  updated_at?: string;
15128
17641
  };
15129
- Relationships: [];
17642
+ Relationships: [{
17643
+ foreignKeyName: "profiles_tenant_id_fkey";
17644
+ columns: ["tenant_id"];
17645
+ isOneToOne: false;
17646
+ referencedRelation: "tenants";
17647
+ referencedColumns: ["id"];
17648
+ }];
15130
17649
  };
15131
17650
  projects: {
15132
17651
  Row: {
@@ -15830,6 +18349,81 @@ export declare const syncAllAccountingProviders: import("@tanstack/start-client-
15830
18349
  referencedColumns: ["id"];
15831
18350
  }];
15832
18351
  };
18352
+ reception_notifications: {
18353
+ Row: {
18354
+ booking_id: string | null;
18355
+ created_at: string;
18356
+ id: string;
18357
+ is_read: boolean;
18358
+ message: string;
18359
+ recipient_email: string | null;
18360
+ title: string;
18361
+ type: string;
18362
+ };
18363
+ Insert: {
18364
+ booking_id?: string | null;
18365
+ created_at?: string;
18366
+ id?: string;
18367
+ is_read?: boolean;
18368
+ message: string;
18369
+ recipient_email?: string | null;
18370
+ title: string;
18371
+ type: string;
18372
+ };
18373
+ Update: {
18374
+ booking_id?: string | null;
18375
+ created_at?: string;
18376
+ id?: string;
18377
+ is_read?: boolean;
18378
+ message?: string;
18379
+ recipient_email?: string | null;
18380
+ title?: string;
18381
+ type?: string;
18382
+ };
18383
+ Relationships: [{
18384
+ foreignKeyName: "reception_notifications_booking_id_fkey";
18385
+ columns: ["booking_id"];
18386
+ isOneToOne: false;
18387
+ referencedRelation: "bookings";
18388
+ referencedColumns: ["id"];
18389
+ }];
18390
+ };
18391
+ rooms: {
18392
+ Row: {
18393
+ capacity: number;
18394
+ color_code: string | null;
18395
+ created_at: string;
18396
+ description: string | null;
18397
+ hourly_rate: number;
18398
+ id: string;
18399
+ image_url: string | null;
18400
+ is_active: boolean;
18401
+ name: string;
18402
+ };
18403
+ Insert: {
18404
+ capacity?: number;
18405
+ color_code?: string | null;
18406
+ created_at?: string;
18407
+ description?: string | null;
18408
+ hourly_rate?: number;
18409
+ id?: string;
18410
+ image_url?: string | null;
18411
+ is_active?: boolean;
18412
+ name: string;
18413
+ };
18414
+ Update: {
18415
+ capacity?: number;
18416
+ color_code?: string | null;
18417
+ created_at?: string;
18418
+ description?: string | null;
18419
+ hourly_rate?: number;
18420
+ id?: string;
18421
+ image_url?: string | null;
18422
+ is_active?: boolean;
18423
+ name?: string;
18424
+ };
18425
+ Relationships: [];
18426
+ };
15833
18427
  supplier_products: {
15834
18428
  Row: {
15835
18429
  article_number: string | null;
@@ -15923,6 +18517,30 @@ export declare const syncAllAccountingProviders: import("@tanstack/start-client-
15923
18517
  };
15924
18518
  Relationships: [];
15925
18519
  };
18520
+ tenants: {
18521
+ Row: {
18522
+ created_at: string;
18523
+ id: string;
18524
+ name: string;
18525
+ slug: string | null;
18526
+ updated_at: string;
18527
+ };
18528
+ Insert: {
18529
+ created_at?: string;
18530
+ id?: string;
18531
+ name?: string;
18532
+ slug?: string | null;
18533
+ updated_at?: string;
18534
+ };
18535
+ Update: {
18536
+ created_at?: string;
18537
+ id?: string;
18538
+ name?: string;
18539
+ slug?: string | null;
18540
+ updated_at?: string;
18541
+ };
18542
+ Relationships: [];
18543
+ };
15926
18544
  trade_item_drafts: {
15927
18545
  Row: {
15928
18546
  connection_id: string | null;
@@ -16598,6 +19216,168 @@ export declare const syncAllAccountingProviders: import("@tanstack/start-client-
16598
19216
  referencedColumns: ["id"];
16599
19217
  }];
16600
19218
  };
19219
+ work_order_monteurs: {
19220
+ Row: {
19221
+ created_at: string;
19222
+ id: string;
19223
+ monteur_id: string;
19224
+ work_order_id: string;
19225
+ };
19226
+ Insert: {
19227
+ created_at?: string;
19228
+ id?: string;
19229
+ monteur_id: string;
19230
+ work_order_id: string;
19231
+ };
19232
+ Update: {
19233
+ created_at?: string;
19234
+ id?: string;
19235
+ monteur_id?: string;
19236
+ work_order_id?: string;
19237
+ };
19238
+ Relationships: [{
19239
+ foreignKeyName: "work_order_monteurs_monteur_id_fkey";
19240
+ columns: ["monteur_id"];
19241
+ isOneToOne: false;
19242
+ referencedRelation: "monteurs";
19243
+ referencedColumns: ["id"];
19244
+ }, {
19245
+ foreignKeyName: "work_order_monteurs_work_order_id_fkey";
19246
+ columns: ["work_order_id"];
19247
+ isOneToOne: false;
19248
+ referencedRelation: "work_orders";
19249
+ referencedColumns: ["id"];
19250
+ }];
19251
+ };
19252
+ work_orders: {
19253
+ Row: {
19254
+ assigned_to: string | null;
19255
+ city: string | null;
19256
+ contact_person: string | null;
19257
+ created_at: string;
19258
+ custom_fields: import("../integrations/supabase/types").Json;
19259
+ customer_name: string;
19260
+ description: string;
19261
+ email: string | null;
19262
+ email_source: string | null;
19263
+ estimated_duration_hours: number | null;
19264
+ external_reference: string | null;
19265
+ follow_up_needed: boolean;
19266
+ id: string;
19267
+ mandate: string;
19268
+ mandate_budget: number;
19269
+ mandate_used: number;
19270
+ order_number: string;
19271
+ parent_work_order_id: string | null;
19272
+ pdf_url: string | null;
19273
+ phone: string | null;
19274
+ postal_code: string;
19275
+ priority: string;
19276
+ project_number: string | null;
19277
+ report_validated: boolean;
19278
+ room_number: string;
19279
+ scheduled_date: string | null;
19280
+ scheduled_end_time: string | null;
19281
+ scheduled_start_time: string | null;
19282
+ status: string;
19283
+ tenant_id: string;
19284
+ total_hours_worked: number | null;
19285
+ total_price: number | null;
19286
+ travel_time_minutes: number | null;
19287
+ updated_at: string;
19288
+ work_address: string;
19289
+ work_report: string | null;
19290
+ };
19291
+ Insert: {
19292
+ assigned_to?: string | null;
19293
+ city?: string | null;
19294
+ contact_person?: string | null;
19295
+ created_at?: string;
19296
+ custom_fields?: import("../integrations/supabase/types").Json;
19297
+ customer_name?: string;
19298
+ description?: string;
19299
+ email?: string | null;
19300
+ email_source?: string | null;
19301
+ estimated_duration_hours?: number | null;
19302
+ external_reference?: string | null;
19303
+ follow_up_needed?: boolean;
19304
+ id?: string;
19305
+ mandate?: string;
19306
+ mandate_budget?: number;
19307
+ mandate_used?: number;
19308
+ order_number?: string;
19309
+ parent_work_order_id?: string | null;
19310
+ pdf_url?: string | null;
19311
+ phone?: string | null;
19312
+ postal_code?: string;
19313
+ priority?: string;
19314
+ project_number?: string | null;
19315
+ report_validated?: boolean;
19316
+ room_number?: string;
19317
+ scheduled_date?: string | null;
19318
+ scheduled_end_time?: string | null;
19319
+ scheduled_start_time?: string | null;
19320
+ status?: string;
19321
+ tenant_id: string;
19322
+ total_hours_worked?: number | null;
19323
+ total_price?: number | null;
19324
+ travel_time_minutes?: number | null;
19325
+ updated_at?: string;
19326
+ work_address?: string;
19327
+ work_report?: string | null;
19328
+ };
19329
+ Update: {
19330
+ assigned_to?: string | null;
19331
+ city?: string | null;
19332
+ contact_person?: string | null;
19333
+ created_at?: string;
19334
+ custom_fields?: import("../integrations/supabase/types").Json;
19335
+ customer_name?: string;
19336
+ description?: string;
19337
+ email?: string | null;
19338
+ email_source?: string | null;
19339
+ estimated_duration_hours?: number | null;
19340
+ external_reference?: string | null;
19341
+ follow_up_needed?: boolean;
19342
+ id?: string;
19343
+ mandate?: string;
19344
+ mandate_budget?: number;
19345
+ mandate_used?: number;
19346
+ order_number?: string;
19347
+ parent_work_order_id?: string | null;
19348
+ pdf_url?: string | null;
19349
+ phone?: string | null;
19350
+ postal_code?: string;
19351
+ priority?: string;
19352
+ project_number?: string | null;
19353
+ report_validated?: boolean;
19354
+ room_number?: string;
19355
+ scheduled_date?: string | null;
19356
+ scheduled_end_time?: string | null;
19357
+ scheduled_start_time?: string | null;
19358
+ status?: string;
19359
+ tenant_id?: string;
19360
+ total_hours_worked?: number | null;
19361
+ total_price?: number | null;
19362
+ travel_time_minutes?: number | null;
19363
+ updated_at?: string;
19364
+ work_address?: string;
19365
+ work_report?: string | null;
19366
+ };
19367
+ Relationships: [{
19368
+ foreignKeyName: "work_orders_parent_work_order_id_fkey";
19369
+ columns: ["parent_work_order_id"];
19370
+ isOneToOne: false;
19371
+ referencedRelation: "work_orders";
19372
+ referencedColumns: ["id"];
19373
+ }, {
19374
+ foreignKeyName: "work_orders_tenant_id_fkey";
19375
+ columns: ["tenant_id"];
19376
+ isOneToOne: false;
19377
+ referencedRelation: "tenants";
19378
+ referencedColumns: ["id"];
19379
+ }];
19380
+ };
16601
19381
  };
16602
19382
  Views: {
16603
19383
  email_auth_connections_safe: {
@@ -16622,6 +19402,7 @@ export declare const syncAllAccountingProviders: import("@tanstack/start-client-
16622
19402
  last_verified_at: string | null;
16623
19403
  oauth_mode: string | null;
16624
19404
  provider: string | null;
19405
+ purpose_assignments: import("../integrations/supabase/types").Json | null;
16625
19406
  scopes: string[] | null;
16626
19407
  smtp_host: string | null;
16627
19408
  smtp_port: number | null;
@@ -16652,6 +19433,7 @@ export declare const syncAllAccountingProviders: import("@tanstack/start-client-
16652
19433
  last_verified_at?: string | null;
16653
19434
  oauth_mode?: string | null;
16654
19435
  provider?: string | null;
19436
+ purpose_assignments?: import("../integrations/supabase/types").Json | null;
16655
19437
  scopes?: string[] | null;
16656
19438
  smtp_host?: string | null;
16657
19439
  smtp_port?: number | null;
@@ -16682,6 +19464,7 @@ export declare const syncAllAccountingProviders: import("@tanstack/start-client-
16682
19464
  last_verified_at?: string | null;
16683
19465
  oauth_mode?: string | null;
16684
19466
  provider?: string | null;
19467
+ purpose_assignments?: import("../integrations/supabase/types").Json | null;
16685
19468
  scopes?: string[] | null;
16686
19469
  smtp_host?: string | null;
16687
19470
  smtp_port?: number | null;
@@ -16832,6 +19615,33 @@ export declare const syncAllAccountingProviders: import("@tanstack/start-client-
16832
19615
  };
16833
19616
  Returns: string;
16834
19617
  };
19618
+ email_auth_fetch_message: {
19619
+ Args: {
19620
+ _connection_id: string;
19621
+ _external_id: string;
19622
+ };
19623
+ Returns: import("../integrations/supabase/types").Json;
19624
+ };
19625
+ email_auth_for_purpose: {
19626
+ Args: {
19627
+ _direction: string;
19628
+ _purpose: string;
19629
+ };
19630
+ Returns: {
19631
+ account_email: string;
19632
+ display_name: string;
19633
+ id: string;
19634
+ last_error: string;
19635
+ last_verified_at: string;
19636
+ needs_reauth: boolean;
19637
+ provider: string;
19638
+ status: string;
19639
+ }[];
19640
+ };
19641
+ ensure_user_tenant: {
19642
+ Args: never;
19643
+ Returns: string;
19644
+ };
16835
19645
  exact_decrypt: {
16836
19646
  Args: {
16837
19647
  cipher: string;
@@ -16904,6 +19714,18 @@ export declare const syncAllAccountingProviders: import("@tanstack/start-client-
16904
19714
  };
16905
19715
  Returns: import("../integrations/supabase/types").Json;
16906
19716
  };
19717
+ get_room_busy_windows: {
19718
+ Args: {
19719
+ p_from: string;
19720
+ p_to: string;
19721
+ };
19722
+ Returns: {
19723
+ end_time: string;
19724
+ room_id: string;
19725
+ start_time: string;
19726
+ status: string;
19727
+ }[];
19728
+ };
16907
19729
  get_twinfield_cron_jobs: {
16908
19730
  Args: never;
16909
19731
  Returns: {
@@ -16913,6 +19735,16 @@ export declare const syncAllAccountingProviders: import("@tanstack/start-client-
16913
19735
  url: string;
16914
19736
  }[];
16915
19737
  };
19738
+ get_user_tenant_id: {
19739
+ Args: never;
19740
+ Returns: string;
19741
+ };
19742
+ get_work_order_tenant_id: {
19743
+ Args: {
19744
+ wo_id: string;
19745
+ };
19746
+ Returns: string;
19747
+ };
16916
19748
  has_role: {
16917
19749
  Args: {
16918
19750
  _role: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
@@ -16920,6 +19752,21 @@ export declare const syncAllAccountingProviders: import("@tanstack/start-client-
16920
19752
  };
16921
19753
  Returns: boolean;
16922
19754
  };
19755
+ is_authenticated: {
19756
+ Args: never;
19757
+ Returns: boolean;
19758
+ };
19759
+ is_developer: {
19760
+ Args: never;
19761
+ Returns: boolean;
19762
+ };
19763
+ next_work_order_number: {
19764
+ Args: {
19765
+ p_parent_work_order_id?: string;
19766
+ p_tenant_id: string;
19767
+ };
19768
+ Returns: string;
19769
+ };
16923
19770
  normalize_vat: {
16924
19771
  Args: {
16925
19772
  v: string;
@@ -17041,7 +19888,7 @@ export declare const syncAllAccountingProviders: import("@tanstack/start-client-
17041
19888
  };
17042
19889
  };
17043
19890
  Enums: {
17044
- app_role: "admin" | "manager" | "warehouse" | "sales" | "developer";
19891
+ app_role: "admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie";
17045
19892
  exact_env: "staging" | "live";
17046
19893
  quote_status: "concept" | "verzonden" | "bekeken" | "in_behandeling" | "geaccepteerd" | "afgewezen" | "verlopen" | "gearchiveerd";
17047
19894
  };