@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.
@@ -188,6 +188,153 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
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
+ number_of_people: number;
274
+ room_id: string;
275
+ start_time: string;
276
+ status: string;
277
+ total_excl_vat: number | null;
278
+ total_incl_vat: number | null;
279
+ user_id: string | null;
280
+ vat_amount: number | null;
281
+ };
282
+ Insert: {
283
+ company_name?: string | null;
284
+ conflict_checked_at?: string | null;
285
+ conflict_reason?: string | null;
286
+ created_at?: string;
287
+ created_by_role?: string | null;
288
+ customer_email?: string | null;
289
+ customer_name?: string | null;
290
+ end_time: string;
291
+ exact_debiteur_id?: string | null;
292
+ has_conflict?: boolean;
293
+ id?: string;
294
+ invoice_run_id?: string | null;
295
+ invoice_status?: string | null;
296
+ invoiced_at?: string | null;
297
+ number_of_people?: number;
298
+ room_id: string;
299
+ start_time: string;
300
+ status?: string;
301
+ total_excl_vat?: number | null;
302
+ total_incl_vat?: number | null;
303
+ user_id?: string | null;
304
+ vat_amount?: number | null;
305
+ };
306
+ Update: {
307
+ company_name?: string | null;
308
+ conflict_checked_at?: string | null;
309
+ conflict_reason?: string | null;
310
+ created_at?: string;
311
+ created_by_role?: string | null;
312
+ customer_email?: string | null;
313
+ customer_name?: string | null;
314
+ end_time?: string;
315
+ exact_debiteur_id?: string | null;
316
+ has_conflict?: boolean;
317
+ id?: string;
318
+ invoice_run_id?: string | null;
319
+ invoice_status?: string | null;
320
+ invoiced_at?: string | null;
321
+ number_of_people?: number;
322
+ room_id?: string;
323
+ start_time?: string;
324
+ status?: string;
325
+ total_excl_vat?: number | null;
326
+ total_incl_vat?: number | null;
327
+ user_id?: string | null;
328
+ vat_amount?: number | null;
329
+ };
330
+ Relationships: [{
331
+ foreignKeyName: "bookings_room_id_fkey";
332
+ columns: ["room_id"];
333
+ isOneToOne: false;
334
+ referencedRelation: "rooms";
335
+ referencedColumns: ["id"];
336
+ }];
337
+ };
191
338
  bugs: {
192
339
  Row: {
193
340
  attachment_url: string | null;
@@ -1019,17 +1166,26 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
1019
1166
  created_at: string;
1020
1167
  created_by: string | null;
1021
1168
  display_name: string | null;
1169
+ gmail_history_id: string | null;
1170
+ gmail_watch_expires_at: string | null;
1171
+ graph_subscription_expires_at: string | null;
1172
+ graph_subscription_id: string | null;
1022
1173
  id: string;
1023
1174
  imap_host: string | null;
1175
+ imap_last_uid: number | null;
1024
1176
  imap_password_encrypted: string | null;
1025
1177
  imap_port: number | null;
1026
1178
  imap_secure: boolean | null;
1179
+ imap_uid_validity: number | null;
1027
1180
  imap_username: string | null;
1028
1181
  is_active: boolean;
1029
1182
  last_error: string | null;
1183
+ last_event_at: string | null;
1030
1184
  last_verified_at: string | null;
1031
1185
  oauth_mode: string | null;
1032
1186
  provider: string;
1187
+ purpose_assignments: import("./types").Json;
1188
+ realtime_mode: string;
1033
1189
  refresh_token_encrypted: string | null;
1034
1190
  scopes: string[] | null;
1035
1191
  smtp_host: string | null;
@@ -1049,17 +1205,26 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
1049
1205
  created_at?: string;
1050
1206
  created_by?: string | null;
1051
1207
  display_name?: string | null;
1208
+ gmail_history_id?: string | null;
1209
+ gmail_watch_expires_at?: string | null;
1210
+ graph_subscription_expires_at?: string | null;
1211
+ graph_subscription_id?: string | null;
1052
1212
  id?: string;
1053
1213
  imap_host?: string | null;
1214
+ imap_last_uid?: number | null;
1054
1215
  imap_password_encrypted?: string | null;
1055
1216
  imap_port?: number | null;
1056
1217
  imap_secure?: boolean | null;
1218
+ imap_uid_validity?: number | null;
1057
1219
  imap_username?: string | null;
1058
1220
  is_active?: boolean;
1059
1221
  last_error?: string | null;
1222
+ last_event_at?: string | null;
1060
1223
  last_verified_at?: string | null;
1061
1224
  oauth_mode?: string | null;
1062
1225
  provider: string;
1226
+ purpose_assignments?: import("./types").Json;
1227
+ realtime_mode?: string;
1063
1228
  refresh_token_encrypted?: string | null;
1064
1229
  scopes?: string[] | null;
1065
1230
  smtp_host?: string | null;
@@ -1079,17 +1244,26 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
1079
1244
  created_at?: string;
1080
1245
  created_by?: string | null;
1081
1246
  display_name?: string | null;
1247
+ gmail_history_id?: string | null;
1248
+ gmail_watch_expires_at?: string | null;
1249
+ graph_subscription_expires_at?: string | null;
1250
+ graph_subscription_id?: string | null;
1082
1251
  id?: string;
1083
1252
  imap_host?: string | null;
1253
+ imap_last_uid?: number | null;
1084
1254
  imap_password_encrypted?: string | null;
1085
1255
  imap_port?: number | null;
1086
1256
  imap_secure?: boolean | null;
1257
+ imap_uid_validity?: number | null;
1087
1258
  imap_username?: string | null;
1088
1259
  is_active?: boolean;
1089
1260
  last_error?: string | null;
1261
+ last_event_at?: string | null;
1090
1262
  last_verified_at?: string | null;
1091
1263
  oauth_mode?: string | null;
1092
1264
  provider?: string;
1265
+ purpose_assignments?: import("./types").Json;
1266
+ realtime_mode?: string;
1093
1267
  refresh_token_encrypted?: string | null;
1094
1268
  scopes?: string[] | null;
1095
1269
  smtp_host?: string | null;
@@ -1103,6 +1277,195 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
1103
1277
  };
1104
1278
  Relationships: [];
1105
1279
  };
