@flowselections/floriday-afhandeling-module 1.0.7 → 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/dist-lib/components/afhandeling/LeveringenPage.d.ts.map +1 -1
  2. package/dist-lib/components/afhandeling/LeveringenPage.js +9 -67
  3. package/dist-lib/components/afhandeling/NieuweLeveringPage.d.ts +2 -0
  4. package/dist-lib/components/afhandeling/NieuweLeveringPage.d.ts.map +1 -0
  5. package/dist-lib/components/afhandeling/NieuweLeveringPage.js +7 -0
  6. package/dist-lib/components/afhandeling/PickAgendaView.d.ts +6 -0
  7. package/dist-lib/components/afhandeling/PickAgendaView.d.ts.map +1 -0
  8. package/dist-lib/components/afhandeling/PickAgendaView.js +31 -0
  9. package/dist-lib/components/afhandeling/PickingPage.d.ts +2 -0
  10. package/dist-lib/components/afhandeling/PickingPage.d.ts.map +1 -0
  11. package/dist-lib/components/afhandeling/PickingPage.js +5 -0
  12. package/dist-lib/components/afhandeling/PlanningAgendaPage.d.ts +9 -0
  13. package/dist-lib/components/afhandeling/PlanningAgendaPage.d.ts.map +1 -0
  14. package/dist-lib/components/afhandeling/PlanningAgendaPage.js +7 -0
  15. package/dist-lib/components/afhandeling/VervoerderForm.d.ts.map +1 -1
  16. package/dist-lib/components/afhandeling/VervoerderForm.js +24 -10
  17. package/dist-lib/components/afhandeling/WeekAgendaView.d.ts +12 -0
  18. package/dist-lib/components/afhandeling/WeekAgendaView.d.ts.map +1 -0
  19. package/dist-lib/components/afhandeling/WeekAgendaView.js +107 -0
  20. package/dist-lib/components/pickstation/LanguagePicker.d.ts +5 -0
  21. package/dist-lib/components/pickstation/LanguagePicker.d.ts.map +1 -0
  22. package/dist-lib/components/pickstation/LanguagePicker.js +5 -0
  23. package/dist-lib/components/pickstation/PakbonTemplate.d.ts +17 -0
  24. package/dist-lib/components/pickstation/PakbonTemplate.d.ts.map +1 -0
  25. package/dist-lib/components/pickstation/PakbonTemplate.js +74 -0
  26. package/dist-lib/components/pickstation/printDocuments.d.ts +3 -0
  27. package/dist-lib/components/pickstation/printDocuments.d.ts.map +1 -0
  28. package/dist-lib/components/pickstation/printDocuments.js +53 -0
  29. package/dist-lib/components/settings/AfhandelingSettingsCard.d.ts +2 -0
  30. package/dist-lib/components/settings/AfhandelingSettingsCard.d.ts.map +1 -0
  31. package/dist-lib/components/settings/AfhandelingSettingsCard.js +60 -0
  32. package/dist-lib/components/settings/VervoerdersSettingsCard.d.ts +2 -0
  33. package/dist-lib/components/settings/VervoerdersSettingsCard.d.ts.map +1 -0
  34. package/dist-lib/components/settings/VervoerdersSettingsCard.js +30 -0
  35. package/dist-lib/hooks/useOrderPlanning.d.ts +14 -0
  36. package/dist-lib/hooks/useOrderPlanning.d.ts.map +1 -0
  37. package/dist-lib/hooks/useOrderPlanning.js +90 -0
  38. package/dist-lib/index.d.ts +6 -0
  39. package/dist-lib/index.d.ts.map +1 -1
  40. package/dist-lib/index.js +17 -6
  41. package/dist-lib/integrations/supabase/auth-middleware.d.ts +2206 -138
  42. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
  43. package/dist-lib/integrations/supabase/client.d.ts +2206 -138
  44. package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
  45. package/dist-lib/integrations/supabase/client.server.d.ts +2206 -138
  46. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
  47. package/dist-lib/integrations/supabase/types.d.ts +2252 -126
  48. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  49. package/dist-lib/integrations/supabase/types.js +9 -1
  50. package/dist-lib/lib/afhandelingSettings.functions.d.ts +14338 -0
  51. package/dist-lib/lib/afhandelingSettings.functions.d.ts.map +1 -0
  52. package/dist-lib/lib/afhandelingSettings.functions.js +73 -0
  53. package/dist-lib/lib/carriers.functions.d.ts +19092 -10812
  54. package/dist-lib/lib/carriers.functions.d.ts.map +1 -1
  55. package/dist-lib/lib/carriers.functions.js +43 -6
  56. package/dist-lib/lib/floriday.functions.d.ts +2207 -138
  57. package/dist-lib/lib/floriday.functions.d.ts.map +1 -1
  58. package/dist-lib/lib/floriday.functions.js +6 -1
  59. package/dist-lib/lib/pickDate.d.ts +21 -0
  60. package/dist-lib/lib/pickDate.d.ts.map +1 -0
  61. package/dist-lib/lib/pickDate.js +71 -0
  62. package/dist-lib/lib/pickstationI18n.d.ts +31 -0
  63. package/dist-lib/lib/pickstationI18n.d.ts.map +1 -0
  64. package/dist-lib/lib/pickstationI18n.js +147 -0
  65. package/dist-lib/lib/pickstationOrders.server.d.ts +9 -0
  66. package/dist-lib/lib/pickstationOrders.server.d.ts.map +1 -0
  67. package/dist-lib/lib/pickstationOrders.server.js +244 -0
  68. package/dist-lib/lib/pickstationTypes.d.ts +17 -0
  69. package/dist-lib/lib/pickstationTypes.d.ts.map +1 -0
  70. package/dist-lib/lib/pickstationTypes.js +1 -0
  71. package/dist-lib/lib/planning.d.ts +66 -0
  72. package/dist-lib/lib/planning.d.ts.map +1 -0
  73. package/dist-lib/lib/planning.js +180 -0
  74. package/package.json +12 -6
@@ -7,6 +7,39 @@ export type Database = {
7
7
  };
