@flowselections/floriday-afhandeling-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.
@@ -199,6 +199,153 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
199
199
  };
200
200
  Relationships: [];
201
201
  };
202
+ app_settings: {
203
+ Row: {
204
+ created_at: string;
205
+ id: string;
206
+ key: string;
207
+ updated_at: string;
208
+ value: string | null;
209
+ };
210
+ Insert: {
211
+ created_at?: string;
212
+ id?: string;
213
+ key: string;
214
+ updated_at?: string;
215
+ value?: string | null;
216
+ };
217
+ Update: {
218
+ created_at?: string;
219
+ id?: string;
220
+ key?: string;
221
+ updated_at?: string;
222
+ value?: string | null;
223
+ };
224
+ Relationships: [];
225
+ };
226
+ booking_items: {
227
+ Row: {
228
+ booking_id: string;
229
+ created_at: string;
230
+ extra_id: string;
231
+ id: string;
232
+ quantity: number;
233
+ total_price: number;
234
+ unit_price: number;
235
+ };
236
+ Insert: {
237
+ booking_id: string;
238
+ created_at?: string;
239
+ extra_id: string;
240
+ id?: string;
241
+ quantity?: number;
242
+ total_price?: number;
243
+ unit_price?: number;
244
+ };
245
+ Update: {
246
+ booking_id?: string;
247
+ created_at?: string;
248
+ extra_id?: string;
249
+ id?: string;
250
+ quantity?: number;
251
+ total_price?: number;
252
+ unit_price?: number;
253
+ };
254
+ Relationships: [{
255
+ foreignKeyName: "booking_items_booking_id_fkey";
256
+ columns: ["booking_id"];
257
+ isOneToOne: false;
258
+ referencedRelation: "bookings";
259
+ referencedColumns: ["id"];
260
+ }, {
261
+ foreignKeyName: "booking_items_extra_id_fkey";
262
+ columns: ["extra_id"];
263
+ isOneToOne: false;
264
+ referencedRelation: "extras";
265
+ referencedColumns: ["id"];
266
+ }];
267
+ };
268
+ bookings: {
269
+ Row: {
270
+ company_name: string | null;
271
+ conflict_checked_at: string | null;
272
+ conflict_reason: string | null;
273
+ created_at: string;
274
+ created_by_role: string | null;
275
+ customer_email: string | null;
276
+ customer_name: string | null;
277
+ end_time: string;
278
+ exact_debiteur_id: string | null;
279
+ has_conflict: boolean;
280
+ id: string;
281
+ invoice_run_id: string | null;
282
+ invoice_status: string | null;
283
+ invoiced_at: string | null;
284
+ number_of_people: number;
285
+ room_id: string;
286
+ start_time: string;
287
+ status: string;
288
+ total_excl_vat: number | null;
289
+ total_incl_vat: number | null;
290
+ user_id: string | null;
291
+ vat_amount: number | null;
292
+ };
293
+ Insert: {
294
+ company_name?: string | null;
295
+ conflict_checked_at?: string | null;
296
+ conflict_reason?: string | null;
297
+ created_at?: string;
298
+ created_by_role?: string | null;
299
+ customer_email?: string | null;
300
+ customer_name?: string | null;
301
+ end_time: string;
302
+ exact_debiteur_id?: string | null;
303
+ has_conflict?: boolean;
304
+ id?: string;
305
+ invoice_run_id?: string | null;
306
+ invoice_status?: string | null;
307
+ invoiced_at?: string | null;
308
+ number_of_people?: number;
309
+ room_id: string;
310
+ start_time: string;
311
+ status?: string;
312
+ total_excl_vat?: number | null;
313
+ total_incl_vat?: number | null;
314
+ user_id?: string | null;
315
+ vat_amount?: number | null;
316
+ };
317
+ Update: {
318
+ company_name?: string | null;
319
+ conflict_checked_at?: string | null;
320
+ conflict_reason?: string | null;
321
+ created_at?: string;
322
+ created_by_role?: string | null;
323
+ customer_email?: string | null;
324
+ customer_name?: string | null;
325
+ end_time?: string;
326
+ exact_debiteur_id?: string | null;
327
+ has_conflict?: boolean;
328
+ id?: string;
329
+ invoice_run_id?: string | null;
330
+ invoice_status?: string | null;
331
+ invoiced_at?: string | null;
332
+ number_of_people?: number;
333
+ room_id?: string;
334
+ start_time?: string;
335
+ status?: string;
336
+ total_excl_vat?: number | null;
337
+ total_incl_vat?: number | null;
338
+ user_id?: string | null;
339
+ vat_amount?: number | null;
340
+ };
341
+ Relationships: [{
342
+ foreignKeyName: "bookings_room_id_fkey";
343
+ columns: ["room_id"];
344
+ isOneToOne: false;
345
+ referencedRelation: "rooms";
346
+ referencedColumns: ["id"];
347
+ }];
348
+ };
202
349
  bugs: {
203
350
  Row: {
204
351
  attachment_url: string | null;
@@ -1030,17 +1177,26 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
1030
1177
  created_at: string;
1031
1178
  created_by: string | null;
1032
1179
  display_name: string | null;
1180
+ gmail_history_id: string | null;
1181
+ gmail_watch_expires_at: string | null;
1182
+ graph_subscription_expires_at: string | null;
1183
+ graph_subscription_id: string | null;
1033
1184
  id: string;
1034
1185
  imap_host: string | null;
1186
+ imap_last_uid: number | null;
1035
1187
  imap_password_encrypted: string | null;
1036
1188
  imap_port: number | null;
1037
1189
  imap_secure: boolean | null;
1190
+ imap_uid_validity: number | null;
1038
1191
  imap_username: string | null;
1039
1192
  is_active: boolean;
1040
1193
  last_error: string | null;
1194
+ last_event_at: string | null;
1041
1195
  last_verified_at: string | null;
1042
1196
  oauth_mode: string | null;
1043
1197
  provider: string;
1198
+ purpose_assignments: import("../integrations/supabase/types").Json;
1199
+ realtime_mode: string;
1044
1200
  refresh_token_encrypted: string | null;
1045
1201
  scopes: string[] | null;
1046
1202
  smtp_host: string | null;
@@ -1060,17 +1216,26 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
1060
1216
  created_at?: string;
1061
1217
  created_by?: string | null;
1062
1218
  display_name?: string | null;
1219
+ gmail_history_id?: string | null;
1220
+ gmail_watch_expires_at?: string | null;
1221
+ graph_subscription_expires_at?: string | null;
1222
+ graph_subscription_id?: string | null;
1063
1223
  id?: string;
1064
1224
  imap_host?: string | null;
1225
+ imap_last_uid?: number | null;
1065
1226
  imap_password_encrypted?: string | null;
1066
1227
  imap_port?: number | null;
1067
1228
  imap_secure?: boolean | null;
1229
+ imap_uid_validity?: number | null;
1068
1230
  imap_username?: string | null;
1069
1231
  is_active?: boolean;
1070
1232
  last_error?: string | null;
1233
+ last_event_at?: string | null;
1071
1234
  last_verified_at?: string | null;
1072
1235
  oauth_mode?: string | null;
1073
1236
  provider: string;
1237
+ purpose_assignments?: import("../integrations/supabase/types").Json;
1238
+ realtime_mode?: string;
1074
1239
  refresh_token_encrypted?: string | null;
1075
1240
  scopes?: string[] | null;
1076
1241
  smtp_host?: string | null;
@@ -1090,17 +1255,26 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
1090
1255
  created_at?: string;
1091
1256
  created_by?: string | null;
1092
1257
  display_name?: string | null;
1258
+ gmail_history_id?: string | null;
1259
+ gmail_watch_expires_at?: string | null;
1260
+ graph_subscription_expires_at?: string | null;
1261
+ graph_subscription_id?: string | null;
1093
1262
  id?: string;
1094
1263
  imap_host?: string | null;
1264
+ imap_last_uid?: number | null;
1095
1265
  imap_password_encrypted?: string | null;
1096
1266
  imap_port?: number | null;
1097
1267
  imap_secure?: boolean | null;
1268
+ imap_uid_validity?: number | null;
1098
1269
  imap_username?: string | null;
1099
1270
  is_active?: boolean;
1100
1271
  last_error?: string | null;
1272
+ last_event_at?: string | null;
1101
1273
  last_verified_at?: string | null;
1102
1274
  oauth_mode?: string | null;
1103
1275
  provider?: string;
1276
+ purpose_assignments?: import("../integrations/supabase/types").Json;
1277
+ realtime_mode?: string;
1104
1278
  refresh_token_encrypted?: string | null;
1105
1279
  scopes?: string[] | null;
1106
1280
  smtp_host?: string | null;
@@ -1114,6 +1288,195 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
1114
1288
  };
1115
1289
  Relationships: [];
1116
1290
  };