1280
+ email_auth_events: {
1281
+ Row: {
1282
+ connection_id: string;
1283
+ consumed_at: string | null;
1284
+ created_at: string;
1285
+ event_type: string;
1286
+ external_id: string | null;
1287
+ id: string;
1288
+ payload: import("./types").Json;
1289
+ provider: string;
1290
+ received_at: string;
1291
+ };
1292
+ Insert: {
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("./types").Json;
1300
+ provider: string;
1301
+ received_at?: string;
1302
+ };
1303
+ Update: {
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("./types").Json;
1311
+ provider?: string;
1312
+ received_at?: string;
1313
+ };
1314
+ Relationships: [{
1315
+ foreignKeyName: "email_auth_events_connection_id_fkey";
1316
+ columns: ["connection_id"];
1317
+ isOneToOne: false;
1318
+ referencedRelation: "email_auth_connections";
1319
+ referencedColumns: ["id"];
1320
+ }, {
1321
+ foreignKeyName: "email_auth_events_connection_id_fkey";
1322
+ columns: ["connection_id"];
1323
+ isOneToOne: false;
1324
+ referencedRelation: "email_auth_connections_safe";
1325
+ referencedColumns: ["id"];
1326
+ }];
1327
+ };
1328
+ email_auth_outbox: {
1329
+ Row: {
1330
+ attempts: number;
1331
+ bcc_addresses: string[];
1332
+ cc_addresses: string[];
1333
+ connection_id: string | null;
1334
+ created_at: string;
1335
+ created_by: string | null;
1336
+ external_message_id: string | null;
1337
+ headers: import("./types").Json;
1338
+ html_body: string | null;
1339
+ id: string;
1340
+ last_error: string | null;
1341
+ purpose: string;
1342
+ reply_to: string | null;
1343
+ scheduled_at: string;
1344
+ sent_at: string | null;
1345
+ status: string;
1346
+ subject: string;
1347
+ text_body: string | null;
1348
+ to_addresses: string[];
1349
+ updated_at: string;
1350
+ };
1351
+ Insert: {
1352
+ attempts?: number;
1353
+ bcc_addresses?: string[];
1354
+ cc_addresses?: string[];
1355
+ connection_id?: string | null;
1356
+ created_at?: string;
1357
+ created_by?: string | null;
1358
+ external_message_id?: string | null;
1359
+ headers?: import("./types").Json;
1360
+ html_body?: string | null;
1361
+ id?: string;
1362
+ last_error?: string | null;
1363
+ purpose: string;
1364
+ reply_to?: string | null;
1365
+ scheduled_at?: string;
1366
+ sent_at?: string | null;
1367
+ status?: string;
1368
+ subject: string;
1369
+ text_body?: string | null;
1370
+ to_addresses: string[];
1371
+ updated_at?: string;
1372
+ };
1373
+ Update: {
1374
+ attempts?: number;
1375
+ bcc_addresses?: string[];
1376
+ cc_addresses?: string[];
1377
+ connection_id?: string | null;
1378
+ created_at?: string;
1379
+ created_by?: string | null;
1380
+ external_message_id?: string | null;
1381
+ headers?: import("./types").Json;
1382
+ html_body?: string | null;
1383
+ id?: string;
1384
+ last_error?: string | null;
1385
+ purpose?: string;
1386
+ reply_to?: string | null;
1387
+ scheduled_at?: string;
1388
+ sent_at?: string | null;
1389
+ status?: string;
1390
+ subject?: string;
1391
+ text_body?: string | null;
1392
+ to_addresses?: string[];
1393
+ updated_at?: string;
1394
+ };
1395
+ Relationships: [{
1396
+ foreignKeyName: "email_auth_outbox_connection_id_fkey";
1397
+ columns: ["connection_id"];
1398
+ isOneToOne: false;
1399
+ referencedRelation: "email_auth_connections";
1400
+ referencedColumns: ["id"];
1401
+ }, {
1402
+ foreignKeyName: "email_auth_outbox_connection_id_fkey";
1403
+ columns: ["connection_id"];
1404
+ isOneToOne: false;
1405
+ referencedRelation: "email_auth_connections_safe";
1406
+ referencedColumns: ["id"];
1407
+ }];
1408
+ };
1409
+ email_auth_purpose_settings: {
1410
+ Row: {
1411
+ purpose: string;
1412
+ reply_to: string | null;
1413
+ updated_at: string;
1414
+ updated_by: string | null;
1415
+ };
1416
+ Insert: {
1417
+ purpose: string;
1418
+ reply_to?: string | null;
1419
+ updated_at?: string;
1420
+ updated_by?: string | null;
1421
+ };
1422
+ Update: {
1423
+ purpose?: string;
1424
+ reply_to?: string | null;
1425
+ updated_at?: string;
1426
+ updated_by?: string | null;
1427
+ };
1428
+ Relationships: [];
1429
+ };
1430
+ email_auth_token_refresh_log: {
1431
+ Row: {
1432
+ connection_id: string;
1433
+ error_message: string | null;
1434
+ id: string;
1435
+ refreshed_at: string;
1436
+ success: boolean;
1437
+ trigger_source: string;
1438
+ };
1439
+ Insert: {
1440
+ connection_id: string;
1441
+ error_message?: string | null;
1442
+ id?: string;
1443
+ refreshed_at?: string;
1444
+ success: boolean;
1445
+ trigger_source: string;
1446
+ };
1447
+ Update: {
1448
+ connection_id?: string;
1449
+ error_message?: string | null;
1450
+ id?: string;
1451
+ refreshed_at?: string;
1452
+ success?: boolean;
1453
+ trigger_source?: string;
1454
+ };
1455
+ Relationships: [{
1456
+ foreignKeyName: "email_auth_token_refresh_log_connection_id_fkey";
1457
+ columns: ["connection_id"];
1458
+ isOneToOne: false;
1459
+ referencedRelation: "email_auth_connections";
1460
+ referencedColumns: ["id"];
1461
+ }, {
1462
+ foreignKeyName: "email_auth_token_refresh_log_connection_id_fkey";
1463
+ columns: ["connection_id"];
1464
+ isOneToOne: false;
1465
+ referencedRelation: "email_auth_connections_safe";
1466
+ referencedColumns: ["id"];
1467
+ }];
1468
+ };
1106
1469
  exact_account_analytics_cache: {
1107
1470
  Row: {
1108
1471
  account_id: string;
@@ -1847,6 +2210,42 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
1847
2210
  };
1848
2211
  Relationships: [];
1849
2212
  };