8
8
  public: {
9
9
  Tables: {
10
+ afhandeling_settings: {
11
+ Row: {
12
+ created_at: string;
13
+ id: string;
14
+ max_workdays_earlier_pick: number;
15
+ pick_days_before_transport: number;
16
+ pick_distribution_enabled: boolean;
17
+ transport_register_days_before: number;
18
+ updated_at: string;
19
+ user_id: string;
20
+ };
21
+ Insert: {
22
+ created_at?: string;
23
+ id?: string;
24
+ max_workdays_earlier_pick?: number;
25
+ pick_days_before_transport?: number;
26
+ pick_distribution_enabled?: boolean;
27
+ transport_register_days_before?: number;
28
+ updated_at?: string;
29
+ user_id: string;
30
+ };
31
+ Update: {
32
+ created_at?: string;
33
+ id?: string;
34
+ max_workdays_earlier_pick?: number;
35
+ pick_days_before_transport?: number;
36
+ pick_distribution_enabled?: boolean;
37
+ transport_register_days_before?: number;
38
+ updated_at?: string;
39
+ user_id?: string;
40
+ };
41
+ Relationships: [];
42
+ };
10
43
  agenda_connections: {
11
44
  Row: {
12
45
  account_email: string | null;
@@ -193,6 +226,161 @@ export type Database = {
193
226
  };
194
227
  Relationships: [];
195
228
  };
229
+ app_settings: {
230
+ Row: {
231
+ created_at: string;
232
+ id: string;
233
+ key: string;
234
+ updated_at: string;
235
+ value: string | null;
236
+ };
237
+ Insert: {
238
+ created_at?: string;
239
+ id?: string;
240
+ key: string;
241
+ updated_at?: string;
242
+ value?: string | null;
243
+ };
244
+ Update: {
245
+ created_at?: string;
246
+ id?: string;
247
+ key?: string;
248
+ updated_at?: string;
249
+ value?: string | null;
250
+ };
251
+ Relationships: [];
252
+ };
253
+ booking_items: {
254
+ Row: {
255
+ booking_id: string;
256
+ created_at: string;
257
+ extra_id: string;
258
+ id: string;
259
+ quantity: number;
260
+ total_price: number;
261
+ unit_price: number;
262
+ };
263
+ Insert: {
264
+ booking_id: string;
265
+ created_at?: string;
266
+ extra_id: string;
267
+ id?: string;
268
+ quantity?: number;
269
+ total_price?: number;
270
+ unit_price?: number;
271
+ };
272
+ Update: {
273
+ booking_id?: string;
274
+ created_at?: string;
275
+ extra_id?: string;
276
+ id?: string;
277
+ quantity?: number;
278
+ total_price?: number;
279
+ unit_price?: number;
280
+ };
281
+ Relationships: [
282
+ {
283
+ foreignKeyName: "booking_items_booking_id_fkey";
284
+ columns: ["booking_id"];
285
+ isOneToOne: false;
286
+ referencedRelation: "bookings";
287
+ referencedColumns: ["id"];
288
+ },
289
+ {
290
+ foreignKeyName: "booking_items_extra_id_fkey";
291
+ columns: ["extra_id"];
292
+ isOneToOne: false;
293
+ referencedRelation: "extras";
294
+ referencedColumns: ["id"];
295
+ }
296
+ ];
297
+ };
298
+ bookings: {
299
+ Row: {
300
+ company_name: string | null;
301
+ conflict_checked_at: string | null;
302
+ conflict_reason: string | null;
303
+ created_at: string;
304
+ created_by_role: string | null;
305
+ customer_email: string | null;
306
+ customer_name: string | null;
307
+ end_time: string;
308
+ exact_debiteur_id: string | null;
309
+ has_conflict: boolean;
310
+ id: string;
311
+ invoice_run_id: string | null;
312
+ invoice_status: string | null;
313
+ invoiced_at: string | null;
314
+ notes: string | null;
315
+ number_of_people: number;
316
+ room_id: string;
317
+ start_time: string;
318
+ status: string;
319
+ total_excl_vat: number | null;
320
+ total_incl_vat: number | null;
321
+ user_id: string | null;
322
+ vat_amount: number | null;
323
+ };
324
+ Insert: {
325
+ company_name?: string | null;
326
+ conflict_checked_at?: string | null;
327
+ conflict_reason?: string | null;
328
+ created_at?: string;
329
+ created_by_role?: string | null;
330
+ customer_email?: string | null;
331
+ customer_name?: string | null;
332
+ end_time: string;
333
+ exact_debiteur_id?: string | null;
334
+ has_conflict?: boolean;
335
+ id?: string;
336
+ invoice_run_id?: string | null;
337
+ invoice_status?: string | null;
338
+ invoiced_at?: string | null;
339
+ notes?: string | null;
340
+ number_of_people?: number;
341
+ room_id: string;
342
+ start_time: string;
343
+ status?: string;
344
+ total_excl_vat?: number | null;
345
+ total_incl_vat?: number | null;
346
+ user_id?: string | null;
347
+ vat_amount?: number | null;
348
+ };
349
+ Update: {
350
+ company_name?: string | null;
351
+ conflict_checked_at?: string | null;
352
+ conflict_reason?: string | null;
353
+ created_at?: string;
354
+ created_by_role?: string | null;
355
+ customer_email?: string | null;
356
+ customer_name?: string | null;
357
+ end_time?: string;
358
+ exact_debiteur_id?: string | null;
359
+ has_conflict?: boolean;
360
+ id?: string;
361
+ invoice_run_id?: string | null;
362
+ invoice_status?: string | null;
363
+ invoiced_at?: string | null;
364
+ notes?: string | null;
365
+ number_of_people?: number;
366
+ room_id?: string;
367
+ start_time?: string;
368
+ status?: string;
369
+ total_excl_vat?: number | null;
370
+ total_incl_vat?: number | null;
371
+ user_id?: string | null;
372
+ vat_amount?: number | null;
373
+ };
374
+ Relationships: [
375
+ {
376
+ foreignKeyName: "bookings_room_id_fkey";
377
+ columns: ["room_id"];
378
+ isOneToOne: false;
379
+ referencedRelation: "rooms";
380
+ referencedColumns: ["id"];
381
+ }
382
+ ];
383
+ };
196
384
  bugs: {
197
385
  Row: {
198
386
  attachment_url: string | null;
@@ -269,9 +457,12 @@ export type Database = {
269
457
  delivery_days: number | null;
270
458
  email: string | null;
271
459
  id: string;
460
+ is_default: boolean;
272
461
  name: string;
273
462
  notes: string | null;
274
463
  phone: string | null;
464
+ pickup_moments: Json;
465
+ signup_days_before_delivery: number;
275
466
  signup_time_1: string | null;
276
467
  signup_time_2: string | null;
277
468
  updated_at: string;
@@ -284,9 +475,12 @@ export type Database = {
284
475
  delivery_days?: number | null;
285
476
  email?: string | null;
286
477
  id?: string;
478
+ is_default?: boolean;
287
479
  name: string;
288
480
  notes?: string | null;
289
481
  phone?: string | null;
482
+ pickup_moments?: Json;
483
+ signup_days_before_delivery?: number;
290
484
  signup_time_1?: string | null;
291
485
  signup_time_2?: string | null;
292
486
  updated_at?: string;
@@ -299,9 +493,12 @@ export type Database = {
299
493
  delivery_days?: number | null;
300
494
  email?: string | null;
301
495
  id?: string;
496
+ is_default?: boolean;
302
497
  name?: string;
303
498
  notes?: string | null;
304
499
  phone?: string | null;
500
+ pickup_moments?: Json;
501
+ signup_days_before_delivery?: number;
305
502
  signup_time_1?: string | null;
306
503
  signup_time_2?: string | null;
307
504
  updated_at?: string;
@@ -1047,17 +1244,26 @@ export type Database = {
1047
1244
  created_at: string;
1048
1245
  created_by: string | null;
1049
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;
1050
1251
  id: string;
1051
1252
  imap_host: string | null;
1253
+ imap_last_uid: number | null;
1052
1254
  imap_password_encrypted: string | null;
1053
1255
  imap_port: number | null;
1054
1256
  imap_secure: boolean | null;
1257
+ imap_uid_validity: number | null;
1055
1258
  imap_username: string | null;
1056
1259
  is_active: boolean;
1057
1260
  last_error: string | null;
1261
+ last_event_at: string | null;
1058
1262
  last_verified_at: string | null;
1059
1263
  oauth_mode: string | null;
1060
1264
  provider: string;
1265
+ purpose_assignments: Json;
1266
+ realtime_mode: string;
1061
1267
  refresh_token_encrypted: string | null;
1062
1268
  scopes: string[] | null;
1063
1269
  smtp_host: string | null;
@@ -1077,17 +1283,26 @@ export type Database = {
1077
1283
  created_at?: string;
1078
1284
  created_by?: string | null;
1079
1285
  display_name?: string | null;
1286
+ gmail_history_id?: string | null;
1287
+ gmail_watch_expires_at?: string | null;
1288
+ graph_subscription_expires_at?: string | null;
1289
+ graph_subscription_id?: string | null;
1080
1290
  id?: string;
1081
1291
  imap_host?: string | null;
1292
+ imap_last_uid?: number | null;
1082
1293
  imap_password_encrypted?: string | null;
1083
1294
  imap_port?: number | null;
1084
1295
  imap_secure?: boolean | null;
1296
+ imap_uid_validity?: number | null;
1085
1297
  imap_username?: string | null;
1086
1298
  is_active?: boolean;
1087
1299
  last_error?: string | null;
1300
+ last_event_at?: string | null;
1088
1301
  last_verified_at?: string | null;
1089
1302
  oauth_mode?: string | null;
1090
1303
  provider: string;
1304
+ purpose_assignments?: Json;
1305
+ realtime_mode?: string;
1091
1306
  refresh_token_encrypted?: string | null;
1092
1307
  scopes?: string[] | null;
1093
1308
  smtp_host?: string | null;
@@ -1107,17 +1322,26 @@ export type Database = {
1107
1322
  created_at?: string;
1108
1323
  created_by?: string | null;
1109
1324
  display_name?: string | null;
1325
+ gmail_history_id?: string | null;
1326
+ gmail_watch_expires_at?: string | null;
1327
+ graph_subscription_expires_at?: string | null;
1328
+ graph_subscription_id?: string | null;
1110
1329
  id?: string;
1111
1330
  imap_host?: string | null;
1331
+ imap_last_uid?: number | null;
1112
1332
  imap_password_encrypted?: string | null;
1113
1333
  imap_port?: number | null;
1114
1334
  imap_secure?: boolean | null;
1335
+ imap_uid_validity?: number | null;
1115
1336
  imap_username?: string | null;
1116
1337
  is_active?: boolean;
1117
1338
  last_error?: string | null;
1339
+ last_event_at?: string | null;
1118
1340
  last_verified_at?: string | null;
1119
1341
  oauth_mode?: string | null;
1120
1342
  provider?: string;
1343
+ purpose_assignments?: Json;
1344
+ realtime_mode?: string;
1121
1345
  refresh_token_encrypted?: string | null;
1122
1346
  scopes?: string[] | null;
1123
1347
  smtp_host?: string | null;
@@ -1131,6 +1355,204 @@ export type Database = {
1131
1355
  };
1132
1356
  Relationships: [];
1133
1357
  };
1358
+ email_auth_events: {
1359
+ Row: {
1360
+ connection_id: string;
1361
+ consumed_at: string | null;
1362
+ created_at: string;
1363
+ event_type: string;
1364
+ external_id: string | null;
1365
+ id: string;
1366
+ payload: Json;
1367
+ provider: string;
1368
+ received_at: string;
1369
+ };
1370
+ Insert: {
1371
+ connection_id: string;
1372
+ consumed_at?: string | null;
1373
+ created_at?: string;
1374
+ event_type: string;
1375
+ external_id?: string | null;
1376
+ id?: string;
1377
+ payload?: Json;
1378
+ provider: string;
1379
+ received_at?: string;
1380
+ };
1381
+ Update: {
1382
+ connection_id?: string;
1383
+ consumed_at?: string | null;
1384
+ created_at?: string;
1385
+ event_type?: string;
1386
+ external_id?: string | null;
1387
+ id?: string;
1388
+ payload?: Json;
1389
+ provider?: string;
1390
+ received_at?: string;
1391
+ };
1392
+ Relationships: [
1393
+ {
1394
+ foreignKeyName: "email_auth_events_connection_id_fkey";
1395
+ columns: ["connection_id"];
1396
+ isOneToOne: false;
1397
+ referencedRelation: "email_auth_connections";
1398
+ referencedColumns: ["id"];
1399
+ },
1400
+ {
1401
+ foreignKeyName: "email_auth_events_connection_id_fkey";
1402
+ columns: ["connection_id"];
1403
+ isOneToOne: false;
1404
+ referencedRelation: "email_auth_connections_safe";
1405
+ referencedColumns: ["id"];
1406
+ }
1407
+ ];
1408
+ };
1409
+ email_auth_outbox: {
1410
+ Row: {
1411
+ attempts: number;
1412
+ bcc_addresses: string[];
1413
+ cc_addresses: string[];
1414
+ connection_id: string | null;
1415
+ created_at: string;
1416
+ created_by: string | null;
1417
+ external_message_id: string | null;
1418
+ headers: Json;
1419
+ html_body: string | null;
1420
+ id: string;
1421
+ last_error: string | null;
1422
+ purpose: string;
1423
+ reply_to: string | null;
1424
+ scheduled_at: string;
1425
+ sent_at: string | null;
1426
+ status: string;
1427
+ subject: string;
1428
+ text_body: string | null;
1429
+ to_addresses: string[];
1430
+ updated_at: string;
1431
+ };
1432
+ Insert: {
1433
+ attempts?: number;
1434
+ bcc_addresses?: string[];
1435
+ cc_addresses?: string[];
1436
+ connection_id?: string | null;
1437
+ created_at?: string;
1438
+ created_by?: string | null;
1439
+ external_message_id?: string | null;
1440
+ headers?: Json;
1441
+ html_body?: string | null;
1442
+ id?: string;
1443
+ last_error?: string | null;
1444
+ purpose: string;
1445
+ reply_to?: string | null;
1446
+ scheduled_at?: string;
1447
+ sent_at?: string | null;
1448
+ status?: string;
1449
+ subject: string;
1450
+ text_body?: string | null;
1451
+ to_addresses: string[];
1452
+ updated_at?: string;
1453
+ };
1454
+ Update: {
1455
+ attempts?: number;
1456
+ bcc_addresses?: string[];
1457
+ cc_addresses?: string[];
1458
+ connection_id?: string | null;
1459
+ created_at?: string;
1460
+ created_by?: string | null;
1461
+ external_message_id?: string | null;
1462
+ headers?: Json;
1463
+ html_body?: string | null;
1464
+ id?: string;
1465
+ last_error?: string | null;
1466
+ purpose?: string;
1467
+ reply_to?: string | null;
1468
+ scheduled_at?: string;
1469
+ sent_at?: string | null;
1470
+ status?: string;
1471
+ subject?: string;
1472
+ text_body?: string | null;
1473
+ to_addresses?: string[];
1474
+ updated_at?: string;
1475
+ };
1476
+ Relationships: [
1477
+ {
1478
+ foreignKeyName: "email_auth_outbox_connection_id_fkey";
1479
+ columns: ["connection_id"];
1480
+ isOneToOne: false;
1481
+ referencedRelation: "email_auth_connections";
1482
+ referencedColumns: ["id"];
1483
+ },
1484
+ {
1485
+ foreignKeyName: "email_auth_outbox_connection_id_fkey";
1486
+ columns: ["connection_id"];
1487
+ isOneToOne: false;
1488
+ referencedRelation: "email_auth_connections_safe";
1489
+ referencedColumns: ["id"];
1490
+ }
1491
+ ];
1492
+ };
1493
+ email_auth_purpose_settings: {
1494
+ Row: {
1495
+ purpose: string;
1496
+ reply_to: string | null;
1497
+ updated_at: string;
1498
+ updated_by: string | null;
1499
+ };
1500
+ Insert: {
1501
+ purpose: string;
1502
+ reply_to?: string | null;
1503
+ updated_at?: string;
1504
+ updated_by?: string | null;
1505
+ };
1506
+ Update: {
1507
+ purpose?: string;
1508
+ reply_to?: string | null;
1509
+ updated_at?: string;
1510
+ updated_by?: string | null;
1511
+ };
1512
+ Relationships: [];
1513
+ };
1514
+ email_auth_token_refresh_log: {
1515
+ Row: {
1516
+ connection_id: string;
1517
+ error_message: string | null;
1518
+ id: string;
1519
+ refreshed_at: string;
1520
+ success: boolean;
1521
+ trigger_source: string;
1522
+ };
1523
+ Insert: {
1524
+ connection_id: string;
1525
+ error_message?: string | null;
1526
+ id?: string;
1527
+ refreshed_at?: string;
1528
+ success: boolean;
1529
+ trigger_source: string;
1530
+ };
1531
+ Update: {
1532
+ connection_id?: string;
1533
+ error_message?: string | null;
1534
+ id?: string;
1535
+ refreshed_at?: string;
1536
+ success?: boolean;
1537
+ trigger_source?: string;
1538
+ };
1539
+ Relationships: [
1540
+ {
1541
+ foreignKeyName: "email_auth_token_refresh_log_connection_id_fkey";
1542
+ columns: ["connection_id"];
1543
+ isOneToOne: false;
1544
+ referencedRelation: "email_auth_connections";
1545
+ referencedColumns: ["id"];
1546
+ },
1547
+ {
1548
+ foreignKeyName: "email_auth_token_refresh_log_connection_id_fkey";
1549
+ columns: ["connection_id"];
1550
+ isOneToOne: false;
1551
+ referencedRelation: "email_auth_connections_safe";
1552
+ referencedColumns: ["id"];
1553
+ }
1554
+ ];
1555
+ };
1134
1556
  exact_account_analytics_cache: {
1135
1557
  Row: {
1136
1558
  account_id: string;
@@ -1877,19 +2299,66 @@ export type Database = {
1877
2299
  }
1878
2300
  ];
1879
2301
  };
1880
- exact_refresh_locks: {
2302
+ exact_push_queue: {
1881
2303
  Row: {
1882
- environment: Database["public"]["Enums"]["exact_env"];
1883
- locked_by: string;
1884
- locked_until: string;
2304
+ attempts: number;
2305
+ connection_id: string;
2306
+ created_at: string;
2307
+ external_id: string | null;
2308
+ id: string;
2309
+ idempotency_hash: string;
2310
+ last_error: string | null;
2311
+ payload: Json;
2312
+ status: Database["public"]["Enums"]["exact_push_status"];
1885
2313
  updated_at: string;
1886
2314
  };
1887
2315
  Insert: {
1888
- environment: Database["public"]["Enums"]["exact_env"];
1889
- locked_by: string;
1890
- locked_until: string;
1891
- updated_at?: string;
1892
- };
2316
+ attempts?: number;
2317
+ connection_id: string;
2318
+ created_at?: string;
2319
+ external_id?: string | null;
2320
+ id?: string;
2321
+ idempotency_hash: string;
2322
+ last_error?: string | null;
2323
+ payload: Json;
2324
+ status?: Database["public"]["Enums"]["exact_push_status"];
2325
+ updated_at?: string;
2326
+ };
2327
+ Update: {
2328
+ attempts?: number;
2329
+ connection_id?: string;
2330
+ created_at?: string;
2331
+ external_id?: string | null;
2332
+ id?: string;
2333
+ idempotency_hash?: string;
2334
+ last_error?: string | null;
2335
+ payload?: Json;
2336
+ status?: Database["public"]["Enums"]["exact_push_status"];
2337
+ updated_at?: string;
2338
+ };
2339
+ Relationships: [
2340
+ {
2341
+ foreignKeyName: "exact_push_queue_connection_id_fkey";
2342
+ columns: ["connection_id"];
2343
+ isOneToOne: false;
2344
+ referencedRelation: "exact_connections";
2345
+ referencedColumns: ["id"];
2346
+ }
2347
+ ];
2348
+ };
2349
+ exact_refresh_locks: {
2350
+ Row: {
2351
+ environment: Database["public"]["Enums"]["exact_env"];
2352
+ locked_by: string;
2353
+ locked_until: string;
2354
+ updated_at: string;
2355
+ };
2356
+ Insert: {
2357
+ environment: Database["public"]["Enums"]["exact_env"];
2358
+ locked_by: string;
2359
+ locked_until: string;
2360
+ updated_at?: string;
2361
+ };
1893
2362
  Update: {
1894
2363
  environment?: Database["public"]["Enums"]["exact_env"];
1895
2364
  locked_by?: string;
@@ -1898,11 +2367,49 @@ export type Database = {
1898
2367
  };
1899
2368
  Relationships: [];
1900
2369
  };
2370
+ exact_settings: {
2371
+ Row: {
2372
+ client_id: string | null;
2373
+ client_secret: string | null;
2374
+ connection_status: string;
2375
+ created_at: string;
2376
+ division_id: string | null;
2377
+ id: string;
2378
+ last_sync_at: string | null;
2379
+ redirect_uri: string | null;
2380
+ updated_at: string;
2381
+ };
2382
+ Insert: {
2383
+ client_id?: string | null;
2384
+ client_secret?: string | null;
2385
+ connection_status?: string;
2386
+ created_at?: string;
2387
+ division_id?: string | null;
2388
+ id?: string;
2389
+ last_sync_at?: string | null;
2390
+ redirect_uri?: string | null;
2391
+ updated_at?: string;
2392
+ };
2393
+ Update: {
2394
+ client_id?: string | null;
2395
+ client_secret?: string | null;
2396
+ connection_status?: string;
2397
+ created_at?: string;
2398
+ division_id?: string | null;
2399
+ id?: string;
2400
+ last_sync_at?: string | null;
2401
+ redirect_uri?: string | null;
2402
+ updated_at?: string;
2403
+ };
2404
+ Relationships: [];
2405
+ };
1901
2406
  exact_sync_state: {
1902
2407
  Row: {
1903
2408
  connection_id: string;
1904
2409
  last_error: string | null;
1905
2410
  last_modified_cursor: string | null;
2411
+ last_modified_cursor_customers: string | null;
2412
+ last_modified_cursor_invoices: string | null;
1906
2413
  last_synced_at: string | null;
1907
2414
  status: string;
1908
2415
  updated_at: string;
@@ -1911,6 +2418,8 @@ export type Database = {
1911
2418
  connection_id: string;
1912
2419
  last_error?: string | null;
1913
2420
  last_modified_cursor?: string | null;
2421
+ last_modified_cursor_customers?: string | null;
2422
+ last_modified_cursor_invoices?: string | null;
1914
2423
  last_synced_at?: string | null;
1915
2424
  status?: string;
1916
2425
  updated_at?: string;
@@ -1919,12 +2428,155 @@ export type Database = {
1919
2428
  connection_id?: string;
1920
2429
  last_error?: string | null;
1921
2430
  last_modified_cursor?: string | null;
2431
+ last_modified_cursor_customers?: string | null;
2432
+ last_modified_cursor_invoices?: string | null;
1922
2433
  last_synced_at?: string | null;
1923
2434
  status?: string;
1924
2435
  updated_at?: string;
1925
2436
  };
1926
2437
  Relationships: [];
1927
2438
  };
2439
+ external_customer_providers: {
2440
+ Row: {
2441
+ color: string | null;
2442
+ created_at: string;
2443
+ icon: string | null;
2444
+ is_enabled: boolean;
2445
+ label: string;
2446
+ last_synced_at: string | null;
2447
+ provider: string;
2448
+ sort_order: number;
2449
+ updated_at: string;
2450
+ };
2451
+ Insert: {
2452
+ color?: string | null;
2453
+ created_at?: string;
2454
+ icon?: string | null;
2455
+ is_enabled?: boolean;
2456
+ label: string;
2457
+ last_synced_at?: string | null;
2458
+ provider: string;
2459
+ sort_order?: number;
2460
+ updated_at?: string;
2461
+ };
2462
+ Update: {
2463
+ color?: string | null;
2464
+ created_at?: string;
2465
+ icon?: string | null;
2466
+ is_enabled?: boolean;
2467
+ label?: string;
2468
+ last_synced_at?: string | null;
2469
+ provider?: string;
2470
+ sort_order?: number;
2471
+ updated_at?: string;
2472
+ };
2473
+ Relationships: [];
2474
+ };
2475
+ external_invoice_providers: {
2476
+ Row: {
2477
+ color: string | null;
2478
+ created_at: string;
2479
+ hmac_secret_name: string | null;
2480
+ icon: string | null;
2481
+ is_enabled: boolean;
2482
+ label: string;
2483
+ last_synced_at: string | null;
2484
+ provider: string;
2485
+ push_endpoint: string | null;
2486
+ sort_order: number;
2487
+ status_endpoint: string | null;
2488
+ sync_endpoint: string | null;
2489
+ updated_at: string;
2490
+ };
2491
+ Insert: {
2492
+ color?: string | null;
2493
+ created_at?: string;
2494
+ hmac_secret_name?: string | null;
2495
+ icon?: string | null;
2496
+ is_enabled?: boolean;
2497
+ label: string;
2498
+ last_synced_at?: string | null;
2499
+ provider: string;
2500
+ push_endpoint?: string | null;
2501
+ sort_order?: number;
2502
+ status_endpoint?: string | null;
2503
+ sync_endpoint?: string | null;
2504
+ updated_at?: string;
2505
+ };
2506
+ Update: {
2507
+ color?: string | null;
2508
+ created_at?: string;
2509
+ hmac_secret_name?: string | null;
2510
+ icon?: string | null;
2511
+ is_enabled?: boolean;
2512
+ label?: string;
2513
+ last_synced_at?: string | null;
2514
+ provider?: string;
2515
+ push_endpoint?: string | null;
2516
+ sort_order?: number;
2517
+ status_endpoint?: string | null;
2518
+ sync_endpoint?: string | null;
2519
+ updated_at?: string;
2520
+ };
2521
+ Relationships: [];
2522
+ };
2523
+ extra_categories: {
2524
+ Row: {
2525
+ created_at: string;
2526
+ id: string;
2527
+ name: string;
2528
+ sort_order: number;
2529
+ updated_at: string;
2530
+ };
2531
+ Insert: {
2532
+ created_at?: string;
2533
+ id?: string;
2534
+ name: string;
2535
+ sort_order?: number;
2536
+ updated_at?: string;
2537
+ };
2538
+ Update: {
2539
+ created_at?: string;
2540
+ id?: string;
2541
+ name?: string;
2542
+ sort_order?: number;
2543
+ updated_at?: string;
2544
+ };
2545
+ Relationships: [];
2546
+ };
2547
+ extras: {
2548
+ Row: {
2549
+ category: string;
2550
+ created_at: string;
2551
+ exact_article_id: string | null;
2552
+ id: string;
2553
+ is_active: boolean;
2554
+ name: string;
2555
+ price: number;
2556
+ pricing_type: string;
2557
+ };
2558
+ Insert: {
2559
+ category: string;
2560
+ created_at?: string;
2561
+ exact_article_id?: string | null;
2562
+ id?: string;
2563
+ is_active?: boolean;
2564
+ name: string;
2565
+ price?: number;
2566
+ pricing_type?: string;
2567
+ };
2568
+ Update: {
2569
+ category?: string;
2570
+ created_at?: string;
2571
+ exact_article_id?: string | null;
2572
+ id?: string;
2573
+ is_active?: boolean;
2574
+ name?: string;
2575
+ price?: number;
2576
+ pricing_type?: string;
2577
+ };
2578
+ Relationships: [];
2579
+ };
1928
2580
  floricode_connection_settings: {
1929
2581
  Row: {
1930
2582
  catalog_key: string | null;
@@ -2015,6 +2667,50 @@ export type Database = {
2015
2667
  };
2016
2668
  Relationships: [];
2017
2669
  };
2670
+ floriday_carriers_cache: {
2671
+ Row: {
2672
+ connection_id: string | null;
2673
+ created_at: string;
2674
+ data: Json;
2675
+ fetched_at: string;
2676
+ gln_code: string | null;
2677
+ id: string;
2678
+ name: string | null;
2679
+ organization_id: string;
2680
+ updated_at: string;
2681
+ };
2682
+ Insert: {
2683
+ connection_id?: string | null;
2684
+ created_at?: string;
2685
+ data: Json;
2686
+ fetched_at?: string;
2687
+ gln_code?: string | null;
2688
+ id?: string;
2689
+ name?: string | null;
2690
+ organization_id: string;
2691
+ updated_at?: string;
2692
+ };
2693
+ Update: {
2694
+ connection_id?: string | null;
2695
+ created_at?: string;
2696
+ data?: Json;
2697
+ fetched_at?: string;
2698
+ gln_code?: string | null;
2699
+ id?: string;
2700
+ name?: string | null;
2701
+ organization_id?: string;
2702
+ updated_at?: string;
2703
+ };
2704
+ Relationships: [
2705
+ {
2706
+ foreignKeyName: "floriday_carriers_cache_connection_id_fkey";
2707
+ columns: ["connection_id"];
2708
+ isOneToOne: false;
2709
+ referencedRelation: "floriday_connections";
2710
+ referencedColumns: ["id"];
2711
+ }
2712
+ ];
2713
+ };
2018
2714
  floriday_connections: {
2019
2715
  Row: {
2020
2716
  access_token: string | null;
@@ -2551,36 +3247,189 @@ export type Database = {
2551
3247
  };
2552
3248
  Relationships: [];
2553
3249
  };
2554
- locations: {
3250
+ invoice_push_log: {
2555
3251
  Row: {
3252
+ connection_id: string | null;
2556
3253
  created_at: string;
3254
+ created_by: string;
3255
+ customer_id: string | null;
2557
3256
  id: string;
2558
- name: string;
2559
- sort_order: number;
3257
+ last_error: string | null;
3258
+ last_polled_at: string | null;
3259
+ payload: Json;
3260
+ provider_id: string;
3261
+ queue_id: string | null;
3262
+ status: string;
2560
3263
  updated_at: string;
2561
3264
  };
2562
3265
  Insert: {
3266
+ connection_id?: string | null;
2563
3267
  created_at?: string;
3268
+ created_by?: string;
3269
+ customer_id?: string | null;
2564
3270
  id?: string;
2565
- name: string;
2566
- sort_order?: number;
3271
+ last_error?: string | null;
3272
+ last_polled_at?: string | null;
3273
+ payload?: Json;
3274
+ provider_id: string;
3275
+ queue_id?: string | null;
3276
+ status?: string;
2567
3277
  updated_at?: string;
2568
3278
  };
2569
3279
  Update: {
3280
+ connection_id?: string | null;
2570
3281
  created_at?: string;
3282
+ created_by?: string;
3283
+ customer_id?: string | null;
2571
3284
  id?: string;
2572
- name?: string;
2573
- sort_order?: number;
3285
+ last_error?: string | null;
3286
+ last_polled_at?: string | null;
3287
+ payload?: Json;
3288
+ provider_id?: string;
3289
+ queue_id?: string | null;
3290
+ status?: string;
2574
3291
  updated_at?: string;
2575
3292
  };
2576
- Relationships: [];
3293
+ Relationships: [
3294
+ {
3295
+ foreignKeyName: "invoice_push_log_provider_id_fkey";
3296
+ columns: ["provider_id"];
3297
+ isOneToOne: false;
3298
+ referencedRelation: "external_invoice_providers";
3299
+ referencedColumns: ["provider"];
3300
+ }
3301
+ ];
2577
3302
  };
2578
- mailbox_messages: {
3303
+ invoice_run_items: {
2579
3304
  Row: {
2580
- body_html: string | null;
2581
- body_text: string | null;
3305
+ booking_id: string | null;
3306
+ company_name: string | null;
3307
+ created_at: string;
3308
+ customer_email: string | null;
3309
+ description: string | null;
3310
+ exact_article_id: string | null;
3311
+ id: string;
3312
+ invoice_run_id: string | null;
3313
+ quantity: number | null;
3314
+ total_excl_vat: number | null;
3315
+ total_incl_vat: number | null;
3316
+ unit_price: number | null;
3317
+ vat_amount: number | null;
3318
+ };
3319
+ Insert: {
3320
+ booking_id?: string | null;
3321
+ company_name?: string | null;
3322
+ created_at?: string;
3323
+ customer_email?: string | null;
3324
+ description?: string | null;
3325
+ exact_article_id?: string | null;
3326
+ id?: string;
3327
+ invoice_run_id?: string | null;
3328
+ quantity?: number | null;
3329
+ total_excl_vat?: number | null;
3330
+ total_incl_vat?: number | null;
3331
+ unit_price?: number | null;
3332
+ vat_amount?: number | null;
3333
+ };
3334
+ Update: {
3335
+ booking_id?: string | null;
3336
+ company_name?: string | null;
3337
+ created_at?: string;
3338
+ customer_email?: string | null;
3339
+ description?: string | null;
3340
+ exact_article_id?: string | null;
3341
+ id?: string;
3342
+ invoice_run_id?: string | null;
3343
+ quantity?: number | null;
3344
+ total_excl_vat?: number | null;
3345
+ total_incl_vat?: number | null;
3346
+ unit_price?: number | null;
3347
+ vat_amount?: number | null;
3348
+ };
3349
+ Relationships: [
3350
+ {
3351
+ foreignKeyName: "invoice_run_items_booking_id_fkey";
3352
+ columns: ["booking_id"];
3353
+ isOneToOne: false;
3354
+ referencedRelation: "bookings";
3355
+ referencedColumns: ["id"];
3356
+ },
3357
+ {
3358
+ foreignKeyName: "invoice_run_items_invoice_run_id_fkey";
3359
+ columns: ["invoice_run_id"];
3360
+ isOneToOne: false;
3361
+ referencedRelation: "invoice_runs";
3362
+ referencedColumns: ["id"];
3363
+ }
3364
+ ];
3365
+ };
3366
+ invoice_runs: {
3367
+ Row: {
3368
+ created_at: string;
3369
+ created_by: string | null;
3370
+ id: string;
3371
+ period_end: string;
3372
+ period_start: string;
3373
+ status: string;
3374
+ total_excl_vat: number | null;
3375
+ total_incl_vat: number | null;
3376
+ vat_amount: number | null;
3377
+ };
3378
+ Insert: {
3379
+ created_at?: string;
3380
+ created_by?: string | null;
3381
+ id?: string;
3382
+ period_end: string;
3383
+ period_start: string;
3384
+ status?: string;
3385
+ total_excl_vat?: number | null;
3386
+ total_incl_vat?: number | null;
3387
+ vat_amount?: number | null;
3388
+ };
3389
+ Update: {
3390
+ created_at?: string;
3391
+ created_by?: string | null;
3392
+ id?: string;
3393
+ period_end?: string;
3394
+ period_start?: string;
3395
+ status?: string;
3396
+ total_excl_vat?: number | null;
3397
+ total_incl_vat?: number | null;
3398
+ vat_amount?: number | null;
3399
+ };
3400
+ Relationships: [];
3401
+ };
3402
+ locations: {
3403
+ Row: {
3404
+ created_at: string;
3405
+ id: string;
3406
+ name: string;
3407
+ sort_order: number;
3408
+ updated_at: string;
3409
+ };
3410
+ Insert: {
3411
+ created_at?: string;
3412
+ id?: string;
3413
+ name: string;
3414
+ sort_order?: number;
3415
+ updated_at?: string;
3416
+ };
3417
+ Update: {
3418
+ created_at?: string;
3419
+ id?: string;
3420
+ name?: string;
3421
+ sort_order?: number;
3422
+ updated_at?: string;
3423
+ };
3424
+ Relationships: [];
3425
+ };
3426
+ mailbox_messages: {
3427
+ Row: {
3428
+ body_html: string | null;
3429
+ body_text: string | null;
2582
3430
  created_at: string;
2583
3431
  error_message: string | null;
3432
+ external_id: string | null;
2584
3433
  from_email: string | null;
2585
3434
  from_name: string | null;
2586
3435
  id: string;
@@ -2590,7 +3439,7 @@ export type Database = {
2590
3439
  received_at: string | null;
2591
3440
  status: string;
2592
3441
  subject: string | null;
2593
- uid: number;
3442
+ uid: number | null;
2594
3443
  updated_at: string;
2595
3444
  };
2596
3445
  Insert: {
@@ -2598,6 +3447,7 @@ export type Database = {
2598
3447
  body_text?: string | null;
2599
3448
  created_at?: string;
2600
3449
  error_message?: string | null;
3450
+ external_id?: string | null;
2601
3451
  from_email?: string | null;
2602
3452
  from_name?: string | null;
2603
3453
  id?: string;
@@ -2607,7 +3457,7 @@ export type Database = {
2607
3457
  received_at?: string | null;
2608
3458
  status?: string;
2609
3459
  subject?: string | null;
2610
- uid: number;
3460
+ uid?: number | null;
2611
3461
  updated_at?: string;
2612
3462
  };
2613
3463
  Update: {
@@ -2615,6 +3465,7 @@ export type Database = {
2615
3465
  body_text?: string | null;
2616
3466
  created_at?: string;
2617
3467
  error_message?: string | null;
3468
+ external_id?: string | null;
2618
3469
  from_email?: string | null;
2619
3470
  from_name?: string | null;
2620
3471
  id?: string;
@@ -2624,7 +3475,7 @@ export type Database = {
2624
3475
  received_at?: string | null;
2625
3476
  status?: string;
2626
3477
  subject?: string | null;
2627
- uid?: number;
3478
+ uid?: number | null;
2628
3479
  updated_at?: string;
2629
3480
  };
2630
3481
  Relationships: [
@@ -2907,6 +3758,62 @@ export type Database = {
2907
3758
  };
2908
3759
  Relationships: [];
2909
3760
  };
3761
+ monteurs: {
3762
+ Row: {
3763
+ avatar_url: string | null;
3764
+ color: string | null;
3765
+ created_at: string;
3766
+ email: string | null;
3767
+ id: string;
3768
+ is_active: boolean;
3769
+ leave_balance_hours: number;
3770
+ name: string;
3771
+ persnr: number | null;
3772
+ phone: string | null;
3773
+ role: string;
3774
+ tenant_id: string;
3775
+ updated_at: string;
3776
+ };
3777
+ Insert: {
3778
+ avatar_url?: string | null;
3779
+ color?: string | null;
3780
+ created_at?: string;
3781
+ email?: string | null;
3782
+ id?: string;
3783
+ is_active?: boolean;
3784
+ leave_balance_hours?: number;
3785
+ name: string;
3786
+ persnr?: number | null;
3787
+ phone?: string | null;
3788
+ role?: string;
3789
+ tenant_id: string;
3790
+ updated_at?: string;
3791
+ };
3792
+ Update: {
3793
+ avatar_url?: string | null;
3794
+ color?: string | null;
3795
+ created_at?: string;
3796
+ email?: string | null;
3797
+ id?: string;
3798
+ is_active?: boolean;
3799
+ leave_balance_hours?: number;
3800
+ name?: string;
3801
+ persnr?: number | null;
3802
+ phone?: string | null;
3803
+ role?: string;
3804
+ tenant_id?: string;
3805
+ updated_at?: string;
3806
+ };
3807
+ Relationships: [
3808
+ {
3809
+ foreignKeyName: "monteurs_tenant_id_fkey";
3810
+ columns: ["tenant_id"];
3811
+ isOneToOne: false;
3812
+ referencedRelation: "tenants";
3813
+ referencedColumns: ["id"];
3814
+ }
3815
+ ];
3816
+ };
2910
3817
  notifications: {
2911
3818
  Row: {
2912
3819
  created_at: string;
@@ -3539,6 +4446,36 @@ export type Database = {
3539
4446
  };
3540
4447
  Relationships: [];
3541
4448
  };
4449
+ pickstation_print_log: {
4450
+ Row: {
4451
+ customer_name: string | null;
4452
+ documents: string[];
4453
+ id: string;
4454
+ ip_address: string | null;
4455
+ order_id: string;
4456
+ order_number: string | null;
4457
+ printed_at: string;
4458
+ };
4459
+ Insert: {
4460
+ customer_name?: string | null;
4461
+ documents?: string[];
4462
+ id?: string;
4463
+ ip_address?: string | null;
4464
+ order_id: string;
4465
+ order_number?: string | null;
4466
+ printed_at?: string;
4467
+ };
4468
+ Update: {
4469
+ customer_name?: string | null;
4470
+ documents?: string[];
4471
+ id?: string;
4472
+ ip_address?: string | null;
4473
+ order_id?: string;
4474
+ order_number?: string | null;
4475
+ printed_at?: string;
4476
+ };
4477
+ Relationships: [];
4478
+ };
3542
4479
  pipeline_settings: {
3543
4480
  Row: {
3544
4481
  created_at: string;
@@ -3764,6 +4701,7 @@ export type Database = {
3764
4701
  email: string | null;
3765
4702
  id: string;
3766
4703
  notification_preferences: Json;
4704
+ tenant_id: string | null;
3767
4705
  updated_at: string;
3768
4706
  };
3769
4707
  Insert: {
@@ -3772,6 +4710,7 @@ export type Database = {
3772
4710
  email?: string | null;
3773
4711
  id: string;
3774
4712
  notification_preferences?: Json;
4713
+ tenant_id?: string | null;
3775
4714
  updated_at?: string;
3776
4715
  };
3777
4716
  Update: {
@@ -3780,9 +4719,18 @@ export type Database = {
3780
4719
  email?: string | null;
3781
4720
  id?: string;
3782
4721
  notification_preferences?: Json;
4722
+ tenant_id?: string | null;
3783
4723
  updated_at?: string;
3784
4724
  };
3785
- Relationships: [];
4725
+ Relationships: [
4726
+ {
4727
+ foreignKeyName: "profiles_tenant_id_fkey";
4728
+ columns: ["tenant_id"];
4729
+ isOneToOne: false;
4730
+ referencedRelation: "tenants";
4731
+ referencedColumns: ["id"];
4732
+ }
4733
+ ];
3786
4734
  };
3787
4735
  projects: {
3788
4736
  Row: {
@@ -4514,6 +5462,83 @@ export type Database = {
4514
5462
  }
4515
5463
  ];
4516
5464
  };
5465
+ reception_notifications: {
5466
+ Row: {
5467
+ booking_id: string | null;
5468
+ created_at: string;
5469
+ id: string;
5470
+ is_read: boolean;
5471
+ message: string;
5472
+ recipient_email: string | null;
5473
+ title: string;
5474
+ type: string;
5475
+ };
5476
+ Insert: {
5477
+ booking_id?: string | null;
5478
+ created_at?: string;
5479
+ id?: string;
5480
+ is_read?: boolean;
5481
+ message: string;
5482
+ recipient_email?: string | null;
5483
+ title: string;
5484
+ type: string;
5485
+ };
5486
+ Update: {
5487
+ booking_id?: string | null;
5488
+ created_at?: string;
5489
+ id?: string;
5490
+ is_read?: boolean;
5491
+ message?: string;
5492
+ recipient_email?: string | null;
5493
+ title?: string;
5494
+ type?: string;
5495
+ };
5496
+ Relationships: [
5497
+ {
5498
+ foreignKeyName: "reception_notifications_booking_id_fkey";
5499
+ columns: ["booking_id"];
5500
+ isOneToOne: false;
5501
+ referencedRelation: "bookings";
5502
+ referencedColumns: ["id"];
5503
+ }
5504
+ ];
5505
+ };
5506
+ rooms: {
5507
+ Row: {
5508
+ capacity: number;
5509
+ color_code: string | null;
5510
+ created_at: string;
5511
+ description: string | null;
5512
+ hourly_rate: number;
5513
+ id: string;
5514
+ image_url: string | null;
5515
+ is_active: boolean;
5516
+ name: string;
5517
+ };
5518
+ Insert: {
5519
+ capacity?: number;
5520
+ color_code?: string | null;
5521
+ created_at?: string;
5522
+ description?: string | null;
5523
+ hourly_rate?: number;
5524
+ id?: string;
5525
+ image_url?: string | null;
5526
+ is_active?: boolean;
5527
+ name: string;
5528
+ };
5529
+ Update: {
5530
+ capacity?: number;
5531
+ color_code?: string | null;
5532
+ created_at?: string;
5533
+ description?: string | null;
5534
+ hourly_rate?: number;
5535
+ id?: string;
5536
+ image_url?: string | null;
5537
+ is_active?: boolean;
5538
+ name?: string;
5539
+ };
5540
+ Relationships: [];
5541
+ };
4517
5542
  supplier_products: {
4518
5543
  Row: {
4519
5544
  article_number: string | null;
@@ -4609,6 +5634,30 @@ export type Database = {
4609
5634
  };
4610
5635
  Relationships: [];
4611
5636
  };
5637
+ tenants: {
5638
+ Row: {
5639
+ created_at: string;
5640
+ id: string;
5641
+ name: string;
5642
+ slug: string | null;
5643
+ updated_at: string;
5644
+ };
5645
+ Insert: {
5646
+ created_at?: string;
5647
+ id?: string;
5648
+ name?: string;
5649
+ slug?: string | null;
5650
+ updated_at?: string;
5651
+ };
5652
+ Update: {
5653
+ created_at?: string;
5654
+ id?: string;
5655
+ name?: string;
5656
+ slug?: string | null;
5657
+ updated_at?: string;
5658
+ };
5659
+ Relationships: [];
5660
+ };
4612
5661
  trade_item_drafts: {
4613
5662
  Row: {
4614
5663
  connection_id: string | null;
@@ -4636,45 +5685,108 @@ export type Database = {
4636
5685
  };
4637
5686
  Relationships: [];
4638
5687
  };
4639
- twinfield_credentials: {
5688
+ twinfield_connections: {
4640
5689
  Row: {
4641
- administration_code: string | null;
4642
- client_id: string | null;
5690
+ access_token: string | null;
5691
+ client_id: string;
4643
5692
  client_secret: string | null;
4644
- cluster: string | null;
5693
+ cluster_uri: string | null;
5694
+ company_code: string | null;
5695
+ company_name: string | null;
4645
5696
  connected_at: string | null;
4646
5697
  created_at: string;
4647
- environment: string | null;
5698
+ environment: string;
4648
5699
  id: string;
4649
- redirect_uri: string | null;
5700
+ is_active: boolean;
5701
+ label: string | null;
5702
+ office_code: string | null;
5703
+ redirect_uri: string;
4650
5704
  refresh_token: string | null;
5705
+ token_expires_at: string | null;
4651
5706
  updated_at: string;
4652
5707
  user_id: string;
4653
5708
  };
4654
5709
  Insert: {
4655
- administration_code?: string | null;
4656
- client_id?: string | null;
5710
+ access_token?: string | null;
5711
+ client_id: string;
4657
5712
  client_secret?: string | null;
4658
- cluster?: string | null;
5713
+ cluster_uri?: string | null;
5714
+ company_code?: string | null;
5715
+ company_name?: string | null;
4659
5716
  connected_at?: string | null;
4660
5717
  created_at?: string;
4661
- environment?: string | null;
5718
+ environment: string;
4662
5719
  id?: string;
4663
- redirect_uri?: string | null;
5720
+ is_active?: boolean;
5721
+ label?: string | null;
5722
+ office_code?: string | null;
5723
+ redirect_uri: string;
4664
5724
  refresh_token?: string | null;
5725
+ token_expires_at?: string | null;
4665
5726
  updated_at?: string;
4666
5727
  user_id: string;
4667
5728
  };
4668
5729
  Update: {
4669
- administration_code?: string | null;
4670
- client_id?: string | null;
5730
+ access_token?: string | null;
5731
+ client_id?: string;
4671
5732
  client_secret?: string | null;
4672
- cluster?: string | null;
5733
+ cluster_uri?: string | null;
5734
+ company_code?: string | null;
5735
+ company_name?: string | null;
4673
5736
  connected_at?: string | null;
4674
5737
  created_at?: string;
4675
- environment?: string | null;
5738
+ environment?: string;
4676
5739
  id?: string;
4677
- redirect_uri?: string | null;
5740
+ is_active?: boolean;
5741
+ label?: string | null;
5742
+ office_code?: string | null;
5743
+ redirect_uri?: string;
5744
+ refresh_token?: string | null;
5745
+ token_expires_at?: string | null;
5746
+ updated_at?: string;
5747
+ user_id?: string;
5748
+ };
5749
+ Relationships: [];
5750
+ };
5751
+ twinfield_credentials: {
5752
+ Row: {
5753
+ administration_code: string | null;
5754
+ client_id: string | null;
5755
+ client_secret: string | null;
5756
+ cluster: string | null;
5757
+ connected_at: string | null;
5758
+ created_at: string;
5759
+ environment: string | null;
5760
+ id: string;
5761
+ redirect_uri: string | null;
5762
+ refresh_token: string | null;
5763
+ updated_at: string;
5764
+ user_id: string;
5765
+ };
5766
+ Insert: {
5767
+ administration_code?: string | null;
5768
+ client_id?: string | null;
5769
+ client_secret?: string | null;
5770
+ cluster?: string | null;
5771
+ connected_at?: string | null;
5772
+ created_at?: string;
5773
+ environment?: string | null;
5774
+ id?: string;
5775
+ redirect_uri?: string | null;
5776
+ refresh_token?: string | null;
5777
+ updated_at?: string;
5778
+ user_id: string;
5779
+ };
5780
+ Update: {
5781
+ administration_code?: string | null;
5782
+ client_id?: string | null;
5783
+ client_secret?: string | null;
5784
+ cluster?: string | null;
5785
+ connected_at?: string | null;
5786
+ created_at?: string;
5787
+ environment?: string | null;
5788
+ id?: string;
5789
+ redirect_uri?: string | null;
4678
5790
  refresh_token?: string | null;
4679
5791
  updated_at?: string;
4680
5792
  user_id?: string;
@@ -4738,6 +5850,50 @@ export type Database = {
4738
5850
  };
4739
5851
  Relationships: [];
4740
5852
  };
5853
+ twinfield_customers_cache: {
5854
+ Row: {
5855
+ connection_id: string;
5856
+ country: string | null;
5857
+ data: Json;
5858
+ email: string | null;
5859
+ fetched_at: string;
5860
+ modified_at: string | null;
5861
+ name: string | null;
5862
+ twinfield_code: string;
5863
+ vat_number: string | null;
5864
+ };
5865
+ Insert: {
5866
+ connection_id: string;
5867
+ country?: string | null;
5868
+ data?: Json;
5869
+ email?: string | null;
5870
+ fetched_at?: string;
5871
+ modified_at?: string | null;
5872
+ name?: string | null;
5873
+ twinfield_code: string;
5874
+ vat_number?: string | null;
5875
+ };
5876
+ Update: {
5877
+ connection_id?: string;
5878
+ country?: string | null;
5879
+ data?: Json;
5880
+ email?: string | null;
5881
+ fetched_at?: string;
5882
+ modified_at?: string | null;
5883
+ name?: string | null;
5884
+ twinfield_code?: string;
5885
+ vat_number?: string | null;
5886
+ };
5887
+ Relationships: [
5888
+ {
5889
+ foreignKeyName: "twinfield_customers_cache_connection_id_fkey";
5890
+ columns: ["connection_id"];
5891
+ isOneToOne: false;
5892
+ referencedRelation: "twinfield_connections";
5893
+ referencedColumns: ["id"];
5894
+ }
5895
+ ];
5896
+ };
4741
5897
  twinfield_invoice_lines: {
4742
5898
  Row: {
4743
5899
  article_code: string | null;
@@ -4794,6 +5950,59 @@ export type Database = {
4794
5950
  }
4795
5951
  ];
4796
5952
  };
5953
+ twinfield_invoice_lines_cache_v2: {
5954
+ Row: {
5955
+ article_code: string | null;
5956
+ connection_id: string;
5957
+ data: Json;
5958
+ description: string | null;
5959
+ fetched_at: string;
5960
+ invoice_number: string;
5961
+ line_number: number;
5962
+ line_total: number | null;
5963
+ quantity: number | null;
5964
+ unit_price: number | null;
5965
+ vat_code: string | null;
5966
+ vat_rate: number | null;
5967
+ };
5968
+ Insert: {
5969
+ article_code?: string | null;
5970
+ connection_id: string;
5971
+ data?: Json;
5972
+ description?: string | null;
5973
+ fetched_at?: string;
5974
+ invoice_number: string;
5975
+ line_number: number;
5976
+ line_total?: number | null;
5977
+ quantity?: number | null;
5978
+ unit_price?: number | null;
5979
+ vat_code?: string | null;
5980
+ vat_rate?: number | null;
5981
+ };
5982
+ Update: {
5983
+ article_code?: string | null;
5984
+ connection_id?: string;
5985
+ data?: Json;
5986
+ description?: string | null;
5987
+ fetched_at?: string;
5988
+ invoice_number?: string;
5989
+ line_number?: number;
5990
+ line_total?: number | null;
5991
+ quantity?: number | null;
5992
+ unit_price?: number | null;
5993
+ vat_code?: string | null;
5994
+ vat_rate?: number | null;
5995
+ };
5996
+ Relationships: [
5997
+ {
5998
+ foreignKeyName: "twinfield_invoice_lines_cache_v2_connection_id_fkey";
5999
+ columns: ["connection_id"];
6000
+ isOneToOne: false;
6001
+ referencedRelation: "twinfield_connections";
6002
+ referencedColumns: ["id"];
6003
+ }
6004
+ ];
6005
+ };
4797
6006
  twinfield_invoice_settings: {
4798
6007
  Row: {
4799
6008
  created_at: string;
@@ -4950,82 +6159,478 @@ export type Database = {
4950
6159
  };
4951
6160
  Relationships: [];
4952
6161
  };
4953
- user_roles: {
6162
+ twinfield_invoices_cache_v2: {
6163
+ Row: {
6164
+ connection_id: string;
6165
+ currency: string | null;
6166
+ customer_code: string | null;
6167
+ data: Json;
6168
+ due_date: string | null;
6169
+ fetched_at: string;
6170
+ invoice_date: string | null;
6171
+ invoice_number: string;
6172
+ modified_at: string | null;
6173
+ outstanding_amount: number | null;
6174
+ status: string | null;
6175
+ status_label: string | null;
6176
+ total_excl: number | null;
6177
+ total_incl: number | null;
6178
+ vat_amount: number | null;
6179
+ };
6180
+ Insert: {
6181
+ connection_id: string;
6182
+ currency?: string | null;
6183
+ customer_code?: string | null;
6184
+ data?: Json;
6185
+ due_date?: string | null;
6186
+ fetched_at?: string;
6187
+ invoice_date?: string | null;
6188
+ invoice_number: string;
6189
+ modified_at?: string | null;
6190
+ outstanding_amount?: number | null;
6191
+ status?: string | null;
6192
+ status_label?: string | null;
6193
+ total_excl?: number | null;
6194
+ total_incl?: number | null;
6195
+ vat_amount?: number | null;
6196
+ };
6197
+ Update: {
6198
+ connection_id?: string;
6199
+ currency?: string | null;
6200
+ customer_code?: string | null;
6201
+ data?: Json;
6202
+ due_date?: string | null;
6203
+ fetched_at?: string;
6204
+ invoice_date?: string | null;
6205
+ invoice_number?: string;
6206
+ modified_at?: string | null;
6207
+ outstanding_amount?: number | null;
6208
+ status?: string | null;
6209
+ status_label?: string | null;
6210
+ total_excl?: number | null;
6211
+ total_incl?: number | null;
6212
+ vat_amount?: number | null;
6213
+ };
6214
+ Relationships: [
6215
+ {
6216
+ foreignKeyName: "twinfield_invoices_cache_v2_connection_id_fkey";
6217
+ columns: ["connection_id"];
6218
+ isOneToOne: false;
6219
+ referencedRelation: "twinfield_connections";
6220
+ referencedColumns: ["id"];
6221
+ }
6222
+ ];
6223
+ };
6224
+ twinfield_oauth_state: {
4954
6225
  Row: {
4955
6226
  created_at: string;
4956
- id: string;
4957
- role: Database["public"]["Enums"]["app_role"];
6227
+ environment: string;
6228
+ nonce: string | null;
6229
+ state: string;
4958
6230
  user_id: string;
4959
6231
  };
4960
6232
  Insert: {
4961
6233
  created_at?: string;
4962
- id?: string;
4963
- role: Database["public"]["Enums"]["app_role"];
6234
+ environment: string;
6235
+ nonce?: string | null;
6236
+ state: string;
4964
6237
  user_id: string;
4965
6238
  };
4966
6239
  Update: {
4967
6240
  created_at?: string;
4968
- id?: string;
4969
- role?: Database["public"]["Enums"]["app_role"];
6241
+ environment?: string;
6242
+ nonce?: string | null;
6243
+ state?: string;
4970
6244
  user_id?: string;
4971
6245
  };
6246
+ Relationships: [];
6247
+ };
6248
+ twinfield_push_queue: {
6249
+ Row: {
6250
+ attempts: number;
6251
+ connection_id: string;
6252
+ created_at: string;
6253
+ external_id: string | null;
6254
+ id: string;
6255
+ idempotency_key: string;
6256
+ last_error: string | null;
6257
+ next_attempt_at: string;
6258
+ office_code: string;
6259
+ payload: Json;
6260
+ status: string;
6261
+ updated_at: string;
6262
+ };
6263
+ Insert: {
6264
+ attempts?: number;
6265
+ connection_id: string;
6266
+ created_at?: string;
6267
+ external_id?: string | null;
6268
+ id?: string;
6269
+ idempotency_key: string;
6270
+ last_error?: string | null;
6271
+ next_attempt_at?: string;
6272
+ office_code: string;
6273
+ payload: Json;
6274
+ status?: string;
6275
+ updated_at?: string;
6276
+ };
6277
+ Update: {
6278
+ attempts?: number;
6279
+ connection_id?: string;
6280
+ created_at?: string;
6281
+ external_id?: string | null;
6282
+ id?: string;
6283
+ idempotency_key?: string;
6284
+ last_error?: string | null;
6285
+ next_attempt_at?: string;
6286
+ office_code?: string;
6287
+ payload?: Json;
6288
+ status?: string;
6289
+ updated_at?: string;
6290
+ };
4972
6291
  Relationships: [
4973
6292
  {
4974
- foreignKeyName: "user_roles_user_id_fkey";
4975
- columns: ["user_id"];
6293
+ foreignKeyName: "twinfield_push_queue_connection_id_fkey";
6294
+ columns: ["connection_id"];
4976
6295
  isOneToOne: false;
4977
- referencedRelation: "profiles";
6296
+ referencedRelation: "twinfield_connections";
4978
6297
  referencedColumns: ["id"];
4979
6298
  }
4980
6299
  ];
4981
6300
  };
4982
- };
4983
- Views: {
4984
- email_auth_connections_safe: {
6301
+ twinfield_settings: {
4985
6302
  Row: {
4986
- account_email: string | null;
4987
- created_at: string | null;
4988
- created_by: string | null;
4989
- display_name: string | null;
4990
- has_access_token: boolean | null;
4991
- has_client_id: boolean | null;
4992
- has_client_secret: boolean | null;
4993
- has_imap_password: boolean | null;
4994
- has_refresh_token: boolean | null;
4995
- has_smtp_password: boolean | null;
4996
- id: string | null;
4997
- imap_host: string | null;
4998
- imap_port: number | null;
4999
- imap_secure: boolean | null;
5000
- imap_username: string | null;
5001
- is_active: boolean | null;
5002
- last_error: string | null;
5003
- last_verified_at: string | null;
5004
- oauth_mode: string | null;
5005
- provider: string | null;
5006
- scopes: string[] | null;
5007
- smtp_host: string | null;
5008
- smtp_port: number | null;
5009
- smtp_secure: boolean | null;
5010
- smtp_username: string | null;
5011
- status: string | null;
5012
- token_expires_at: string | null;
5013
- updated_at: string | null;
6303
+ active_environment: string;
6304
+ id: number;
6305
+ updated_at: string;
5014
6306
  };
5015
6307
  Insert: {
5016
- account_email?: string | null;
5017
- created_at?: string | null;
5018
- created_by?: string | null;
5019
- display_name?: string | null;
5020
- has_access_token?: never;
5021
- has_client_id?: never;
5022
- has_client_secret?: never;
5023
- has_imap_password?: never;
5024
- has_refresh_token?: never;
5025
- has_smtp_password?: never;
5026
- id?: string | null;
5027
- imap_host?: string | null;
5028
- imap_port?: number | null;
6308
+ active_environment?: string;
6309
+ id?: number;
6310
+ updated_at?: string;
6311
+ };
6312
+ Update: {
6313
+ active_environment?: string;
6314
+ id?: number;
6315
+ updated_at?: string;
6316
+ };
6317
+ Relationships: [];
6318
+ };
6319
+ twinfield_sync_state: {
6320
+ Row: {
6321
+ connection_id: string;
6322
+ entity_type: string;
6323
+ last_error: string | null;
6324
+ last_modified_since: string;
6325
+ last_synced_at: string | null;
6326
+ updated_at: string;
6327
+ };
6328
+ Insert: {
6329
+ connection_id: string;
6330
+ entity_type: string;
6331
+ last_error?: string | null;
6332
+ last_modified_since?: string;
6333
+ last_synced_at?: string | null;
6334
+ updated_at?: string;
6335
+ };
6336
+ Update: {
6337
+ connection_id?: string;
6338
+ entity_type?: string;
6339
+ last_error?: string | null;
6340
+ last_modified_since?: string;
6341
+ last_synced_at?: string | null;
6342
+ updated_at?: string;
6343
+ };
6344
+ Relationships: [
6345
+ {
6346
+ foreignKeyName: "twinfield_sync_state_connection_id_fkey";
6347
+ columns: ["connection_id"];
6348
+ isOneToOne: false;
6349
+ referencedRelation: "twinfield_connections";
6350
+ referencedColumns: ["id"];
6351
+ }
6352
+ ];
6353
+ };
6354
+ twinfield_token_refresh_log: {
6355
+ Row: {
6356
+ attempted_at: string;
6357
+ connection_id: string;
6358
+ error: string | null;
6359
+ expires_at: string | null;
6360
+ id: string;
6361
+ ok: boolean;
6362
+ };
6363
+ Insert: {
6364
+ attempted_at?: string;
6365
+ connection_id: string;
6366
+ error?: string | null;
6367
+ expires_at?: string | null;
6368
+ id?: string;
6369
+ ok: boolean;
6370
+ };
6371
+ Update: {
6372
+ attempted_at?: string;
6373
+ connection_id?: string;
6374
+ error?: string | null;
6375
+ expires_at?: string | null;
6376
+ id?: string;
6377
+ ok?: boolean;
6378
+ };
6379
+ Relationships: [
6380
+ {
6381
+ foreignKeyName: "twinfield_token_refresh_log_connection_id_fkey";
6382
+ columns: ["connection_id"];
6383
+ isOneToOne: false;
6384
+ referencedRelation: "twinfield_connections";
6385
+ referencedColumns: ["id"];
6386
+ }
6387
+ ];
6388
+ };
6389
+ user_roles: {
6390
+ Row: {
6391
+ created_at: string;
6392
+ id: string;
6393
+ role: Database["public"]["Enums"]["app_role"];
6394
+ user_id: string;
6395
+ };
6396
+ Insert: {
6397
+ created_at?: string;
6398
+ id?: string;
6399
+ role: Database["public"]["Enums"]["app_role"];
6400
+ user_id: string;
6401
+ };
6402
+ Update: {
6403
+ created_at?: string;
6404
+ id?: string;
6405
+ role?: Database["public"]["Enums"]["app_role"];
6406
+ user_id?: string;
6407
+ };
6408
+ Relationships: [
6409
+ {
6410
+ foreignKeyName: "user_roles_user_id_fkey";
6411
+ columns: ["user_id"];
6412
+ isOneToOne: false;
6413
+ referencedRelation: "profiles";
6414
+ referencedColumns: ["id"];
6415
+ }
6416
+ ];
6417
+ };
6418
+ work_order_monteurs: {
6419
+ Row: {
6420
+ created_at: string;
6421
+ id: string;
6422
+ monteur_id: string;
6423
+ work_order_id: string;
6424
+ };
6425
+ Insert: {
6426
+ created_at?: string;
6427
+ id?: string;
6428
+ monteur_id: string;
6429
+ work_order_id: string;
6430
+ };
6431
+ Update: {
6432
+ created_at?: string;
6433
+ id?: string;
6434
+ monteur_id?: string;
6435
+ work_order_id?: string;
6436
+ };
6437
+ Relationships: [
6438
+ {
6439
+ foreignKeyName: "work_order_monteurs_monteur_id_fkey";
6440
+ columns: ["monteur_id"];
6441
+ isOneToOne: false;
6442
+ referencedRelation: "monteurs";
6443
+ referencedColumns: ["id"];
6444
+ },
6445
+ {
6446
+ foreignKeyName: "work_order_monteurs_work_order_id_fkey";
6447
+ columns: ["work_order_id"];
6448
+ isOneToOne: false;
6449
+ referencedRelation: "work_orders";
6450
+ referencedColumns: ["id"];
6451
+ }
6452
+ ];
6453
+ };
6454
+ work_orders: {
6455
+ Row: {
6456
+ assigned_to: string | null;
6457
+ city: string | null;
6458
+ contact_person: string | null;
6459
+ created_at: string;
6460
+ custom_fields: Json;
6461
+ customer_name: string;
6462
+ description: string;
6463
+ email: string | null;
6464
+ email_source: string | null;
6465
+ estimated_duration_hours: number | null;
6466
+ external_reference: string | null;
6467
+ follow_up_needed: boolean;
6468
+ id: string;
6469
+ mandate: string;
6470
+ mandate_budget: number;
6471
+ mandate_used: number;
6472
+ order_number: string;
6473
+ parent_work_order_id: string | null;
6474
+ pdf_url: string | null;
6475
+ phone: string | null;
6476
+ postal_code: string;
6477
+ priority: string;
6478
+ project_number: string | null;
6479
+ report_validated: boolean;
6480
+ room_number: string;
6481
+ scheduled_date: string | null;
6482
+ scheduled_end_time: string | null;
6483
+ scheduled_start_time: string | null;
6484
+ status: string;
6485
+ tenant_id: string;
6486
+ total_hours_worked: number | null;
6487
+ total_price: number | null;
6488
+ travel_time_minutes: number | null;
6489
+ updated_at: string;
6490
+ work_address: string;
6491
+ work_report: string | null;
6492
+ };
6493
+ Insert: {
6494
+ assigned_to?: string | null;
6495
+ city?: string | null;
6496
+ contact_person?: string | null;
6497
+ created_at?: string;
6498
+ custom_fields?: Json;
6499
+ customer_name?: string;
6500
+ description?: string;
6501
+ email?: string | null;
6502
+ email_source?: string | null;
6503
+ estimated_duration_hours?: number | null;
6504
+ external_reference?: string | null;
6505
+ follow_up_needed?: boolean;
6506
+ id?: string;
6507
+ mandate?: string;
6508
+ mandate_budget?: number;
6509
+ mandate_used?: number;
6510
+ order_number?: string;
6511
+ parent_work_order_id?: string | null;
6512
+ pdf_url?: string | null;
6513
+ phone?: string | null;
6514
+ postal_code?: string;
6515
+ priority?: string;
6516
+ project_number?: string | null;
6517
+ report_validated?: boolean;
6518
+ room_number?: string;
6519
+ scheduled_date?: string | null;
6520
+ scheduled_end_time?: string | null;
6521
+ scheduled_start_time?: string | null;
6522
+ status?: string;
6523
+ tenant_id: string;
6524
+ total_hours_worked?: number | null;
6525
+ total_price?: number | null;
6526
+ travel_time_minutes?: number | null;
6527
+ updated_at?: string;
6528
+ work_address?: string;
6529
+ work_report?: string | null;
6530
+ };
6531
+ Update: {
6532
+ assigned_to?: string | null;
6533
+ city?: string | null;
6534
+ contact_person?: string | null;
6535
+ created_at?: string;
6536
+ custom_fields?: Json;
6537
+ customer_name?: string;
6538
+ description?: string;
6539
+ email?: string | null;
6540
+ email_source?: string | null;
6541
+ estimated_duration_hours?: number | null;
6542
+ external_reference?: string | null;
6543
+ follow_up_needed?: boolean;
6544
+ id?: string;
6545
+ mandate?: string;
6546
+ mandate_budget?: number;
6547
+ mandate_used?: number;
6548
+ order_number?: string;
6549
+ parent_work_order_id?: string | null;
6550
+ pdf_url?: string | null;
6551
+ phone?: string | null;
6552
+ postal_code?: string;
6553
+ priority?: string;
6554
+ project_number?: string | null;
6555
+ report_validated?: boolean;
6556
+ room_number?: string;
6557
+ scheduled_date?: string | null;
6558
+ scheduled_end_time?: string | null;
6559
+ scheduled_start_time?: string | null;
6560
+ status?: string;
6561
+ tenant_id?: string;
6562
+ total_hours_worked?: number | null;
6563
+ total_price?: number | null;
6564
+ travel_time_minutes?: number | null;
6565
+ updated_at?: string;
6566
+ work_address?: string;
6567
+ work_report?: string | null;
6568
+ };
6569
+ Relationships: [
6570
+ {
6571
+ foreignKeyName: "work_orders_parent_work_order_id_fkey";
6572
+ columns: ["parent_work_order_id"];
6573
+ isOneToOne: false;
6574
+ referencedRelation: "work_orders";
6575
+ referencedColumns: ["id"];
6576
+ },
6577
+ {
6578
+ foreignKeyName: "work_orders_tenant_id_fkey";
6579
+ columns: ["tenant_id"];
6580
+ isOneToOne: false;
6581
+ referencedRelation: "tenants";
6582
+ referencedColumns: ["id"];
6583
+ }
6584
+ ];
6585
+ };
6586
+ };
6587
+ Views: {
6588
+ email_auth_connections_safe: {
6589
+ Row: {
6590
+ account_email: string | null;
6591
+ created_at: string | null;
6592
+ created_by: string | null;
6593
+ display_name: string | null;
6594
+ has_access_token: boolean | null;
6595
+ has_client_id: boolean | null;
6596
+ has_client_secret: boolean | null;
6597
+ has_imap_password: boolean | null;
6598
+ has_refresh_token: boolean | null;
6599
+ has_smtp_password: boolean | null;
6600
+ id: string | null;
6601
+ imap_host: string | null;
6602
+ imap_port: number | null;
6603
+ imap_secure: boolean | null;
6604
+ imap_username: string | null;
6605
+ is_active: boolean | null;
6606
+ last_error: string | null;
6607
+ last_verified_at: string | null;
6608
+ oauth_mode: string | null;
6609
+ provider: string | null;
6610
+ purpose_assignments: Json | null;
6611
+ scopes: string[] | null;
6612
+ smtp_host: string | null;
6613
+ smtp_port: number | null;
6614
+ smtp_secure: boolean | null;
6615
+ smtp_username: string | null;
6616
+ status: string | null;
6617
+ token_expires_at: string | null;
6618
+ updated_at: string | null;
6619
+ };
6620
+ Insert: {
6621
+ account_email?: string | null;
6622
+ created_at?: string | null;
6623
+ created_by?: string | null;
6624
+ display_name?: string | null;
6625
+ has_access_token?: never;
6626
+ has_client_id?: never;
6627
+ has_client_secret?: never;
6628
+ has_imap_password?: never;
6629
+ has_refresh_token?: never;
6630
+ has_smtp_password?: never;
6631
+ id?: string | null;
6632
+ imap_host?: string | null;
6633
+ imap_port?: number | null;
5029
6634
  imap_secure?: boolean | null;
5030
6635
  imap_username?: string | null;
5031
6636
  is_active?: boolean | null;
@@ -5033,49 +6638,409 @@ export type Database = {
5033
6638
  last_verified_at?: string | null;
5034
6639
  oauth_mode?: string | null;
5035
6640
  provider?: string | null;
6641
+ purpose_assignments?: Json | null;
5036
6642
  scopes?: string[] | null;
5037
6643
  smtp_host?: string | null;
5038
6644
  smtp_port?: number | null;
5039
6645
  smtp_secure?: boolean | null;
5040
6646
  smtp_username?: string | null;
5041
6647
  status?: string | null;
5042
- token_expires_at?: string | null;
5043
- updated_at?: string | null;
6648
+ token_expires_at?: string | null;
6649
+ updated_at?: string | null;
6650
+ };
6651
+ Update: {
6652
+ account_email?: string | null;
6653
+ created_at?: string | null;
6654
+ created_by?: string | null;
6655
+ display_name?: string | null;
6656
+ has_access_token?: never;
6657
+ has_client_id?: never;
6658
+ has_client_secret?: never;
6659
+ has_imap_password?: never;
6660
+ has_refresh_token?: never;
6661
+ has_smtp_password?: never;
6662
+ id?: string | null;
6663
+ imap_host?: string | null;
6664
+ imap_port?: number | null;
6665
+ imap_secure?: boolean | null;
6666
+ imap_username?: string | null;
6667
+ is_active?: boolean | null;
6668
+ last_error?: string | null;
6669
+ last_verified_at?: string | null;
6670
+ oauth_mode?: string | null;
6671
+ provider?: string | null;
6672
+ purpose_assignments?: Json | null;
6673
+ scopes?: string[] | null;
6674
+ smtp_host?: string | null;
6675
+ smtp_port?: number | null;
6676
+ smtp_secure?: boolean | null;
6677
+ smtp_username?: string | null;
6678
+ status?: string | null;
6679
+ token_expires_at?: string | null;
6680
+ updated_at?: string | null;
6681
+ };
6682
+ Relationships: [];
6683
+ };
6684
+ external_customers_grouped: {
6685
+ Row: {
6686
+ city: string | null;
6687
+ commercial_name: string | null;
6688
+ contact_person: string | null;
6689
+ country: string | null;
6690
+ display_name: string | null;
6691
+ email: string | null;
6692
+ fetched_at: string | null;
6693
+ gln: string | null;
6694
+ group_key: string | null;
6695
+ is_active: boolean | null;
6696
+ is_merged: boolean | null;
6697
+ logo_url: string | null;
6698
+ match_key: string | null;
6699
+ phone: string | null;
6700
+ providers: string[] | null;
6701
+ source_count: number | null;
6702
+ sources: Json | null;
6703
+ vat_number: string | null;
6704
+ website: string | null;
6705
+ };
6706
+ Relationships: [];
6707
+ };
6708
+ external_customers_unified: {
6709
+ Row: {
6710
+ city: string | null;
6711
+ commercial_name: string | null;
6712
+ company_name: string | null;
6713
+ connection_id: string | null;
6714
+ contact_person: string | null;
6715
+ country: string | null;
6716
+ email: string | null;
6717
+ external_id: string | null;
6718
+ fetched_at: string | null;
6719
+ gln: string | null;
6720
+ house_number: string | null;
6721
+ is_active: boolean | null;
6722
+ is_deleted: boolean | null;
6723
+ logo_url: string | null;
6724
+ phone: string | null;
6725
+ postal_code: string | null;
6726
+ provider: string | null;
6727
+ raw: Json | null;
6728
+ status: string | null;
6729
+ street: string | null;
6730
+ vat_number: string | null;
6731
+ website: string | null;
6732
+ };
6733
+ Relationships: [];
6734
+ };
6735
+ external_invoices_grouped: {
6736
+ Row: {
6737
+ currency: string | null;
6738
+ customer_external_id: string | null;
6739
+ customer_name: string | null;
6740
+ customer_vat: string | null;
6741
+ due_at: string | null;
6742
+ group_key: string | null;
6743
+ invoice_number: string | null;
6744
+ is_merged: boolean | null;
6745
+ issued_at: string | null;
6746
+ modified_at: string | null;
6747
+ open_amount: number | null;
6748
+ paid_at: string | null;
6749
+ providers: string[] | null;
6750
+ source_count: number | null;
6751
+ sources: Json | null;
6752
+ status: string | null;
6753
+ total_excl: number | null;
6754
+ total_incl: number | null;
6755
+ total_vat: number | null;
6756
+ };
6757
+ Relationships: [];
6758
+ };
6759
+ external_invoices_unified: {
6760
+ Row: {
6761
+ connection_id: string | null;
6762
+ currency: string | null;
6763
+ customer_external_id: string | null;
6764
+ customer_name: string | null;
6765
+ customer_vat: string | null;
6766
+ due_at: string | null;
6767
+ external_id: string | null;
6768
+ invoice_number: string | null;
6769
+ issued_at: string | null;
6770
+ open_amount: number | null;
6771
+ owner_user_id: string | null;
6772
+ paid_at: string | null;
6773
+ raw: Json | null;
6774
+ source: string | null;
6775
+ status: string | null;
6776
+ synced_at: string | null;
6777
+ total_excl: number | null;
6778
+ total_incl: number | null;
6779
+ total_vat: number | null;
6780
+ };
6781
+ Relationships: [];
6782
+ };
6783
+ v_external_customers_exact: {
6784
+ Row: {
6785
+ account_number: string | null;
6786
+ city: string | null;
6787
+ coc_number: string | null;
6788
+ company_name: string | null;
6789
+ connection_id: string | null;
6790
+ country: string | null;
6791
+ currency: string | null;
6792
+ email: string | null;
6793
+ external_id: string | null;
6794
+ is_sales: boolean | null;
6795
+ is_supplier: boolean | null;
6796
+ language: string | null;
6797
+ modified_at: string | null;
6798
+ phone: string | null;
6799
+ postal_code: string | null;
6800
+ raw: Json | null;
6801
+ source: string | null;
6802
+ street: string | null;
6803
+ synced_at: string | null;
6804
+ vat_number: string | null;
6805
+ website: string | null;
6806
+ };
6807
+ Insert: {
6808
+ account_number?: string | null;
6809
+ city?: string | null;
6810
+ coc_number?: string | null;
6811
+ company_name?: string | null;
6812
+ connection_id?: string | null;
6813
+ country?: string | null;
6814
+ currency?: string | null;
6815
+ email?: string | null;
6816
+ external_id?: string | null;
6817
+ is_sales?: boolean | null;
6818
+ is_supplier?: boolean | null;
6819
+ language?: string | null;
6820
+ modified_at?: string | null;
6821
+ phone?: string | null;
6822
+ postal_code?: string | null;
6823
+ raw?: Json | null;
6824
+ source?: never;
6825
+ street?: string | null;
6826
+ synced_at?: string | null;
6827
+ vat_number?: string | null;
6828
+ website?: string | null;
6829
+ };
6830
+ Update: {
6831
+ account_number?: string | null;
6832
+ city?: string | null;
6833
+ coc_number?: string | null;
6834
+ company_name?: string | null;
6835
+ connection_id?: string | null;
6836
+ country?: string | null;
6837
+ currency?: string | null;
6838
+ email?: string | null;
6839
+ external_id?: string | null;
6840
+ is_sales?: boolean | null;
6841
+ is_supplier?: boolean | null;
6842
+ language?: string | null;
6843
+ modified_at?: string | null;
6844
+ phone?: string | null;
6845
+ postal_code?: string | null;
6846
+ raw?: Json | null;
6847
+ source?: never;
6848
+ street?: string | null;
6849
+ synced_at?: string | null;
6850
+ vat_number?: string | null;
6851
+ website?: string | null;
6852
+ };
6853
+ Relationships: [
6854
+ {
6855
+ foreignKeyName: "exact_customers_cache_connection_id_fkey";
6856
+ columns: ["connection_id"];
6857
+ isOneToOne: false;
6858
+ referencedRelation: "exact_connections";
6859
+ referencedColumns: ["id"];
6860
+ }
6861
+ ];
6862
+ };
6863
+ v_external_customers_floriday: {
6864
+ Row: {
6865
+ city: string | null;
6866
+ commercial_name: string | null;
6867
+ company_name: string | null;
6868
+ connection_id: string | null;
6869
+ contact_person: string | null;
6870
+ country: string | null;
6871
+ email: string | null;
6872
+ external_id: string | null;
6873
+ fetched_at: string | null;
6874
+ gln: string | null;
6875
+ house_number: string | null;
6876
+ is_active: boolean | null;
6877
+ is_deleted: boolean | null;
6878
+ logo_url: string | null;
6879
+ phone: string | null;
6880
+ postal_code: string | null;
6881
+ provider: string | null;
6882
+ raw: Json | null;
6883
+ status: string | null;
6884
+ street: string | null;
6885
+ vat_number: string | null;
6886
+ website: string | null;
6887
+ };
6888
+ Relationships: [
6889
+ {
6890
+ foreignKeyName: "floriday_customers_cache_connection_id_fkey";
6891
+ columns: ["connection_id"];
6892
+ isOneToOne: false;
6893
+ referencedRelation: "floriday_connections";
6894
+ referencedColumns: ["id"];
6895
+ }
6896
+ ];
6897
+ };
6898
+ v_external_customers_twinfield: {
6899
+ Row: {
6900
+ city: string | null;
6901
+ commercial_name: string | null;
6902
+ company_name: string | null;
6903
+ connection_id: string | null;
6904
+ contact_person: string | null;
6905
+ country: string | null;
6906
+ email: string | null;
6907
+ external_id: string | null;
6908
+ fetched_at: string | null;
6909
+ gln: string | null;
6910
+ house_number: string | null;
6911
+ is_active: boolean | null;
6912
+ is_deleted: boolean | null;
6913
+ logo_url: string | null;
6914
+ phone: string | null;
6915
+ postal_code: string | null;
6916
+ provider: string | null;
6917
+ raw: Json | null;
6918
+ status: string | null;
6919
+ street: string | null;
6920
+ vat_number: string | null;
6921
+ website: string | null;
6922
+ };
6923
+ Relationships: [
6924
+ {
6925
+ foreignKeyName: "twinfield_customers_cache_connection_id_fkey";
6926
+ columns: ["connection_id"];
6927
+ isOneToOne: false;
6928
+ referencedRelation: "twinfield_connections";
6929
+ referencedColumns: ["id"];
6930
+ }
6931
+ ];
6932
+ };
6933
+ v_external_invoices_exact: {
6934
+ Row: {
6935
+ connection_id: string | null;
6936
+ currency: string | null;
6937
+ customer_external_id: string | null;
6938
+ customer_name: string | null;
6939
+ customer_vat: string | null;
6940
+ due_at: string | null;
6941
+ external_id: string | null;
6942
+ invoice_number: string | null;
6943
+ issued_at: string | null;
6944
+ open_amount: number | null;
6945
+ paid_at: string | null;
6946
+ raw: Json | null;
6947
+ source: string | null;
6948
+ status: string | null;
6949
+ synced_at: string | null;
6950
+ total_excl: number | null;
6951
+ total_incl: number | null;
6952
+ total_vat: number | null;
6953
+ };
6954
+ Insert: {
6955
+ connection_id?: string | null;
6956
+ currency?: never;
6957
+ customer_external_id?: string | null;
6958
+ customer_name?: string | null;
6959
+ customer_vat?: never;
6960
+ due_at?: string | null;
6961
+ external_id?: string | null;
6962
+ invoice_number?: string | null;
6963
+ issued_at?: string | null;
6964
+ open_amount?: number | null;
6965
+ paid_at?: string | null;
6966
+ raw?: Json | null;
6967
+ source?: never;
6968
+ status?: string | null;
6969
+ synced_at?: string | null;
6970
+ total_excl?: number | null;
6971
+ total_incl?: number | null;
6972
+ total_vat?: number | null;
5044
6973
  };
5045
6974
  Update: {
5046
- account_email?: string | null;
5047
- created_at?: string | null;
5048
- created_by?: string | null;
5049
- display_name?: string | null;
5050
- has_access_token?: never;
5051
- has_client_id?: never;
5052
- has_client_secret?: never;
5053
- has_imap_password?: never;
5054
- has_refresh_token?: never;
5055
- has_smtp_password?: never;
5056
- id?: string | null;
5057
- imap_host?: string | null;
5058
- imap_port?: number | null;
5059
- imap_secure?: boolean | null;
5060
- imap_username?: string | null;
5061
- is_active?: boolean | null;
5062
- last_error?: string | null;
5063
- last_verified_at?: string | null;
5064
- oauth_mode?: string | null;
5065
- provider?: string | null;
5066
- scopes?: string[] | null;
5067
- smtp_host?: string | null;
5068
- smtp_port?: number | null;
5069
- smtp_secure?: boolean | null;
5070
- smtp_username?: string | null;
6975
+ connection_id?: string | null;
6976
+ currency?: never;
6977
+ customer_external_id?: string | null;
6978
+ customer_name?: string | null;
6979
+ customer_vat?: never;
6980
+ due_at?: string | null;
6981
+ external_id?: string | null;
6982
+ invoice_number?: string | null;
6983
+ issued_at?: string | null;
6984
+ open_amount?: number | null;
6985
+ paid_at?: string | null;
6986
+ raw?: Json | null;
6987
+ source?: never;
5071
6988
  status?: string | null;
5072
- token_expires_at?: string | null;
5073
- updated_at?: string | null;
6989
+ synced_at?: string | null;
6990
+ total_excl?: number | null;
6991
+ total_incl?: number | null;
6992
+ total_vat?: number | null;
5074
6993
  };
5075
- Relationships: [];
6994
+ Relationships: [
6995
+ {
6996
+ foreignKeyName: "exact_invoices_cache_connection_id_fkey";
6997
+ columns: ["connection_id"];
6998
+ isOneToOne: false;
6999
+ referencedRelation: "exact_connections";
7000
+ referencedColumns: ["id"];
7001
+ }
7002
+ ];
7003
+ };
7004
+ v_external_invoices_twinfield: {
7005
+ Row: {
7006
+ connection_id: string | null;
7007
+ currency: string | null;
7008
+ customer_external_id: string | null;
7009
+ customer_name: string | null;
7010
+ customer_vat: string | null;
7011
+ due_at: string | null;
7012
+ external_id: string | null;
7013
+ invoice_number: string | null;
7014
+ issued_at: string | null;
7015
+ open_amount: number | null;
7016
+ owner_user_id: string | null;
7017
+ paid_at: string | null;
7018
+ raw: Json | null;
7019
+ source: string | null;
7020
+ status: string | null;
7021
+ synced_at: string | null;
7022
+ total_excl: number | null;
7023
+ total_incl: number | null;
7024
+ total_vat: number | null;
7025
+ };
7026
+ Relationships: [
7027
+ {
7028
+ foreignKeyName: "twinfield_invoices_cache_v2_connection_id_fkey";
7029
+ columns: ["connection_id"];
7030
+ isOneToOne: false;
7031
+ referencedRelation: "twinfield_connections";
7032
+ referencedColumns: ["id"];
7033
+ }
7034
+ ];
5076
7035
  };
5077
7036
  };
5078
7037
  Functions: {
7038
+ call_exact_route: {
7039
+ Args: {
7040
+ path: string;
7041
+ };
7042
+ Returns: number;
7043
+ };
5079
7044
  dashboard_list_public_schema: {
5080
7045
  Args: never;
5081
7046
  Returns: {
@@ -5096,6 +7061,33 @@ export type Database = {
5096
7061
  };
5097
7062
  Returns: string;
5098
7063
  };
7064
+ email_auth_fetch_message: {
7065
+ Args: {
7066
+ _connection_id: string;
7067
+ _external_id: string;
7068
+ };
7069
+ Returns: Json;
7070
+ };
7071
+ email_auth_for_purpose: {
7072
+ Args: {
7073
+ _direction: string;
7074
+ _purpose: string;
7075
+ };
7076
+ Returns: {
7077
+ account_email: string;
7078
+ display_name: string;
7079
+ id: string;
7080
+ last_error: string;
7081
+ last_verified_at: string;
7082
+ needs_reauth: boolean;
7083
+ provider: string;
7084
+ status: string;
7085
+ }[];
7086
+ };
7087
+ ensure_user_tenant: {
7088
+ Args: never;
7089
+ Returns: string;
7090
+ };
5099
7091
  exact_decrypt: {
5100
7092
  Args: {
5101
7093
  cipher: string;
@@ -5142,6 +7134,17 @@ export type Database = {
5142
7134
  preferred_warehouse_name: string;
5143
7135
  }[];
5144
7136
  };
7137
+ get_active_twinfield_public: {
7138
+ Args: never;
7139
+ Returns: {
7140
+ active_environment: string;
7141
+ company_code: string;
7142
+ company_name: string;
7143
+ connection_id: string;
7144
+ environment: string;
7145
+ office_code: string;
7146
+ }[];
7147
+ };
5145
7148
  get_floriday_cron_jobs: {
5146
7149
  Args: never;
5147
7150
  Returns: {
@@ -5157,6 +7160,37 @@ export type Database = {
5157
7160
  };
5158
7161
  Returns: Json;
5159
7162
  };
7163
+ get_room_busy_windows: {
7164
+ Args: {
7165
+ p_from: string;
7166
+ p_to: string;
7167
+ };
7168
+ Returns: {
7169
+ end_time: string;
7170
+ room_id: string;
7171
+ start_time: string;
7172
+ status: string;
7173
+ }[];
7174
+ };
7175
+ get_twinfield_cron_jobs: {
7176
+ Args: never;
7177
+ Returns: {
7178
+ active: boolean;
7179
+ jobname: string;
7180
+ schedule: string;
7181
+ url: string;
7182
+ }[];
7183
+ };
7184
+ get_user_tenant_id: {
7185
+ Args: never;
7186
+ Returns: string;
7187
+ };
7188
+ get_work_order_tenant_id: {
7189
+ Args: {
7190
+ wo_id: string;
7191
+ };
7192
+ Returns: string;
7193
+ };
5160
7194
  has_role: {
5161
7195
  Args: {
5162
7196
  _role: Database["public"]["Enums"]["app_role"];
@@ -5164,6 +7198,34 @@ export type Database = {
5164
7198
  };
5165
7199
  Returns: boolean;
5166
7200
  };
7201
+ is_authenticated: {
7202
+ Args: never;
7203
+ Returns: boolean;
7204
+ };
7205
+ is_developer: {
7206
+ Args: never;
7207
+ Returns: boolean;
7208
+ };
7209
+ next_work_order_number: {
7210
+ Args: {
7211
+ p_parent_work_order_id?: string;
7212
+ p_tenant_id: string;
7213
+ };
7214
+ Returns: string;
7215
+ };
7216
+ normalize_vat: {
7217
+ Args: {
7218
+ v: string;
7219
+ };
7220
+ Returns: string;
7221
+ };
7222
+ schedule_floriday_carriers_sync: {
7223
+ Args: {
7224
+ p_apikey: string;
7225
+ p_url: string;
7226
+ };
7227
+ Returns: number;
7228
+ };
5167
7229
  schedule_floriday_connections_sync: {
5168
7230
  Args: {
5169
7231
  p_apikey: string;
@@ -5206,6 +7268,56 @@ export type Database = {
5206
7268
  };
5207
7269
  Returns: number;
5208
7270
  };
7271
+ schedule_twinfield_customers_sync: {
7272
+ Args: {
7273
+ p_apikey: string;
7274
+ p_url: string;
7275
+ };
7276
+ Returns: number;
7277
+ } | {
7278
+ Args: {
7279
+ p_apikey: string;
7280
+ p_cron_secret?: string;
7281
+ p_url: string;
7282
+ };
7283
+ Returns: number;
7284
+ };
7285
+ schedule_twinfield_invoices_sync: {
7286
+ Args: {
7287
+ p_apikey: string;
7288
+ p_url: string;
7289
+ };
7290
+ Returns: number;
7291
+ } | {
7292
+ Args: {
7293
+ p_apikey: string;
7294
+ p_cron_secret?: string;
7295
+ p_url: string;
7296
+ };
7297
+ Returns: number;
7298
+ };
7299
+ schedule_twinfield_push_queue_flush: {
7300
+ Args: {
7301
+ p_apikey: string;
7302
+ p_cron_secret?: string;
7303
+ p_url: string;
7304
+ };
7305
+ Returns: number;
7306
+ };
7307
+ schedule_twinfield_token_refresh: {
7308
+ Args: {
7309
+ p_apikey: string;
7310
+ p_url: string;
7311
+ };
7312
+ Returns: number;
7313
+ } | {
7314
+ Args: {
7315
+ p_apikey: string;
7316
+ p_cron_secret?: string;
7317
+ p_url: string;
7318
+ };
7319
+ Returns: number;
7320
+ };
5209
7321
  show_limit: {
5210
7322
  Args: never;
5211
7323
  Returns: number;
@@ -5216,10 +7328,23 @@ export type Database = {
5216
7328
  };
5217
7329
  Returns: string[];
5218
7330
  };
7331
+ twinfield_decrypt: {
7332
+ Args: {
7333
+ cipher: string;
7334
+ };
7335
+ Returns: string;
7336
+ };
7337
+ twinfield_encrypt: {
7338
+ Args: {
7339
+ plain: string;
7340
+ };
7341
+ Returns: string;
7342
+ };
5219
7343
  };
5220
7344
  Enums: {
5221
- app_role: "admin" | "manager" | "warehouse" | "sales" | "developer";
7345
+ app_role: "admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie";
5222
7346
  exact_env: "staging" | "live";
7347
+ exact_push_status: "pending" | "sent" | "error";
5223
7348
  quote_status: "concept" | "verzonden" | "bekeken" | "in_behandeling" | "geaccepteerd" | "afgewezen" | "verlopen" | "gearchiveerd";
5224
7349
  };
5225
7350
  CompositeTypes: {
@@ -5279,8 +7404,9 @@ export type CompositeTypes<PublicCompositeTypeNameOrOptions extends keyof Defaul
5279
7404
  export declare const Constants: {
5280
7405
  readonly public: {
5281
7406
  readonly Enums: {
5282
- readonly app_role: readonly ["admin", "manager", "warehouse", "sales", "developer"];
7407
+ readonly app_role: readonly ["admin", "manager", "warehouse", "sales", "developer", "receptie"];
5283
7408
  readonly exact_env: readonly ["staging", "live"];
7409
+ readonly exact_push_status: readonly ["pending", "sent", "error"];
5284
7410
  readonly quote_status: readonly ["concept", "verzonden", "bekeken", "in_behandeling", "geaccepteerd", "afgewezen", "verlopen", "gearchiveerd"];
5285
7411
  };
5286
7412
  };