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