2213
+ exact_settings: {
2214
+ Row: {
2215
+ client_id: string | null;
2216
+ client_secret: string | null;
2217
+ connection_status: string;
2218
+ created_at: string;
2219
+ division_id: string | null;
2220
+ id: string;
2221
+ last_sync_at: string | null;
2222
+ redirect_uri: string | null;
2223
+ updated_at: string;
2224
+ };
2225
+ Insert: {
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
+ Update: {
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
+ Relationships: [];
2248
+ };
1850
2249
  exact_sync_state: {
1851
2250
  Row: {
1852
2251
  connection_id: string;
@@ -1874,31 +2273,124 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
1874
2273
  };
1875
2274
  Relationships: [];
1876
2275
  };
1877
- floricode_connection_settings: {
2276
+ external_customer_providers: {
1878
2277
  Row: {
1879
- catalog_key: string | null;
1880
- catalog_url: string;
2278
+ color: string | null;
1881
2279
  created_at: string;
1882
- id: number;
1883
- last_meta: import("./types").Json | null;
1884
- last_test_at: string | null;
1885
- last_test_error: string | null;
1886
- last_test_ok: boolean | null;
2280
+ icon: string | null;
2281
+ is_enabled: boolean;
2282
+ label: string;
2283
+ last_synced_at: string | null;
2284
+ provider: string;
2285
+ sort_order: number;
1887
2286
  updated_at: string;
1888
2287
  };
1889
2288
  Insert: {
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("./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
  Update: {
1901
- catalog_key?: string | null;
2300
+ color?: string | null;
2301
+ created_at?: string;
2302
+ icon?: string | null;
2303
+ is_enabled?: boolean;
2304
+ label?: string;
2305
+ last_synced_at?: string | null;
2306
+ provider?: string;
2307
+ sort_order?: number;
2308
+ updated_at?: string;
2309
+ };
2310
+ Relationships: [];
2311
+ };
2312
+ extra_categories: {
2313
+ Row: {
2314
+ created_at: string;
2315
+ id: string;
2316
+ name: string;
2317
+ sort_order: number;
2318
+ updated_at: string;
2319
+ };
2320
+ Insert: {
2321
+ created_at?: string;
2322
+ id?: string;
2323
+ name: string;
2324
+ sort_order?: number;
2325
+ updated_at?: string;
2326
+ };
2327
+ Update: {
2328
+ created_at?: string;
2329
+ id?: string;
2330
+ name?: string;
2331
+ sort_order?: number;
2332
+ updated_at?: string;
2333
+ };
2334
+ Relationships: [];
2335
+ };
2336
+ extras: {
2337
+ Row: {
2338
+ category: string;
2339
+ created_at: string;
2340
+ exact_article_id: string | null;
2341
+ id: string;
2342
+ is_active: boolean;
2343
+ name: string;
2344
+ price: number;
2345
+ pricing_type: string;
2346
+ };
2347
+ Insert: {
2348
+ category: string;
2349
+ created_at?: string;
2350
+ exact_article_id?: string | null;
2351
+ id?: string;
2352
+ is_active?: boolean;
2353
+ name: string;
2354
+ price?: number;
2355
+ pricing_type?: string;
2356
+ };
2357
+ Update: {
2358
+ category?: string;
2359
+ created_at?: string;
2360
+ exact_article_id?: string | null;
2361
+ id?: string;
2362
+ is_active?: boolean;
2363
+ name?: string;
2364
+ price?: number;
2365
+ pricing_type?: string;
2366
+ };
2367
+ Relationships: [];
2368
+ };
2369
+ floricode_connection_settings: {
2370
+ Row: {
2371
+ catalog_key: string | null;
2372
+ catalog_url: string;
2373
+ created_at: string;
2374
+ id: number;
2375
+ last_meta: import("./types").Json | null;
2376
+ last_test_at: string | null;
2377
+ last_test_error: string | null;
2378
+ last_test_ok: boolean | null;
2379
+ updated_at: string;
2380
+ };
2381
+ Insert: {
2382
+ catalog_key?: string | null;
2383
+ catalog_url?: string;
2384
+ created_at?: string;
2385
+ id?: number;
2386
+ last_meta?: import("./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
+ Update: {
2393
+ catalog_key?: string | null;
1902
2394
  catalog_url?: string;
1903
2395
  created_at?: string;
1904
2396
  id?: number;
@@ -1964,6 +2456,48 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
1964
2456
  };
1965
2457
  Relationships: [];
1966
2458
  };
2459
+ floriday_carriers_cache: {
2460
+ Row: {
2461
+ connection_id: string | null;
2462
+ created_at: string;
2463
+ data: import("./types").Json;
2464
+ fetched_at: string;
2465
+ gln_code: string | null;
2466
+ id: string;
2467
+ name: string | null;
2468
+ organization_id: string;
2469
+ updated_at: string;
2470
+ };
2471
+ Insert: {
2472
+ connection_id?: string | null;
2473
+ created_at?: string;
2474
+ data: import("./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
+ Update: {
2483
+ connection_id?: string | null;
2484
+ created_at?: string;
2485
+ data?: import("./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
+ Relationships: [{
2494
+ foreignKeyName: "floriday_carriers_cache_connection_id_fkey";
2495
+ columns: ["connection_id"];
2496
+ isOneToOne: false;
2497
+ referencedRelation: "floriday_connections";
2498
+ referencedColumns: ["id"];
2499
+ }];
2500
+ };
1967
2501
  floriday_connections: {
1968
2502
  Row: {
1969
2503
  access_token: string | null;
@@ -2483,6 +3017,102 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
2483
3017
  };
2484
3018
  Relationships: [];
2485
3019
  };
3020
+ invoice_run_items: {
3021
+ Row: {
3022
+ booking_id: string | null;
3023
+ company_name: string | null;
3024
+ created_at: string;
3025
+ customer_email: string | null;
3026
+ description: string | null;
3027
+ exact_article_id: string | null;
3028
+ id: string;
3029
+ invoice_run_id: string | null;
3030
+ quantity: number | null;
3031
+ total_excl_vat: number | null;
3032
+ total_incl_vat: number | null;
3033
+ unit_price: number | null;
3034
+ vat_amount: number | null;
3035
+ };
3036
+ Insert: {
3037
+ booking_id?: string | null;
3038
+ company_name?: string | null;
3039
+ created_at?: string;
3040
+ customer_email?: string | null;
3041
+ description?: string | null;
3042
+ exact_article_id?: string | null;
3043
+ id?: string;
3044
+ invoice_run_id?: string | null;
3045
+ quantity?: number | null;
3046
+ total_excl_vat?: number | null;
3047
+ total_incl_vat?: number | null;
3048
+ unit_price?: number | null;
3049
+ vat_amount?: number | null;
3050
+ };
3051
+ Update: {
3052
+ booking_id?: string | null;
3053
+ company_name?: string | null;
3054
+ created_at?: string;
3055
+ customer_email?: string | null;
3056
+ description?: string | null;
3057
+ exact_article_id?: string | null;
3058
+ id?: string;
3059
+ invoice_run_id?: string | null;
3060
+ quantity?: number | null;
3061
+ total_excl_vat?: number | null;
3062
+ total_incl_vat?: number | null;
3063
+ unit_price?: number | null;
3064
+ vat_amount?: number | null;
3065
+ };
3066
+ Relationships: [{
3067
+ foreignKeyName: "invoice_run_items_booking_id_fkey";
3068
+ columns: ["booking_id"];
3069
+ isOneToOne: false;
3070
+ referencedRelation: "bookings";
3071
+ referencedColumns: ["id"];
3072
+ }, {
3073
+ foreignKeyName: "invoice_run_items_invoice_run_id_fkey";
3074
+ columns: ["invoice_run_id"];
3075
+ isOneToOne: false;
3076
+ referencedRelation: "invoice_runs";
3077
+ referencedColumns: ["id"];
3078
+ }];
3079
+ };
3080
+ invoice_runs: {
3081
+ Row: {
3082
+ created_at: string;
3083
+ created_by: string | null;
3084
+ id: string;
3085
+ period_end: string;
3086
+ period_start: string;
3087
+ status: string;
3088
+ total_excl_vat: number | null;
3089
+ total_incl_vat: number | null;
3090
+ vat_amount: number | null;
3091
+ };
3092
+ Insert: {
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
+ Update: {
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
+ Relationships: [];
3115
+ };
2486
3116
  locations: {
2487
3117
  Row: {
2488
3118
  created_at: string;
@@ -2513,6 +3143,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
2513
3143
  body_text: string | null;
2514
3144
  created_at: string;
2515
3145
  error_message: string | null;
3146
+ external_id: string | null;
2516
3147
  from_email: string | null;
2517
3148
  from_name: string | null;
2518
3149
  id: string;
@@ -2522,7 +3153,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
2522
3153
  received_at: string | null;
2523
3154
  status: string;
2524
3155
  subject: string | null;
2525
- uid: number;
3156
+ uid: number | null;
2526
3157
  updated_at: string;
2527
3158
  };
2528
3159
  Insert: {
@@ -2530,6 +3161,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
2530
3161
  body_text?: string | null;
2531
3162
  created_at?: string;
2532
3163
  error_message?: string | null;
3164
+ external_id?: string | null;
2533
3165
  from_email?: string | null;
2534
3166
  from_name?: string | null;
2535
3167
  id?: string;
@@ -2539,7 +3171,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
2539
3171
  received_at?: string | null;
2540
3172
  status?: string;
2541
3173
  subject?: string | null;
2542
- uid: number;
3174
+ uid?: number | null;
2543
3175
  updated_at?: string;
2544
3176
  };
2545
3177
  Update: {
@@ -2547,6 +3179,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
2547
3179
  body_text?: string | null;
2548
3180
  created_at?: string;
2549
3181
  error_message?: string | null;
3182
+ external_id?: string | null;
2550
3183
  from_email?: string | null;
2551
3184
  from_name?: string | null;
2552
3185
  id?: string;
@@ -2556,7 +3189,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
2556
3189
  received_at?: string | null;
2557
3190
  status?: string;
2558
3191
  subject?: string | null;
2559
- uid?: number;
3192
+ uid?: number | null;
2560
3193
  updated_at?: string;
2561
3194
  };
2562
3195
  Relationships: [{
@@ -2828,6 +3461,60 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
2828
3461
  };
2829
3462
  Relationships: [];
2830
3463
  };
3464
+ monteurs: {
3465
+ Row: {
3466
+ avatar_url: string | null;
3467
+ color: string | null;
3468
+ created_at: string;
3469
+ email: string | null;
3470
+ id: string;
3471
+ is_active: boolean;
3472
+ leave_balance_hours: number;
3473
+ name: string;
3474
+ persnr: number | null;
3475
+ phone: string | null;
3476
+ role: string;
3477
+ tenant_id: string;
3478
+ updated_at: string;
3479
+ };
3480
+ Insert: {
3481
+ avatar_url?: string | null;
3482
+ color?: string | null;
3483
+ created_at?: string;
3484
+ email?: string | null;
3485
+ id?: string;
3486
+ is_active?: boolean;
3487
+ leave_balance_hours?: number;
3488
+ name: string;
3489
+ persnr?: number | null;
3490
+ phone?: string | null;
3491
+ role?: string;
3492
+ tenant_id: string;
3493
+ updated_at?: string;
3494
+ };
3495
+ Update: {
3496
+ avatar_url?: string | null;
3497
+ color?: string | null;
3498
+ created_at?: string;
3499
+ email?: string | null;
3500
+ id?: string;
3501
+ is_active?: boolean;
3502
+ leave_balance_hours?: number;
3503
+ name?: string;
3504
+ persnr?: number | null;
3505
+ phone?: string | null;
3506
+ role?: string;
3507
+ tenant_id?: string;
3508
+ updated_at?: string;
3509
+ };
3510
+ Relationships: [{
3511
+ foreignKeyName: "monteurs_tenant_id_fkey";
3512
+ columns: ["tenant_id"];
3513
+ isOneToOne: false;
3514
+ referencedRelation: "tenants";
3515
+ referencedColumns: ["id"];
3516
+ }];
3517
+ };
2831
3518
  notifications: {
2832
3519
  Row: {
2833
3520
  created_at: string;
@@ -3660,6 +4347,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
3660
4347
  email: string | null;
3661
4348
  id: string;
3662
4349
  notification_preferences: import("./types").Json;
4350
+ tenant_id: string | null;
3663
4351
  updated_at: string;
3664
4352
  };
3665
4353
  Insert: {
@@ -3668,6 +4356,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
3668
4356
  email?: string | null;
3669
4357
  id: string;
3670
4358
  notification_preferences?: import("./types").Json;
4359
+ tenant_id?: string | null;
3671
4360
  updated_at?: string;
3672
4361
  };
3673
4362
  Update: {
@@ -3676,9 +4365,16 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
3676
4365
  email?: string | null;
3677
4366
  id?: string;
3678
4367
  notification_preferences?: import("./types").Json;
4368
+ tenant_id?: string | null;
3679
4369
  updated_at?: string;
3680
4370
  };
3681
- Relationships: [];
4371
+ Relationships: [{
4372
+ foreignKeyName: "profiles_tenant_id_fkey";
4373
+ columns: ["tenant_id"];
4374
+ isOneToOne: false;
4375
+ referencedRelation: "tenants";
4376
+ referencedColumns: ["id"];
4377
+ }];
3682
4378
  };
3683
4379
  projects: {
3684
4380
  Row: {
@@ -4382,45 +5078,120 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
4382
5078
  referencedColumns: ["id"];
4383
5079
  }];
4384
5080
  };
4385
- supplier_products: {
5081
+ reception_notifications: {
4386
5082
  Row: {
4387
- article_number: string | null;
5083
+ booking_id: string | null;
4388
5084
  created_at: string;
4389
5085
  id: string;
4390
- name: string;
4391
- notes: string | null;
4392
- pot_size: string | null;
4393
- price: number | null;
4394
- quantity: number | null;
4395
- supplier_id: string;
4396
- unit: string;
4397
- updated_at: string;
5086
+ is_read: boolean;
5087
+ message: string;
5088
+ recipient_email: string | null;
5089
+ title: string;
5090
+ type: string;
4398
5091
  };
4399
5092
  Insert: {
4400
- article_number?: string | null;
5093
+ booking_id?: string | null;
4401
5094
  created_at?: string;
4402
5095
  id?: string;
4403
- name: string;
4404
- notes?: string | null;
4405
- pot_size?: string | null;
4406
- price?: number | null;
4407
- quantity?: number | null;
4408
- supplier_id: string;
4409
- unit?: string;
4410
- updated_at?: string;
5096
+ is_read?: boolean;
5097
+ message: string;
5098
+ recipient_email?: string | null;
5099
+ title: string;
5100
+ type: string;
4411
5101
  };
4412
5102
  Update: {
4413
- article_number?: string | null;
5103
+ booking_id?: string | null;
4414
5104
  created_at?: string;
4415
5105
  id?: string;
4416
- name?: string;
4417
- notes?: string | null;
4418
- pot_size?: string | null;
4419
- price?: number | null;
4420
- quantity?: number | null;
4421
- supplier_id?: string;
4422
- unit?: string;
4423
- updated_at?: string;
5106
+ is_read?: boolean;
5107
+ message?: string;
5108
+ recipient_email?: string | null;
5109
+ title?: string;
5110
+ type?: string;
5111
+ };
5112
+ Relationships: [{
5113
+ foreignKeyName: "reception_notifications_booking_id_fkey";
5114
+ columns: ["booking_id"];
5115
+ isOneToOne: false;
5116
+ referencedRelation: "bookings";
5117
+ referencedColumns: ["id"];
5118
+ }];
5119
+ };
5120
+ rooms: {
5121
+ Row: {
5122
+ capacity: number;
5123
+ color_code: string | null;
5124
+ created_at: string;
5125
+ description: string | null;
5126
+ hourly_rate: number;
5127
+ id: string;
5128
+ image_url: string | null;
5129
+ is_active: boolean;
5130
+ name: string;
5131
+ };
5132
+ Insert: {
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
+ Update: {
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
+ Relationships: [];
5155
+ };
5156
+ supplier_products: {
5157
+ Row: {
5158
+ article_number: string | null;
5159
+ created_at: string;
5160
+ id: string;
5161
+ name: string;
5162
+ notes: string | null;
5163
+ pot_size: string | null;
5164
+ price: number | null;
5165
+ quantity: number | null;
5166
+ supplier_id: string;
5167
+ unit: string;
5168
+ updated_at: string;
5169
+ };
5170
+ Insert: {
5171
+ article_number?: string | null;
5172
+ created_at?: string;
5173
+ id?: string;
5174
+ name: string;
5175
+ notes?: string | null;
5176
+ pot_size?: string | null;
5177
+ price?: number | null;
5178
+ quantity?: number | null;
5179
+ supplier_id: string;
5180
+ unit?: string;
5181
+ updated_at?: string;
5182
+ };
5183
+ Update: {
5184
+ article_number?: string | null;
5185
+ created_at?: string;
5186
+ id?: string;
5187
+ name?: string;
5188
+ notes?: string | null;
5189
+ pot_size?: string | null;
5190
+ price?: number | null;
5191
+ quantity?: number | null;
5192
+ supplier_id?: string;
5193
+ unit?: string;
5194
+ updated_at?: string;
4424
5195
  };
4425
5196
  Relationships: [{
4426
5197
  foreignKeyName: "supplier_products_supplier_id_fkey";
@@ -4475,6 +5246,30 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
4475
5246
  };
4476
5247
  Relationships: [];
4477
5248
  };
5249
+ tenants: {
5250
+ Row: {
5251
+ created_at: string;
5252
+ id: string;
5253
+ name: string;
5254
+ slug: string | null;
5255
+ updated_at: string;
5256
+ };
5257
+ Insert: {
5258
+ created_at?: string;
5259
+ id?: string;
5260
+ name?: string;
5261
+ slug?: string | null;
5262
+ updated_at?: string;
5263
+ };
5264
+ Update: {
5265
+ created_at?: string;
5266
+ id?: string;
5267
+ name?: string;
5268
+ slug?: string | null;
5269
+ updated_at?: string;
5270
+ };
5271
+ Relationships: [];
5272
+ };
4478
5273
  trade_item_drafts: {
4479
5274
  Row: {
4480
5275
  connection_id: string | null;
@@ -4502,6 +5297,69 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
4502
5297
  };
4503
5298
  Relationships: [];
4504
5299
  };
5300
+ twinfield_connections: {
5301
+ Row: {
5302
+ access_token: string | null;
5303
+ client_id: string;
5304
+ client_secret: string | null;
5305
+ cluster_uri: string | null;
5306
+ company_code: string | null;
5307
+ company_name: string | null;
5308
+ connected_at: string | null;
5309
+ created_at: string;
5310
+ environment: string;
5311
+ id: string;
5312
+ is_active: boolean;
5313
+ label: string | null;
5314
+ office_code: string | null;
5315
+ redirect_uri: string;
5316
+ refresh_token: string | null;
5317
+ token_expires_at: string | null;
5318
+ updated_at: string;
5319
+ user_id: string;
5320
+ };
5321
+ Insert: {
5322
+ access_token?: string | null;
5323
+ client_id: string;
5324
+ client_secret?: string | null;
5325
+ cluster_uri?: string | null;
5326
+ company_code?: string | null;
5327
+ company_name?: string | null;
5328
+ connected_at?: string | null;
5329
+ created_at?: string;
5330
+ environment: string;
5331
+ id?: string;
5332
+ is_active?: boolean;
5333
+ label?: string | null;
5334
+ office_code?: string | null;
5335
+ redirect_uri: string;
5336
+ refresh_token?: string | null;
5337
+ token_expires_at?: string | null;
5338
+ updated_at?: string;
5339
+ user_id: string;
5340
+ };
5341
+ Update: {
5342
+ access_token?: string | null;
5343
+ client_id?: string;
5344
+ client_secret?: string | null;
5345
+ cluster_uri?: string | null;
5346
+ company_code?: string | null;
5347
+ company_name?: string | null;
5348
+ connected_at?: string | null;
5349
+ created_at?: string;
5350
+ environment?: string;
5351
+ id?: string;
5352
+ is_active?: boolean;
5353
+ label?: string | null;
5354
+ office_code?: string | null;
5355
+ redirect_uri?: string;
5356
+ refresh_token?: string | null;
5357
+ token_expires_at?: string | null;
5358
+ updated_at?: string;
5359
+ user_id?: string;
5360
+ };
5361
+ Relationships: [];
5362
+ };
4505
5363
  twinfield_credentials: {
4506
5364
  Row: {
4507
5365
  administration_code: string | null;
@@ -4604,6 +5462,48 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
4604
5462
  };
4605
5463
  Relationships: [];
4606
5464
  };
5465
+ twinfield_customers_cache: {
5466
+ Row: {
5467
+ connection_id: string;
5468
+ country: string | null;
5469
+ data: import("./types").Json;
5470
+ email: string | null;
5471
+ fetched_at: string;
5472
+ modified_at: string | null;
5473
+ name: string | null;
5474
+ twinfield_code: string;
5475
+ vat_number: string | null;
5476
+ };
5477
+ Insert: {
5478
+ connection_id: string;
5479
+ country?: string | null;
5480
+ data?: import("./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
+ Update: {
5489
+ connection_id?: string;
5490
+ country?: string | null;
5491
+ data?: import("./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
+ Relationships: [{
5500
+ foreignKeyName: "twinfield_customers_cache_connection_id_fkey";
5501
+ columns: ["connection_id"];
5502
+ isOneToOne: false;
5503
+ referencedRelation: "twinfield_connections";
5504
+ referencedColumns: ["id"];
5505
+ }];
5506
+ };
4607
5507
  twinfield_invoice_lines: {
4608
5508
  Row: {
4609
5509
  article_code: string | null;
@@ -4658,6 +5558,51 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
4658
5558
  referencedColumns: ["id"];
4659
5559
  }];
4660
5560
  };
5561
+ twinfield_invoice_lines_cache_v2: {
5562
+ Row: {
5563
+ article_code: string | null;
5564
+ connection_id: string;
5565
+ data: import("./types").Json;
5566
+ description: string | null;
5567
+ fetched_at: string;
5568
+ invoice_number: string;
5569
+ line_number: number;
5570
+ quantity: number | null;
5571
+ unit_price: number | null;
5572
+ vat_code: string | null;
5573
+ };
5574
+ Insert: {
5575
+ article_code?: string | null;
5576
+ connection_id: string;
5577
+ data?: import("./types").Json;
5578
+ description?: string | null;
5579
+ fetched_at?: string;
5580
+ invoice_number: string;
5581
+ line_number: number;
5582
+ quantity?: number | null;
5583
+ unit_price?: number | null;
5584
+ vat_code?: string | null;
5585
+ };
5586
+ Update: {
5587
+ article_code?: string | null;
5588
+ connection_id?: string;
5589
+ data?: import("./types").Json;
5590
+ description?: string | null;
5591
+ fetched_at?: string;
5592
+ invoice_number?: string;
5593
+ line_number?: number;
5594
+ quantity?: number | null;
5595
+ unit_price?: number | null;
5596
+ vat_code?: string | null;
5597
+ };
5598
+ Relationships: [{
5599
+ foreignKeyName: "twinfield_invoice_lines_cache_v2_connection_id_fkey";
5600
+ columns: ["connection_id"];
5601
+ isOneToOne: false;
5602
+ referencedRelation: "twinfield_connections";
5603
+ referencedColumns: ["id"];
5604
+ }];
5605
+ };
4661
5606
  twinfield_invoice_settings: {
4662
5607
  Row: {
4663
5608
  created_at: string;
@@ -4814,39 +5759,360 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
4814
5759
  };
4815
5760
  Relationships: [];
4816
5761
  };
4817
- user_roles: {
5762
+ twinfield_invoices_cache_v2: {
4818
5763
  Row: {
4819
- created_at: string;
4820
- id: string;
4821
- role: Database["public"]["Enums"]["app_role"];
4822
- user_id: string;
5764
+ connection_id: string;
5765
+ currency: string | null;
5766
+ customer_code: string | null;
5767
+ data: import("./types").Json;
5768
+ due_date: string | null;
5769
+ fetched_at: string;
5770
+ invoice_date: string | null;
5771
+ invoice_number: string;
5772
+ modified_at: string | null;
5773
+ status: string | null;
5774
+ total_excl: number | null;
5775
+ total_incl: number | null;
4823
5776
  };
4824
5777
  Insert: {
4825
- created_at?: string;
4826
- id?: string;
4827
- role: Database["public"]["Enums"]["app_role"];
4828
- user_id: string;
5778
+ connection_id: string;
5779
+ currency?: string | null;
5780
+ customer_code?: string | null;
5781
+ data?: import("./types").Json;
5782
+ due_date?: string | null;
5783
+ fetched_at?: string;
5784
+ invoice_date?: string | null;
5785
+ invoice_number: string;
5786
+ modified_at?: string | null;
5787
+ status?: string | null;
5788
+ total_excl?: number | null;
5789
+ total_incl?: number | null;
4829
5790
  };
4830
5791
  Update: {
4831
- created_at?: string;
4832
- id?: string;
4833
- role?: Database["public"]["Enums"]["app_role"];
4834
- user_id?: string;
5792
+ connection_id?: string;
5793
+ currency?: string | null;
5794
+ customer_code?: string | null;
5795
+ data?: import("./types").Json;
5796
+ due_date?: string | null;
5797
+ fetched_at?: string;
5798
+ invoice_date?: string | null;
5799
+ invoice_number?: string;
5800
+ modified_at?: string | null;
5801
+ status?: string | null;
5802
+ total_excl?: number | null;
5803
+ total_incl?: number | null;
4835
5804
  };
4836
5805
  Relationships: [{
4837
- foreignKeyName: "user_roles_user_id_fkey";
4838
- columns: ["user_id"];
5806
+ foreignKeyName: "twinfield_invoices_cache_v2_connection_id_fkey";
5807
+ columns: ["connection_id"];
4839
5808
  isOneToOne: false;
4840
- referencedRelation: "profiles";
5809
+ referencedRelation: "twinfield_connections";
4841
5810
  referencedColumns: ["id"];
4842
5811
  }];
4843
5812
  };
4844
- };
4845
- Views: {
4846
- email_auth_connections_safe: {
5813
+ twinfield_oauth_state: {
4847
5814
  Row: {
4848
- account_email: string | null;
4849
- created_at: string | null;
5815
+ created_at: string;
5816
+ environment: string;
5817
+ nonce: string | null;
5818
+ state: string;
5819
+ user_id: string;
5820
+ };
5821
+ Insert: {
5822
+ created_at?: string;
5823
+ environment: string;
5824
+ nonce?: string | null;
5825
+ state: string;
5826
+ user_id: string;
5827
+ };
5828
+ Update: {
5829
+ created_at?: string;
5830
+ environment?: string;
5831
+ nonce?: string | null;
5832
+ state?: string;
5833
+ user_id?: string;
5834
+ };
5835
+ Relationships: [];
5836
+ };
5837
+ twinfield_settings: {
5838
+ Row: {
5839
+ active_environment: string;
5840
+ id: number;
5841
+ updated_at: string;
5842
+ };
5843
+ Insert: {
5844
+ active_environment?: string;
5845
+ id?: number;
5846
+ updated_at?: string;
5847
+ };
5848
+ Update: {
5849
+ active_environment?: string;
5850
+ id?: number;
5851
+ updated_at?: string;
5852
+ };
5853
+ Relationships: [];
5854
+ };
5855
+ twinfield_sync_state: {
5856
+ Row: {
5857
+ connection_id: string;
5858
+ entity_type: string;
5859
+ last_error: string | null;
5860
+ last_modified_since: string;
5861
+ last_synced_at: string | null;
5862
+ updated_at: string;
5863
+ };
5864
+ Insert: {
5865
+ connection_id: string;
5866
+ entity_type: string;
5867
+ last_error?: string | null;
5868
+ last_modified_since?: string;
5869
+ last_synced_at?: string | null;
5870
+ updated_at?: string;
5871
+ };
5872
+ Update: {
5873
+ connection_id?: string;
5874
+ entity_type?: string;
5875
+ last_error?: string | null;
5876
+ last_modified_since?: string;
5877
+ last_synced_at?: string | null;
5878
+ updated_at?: string;
5879
+ };
5880
+ Relationships: [{
5881
+ foreignKeyName: "twinfield_sync_state_connection_id_fkey";
5882
+ columns: ["connection_id"];
5883
+ isOneToOne: false;
5884
+ referencedRelation: "twinfield_connections";
5885
+ referencedColumns: ["id"];
5886
+ }];
5887
+ };
5888
+ twinfield_token_refresh_log: {
5889
+ Row: {
5890
+ attempted_at: string;
5891
+ connection_id: string;
5892
+ error: string | null;
5893
+ expires_at: string | null;
5894
+ id: string;
5895
+ ok: boolean;
5896
+ };
5897
+ Insert: {
5898
+ attempted_at?: string;
5899
+ connection_id: string;
5900
+ error?: string | null;
5901
+ expires_at?: string | null;
5902
+ id?: string;
5903
+ ok: boolean;
5904
+ };
5905
+ Update: {
5906
+ attempted_at?: string;
5907
+ connection_id?: string;
5908
+ error?: string | null;
5909
+ expires_at?: string | null;
5910
+ id?: string;
5911
+ ok?: boolean;
5912
+ };
5913
+ Relationships: [{
5914
+ foreignKeyName: "twinfield_token_refresh_log_connection_id_fkey";
5915
+ columns: ["connection_id"];
5916
+ isOneToOne: false;
5917
+ referencedRelation: "twinfield_connections";
5918
+ referencedColumns: ["id"];
5919
+ }];
5920
+ };
5921
+ user_roles: {
5922
+ Row: {
5923
+ created_at: string;
5924
+ id: string;
5925
+ role: Database["public"]["Enums"]["app_role"];
5926
+ user_id: string;
5927
+ };
5928
+ Insert: {
5929
+ created_at?: string;
5930
+ id?: string;
5931
+ role: Database["public"]["Enums"]["app_role"];
5932
+ user_id: string;
5933
+ };
5934
+ Update: {
5935
+ created_at?: string;
5936
+ id?: string;
5937
+ role?: Database["public"]["Enums"]["app_role"];
5938
+ user_id?: string;
5939
+ };
5940
+ Relationships: [{
5941
+ foreignKeyName: "user_roles_user_id_fkey";
5942
+ columns: ["user_id"];
5943
+ isOneToOne: false;
5944
+ referencedRelation: "profiles";
5945
+ referencedColumns: ["id"];
5946
+ }];
5947
+ };
5948
+ work_order_monteurs: {
5949
+ Row: {
5950
+ created_at: string;
5951
+ id: string;
5952
+ monteur_id: string;
5953
+ work_order_id: string;
5954
+ };
5955
+ Insert: {
5956
+ created_at?: string;
5957
+ id?: string;
5958
+ monteur_id: string;
5959
+ work_order_id: string;
5960
+ };
5961
+ Update: {
5962
+ created_at?: string;
5963
+ id?: string;
5964
+ monteur_id?: string;
5965
+ work_order_id?: string;
5966
+ };
5967
+ Relationships: [{
5968
+ foreignKeyName: "work_order_monteurs_monteur_id_fkey";
5969
+ columns: ["monteur_id"];
5970
+ isOneToOne: false;
5971
+ referencedRelation: "monteurs";
5972
+ referencedColumns: ["id"];
5973
+ }, {
5974
+ foreignKeyName: "work_order_monteurs_work_order_id_fkey";
5975
+ columns: ["work_order_id"];
5976
+ isOneToOne: false;
5977
+ referencedRelation: "work_orders";
5978
+ referencedColumns: ["id"];
5979
+ }];
5980
+ };
5981
+ work_orders: {
5982
+ Row: {
5983
+ assigned_to: string | null;
5984
+ city: string | null;
5985
+ contact_person: string | null;
5986
+ created_at: string;
5987
+ custom_fields: import("./types").Json;
5988
+ customer_name: string;
5989
+ description: string;
5990
+ email: string | null;
5991
+ email_source: string | null;
5992
+ estimated_duration_hours: number | null;
5993
+ external_reference: string | null;
5994
+ follow_up_needed: boolean;
5995
+ id: string;
5996
+ mandate: string;
5997
+ mandate_budget: number;
5998
+ mandate_used: number;
5999
+ order_number: string;
6000
+ parent_work_order_id: string | null;
6001
+ pdf_url: string | null;
6002
+ phone: string | null;
6003
+ postal_code: string;
6004
+ priority: string;
6005
+ project_number: string | null;
6006
+ report_validated: boolean;
6007
+ room_number: string;
6008
+ scheduled_date: string | null;
6009
+ scheduled_end_time: string | null;
6010
+ scheduled_start_time: string | null;
6011
+ status: string;
6012
+ tenant_id: string;
6013
+ total_hours_worked: number | null;
6014
+ total_price: number | null;
6015
+ travel_time_minutes: number | null;
6016
+ updated_at: string;
6017
+ work_address: string;
6018
+ work_report: string | null;
6019
+ };
6020
+ Insert: {
6021
+ assigned_to?: string | null;
6022
+ city?: string | null;
6023
+ contact_person?: string | null;
6024
+ created_at?: string;
6025
+ custom_fields?: import("./types").Json;
6026
+ customer_name?: string;
6027
+ description?: string;
6028
+ email?: string | null;
6029
+ email_source?: string | null;
6030
+ estimated_duration_hours?: number | null;
6031
+ external_reference?: string | null;
6032
+ follow_up_needed?: boolean;
6033
+ id?: string;
6034
+ mandate?: string;
6035
+ mandate_budget?: number;
6036
+ mandate_used?: number;
6037
+ order_number?: string;
6038
+ parent_work_order_id?: string | null;
6039
+ pdf_url?: string | null;
6040
+ phone?: string | null;
6041
+ postal_code?: string;
6042
+ priority?: string;
6043
+ project_number?: string | null;
6044
+ report_validated?: boolean;
6045
+ room_number?: string;
6046
+ scheduled_date?: string | null;
6047
+ scheduled_end_time?: string | null;
6048
+ scheduled_start_time?: string | null;
6049
+ status?: string;
6050
+ tenant_id: string;
6051
+ total_hours_worked?: number | null;
6052
+ total_price?: number | null;
6053
+ travel_time_minutes?: number | null;
6054
+ updated_at?: string;
6055
+ work_address?: string;
6056
+ work_report?: string | null;
6057
+ };
6058
+ Update: {
6059
+ assigned_to?: string | null;
6060
+ city?: string | null;
6061
+ contact_person?: string | null;
6062
+ created_at?: string;
6063
+ custom_fields?: import("./types").Json;
6064
+ customer_name?: string;
6065
+ description?: string;
6066
+ email?: string | null;
6067
+ email_source?: string | null;
6068
+ estimated_duration_hours?: number | null;
6069
+ external_reference?: string | null;
6070
+ follow_up_needed?: boolean;
6071
+ id?: string;
6072
+ mandate?: string;
6073
+ mandate_budget?: number;
6074
+ mandate_used?: number;
6075
+ order_number?: string;
6076
+ parent_work_order_id?: string | null;
6077
+ pdf_url?: string | null;
6078
+ phone?: string | null;
6079
+ postal_code?: string;
6080
+ priority?: string;
6081
+ project_number?: string | null;
6082
+ report_validated?: boolean;
6083
+ room_number?: string;
6084
+ scheduled_date?: string | null;
6085
+ scheduled_end_time?: string | null;
6086
+ scheduled_start_time?: string | null;
6087
+ status?: string;
6088
+ tenant_id?: string;
6089
+ total_hours_worked?: number | null;
6090
+ total_price?: number | null;
6091
+ travel_time_minutes?: number | null;
6092
+ updated_at?: string;
6093
+ work_address?: string;
6094
+ work_report?: string | null;
6095
+ };
6096
+ Relationships: [{
6097
+ foreignKeyName: "work_orders_parent_work_order_id_fkey";
6098
+ columns: ["parent_work_order_id"];
6099
+ isOneToOne: false;
6100
+ referencedRelation: "work_orders";
6101
+ referencedColumns: ["id"];
6102
+ }, {
6103
+ foreignKeyName: "work_orders_tenant_id_fkey";
6104
+ columns: ["tenant_id"];
6105
+ isOneToOne: false;
6106
+ referencedRelation: "tenants";
6107
+ referencedColumns: ["id"];
6108
+ }];
6109
+ };
6110
+ };
6111
+ Views: {
6112
+ email_auth_connections_safe: {
6113
+ Row: {
6114
+ account_email: string | null;
6115
+ created_at: string | null;
4850
6116
  created_by: string | null;
4851
6117
  display_name: string | null;
4852
6118
  has_access_token: boolean | null;
@@ -4865,6 +6131,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
4865
6131
  last_verified_at: string | null;
4866
6132
  oauth_mode: string | null;
4867
6133
  provider: string | null;
6134
+ purpose_assignments: import("./types").Json | null;
4868
6135
  scopes: string[] | null;
4869
6136
  smtp_host: string | null;
4870
6137
  smtp_port: number | null;
@@ -4895,6 +6162,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
4895
6162
  last_verified_at?: string | null;
4896
6163
  oauth_mode?: string | null;
4897
6164
  provider?: string | null;
6165
+ purpose_assignments?: import("./types").Json | null;
4898
6166
  scopes?: string[] | null;
4899
6167
  smtp_host?: string | null;
4900
6168
  smtp_port?: number | null;
@@ -4925,6 +6193,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
4925
6193
  last_verified_at?: string | null;
4926
6194
  oauth_mode?: string | null;
4927
6195
  provider?: string | null;
6196
+ purpose_assignments?: import("./types").Json | null;
4928
6197
  scopes?: string[] | null;
4929
6198
  smtp_host?: string | null;
4930
6199
  smtp_port?: number | null;
@@ -4936,6 +6205,123 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
4936
6205
  };
4937
6206
  Relationships: [];
4938
6207
  };
6208
+ external_customers_grouped: {
6209
+ Row: {
6210
+ city: string | null;
6211
+ commercial_name: string | null;
6212
+ contact_person: string | null;
6213
+ country: string | null;
6214
+ display_name: string | null;
6215
+ email: string | null;
6216
+ fetched_at: string | null;
6217
+ gln: string | null;
6218
+ group_key: string | null;
6219
+ is_active: boolean | null;
6220
+ is_merged: boolean | null;
6221
+ logo_url: string | null;
6222
+ match_key: string | null;
6223
+ phone: string | null;
6224
+ providers: string[] | null;
6225
+ source_count: number | null;
6226
+ sources: import("./types").Json | null;
6227
+ vat_number: string | null;
6228
+ website: string | null;
6229
+ };
6230
+ Relationships: [];
6231
+ };
6232
+ external_customers_unified: {
6233
+ Row: {
6234
+ city: string | null;
6235
+ commercial_name: string | null;
6236
+ company_name: string | null;
6237
+ connection_id: string | null;
6238
+ contact_person: string | null;
6239
+ country: string | null;
6240
+ email: string | null;
6241
+ external_id: string | null;
6242
+ fetched_at: string | null;
6243
+ gln: string | null;
6244
+ house_number: string | null;
6245
+ is_active: boolean | null;
6246
+ is_deleted: boolean | null;
6247
+ logo_url: string | null;
6248
+ phone: string | null;
6249
+ postal_code: string | null;
6250
+ provider: string | null;
6251
+ raw: import("./types").Json | null;
6252
+ status: string | null;
6253
+ street: string | null;
6254
+ vat_number: string | null;
6255
+ website: string | null;
6256
+ };
6257
+ Relationships: [];
6258
+ };
6259
+ v_external_customers_floriday: {
6260
+ Row: {
6261
+ city: string | null;
6262
+ commercial_name: string | null;
6263
+ company_name: string | null;
6264
+ connection_id: string | null;
6265
+ contact_person: string | null;
6266
+ country: string | null;
6267
+ email: string | null;
6268
+ external_id: string | null;
6269
+ fetched_at: string | null;
6270
+ gln: string | null;
6271
+ house_number: string | null;
6272
+ is_active: boolean | null;
6273
+ is_deleted: boolean | null;
6274
+ logo_url: string | null;
6275
+ phone: string | null;
6276
+ postal_code: string | null;
6277
+ provider: string | null;
6278
+ raw: import("./types").Json | null;
6279
+ status: string | null;
6280
+ street: string | null;
6281
+ vat_number: string | null;
6282
+ website: string | null;
6283
+ };
6284
+ Relationships: [{
6285
+ foreignKeyName: "floriday_customers_cache_connection_id_fkey";
6286
+ columns: ["connection_id"];
6287
+ isOneToOne: false;
6288
+ referencedRelation: "floriday_connections";
6289
+ referencedColumns: ["id"];
6290
+ }];
6291
+ };
6292
+ v_external_customers_twinfield: {
6293
+ Row: {
6294
+ city: string | null;
6295
+ commercial_name: string | null;
6296
+ company_name: string | null;
6297
+ connection_id: string | null;
6298
+ contact_person: string | null;
6299
+ country: string | null;
6300
+ email: string | null;
6301
+ external_id: string | null;
6302
+ fetched_at: string | null;
6303
+ gln: string | null;
6304
+ house_number: string | null;
6305
+ is_active: boolean | null;
6306
+ is_deleted: boolean | null;
6307
+ logo_url: string | null;
6308
+ phone: string | null;
6309
+ postal_code: string | null;
6310
+ provider: string | null;
6311
+ raw: import("./types").Json | null;
6312
+ status: string | null;
6313
+ street: string | null;
6314
+ vat_number: string | null;
6315
+ website: string | null;
6316
+ };
6317
+ Relationships: [{
6318
+ foreignKeyName: "twinfield_customers_cache_connection_id_fkey";
6319
+ columns: ["connection_id"];
6320
+ isOneToOne: false;
6321
+ referencedRelation: "twinfield_connections";
6322
+ referencedColumns: ["id"];
6323
+ }];
6324
+ };
4939
6325
  };
4940
6326
  Functions: {
4941
6327
  dashboard_list_public_schema: {
@@ -4958,6 +6344,33 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
4958
6344
  };
4959
6345
  Returns: string;
4960
6346
  };
6347
+ email_auth_fetch_message: {
6348
+ Args: {
6349
+ _connection_id: string;
6350
+ _external_id: string;
6351
+ };
6352
+ Returns: import("./types").Json;
6353
+ };
6354
+ email_auth_for_purpose: {
6355
+ Args: {
6356
+ _direction: string;
6357
+ _purpose: string;
6358
+ };
6359
+ Returns: {
6360
+ account_email: string;
6361
+ display_name: string;
6362
+ id: string;
6363
+ last_error: string;
6364
+ last_verified_at: string;
6365
+ needs_reauth: boolean;
6366
+ provider: string;
6367
+ status: string;
6368
+ }[];
6369
+ };
6370
+ ensure_user_tenant: {
6371
+ Args: never;
6372
+ Returns: string;
6373
+ };
4961
6374
  exact_decrypt: {
4962
6375
  Args: {
4963
6376
  cipher: string;
@@ -5004,6 +6417,17 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
5004
6417
  preferred_warehouse_name: string;
5005
6418
  }[];
5006
6419
  };
6420
+ get_active_twinfield_public: {
6421
+ Args: never;
6422
+ Returns: {
6423
+ active_environment: string;
6424
+ company_code: string;
6425
+ company_name: string;
6426
+ connection_id: string;
6427
+ environment: string;
6428
+ office_code: string;
6429
+ }[];
6430
+ };
5007
6431
  get_floriday_cron_jobs: {
5008
6432
  Args: never;
5009
6433
  Returns: {
@@ -5019,6 +6443,37 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
5019
6443
  };
5020
6444
  Returns: import("./types").Json;
5021
6445
  };
6446
+ get_room_busy_windows: {
6447
+ Args: {
6448
+ p_from: string;
6449
+ p_to: string;
6450
+ };
6451
+ Returns: {
6452
+ end_time: string;
6453
+ room_id: string;
6454
+ start_time: string;
6455
+ status: string;
6456
+ }[];
6457
+ };
6458
+ get_twinfield_cron_jobs: {
6459
+ Args: never;
6460
+ Returns: {
6461
+ active: boolean;
6462
+ jobname: string;
6463
+ schedule: string;
6464
+ url: string;
6465
+ }[];
6466
+ };
6467
+ get_user_tenant_id: {
6468
+ Args: never;
6469
+ Returns: string;
6470
+ };
6471
+ get_work_order_tenant_id: {
6472
+ Args: {
6473
+ wo_id: string;
6474
+ };
6475
+ Returns: string;
6476
+ };
5022
6477
  has_role: {
5023
6478
  Args: {
5024
6479
  _role: Database["public"]["Enums"]["app_role"];
@@ -5026,6 +6481,34 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
5026
6481
  };
5027
6482
  Returns: boolean;
5028
6483
  };
6484
+ is_authenticated: {
6485
+ Args: never;
6486
+ Returns: boolean;
6487
+ };
6488
+ is_developer: {
6489
+ Args: never;
6490
+ Returns: boolean;
6491
+ };
6492
+ next_work_order_number: {
6493
+ Args: {
6494
+ p_parent_work_order_id?: string;
6495
+ p_tenant_id: string;
6496
+ };
6497
+ Returns: string;
6498
+ };
6499
+ normalize_vat: {
6500
+ Args: {
6501
+ v: string;
6502
+ };
6503
+ Returns: string;
6504
+ };
6505
+ schedule_floriday_carriers_sync: {
6506
+ Args: {
6507
+ p_apikey: string;
6508
+ p_url: string;
6509
+ };
6510
+ Returns: number;
6511
+ };
5029
6512
  schedule_floriday_connections_sync: {
5030
6513
  Args: {
5031
6514
  p_apikey: string;
@@ -5068,6 +6551,48 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
5068
6551
  };
5069
6552
  Returns: number;
5070
6553
  };
6554
+ schedule_twinfield_customers_sync: {
6555
+ Args: {
6556
+ p_apikey: string;
6557
+ p_url: string;
6558
+ };
6559
+ Returns: number;
6560
+ } | {
6561
+ Args: {
6562
+ p_apikey: string;
6563
+ p_cron_secret?: string;
6564
+ p_url: string;
6565
+ };
6566
+ Returns: number;
6567
+ };
6568
+ schedule_twinfield_invoices_sync: {
6569
+ Args: {
6570
+ p_apikey: string;
6571
+ p_url: string;
6572
+ };
6573
+ Returns: number;
6574
+ } | {
6575
+ Args: {
6576
+ p_apikey: string;
6577
+ p_cron_secret?: string;
6578
+ p_url: string;
6579
+ };
6580
+ Returns: number;
6581
+ };
6582
+ schedule_twinfield_token_refresh: {
6583
+ Args: {
6584
+ p_apikey: string;
6585
+ p_url: string;
6586
+ };
6587
+ Returns: number;
6588
+ } | {
6589
+ Args: {
6590
+ p_apikey: string;
6591
+ p_cron_secret?: string;
6592
+ p_url: string;
6593
+ };
6594
+ Returns: number;
6595
+ };
5071
6596
  show_limit: {
5072
6597
  Args: never;
5073
6598
  Returns: number;
@@ -5078,9 +6603,21 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
5078
6603
  };
5079
6604
  Returns: string[];
5080
6605
  };
6606
+ twinfield_decrypt: {
6607
+ Args: {
6608
+ cipher: string;
6609
+ };
6610
+ Returns: string;
6611
+ };
6612
+ twinfield_encrypt: {
6613
+ Args: {
6614
+ plain: string;
6615
+ };
6616
+ Returns: string;
6617
+ };
5081
6618
  };
5082
6619
  Enums: {
5083
- app_role: "admin" | "manager" | "warehouse" | "sales" | "developer";
6620
+ app_role: "admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie";
5084
6621
  exact_env: "staging" | "live";
5085
6622
  quote_status: "concept" | "verzonden" | "bekeken" | "in_behandeling" | "geaccepteerd" | "afgewezen" | "verlopen" | "gearchiveerd";
5086
6623
  };