1291
+ email_auth_events: {
1292
+ Row: {
1293
+ connection_id: string;
1294
+ consumed_at: string | null;
1295
+ created_at: string;
1296
+ event_type: string;
1297
+ external_id: string | null;
1298
+ id: string;
1299
+ payload: import("../integrations/supabase/types").Json;
1300
+ provider: string;
1301
+ received_at: string;
1302
+ };
1303
+ Insert: {
1304
+ connection_id: string;
1305
+ consumed_at?: string | null;
1306
+ created_at?: string;
1307
+ event_type: string;
1308
+ external_id?: string | null;
1309
+ id?: string;
1310
+ payload?: import("../integrations/supabase/types").Json;
1311
+ provider: string;
1312
+ received_at?: string;
1313
+ };
1314
+ Update: {
1315
+ connection_id?: string;
1316
+ consumed_at?: string | null;
1317
+ created_at?: string;
1318
+ event_type?: string;
1319
+ external_id?: string | null;
1320
+ id?: string;
1321
+ payload?: import("../integrations/supabase/types").Json;
1322
+ provider?: string;
1323
+ received_at?: string;
1324
+ };
1325
+ Relationships: [{
1326
+ foreignKeyName: "email_auth_events_connection_id_fkey";
1327
+ columns: ["connection_id"];
1328
+ isOneToOne: false;
1329
+ referencedRelation: "email_auth_connections";
1330
+ referencedColumns: ["id"];
1331
+ }, {
1332
+ foreignKeyName: "email_auth_events_connection_id_fkey";
1333
+ columns: ["connection_id"];
1334
+ isOneToOne: false;
1335
+ referencedRelation: "email_auth_connections_safe";
1336
+ referencedColumns: ["id"];
1337
+ }];
1338
+ };
1339
+ email_auth_outbox: {
1340
+ Row: {
1341
+ attempts: number;
1342
+ bcc_addresses: string[];
1343
+ cc_addresses: string[];
1344
+ connection_id: string | null;
1345
+ created_at: string;
1346
+ created_by: string | null;
1347
+ external_message_id: string | null;
1348
+ headers: import("../integrations/supabase/types").Json;
1349
+ html_body: string | null;
1350
+ id: string;
1351
+ last_error: string | null;
1352
+ purpose: string;
1353
+ reply_to: string | null;
1354
+ scheduled_at: string;
1355
+ sent_at: string | null;
1356
+ status: string;
1357
+ subject: string;
1358
+ text_body: string | null;
1359
+ to_addresses: string[];
1360
+ updated_at: string;
1361
+ };
1362
+ Insert: {
1363
+ attempts?: number;
1364
+ bcc_addresses?: string[];
1365
+ cc_addresses?: string[];
1366
+ connection_id?: string | null;
1367
+ created_at?: string;
1368
+ created_by?: string | null;
1369
+ external_message_id?: string | null;
1370
+ headers?: import("../integrations/supabase/types").Json;
1371
+ html_body?: string | null;
1372
+ id?: string;
1373
+ last_error?: string | null;
1374
+ purpose: string;
1375
+ reply_to?: string | null;
1376
+ scheduled_at?: string;
1377
+ sent_at?: string | null;
1378
+ status?: string;
1379
+ subject: string;
1380
+ text_body?: string | null;
1381
+ to_addresses: string[];
1382
+ updated_at?: string;
1383
+ };
1384
+ Update: {
1385
+ attempts?: number;
1386
+ bcc_addresses?: string[];
1387
+ cc_addresses?: string[];
1388
+ connection_id?: string | null;
1389
+ created_at?: string;
1390
+ created_by?: string | null;
1391
+ external_message_id?: string | null;
1392
+ headers?: import("../integrations/supabase/types").Json;
1393
+ html_body?: string | null;
1394
+ id?: string;
1395
+ last_error?: string | null;
1396
+ purpose?: string;
1397
+ reply_to?: string | null;
1398
+ scheduled_at?: string;
1399
+ sent_at?: string | null;
1400
+ status?: string;
1401
+ subject?: string;
1402
+ text_body?: string | null;
1403
+ to_addresses?: string[];
1404
+ updated_at?: string;
1405
+ };
1406
+ Relationships: [{
1407
+ foreignKeyName: "email_auth_outbox_connection_id_fkey";
1408
+ columns: ["connection_id"];
1409
+ isOneToOne: false;
1410
+ referencedRelation: "email_auth_connections";
1411
+ referencedColumns: ["id"];
1412
+ }, {
1413
+ foreignKeyName: "email_auth_outbox_connection_id_fkey";
1414
+ columns: ["connection_id"];
1415
+ isOneToOne: false;
1416
+ referencedRelation: "email_auth_connections_safe";
1417
+ referencedColumns: ["id"];
1418
+ }];
1419
+ };
1420
+ email_auth_purpose_settings: {
1421
+ Row: {
1422
+ purpose: string;
1423
+ reply_to: string | null;
1424
+ updated_at: string;
1425
+ updated_by: string | null;
1426
+ };
1427
+ Insert: {
1428
+ purpose: string;
1429
+ reply_to?: string | null;
1430
+ updated_at?: string;
1431
+ updated_by?: string | null;
1432
+ };
1433
+ Update: {
1434
+ purpose?: string;
1435
+ reply_to?: string | null;
1436
+ updated_at?: string;
1437
+ updated_by?: string | null;
1438
+ };
1439
+ Relationships: [];
1440
+ };
1441
+ email_auth_token_refresh_log: {
1442
+ Row: {
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
+ Insert: {
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
+ Update: {
1459
+ connection_id?: string;
1460
+ error_message?: string | null;
1461
+ id?: string;
1462
+ refreshed_at?: string;
1463
+ success?: boolean;
1464
+ trigger_source?: string;
1465
+ };
1466
+ Relationships: [{
1467
+ foreignKeyName: "email_auth_token_refresh_log_connection_id_fkey";
1468
+ columns: ["connection_id"];
1469
+ isOneToOne: false;
1470
+ referencedRelation: "email_auth_connections";
1471
+ referencedColumns: ["id"];
1472
+ }, {
1473
+ foreignKeyName: "email_auth_token_refresh_log_connection_id_fkey";
1474
+ columns: ["connection_id"];
1475
+ isOneToOne: false;
1476
+ referencedRelation: "email_auth_connections_safe";
1477
+ referencedColumns: ["id"];
1478
+ }];
1479
+ };
1117
1480
  exact_account_analytics_cache: {
1118
1481
  Row: {
1119
1482
  account_id: string;
@@ -1858,6 +2221,42 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
1858
2221
  };
1859
2222
  Relationships: [];
1860
2223
  };
2224
+ exact_settings: {
2225
+ Row: {
2226
+ client_id: string | null;
2227
+ client_secret: string | null;
2228
+ connection_status: string;
2229
+ created_at: string;
2230
+ division_id: string | null;
2231
+ id: string;
2232
+ last_sync_at: string | null;
2233
+ redirect_uri: string | null;
2234
+ updated_at: string;
2235
+ };
2236
+ Insert: {
2237
+ client_id?: string | null;
2238
+ client_secret?: string | null;
2239
+ connection_status?: string;
2240
+ created_at?: string;
2241
+ division_id?: string | null;
2242
+ id?: string;
2243
+ last_sync_at?: string | null;
2244
+ redirect_uri?: string | null;
2245
+ updated_at?: string;
2246
+ };
2247
+ Update: {
2248
+ client_id?: string | null;
2249
+ client_secret?: string | null;
2250
+ connection_status?: string;
2251
+ created_at?: string;
2252
+ division_id?: string | null;
2253
+ id?: string;
2254
+ last_sync_at?: string | null;
2255
+ redirect_uri?: string | null;
2256
+ updated_at?: string;
2257
+ };
2258
+ Relationships: [];
2259
+ };
1861
2260
  exact_sync_state: {
1862
2261
  Row: {
1863
2262
  connection_id: string;
@@ -1885,31 +2284,124 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
1885
2284
  };
1886
2285
  Relationships: [];
1887
2286
  };
1888
- floricode_connection_settings: {
2287
+ external_customer_providers: {
1889
2288
  Row: {
1890
- catalog_key: string | null;
1891
- catalog_url: string;
2289
+ color: string | null;
1892
2290
  created_at: string;
1893
- id: number;
1894
- last_meta: import("../integrations/supabase/types").Json | null;
1895
- last_test_at: string | null;
1896
- last_test_error: string | null;
1897
- last_test_ok: boolean | null;
2291
+ icon: string | null;
2292
+ is_enabled: boolean;
2293
+ label: string;
2294
+ last_synced_at: string | null;
2295
+ provider: string;
2296
+ sort_order: number;
1898
2297
  updated_at: string;
1899
2298
  };
1900
2299
  Insert: {
1901
- catalog_key?: string | null;
1902
- catalog_url?: string;
2300
+ color?: string | null;
1903
2301
  created_at?: string;
1904
- id?: number;
1905
- last_meta?: import("../integrations/supabase/types").Json | null;
1906
- last_test_at?: string | null;
1907
- last_test_error?: string | null;
1908
- last_test_ok?: boolean | null;
2302
+ icon?: string | null;
2303
+ is_enabled?: boolean;
2304
+ label: string;
2305
+ last_synced_at?: string | null;
2306
+ provider: string;
2307
+ sort_order?: number;
1909
2308
  updated_at?: string;
1910
2309
  };
1911
2310
  Update: {
1912
- catalog_key?: string | null;
2311
+ color?: string | null;
2312
+ created_at?: string;
2313
+ icon?: string | null;
2314
+ is_enabled?: boolean;
2315
+ label?: string;
2316
+ last_synced_at?: string | null;
2317
+ provider?: string;
2318
+ sort_order?: number;
2319
+ updated_at?: string;
2320
+ };
2321
+ Relationships: [];
2322
+ };
2323
+ extra_categories: {
2324
+ Row: {
2325
+ created_at: string;
2326
+ id: string;
2327
+ name: string;
2328
+ sort_order: number;
2329
+ updated_at: string;
2330
+ };
2331
+ Insert: {
2332
+ created_at?: string;
2333
+ id?: string;
2334
+ name: string;
2335
+ sort_order?: number;
2336
+ updated_at?: string;
2337
+ };
2338
+ Update: {
2339
+ created_at?: string;
2340
+ id?: string;
2341
+ name?: string;
2342
+ sort_order?: number;
2343
+ updated_at?: string;
2344
+ };
2345
+ Relationships: [];
2346
+ };
2347
+ extras: {
2348
+ Row: {
2349
+ category: string;
2350
+ created_at: string;
2351
+ exact_article_id: string | null;
2352
+ id: string;
2353
+ is_active: boolean;
2354
+ name: string;
2355
+ price: number;
2356
+ pricing_type: string;
2357
+ };
2358
+ Insert: {
2359
+ category: string;
2360
+ created_at?: string;
2361
+ exact_article_id?: string | null;
2362
+ id?: string;
2363
+ is_active?: boolean;
2364
+ name: string;
2365
+ price?: number;
2366
+ pricing_type?: string;
2367
+ };
2368
+ Update: {
2369
+ category?: string;
2370
+ created_at?: string;
2371
+ exact_article_id?: string | null;
2372
+ id?: string;
2373
+ is_active?: boolean;
2374
+ name?: string;
2375
+ price?: number;
2376
+ pricing_type?: string;
2377
+ };
2378
+ Relationships: [];
2379
+ };
2380
+ floricode_connection_settings: {
2381
+ Row: {
2382
+ catalog_key: string | null;
2383
+ catalog_url: string;
2384
+ created_at: string;
2385
+ id: number;
2386
+ last_meta: import("../integrations/supabase/types").Json | null;
2387
+ last_test_at: string | null;
2388
+ last_test_error: string | null;
2389
+ last_test_ok: boolean | null;
2390
+ updated_at: string;
2391
+ };
2392
+ Insert: {
2393
+ catalog_key?: string | null;
2394
+ catalog_url?: string;
2395
+ created_at?: string;
2396
+ id?: number;
2397
+ last_meta?: import("../integrations/supabase/types").Json | null;
2398
+ last_test_at?: string | null;
2399
+ last_test_error?: string | null;
2400
+ last_test_ok?: boolean | null;
2401
+ updated_at?: string;
2402
+ };
2403
+ Update: {
2404
+ catalog_key?: string | null;
1913
2405
  catalog_url?: string;
1914
2406
  created_at?: string;
1915
2407
  id?: number;
@@ -1975,6 +2467,48 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
1975
2467
  };
1976
2468
  Relationships: [];
1977
2469
  };
2470
+ floriday_carriers_cache: {
2471
+ Row: {
2472
+ connection_id: string | null;
2473
+ created_at: string;
2474
+ data: import("../integrations/supabase/types").Json;
2475
+ fetched_at: string;
2476
+ gln_code: string | null;
2477
+ id: string;
2478
+ name: string | null;
2479
+ organization_id: string;
2480
+ updated_at: string;
2481
+ };
2482
+ Insert: {
2483
+ connection_id?: string | null;
2484
+ created_at?: string;
2485
+ data: import("../integrations/supabase/types").Json;
2486
+ fetched_at?: string;
2487
+ gln_code?: string | null;
2488
+ id?: string;
2489
+ name?: string | null;
2490
+ organization_id: string;
2491
+ updated_at?: string;
2492
+ };
2493
+ Update: {
2494
+ connection_id?: string | null;
2495
+ created_at?: string;
2496
+ data?: import("../integrations/supabase/types").Json;
2497
+ fetched_at?: string;
2498
+ gln_code?: string | null;
2499
+ id?: string;
2500
+ name?: string | null;
2501
+ organization_id?: string;
2502
+ updated_at?: string;
2503
+ };
2504
+ Relationships: [{
2505
+ foreignKeyName: "floriday_carriers_cache_connection_id_fkey";
2506
+ columns: ["connection_id"];
2507
+ isOneToOne: false;
2508
+ referencedRelation: "floriday_connections";
2509
+ referencedColumns: ["id"];
2510
+ }];
2511
+ };
1978
2512
  floriday_connections: {
1979
2513
  Row: {
1980
2514
  access_token: string | null;
@@ -2494,6 +3028,102 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
2494
3028
  };
2495
3029
  Relationships: [];
2496
3030
  };
3031
+ invoice_run_items: {
3032
+ Row: {
3033
+ booking_id: string | null;
3034
+ company_name: string | null;
3035
+ created_at: string;
3036
+ customer_email: string | null;
3037
+ description: string | null;
3038
+ exact_article_id: string | null;
3039
+ id: string;
3040
+ invoice_run_id: string | null;
3041
+ quantity: number | null;
3042
+ total_excl_vat: number | null;
3043
+ total_incl_vat: number | null;
3044
+ unit_price: number | null;
3045
+ vat_amount: number | null;
3046
+ };
3047
+ Insert: {
3048
+ booking_id?: string | null;
3049
+ company_name?: string | null;
3050
+ created_at?: string;
3051
+ customer_email?: string | null;
3052
+ description?: string | null;
3053
+ exact_article_id?: string | null;
3054
+ id?: string;
3055
+ invoice_run_id?: string | null;
3056
+ quantity?: number | null;
3057
+ total_excl_vat?: number | null;
3058
+ total_incl_vat?: number | null;
3059
+ unit_price?: number | null;
3060
+ vat_amount?: number | null;
3061
+ };
3062
+ Update: {
3063
+ booking_id?: string | null;
3064
+ company_name?: string | null;
3065
+ created_at?: string;
3066
+ customer_email?: string | null;
3067
+ description?: string | null;
3068
+ exact_article_id?: string | null;
3069
+ id?: string;
3070
+ invoice_run_id?: string | null;
3071
+ quantity?: number | null;
3072
+ total_excl_vat?: number | null;
3073
+ total_incl_vat?: number | null;
3074
+ unit_price?: number | null;
3075
+ vat_amount?: number | null;
3076
+ };
3077
+ Relationships: [{
3078
+ foreignKeyName: "invoice_run_items_booking_id_fkey";
3079
+ columns: ["booking_id"];
3080
+ isOneToOne: false;
3081
+ referencedRelation: "bookings";
3082
+ referencedColumns: ["id"];
3083
+ }, {
3084
+ foreignKeyName: "invoice_run_items_invoice_run_id_fkey";
3085
+ columns: ["invoice_run_id"];
3086
+ isOneToOne: false;
3087
+ referencedRelation: "invoice_runs";
3088
+ referencedColumns: ["id"];
3089
+ }];
3090
+ };
3091
+ invoice_runs: {
3092
+ Row: {
3093
+ created_at: string;
3094
+ created_by: string | null;
3095
+ id: string;
3096
+ period_end: string;
3097
+ period_start: string;
3098
+ status: string;
3099
+ total_excl_vat: number | null;
3100
+ total_incl_vat: number | null;
3101
+ vat_amount: number | null;
3102
+ };
3103
+ Insert: {
3104
+ created_at?: string;
3105
+ created_by?: string | null;
3106
+ id?: string;
3107
+ period_end: string;
3108
+ period_start: string;
3109
+ status?: string;
3110
+ total_excl_vat?: number | null;
3111
+ total_incl_vat?: number | null;
3112
+ vat_amount?: number | null;
3113
+ };
3114
+ Update: {
3115
+ created_at?: string;
3116
+ created_by?: string | null;
3117
+ id?: string;
3118
+ period_end?: string;
3119
+ period_start?: string;
3120
+ status?: string;
3121
+ total_excl_vat?: number | null;
3122
+ total_incl_vat?: number | null;
3123
+ vat_amount?: number | null;
3124
+ };
3125
+ Relationships: [];
3126
+ };
2497
3127
  locations: {
2498
3128
  Row: {
2499
3129
  created_at: string;
@@ -2524,6 +3154,7 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
2524
3154
  body_text: string | null;
2525
3155
  created_at: string;
2526
3156
  error_message: string | null;
3157
+ external_id: string | null;
2527
3158
  from_email: string | null;
2528
3159
  from_name: string | null;
2529
3160
  id: string;
@@ -2533,7 +3164,7 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
2533
3164
  received_at: string | null;
2534
3165
  status: string;
2535
3166
  subject: string | null;
2536
- uid: number;
3167
+ uid: number | null;
2537
3168
  updated_at: string;
2538
3169
  };
2539
3170
  Insert: {
@@ -2541,6 +3172,7 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
2541
3172
  body_text?: string | null;
2542
3173
  created_at?: string;
2543
3174
  error_message?: string | null;
3175
+ external_id?: string | null;
2544
3176
  from_email?: string | null;
2545
3177
  from_name?: string | null;
2546
3178
  id?: string;
@@ -2550,7 +3182,7 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
2550
3182
  received_at?: string | null;
2551
3183
  status?: string;
2552
3184
  subject?: string | null;
2553
- uid: number;
3185
+ uid?: number | null;
2554
3186
  updated_at?: string;
2555
3187
  };
2556
3188
  Update: {
@@ -2558,6 +3190,7 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
2558
3190
  body_text?: string | null;
2559
3191
  created_at?: string;
2560
3192
  error_message?: string | null;
3193
+ external_id?: string | null;
2561
3194
  from_email?: string | null;
2562
3195
  from_name?: string | null;
2563
3196
  id?: string;
@@ -2567,7 +3200,7 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
2567
3200
  received_at?: string | null;
2568
3201
  status?: string;
2569
3202
  subject?: string | null;
2570
- uid?: number;
3203
+ uid?: number | null;
2571
3204
  updated_at?: string;
2572
3205
  };
2573
3206
  Relationships: [{
@@ -2839,6 +3472,60 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
2839
3472
  };
2840
3473
  Relationships: [];
2841
3474
  };
3475
+ monteurs: {
3476
+ Row: {
3477
+ avatar_url: string | null;
3478
+ color: string | null;
3479
+ created_at: string;
3480
+ email: string | null;
3481
+ id: string;
3482
+ is_active: boolean;
3483
+ leave_balance_hours: number;
3484
+ name: string;
3485
+ persnr: number | null;
3486
+ phone: string | null;
3487
+ role: string;
3488
+ tenant_id: string;
3489
+ updated_at: string;
3490
+ };
3491
+ Insert: {
3492
+ avatar_url?: string | null;
3493
+ color?: string | null;
3494
+ created_at?: string;
3495
+ email?: string | null;
3496
+ id?: string;
3497
+ is_active?: boolean;
3498
+ leave_balance_hours?: number;
3499
+ name: string;
3500
+ persnr?: number | null;
3501
+ phone?: string | null;
3502
+ role?: string;
3503
+ tenant_id: string;
3504
+ updated_at?: string;
3505
+ };
3506
+ Update: {
3507
+ avatar_url?: string | null;
3508
+ color?: string | null;
3509
+ created_at?: string;
3510
+ email?: string | null;
3511
+ id?: string;
3512
+ is_active?: boolean;
3513
+ leave_balance_hours?: number;
3514
+ name?: string;
3515
+ persnr?: number | null;
3516
+ phone?: string | null;
3517
+ role?: string;
3518
+ tenant_id?: string;
3519
+ updated_at?: string;
3520
+ };
3521
+ Relationships: [{
3522
+ foreignKeyName: "monteurs_tenant_id_fkey";
3523
+ columns: ["tenant_id"];
3524
+ isOneToOne: false;
3525
+ referencedRelation: "tenants";
3526
+ referencedColumns: ["id"];
3527
+ }];
3528
+ };
2842
3529
  notifications: {
2843
3530
  Row: {
2844
3531
  created_at: string;
@@ -3671,6 +4358,7 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
3671
4358
  email: string | null;
3672
4359
  id: string;
3673
4360
  notification_preferences: import("../integrations/supabase/types").Json;
4361
+ tenant_id: string | null;
3674
4362
  updated_at: string;
3675
4363
  };
3676
4364
  Insert: {
@@ -3679,6 +4367,7 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
3679
4367
  email?: string | null;
3680
4368
  id: string;
3681
4369
  notification_preferences?: import("../integrations/supabase/types").Json;
4370
+ tenant_id?: string | null;
3682
4371
  updated_at?: string;
3683
4372
  };
3684
4373
  Update: {
@@ -3687,9 +4376,16 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
3687
4376
  email?: string | null;
3688
4377
  id?: string;
3689
4378
  notification_preferences?: import("../integrations/supabase/types").Json;
4379
+ tenant_id?: string | null;
3690
4380
  updated_at?: string;
3691
4381
  };
3692
- Relationships: [];
4382
+ Relationships: [{
4383
+ foreignKeyName: "profiles_tenant_id_fkey";
4384
+ columns: ["tenant_id"];
4385
+ isOneToOne: false;
4386
+ referencedRelation: "tenants";
4387
+ referencedColumns: ["id"];
4388
+ }];
3693
4389
  };
3694
4390
  projects: {
3695
4391
  Row: {
@@ -4393,45 +5089,120 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
4393
5089
  referencedColumns: ["id"];
4394
5090
  }];
4395
5091
  };
4396
- supplier_products: {
5092
+ reception_notifications: {
4397
5093
  Row: {
4398
- article_number: string | null;
5094
+ booking_id: string | null;
4399
5095
  created_at: string;
4400
5096
  id: string;
4401
- name: string;
4402
- notes: string | null;
4403
- pot_size: string | null;
4404
- price: number | null;
4405
- quantity: number | null;
4406
- supplier_id: string;
4407
- unit: string;
4408
- updated_at: string;
5097
+ is_read: boolean;
5098
+ message: string;
5099
+ recipient_email: string | null;
5100
+ title: string;
5101
+ type: string;
4409
5102
  };
4410
5103
  Insert: {
4411
- article_number?: string | null;
5104
+ booking_id?: string | null;
4412
5105
  created_at?: string;
4413
5106
  id?: string;
4414
- name: string;
4415
- notes?: string | null;
4416
- pot_size?: string | null;
4417
- price?: number | null;
4418
- quantity?: number | null;
4419
- supplier_id: string;
4420
- unit?: string;
4421
- updated_at?: string;
5107
+ is_read?: boolean;
5108
+ message: string;
5109
+ recipient_email?: string | null;
5110
+ title: string;
5111
+ type: string;
4422
5112
  };
4423
5113
  Update: {
4424
- article_number?: string | null;
5114
+ booking_id?: string | null;
4425
5115
  created_at?: string;
4426
5116
  id?: string;
4427
- name?: string;
4428
- notes?: string | null;
4429
- pot_size?: string | null;
4430
- price?: number | null;
4431
- quantity?: number | null;
4432
- supplier_id?: string;
4433
- unit?: string;
4434
- updated_at?: string;
5117
+ is_read?: boolean;
5118
+ message?: string;
5119
+ recipient_email?: string | null;
5120
+ title?: string;
5121
+ type?: string;
5122
+ };
5123
+ Relationships: [{
5124
+ foreignKeyName: "reception_notifications_booking_id_fkey";
5125
+ columns: ["booking_id"];
5126
+ isOneToOne: false;
5127
+ referencedRelation: "bookings";
5128
+ referencedColumns: ["id"];
5129
+ }];
5130
+ };
5131
+ rooms: {
5132
+ Row: {
5133
+ capacity: number;
5134
+ color_code: string | null;
5135
+ created_at: string;
5136
+ description: string | null;
5137
+ hourly_rate: number;
5138
+ id: string;
5139
+ image_url: string | null;
5140
+ is_active: boolean;
5141
+ name: string;
5142
+ };
5143
+ Insert: {
5144
+ capacity?: number;
5145
+ color_code?: string | null;
5146
+ created_at?: string;
5147
+ description?: string | null;
5148
+ hourly_rate?: number;
5149
+ id?: string;
5150
+ image_url?: string | null;
5151
+ is_active?: boolean;
5152
+ name: string;
5153
+ };
5154
+ Update: {
5155
+ capacity?: number;
5156
+ color_code?: string | null;
5157
+ created_at?: string;
5158
+ description?: string | null;
5159
+ hourly_rate?: number;
5160
+ id?: string;
5161
+ image_url?: string | null;
5162
+ is_active?: boolean;
5163
+ name?: string;
5164
+ };
5165
+ Relationships: [];
5166
+ };
5167
+ supplier_products: {
5168
+ Row: {
5169
+ article_number: string | null;
5170
+ created_at: string;
5171
+ id: string;
5172
+ name: string;
5173
+ notes: string | null;
5174
+ pot_size: string | null;
5175
+ price: number | null;
5176
+ quantity: number | null;
5177
+ supplier_id: string;
5178
+ unit: string;
5179
+ updated_at: string;
5180
+ };
5181
+ Insert: {
5182
+ article_number?: string | null;
5183
+ created_at?: string;
5184
+ id?: string;
5185
+ name: string;
5186
+ notes?: string | null;
5187
+ pot_size?: string | null;
5188
+ price?: number | null;
5189
+ quantity?: number | null;
5190
+ supplier_id: string;
5191
+ unit?: string;
5192
+ updated_at?: string;
5193
+ };
5194
+ Update: {
5195
+ article_number?: string | null;
5196
+ created_at?: string;
5197
+ id?: string;
5198
+ name?: string;
5199
+ notes?: string | null;
5200
+ pot_size?: string | null;
5201
+ price?: number | null;
5202
+ quantity?: number | null;
5203
+ supplier_id?: string;
5204
+ unit?: string;
5205
+ updated_at?: string;
4435
5206
  };
4436
5207
  Relationships: [{
4437
5208
  foreignKeyName: "supplier_products_supplier_id_fkey";
@@ -4486,6 +5257,30 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
4486
5257
  };
4487
5258
  Relationships: [];
4488
5259
  };
5260
+ tenants: {
5261
+ Row: {
5262
+ created_at: string;
5263
+ id: string;
5264
+ name: string;
5265
+ slug: string | null;
5266
+ updated_at: string;
5267
+ };
5268
+ Insert: {
5269
+ created_at?: string;
5270
+ id?: string;
5271
+ name?: string;
5272
+ slug?: string | null;
5273
+ updated_at?: string;
5274
+ };
5275
+ Update: {
5276
+ created_at?: string;
5277
+ id?: string;
5278
+ name?: string;
5279
+ slug?: string | null;
5280
+ updated_at?: string;
5281
+ };
5282
+ Relationships: [];
5283
+ };
4489
5284
  trade_item_drafts: {
4490
5285
  Row: {
4491
5286
  connection_id: string | null;
@@ -4513,6 +5308,69 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
4513
5308
  };
4514
5309
  Relationships: [];
4515
5310
  };
5311
+ twinfield_connections: {
5312
+ Row: {
5313
+ access_token: string | null;
5314
+ client_id: string;
5315
+ client_secret: string | null;
5316
+ cluster_uri: string | null;
5317
+ company_code: string | null;
5318
+ company_name: string | null;
5319
+ connected_at: string | null;
5320
+ created_at: string;
5321
+ environment: string;
5322
+ id: string;
5323
+ is_active: boolean;
5324
+ label: string | null;
5325
+ office_code: string | null;
5326
+ redirect_uri: string;
5327
+ refresh_token: string | null;
5328
+ token_expires_at: string | null;
5329
+ updated_at: string;
5330
+ user_id: string;
5331
+ };
5332
+ Insert: {
5333
+ access_token?: string | null;
5334
+ client_id: string;
5335
+ client_secret?: string | null;
5336
+ cluster_uri?: string | null;
5337
+ company_code?: string | null;
5338
+ company_name?: string | null;
5339
+ connected_at?: string | null;
5340
+ created_at?: string;
5341
+ environment: string;
5342
+ id?: string;
5343
+ is_active?: boolean;
5344
+ label?: string | null;
5345
+ office_code?: string | null;
5346
+ redirect_uri: string;
5347
+ refresh_token?: string | null;
5348
+ token_expires_at?: string | null;
5349
+ updated_at?: string;
5350
+ user_id: string;
5351
+ };
5352
+ Update: {
5353
+ access_token?: string | null;
5354
+ client_id?: string;
5355
+ client_secret?: string | null;
5356
+ cluster_uri?: string | null;
5357
+ company_code?: string | null;
5358
+ company_name?: string | null;
5359
+ connected_at?: string | null;
5360
+ created_at?: string;
5361
+ environment?: string;
5362
+ id?: string;
5363
+ is_active?: boolean;
5364
+ label?: string | null;
5365
+ office_code?: string | null;
5366
+ redirect_uri?: string;
5367
+ refresh_token?: string | null;
5368
+ token_expires_at?: string | null;
5369
+ updated_at?: string;
5370
+ user_id?: string;
5371
+ };
5372
+ Relationships: [];
5373
+ };
4516
5374
  twinfield_credentials: {
4517
5375
  Row: {
4518
5376
  administration_code: string | null;
@@ -4615,6 +5473,48 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
4615
5473
  };
4616
5474
  Relationships: [];
4617
5475
  };
5476
+ twinfield_customers_cache: {
5477
+ Row: {
5478
+ connection_id: string;
5479
+ country: string | null;
5480
+ data: import("../integrations/supabase/types").Json;
5481
+ email: string | null;
5482
+ fetched_at: string;
5483
+ modified_at: string | null;
5484
+ name: string | null;
5485
+ twinfield_code: string;
5486
+ vat_number: string | null;
5487
+ };
5488
+ Insert: {
5489
+ connection_id: string;
5490
+ country?: string | null;
5491
+ data?: import("../integrations/supabase/types").Json;
5492
+ email?: string | null;
5493
+ fetched_at?: string;
5494
+ modified_at?: string | null;
5495
+ name?: string | null;
5496
+ twinfield_code: string;
5497
+ vat_number?: string | null;
5498
+ };
5499
+ Update: {
5500
+ connection_id?: string;
5501
+ country?: string | null;
5502
+ data?: import("../integrations/supabase/types").Json;
5503
+ email?: string | null;
5504
+ fetched_at?: string;
5505
+ modified_at?: string | null;
5506
+ name?: string | null;
5507
+ twinfield_code?: string;
5508
+ vat_number?: string | null;
5509
+ };
5510
+ Relationships: [{
5511
+ foreignKeyName: "twinfield_customers_cache_connection_id_fkey";
5512
+ columns: ["connection_id"];
5513
+ isOneToOne: false;
5514
+ referencedRelation: "twinfield_connections";
5515
+ referencedColumns: ["id"];
5516
+ }];
5517
+ };
4618
5518
  twinfield_invoice_lines: {
4619
5519
  Row: {
4620
5520
  article_code: string | null;
@@ -4669,6 +5569,51 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
4669
5569
  referencedColumns: ["id"];
4670
5570
  }];
4671
5571
  };
5572
+ twinfield_invoice_lines_cache_v2: {
5573
+ Row: {
5574
+ article_code: string | null;
5575
+ connection_id: string;
5576
+ data: import("../integrations/supabase/types").Json;
5577
+ description: string | null;
5578
+ fetched_at: string;
5579
+ invoice_number: string;
5580
+ line_number: number;
5581
+ quantity: number | null;
5582
+ unit_price: number | null;
5583
+ vat_code: string | null;
5584
+ };
5585
+ Insert: {
5586
+ article_code?: string | null;
5587
+ connection_id: string;
5588
+ data?: import("../integrations/supabase/types").Json;
5589
+ description?: string | null;
5590
+ fetched_at?: string;
5591
+ invoice_number: string;
5592
+ line_number: number;
5593
+ quantity?: number | null;
5594
+ unit_price?: number | null;
5595
+ vat_code?: string | null;
5596
+ };
5597
+ Update: {
5598
+ article_code?: string | null;
5599
+ connection_id?: string;
5600
+ data?: import("../integrations/supabase/types").Json;
5601
+ description?: string | null;
5602
+ fetched_at?: string;
5603
+ invoice_number?: string;
5604
+ line_number?: number;
5605
+ quantity?: number | null;
5606
+ unit_price?: number | null;
5607
+ vat_code?: string | null;
5608
+ };
5609
+ Relationships: [{
5610
+ foreignKeyName: "twinfield_invoice_lines_cache_v2_connection_id_fkey";
5611
+ columns: ["connection_id"];
5612
+ isOneToOne: false;
5613
+ referencedRelation: "twinfield_connections";
5614
+ referencedColumns: ["id"];
5615
+ }];
5616
+ };
4672
5617
  twinfield_invoice_settings: {
4673
5618
  Row: {
4674
5619
  created_at: string;
@@ -4825,39 +5770,360 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
4825
5770
  };
4826
5771
  Relationships: [];
4827
5772
  };
4828
- user_roles: {
5773
+ twinfield_invoices_cache_v2: {
4829
5774
  Row: {
4830
- created_at: string;
4831
- id: string;
4832
- role: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
4833
- user_id: string;
5775
+ connection_id: string;
5776
+ currency: string | null;
5777
+ customer_code: string | null;
5778
+ data: import("../integrations/supabase/types").Json;
5779
+ due_date: string | null;
5780
+ fetched_at: string;
5781
+ invoice_date: string | null;
5782
+ invoice_number: string;
5783
+ modified_at: string | null;
5784
+ status: string | null;
5785
+ total_excl: number | null;
5786
+ total_incl: number | null;
4834
5787
  };
4835
5788
  Insert: {
4836
- created_at?: string;
4837
- id?: string;
4838
- role: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
4839
- user_id: string;
5789
+ connection_id: string;
5790
+ currency?: string | null;
5791
+ customer_code?: string | null;
5792
+ data?: import("../integrations/supabase/types").Json;
5793
+ due_date?: string | null;
5794
+ fetched_at?: string;
5795
+ invoice_date?: string | null;
5796
+ invoice_number: string;
5797
+ modified_at?: string | null;
5798
+ status?: string | null;
5799
+ total_excl?: number | null;
5800
+ total_incl?: number | null;
4840
5801
  };
4841
5802
  Update: {
4842
- created_at?: string;
4843
- id?: string;
4844
- role?: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
4845
- user_id?: string;
5803
+ connection_id?: string;
5804
+ currency?: string | null;
5805
+ customer_code?: string | null;
5806
+ data?: import("../integrations/supabase/types").Json;
5807
+ due_date?: string | null;
5808
+ fetched_at?: string;
5809
+ invoice_date?: string | null;
5810
+ invoice_number?: string;
5811
+ modified_at?: string | null;
5812
+ status?: string | null;
5813
+ total_excl?: number | null;
5814
+ total_incl?: number | null;
4846
5815
  };
4847
5816
  Relationships: [{
4848
- foreignKeyName: "user_roles_user_id_fkey";
4849
- columns: ["user_id"];
5817
+ foreignKeyName: "twinfield_invoices_cache_v2_connection_id_fkey";
5818
+ columns: ["connection_id"];
4850
5819
  isOneToOne: false;
4851
- referencedRelation: "profiles";
5820
+ referencedRelation: "twinfield_connections";
4852
5821
  referencedColumns: ["id"];
4853
5822
  }];
4854
5823
  };
4855
- };
4856
- Views: {
4857
- email_auth_connections_safe: {
5824
+ twinfield_oauth_state: {
4858
5825
  Row: {
4859
- account_email: string | null;
4860
- created_at: string | null;
5826
+ created_at: string;
5827
+ environment: string;
5828
+ nonce: string | null;
5829
+ state: string;
5830
+ user_id: string;
5831
+ };
5832
+ Insert: {
5833
+ created_at?: string;
5834
+ environment: string;
5835
+ nonce?: string | null;
5836
+ state: string;
5837
+ user_id: string;
5838
+ };
5839
+ Update: {
5840
+ created_at?: string;
5841
+ environment?: string;
5842
+ nonce?: string | null;
5843
+ state?: string;
5844
+ user_id?: string;
5845
+ };
5846
+ Relationships: [];
5847
+ };
5848
+ twinfield_settings: {
5849
+ Row: {
5850
+ active_environment: string;
5851
+ id: number;
5852
+ updated_at: string;
5853
+ };
5854
+ Insert: {
5855
+ active_environment?: string;
5856
+ id?: number;
5857
+ updated_at?: string;
5858
+ };
5859
+ Update: {
5860
+ active_environment?: string;
5861
+ id?: number;
5862
+ updated_at?: string;
5863
+ };
5864
+ Relationships: [];
5865
+ };
5866
+ twinfield_sync_state: {
5867
+ Row: {
5868
+ connection_id: string;
5869
+ entity_type: string;
5870
+ last_error: string | null;
5871
+ last_modified_since: string;
5872
+ last_synced_at: string | null;
5873
+ updated_at: string;
5874
+ };
5875
+ Insert: {
5876
+ connection_id: string;
5877
+ entity_type: string;
5878
+ last_error?: string | null;
5879
+ last_modified_since?: string;
5880
+ last_synced_at?: string | null;
5881
+ updated_at?: string;
5882
+ };
5883
+ Update: {
5884
+ connection_id?: string;
5885
+ entity_type?: string;
5886
+ last_error?: string | null;
5887
+ last_modified_since?: string;
5888
+ last_synced_at?: string | null;
5889
+ updated_at?: string;
5890
+ };
5891
+ Relationships: [{
5892
+ foreignKeyName: "twinfield_sync_state_connection_id_fkey";
5893
+ columns: ["connection_id"];
5894
+ isOneToOne: false;
5895
+ referencedRelation: "twinfield_connections";
5896
+ referencedColumns: ["id"];
5897
+ }];
5898
+ };
5899
+ twinfield_token_refresh_log: {
5900
+ Row: {
5901
+ attempted_at: string;
5902
+ connection_id: string;
5903
+ error: string | null;
5904
+ expires_at: string | null;
5905
+ id: string;
5906
+ ok: boolean;
5907
+ };
5908
+ Insert: {
5909
+ attempted_at?: string;
5910
+ connection_id: string;
5911
+ error?: string | null;
5912
+ expires_at?: string | null;
5913
+ id?: string;
5914
+ ok: boolean;
5915
+ };
5916
+ Update: {
5917
+ attempted_at?: string;
5918
+ connection_id?: string;
5919
+ error?: string | null;
5920
+ expires_at?: string | null;
5921
+ id?: string;
5922
+ ok?: boolean;
5923
+ };
5924
+ Relationships: [{
5925
+ foreignKeyName: "twinfield_token_refresh_log_connection_id_fkey";
5926
+ columns: ["connection_id"];
5927
+ isOneToOne: false;
5928
+ referencedRelation: "twinfield_connections";
5929
+ referencedColumns: ["id"];
5930
+ }];
5931
+ };
5932
+ user_roles: {
5933
+ Row: {
5934
+ created_at: string;
5935
+ id: string;
5936
+ role: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
5937
+ user_id: string;
5938
+ };
5939
+ Insert: {
5940
+ created_at?: string;
5941
+ id?: string;
5942
+ role: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
5943
+ user_id: string;
5944
+ };
5945
+ Update: {
5946
+ created_at?: string;
5947
+ id?: string;
5948
+ role?: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
5949
+ user_id?: string;
5950
+ };
5951
+ Relationships: [{
5952
+ foreignKeyName: "user_roles_user_id_fkey";
5953
+ columns: ["user_id"];
5954
+ isOneToOne: false;
5955
+ referencedRelation: "profiles";
5956
+ referencedColumns: ["id"];
5957
+ }];
5958
+ };
5959
+ work_order_monteurs: {
5960
+ Row: {
5961
+ created_at: string;
5962
+ id: string;
5963
+ monteur_id: string;
5964
+ work_order_id: string;
5965
+ };
5966
+ Insert: {
5967
+ created_at?: string;
5968
+ id?: string;
5969
+ monteur_id: string;
5970
+ work_order_id: string;
5971
+ };
5972
+ Update: {
5973
+ created_at?: string;
5974
+ id?: string;
5975
+ monteur_id?: string;
5976
+ work_order_id?: string;
5977
+ };
5978
+ Relationships: [{
5979
+ foreignKeyName: "work_order_monteurs_monteur_id_fkey";
5980
+ columns: ["monteur_id"];
5981
+ isOneToOne: false;
5982
+ referencedRelation: "monteurs";
5983
+ referencedColumns: ["id"];
5984
+ }, {
5985
+ foreignKeyName: "work_order_monteurs_work_order_id_fkey";
5986
+ columns: ["work_order_id"];
5987
+ isOneToOne: false;
5988
+ referencedRelation: "work_orders";
5989
+ referencedColumns: ["id"];
5990
+ }];
5991
+ };
5992
+ work_orders: {
5993
+ Row: {
5994
+ assigned_to: string | null;
5995
+ city: string | null;
5996
+ contact_person: string | null;
5997
+ created_at: string;
5998
+ custom_fields: import("../integrations/supabase/types").Json;
5999
+ customer_name: string;
6000
+ description: string;
6001
+ email: string | null;
6002
+ email_source: string | null;
6003
+ estimated_duration_hours: number | null;
6004
+ external_reference: string | null;
6005
+ follow_up_needed: boolean;
6006
+ id: string;
6007
+ mandate: string;
6008
+ mandate_budget: number;
6009
+ mandate_used: number;
6010
+ order_number: string;
6011
+ parent_work_order_id: string | null;
6012
+ pdf_url: string | null;
6013
+ phone: string | null;
6014
+ postal_code: string;
6015
+ priority: string;
6016
+ project_number: string | null;
6017
+ report_validated: boolean;
6018
+ room_number: string;
6019
+ scheduled_date: string | null;
6020
+ scheduled_end_time: string | null;
6021
+ scheduled_start_time: string | null;
6022
+ status: string;
6023
+ tenant_id: string;
6024
+ total_hours_worked: number | null;
6025
+ total_price: number | null;
6026
+ travel_time_minutes: number | null;
6027
+ updated_at: string;
6028
+ work_address: string;
6029
+ work_report: string | null;
6030
+ };
6031
+ Insert: {
6032
+ assigned_to?: string | null;
6033
+ city?: string | null;
6034
+ contact_person?: string | null;
6035
+ created_at?: string;
6036
+ custom_fields?: import("../integrations/supabase/types").Json;
6037
+ customer_name?: string;
6038
+ description?: string;
6039
+ email?: string | null;
6040
+ email_source?: string | null;
6041
+ estimated_duration_hours?: number | null;
6042
+ external_reference?: string | null;
6043
+ follow_up_needed?: boolean;
6044
+ id?: string;
6045
+ mandate?: string;
6046
+ mandate_budget?: number;
6047
+ mandate_used?: number;
6048
+ order_number?: string;
6049
+ parent_work_order_id?: string | null;
6050
+ pdf_url?: string | null;
6051
+ phone?: string | null;
6052
+ postal_code?: string;
6053
+ priority?: string;
6054
+ project_number?: string | null;
6055
+ report_validated?: boolean;
6056
+ room_number?: string;
6057
+ scheduled_date?: string | null;
6058
+ scheduled_end_time?: string | null;
6059
+ scheduled_start_time?: string | null;
6060
+ status?: string;
6061
+ tenant_id: string;
6062
+ total_hours_worked?: number | null;
6063
+ total_price?: number | null;
6064
+ travel_time_minutes?: number | null;
6065
+ updated_at?: string;
6066
+ work_address?: string;
6067
+ work_report?: string | null;
6068
+ };
6069
+ Update: {
6070
+ assigned_to?: string | null;
6071
+ city?: string | null;
6072
+ contact_person?: string | null;
6073
+ created_at?: string;
6074
+ custom_fields?: import("../integrations/supabase/types").Json;
6075
+ customer_name?: string;
6076
+ description?: string;
6077
+ email?: string | null;
6078
+ email_source?: string | null;
6079
+ estimated_duration_hours?: number | null;
6080
+ external_reference?: string | null;
6081
+ follow_up_needed?: boolean;
6082
+ id?: string;
6083
+ mandate?: string;
6084
+ mandate_budget?: number;
6085
+ mandate_used?: number;
6086
+ order_number?: string;
6087
+ parent_work_order_id?: string | null;
6088
+ pdf_url?: string | null;
6089
+ phone?: string | null;
6090
+ postal_code?: string;
6091
+ priority?: string;
6092
+ project_number?: string | null;
6093
+ report_validated?: boolean;
6094
+ room_number?: string;
6095
+ scheduled_date?: string | null;
6096
+ scheduled_end_time?: string | null;
6097
+ scheduled_start_time?: string | null;
6098
+ status?: string;
6099
+ tenant_id?: string;
6100
+ total_hours_worked?: number | null;
6101
+ total_price?: number | null;
6102
+ travel_time_minutes?: number | null;
6103
+ updated_at?: string;
6104
+ work_address?: string;
6105
+ work_report?: string | null;
6106
+ };
6107
+ Relationships: [{
6108
+ foreignKeyName: "work_orders_parent_work_order_id_fkey";
6109
+ columns: ["parent_work_order_id"];
6110
+ isOneToOne: false;
6111
+ referencedRelation: "work_orders";
6112
+ referencedColumns: ["id"];
6113
+ }, {
6114
+ foreignKeyName: "work_orders_tenant_id_fkey";
6115
+ columns: ["tenant_id"];
6116
+ isOneToOne: false;
6117
+ referencedRelation: "tenants";
6118
+ referencedColumns: ["id"];
6119
+ }];
6120
+ };
6121
+ };
6122
+ Views: {
6123
+ email_auth_connections_safe: {
6124
+ Row: {
6125
+ account_email: string | null;
6126
+ created_at: string | null;
4861
6127
  created_by: string | null;
4862
6128
  display_name: string | null;
4863
6129
  has_access_token: boolean | null;
@@ -4876,6 +6142,7 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
4876
6142
  last_verified_at: string | null;
4877
6143
  oauth_mode: string | null;
4878
6144
  provider: string | null;
6145
+ purpose_assignments: import("../integrations/supabase/types").Json | null;
4879
6146
  scopes: string[] | null;
4880
6147
  smtp_host: string | null;
4881
6148
  smtp_port: number | null;
@@ -4906,6 +6173,7 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
4906
6173
  last_verified_at?: string | null;
4907
6174
  oauth_mode?: string | null;
4908
6175
  provider?: string | null;
6176
+ purpose_assignments?: import("../integrations/supabase/types").Json | null;
4909
6177
  scopes?: string[] | null;
4910
6178
  smtp_host?: string | null;
4911
6179
  smtp_port?: number | null;
@@ -4936,6 +6204,7 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
4936
6204
  last_verified_at?: string | null;
4937
6205
  oauth_mode?: string | null;
4938
6206
  provider?: string | null;
6207
+ purpose_assignments?: import("../integrations/supabase/types").Json | null;
4939
6208
  scopes?: string[] | null;
4940
6209
  smtp_host?: string | null;
4941
6210
  smtp_port?: number | null;
@@ -4947,6 +6216,123 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
4947
6216
  };
4948
6217
  Relationships: [];
4949
6218
  };
6219
+ external_customers_grouped: {
6220
+ Row: {
6221
+ city: string | null;
6222
+ commercial_name: string | null;
6223
+ contact_person: string | null;
6224
+ country: string | null;
6225
+ display_name: string | null;
6226
+ email: string | null;
6227
+ fetched_at: string | null;
6228
+ gln: string | null;
6229
+ group_key: string | null;
6230
+ is_active: boolean | null;
6231
+ is_merged: boolean | null;
6232
+ logo_url: string | null;
6233
+ match_key: string | null;
6234
+ phone: string | null;
6235
+ providers: string[] | null;
6236
+ source_count: number | null;
6237
+ sources: import("../integrations/supabase/types").Json | null;
6238
+ vat_number: string | null;
6239
+ website: string | null;
6240
+ };
6241
+ Relationships: [];
6242
+ };
6243
+ external_customers_unified: {
6244
+ Row: {
6245
+ city: string | null;
6246
+ commercial_name: string | null;
6247
+ company_name: string | null;
6248
+ connection_id: string | null;
6249
+ contact_person: string | null;
6250
+ country: string | null;
6251
+ email: string | null;
6252
+ external_id: string | null;
6253
+ fetched_at: string | null;
6254
+ gln: string | null;
6255
+ house_number: string | null;
6256
+ is_active: boolean | null;
6257
+ is_deleted: boolean | null;
6258
+ logo_url: string | null;
6259
+ phone: string | null;
6260
+ postal_code: string | null;
6261
+ provider: string | null;
6262
+ raw: import("../integrations/supabase/types").Json | null;
6263
+ status: string | null;
6264
+ street: string | null;
6265
+ vat_number: string | null;
6266
+ website: string | null;
6267
+ };
6268
+ Relationships: [];
6269
+ };
6270
+ v_external_customers_floriday: {
6271
+ Row: {
6272
+ city: string | null;
6273
+ commercial_name: string | null;
6274
+ company_name: string | null;
6275
+ connection_id: string | null;
6276
+ contact_person: string | null;
6277
+ country: string | null;
6278
+ email: string | null;
6279
+ external_id: string | null;
6280
+ fetched_at: string | null;
6281
+ gln: string | null;
6282
+ house_number: string | null;
6283
+ is_active: boolean | null;
6284
+ is_deleted: boolean | null;
6285
+ logo_url: string | null;
6286
+ phone: string | null;
6287
+ postal_code: string | null;
6288
+ provider: string | null;
6289
+ raw: import("../integrations/supabase/types").Json | null;
6290
+ status: string | null;
6291
+ street: string | null;
6292
+ vat_number: string | null;
6293
+ website: string | null;
6294
+ };
6295
+ Relationships: [{
6296
+ foreignKeyName: "floriday_customers_cache_connection_id_fkey";
6297
+ columns: ["connection_id"];
6298
+ isOneToOne: false;
6299
+ referencedRelation: "floriday_connections";
6300
+ referencedColumns: ["id"];
6301
+ }];
6302
+ };
6303
+ v_external_customers_twinfield: {
6304
+ Row: {
6305
+ city: string | null;
6306
+ commercial_name: string | null;
6307
+ company_name: string | null;
6308
+ connection_id: string | null;
6309
+ contact_person: string | null;
6310
+ country: string | null;
6311
+ email: string | null;
6312
+ external_id: string | null;
6313
+ fetched_at: string | null;
6314
+ gln: string | null;
6315
+ house_number: string | null;
6316
+ is_active: boolean | null;
6317
+ is_deleted: boolean | null;
6318
+ logo_url: string | null;
6319
+ phone: string | null;
6320
+ postal_code: string | null;
6321
+ provider: string | null;
6322
+ raw: import("../integrations/supabase/types").Json | null;
6323
+ status: string | null;
6324
+ street: string | null;
6325
+ vat_number: string | null;
6326
+ website: string | null;
6327
+ };
6328
+ Relationships: [{
6329
+ foreignKeyName: "twinfield_customers_cache_connection_id_fkey";
6330
+ columns: ["connection_id"];
6331
+ isOneToOne: false;
6332
+ referencedRelation: "twinfield_connections";
6333
+ referencedColumns: ["id"];
6334
+ }];
6335
+ };
4950
6336
  };
4951
6337
  Functions: {
4952
6338
  dashboard_list_public_schema: {
@@ -4969,6 +6355,33 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
4969
6355
  };
4970
6356
  Returns: string;
4971
6357
  };
6358
+ email_auth_fetch_message: {
6359
+ Args: {
6360
+ _connection_id: string;
6361
+ _external_id: string;
6362
+ };
6363
+ Returns: import("../integrations/supabase/types").Json;
6364
+ };
6365
+ email_auth_for_purpose: {
6366
+ Args: {
6367
+ _direction: string;
6368
+ _purpose: string;
6369
+ };
6370
+ Returns: {
6371
+ account_email: string;
6372
+ display_name: string;
6373
+ id: string;
6374
+ last_error: string;
6375
+ last_verified_at: string;
6376
+ needs_reauth: boolean;
6377
+ provider: string;
6378
+ status: string;
6379
+ }[];
6380
+ };
6381
+ ensure_user_tenant: {
6382
+ Args: never;
6383
+ Returns: string;
6384
+ };
4972
6385
  exact_decrypt: {
4973
6386
  Args: {
4974
6387
  cipher: string;
@@ -5015,6 +6428,17 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
5015
6428
  preferred_warehouse_name: string;
5016
6429
  }[];
5017
6430
  };
6431
+ get_active_twinfield_public: {
6432
+ Args: never;
6433
+ Returns: {
6434
+ active_environment: string;
6435
+ company_code: string;
6436
+ company_name: string;
6437
+ connection_id: string;
6438
+ environment: string;
6439
+ office_code: string;
6440
+ }[];
6441
+ };
5018
6442
  get_floriday_cron_jobs: {
5019
6443
  Args: never;
5020
6444
  Returns: {
@@ -5030,6 +6454,37 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
5030
6454
  };
5031
6455
  Returns: import("../integrations/supabase/types").Json;
5032
6456
  };
6457
+ get_room_busy_windows: {
6458
+ Args: {
6459
+ p_from: string;
6460
+ p_to: string;
6461
+ };
6462
+ Returns: {
6463
+ end_time: string;
6464
+ room_id: string;
6465
+ start_time: string;
6466
+ status: string;
6467
+ }[];
6468
+ };
6469
+ get_twinfield_cron_jobs: {
6470
+ Args: never;
6471
+ Returns: {
6472
+ active: boolean;
6473
+ jobname: string;
6474
+ schedule: string;
6475
+ url: string;
6476
+ }[];
6477
+ };
6478
+ get_user_tenant_id: {
6479
+ Args: never;
6480
+ Returns: string;
6481
+ };
6482
+ get_work_order_tenant_id: {
6483
+ Args: {
6484
+ wo_id: string;
6485
+ };
6486
+ Returns: string;
6487
+ };
5033
6488
  has_role: {
5034
6489
  Args: {
5035
6490
  _role: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
@@ -5037,6 +6492,34 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
5037
6492
  };
5038
6493
  Returns: boolean;
5039
6494
  };
6495
+ is_authenticated: {
6496
+ Args: never;
6497
+ Returns: boolean;
6498
+ };
6499
+ is_developer: {
6500
+ Args: never;
6501
+ Returns: boolean;
6502
+ };
6503
+ next_work_order_number: {
6504
+ Args: {
6505
+ p_parent_work_order_id?: string;
6506
+ p_tenant_id: string;
6507
+ };
6508
+ Returns: string;
6509
+ };
6510
+ normalize_vat: {
6511
+ Args: {
6512
+ v: string;
6513
+ };
6514
+ Returns: string;
6515
+ };
6516
+ schedule_floriday_carriers_sync: {
6517
+ Args: {
6518
+ p_apikey: string;
6519
+ p_url: string;
6520
+ };
6521
+ Returns: number;
6522
+ };
5040
6523
  schedule_floriday_connections_sync: {
5041
6524
  Args: {
5042
6525
  p_apikey: string;
@@ -5079,6 +6562,48 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
5079
6562
  };
5080
6563
  Returns: number;
5081
6564
  };
6565
+ schedule_twinfield_customers_sync: {
6566
+ Args: {
6567
+ p_apikey: string;
6568
+ p_url: string;
6569
+ };
6570
+ Returns: number;
6571
+ } | {
6572
+ Args: {
6573
+ p_apikey: string;
6574
+ p_cron_secret?: string;
6575
+ p_url: string;
6576
+ };
6577
+ Returns: number;
6578
+ };
6579
+ schedule_twinfield_invoices_sync: {
6580
+ Args: {
6581
+ p_apikey: string;
6582
+ p_url: string;
6583
+ };
6584
+ Returns: number;
6585
+ } | {
6586
+ Args: {
6587
+ p_apikey: string;
6588
+ p_cron_secret?: string;
6589
+ p_url: string;
6590
+ };
6591
+ Returns: number;
6592
+ };
6593
+ schedule_twinfield_token_refresh: {
6594
+ Args: {
6595
+ p_apikey: string;
6596
+ p_url: string;
6597
+ };
6598
+ Returns: number;
6599
+ } | {
6600
+ Args: {
6601
+ p_apikey: string;
6602
+ p_cron_secret?: string;
6603
+ p_url: string;
6604
+ };
6605
+ Returns: number;
6606
+ };
5082
6607
  show_limit: {
5083
6608
  Args: never;
5084
6609
  Returns: number;
@@ -5089,9 +6614,21 @@ export declare const getFloridayOrders: import("@tanstack/start-client-core").Op
5089
6614
  };
5090
6615
  Returns: string[];
5091
6616
  };
6617
+ twinfield_decrypt: {
6618
+ Args: {
6619
+ cipher: string;
6620
+ };
6621
+ Returns: string;
6622
+ };
6623
+ twinfield_encrypt: {
6624
+ Args: {
6625
+ plain: string;
6626
+ };
6627
+ Returns: string;
6628
+ };
5092
6629
  };
5093
6630
  Enums: {
5094
- app_role: "admin" | "manager" | "warehouse" | "sales" | "developer";
6631
+ app_role: "admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie";
5095
6632
  exact_env: "staging" | "live";
5096
6633
  quote_status: "concept" | "verzonden" | "bekeken" | "in_behandeling" | "geaccepteerd" | "afgewezen" | "verlopen" | "gearchiveerd";
5097
6634
  };