@flowselections/floriday-afhandeling-module 1.0.6 → 1.0.7

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 (30) hide show
  1. package/dist-lib/components/afhandeling/LeveringenPage.d.ts.map +1 -1
  2. package/dist-lib/components/afhandeling/LeveringenPage.js +23 -2
  3. package/dist-lib/components/afhandeling/VervoerderForm.d.ts +6 -0
  4. package/dist-lib/components/afhandeling/VervoerderForm.d.ts.map +1 -0
  5. package/dist-lib/components/afhandeling/VervoerderForm.js +136 -0
  6. package/dist-lib/components/afhandeling/VervoerdersPage.d.ts +2 -0
  7. package/dist-lib/components/afhandeling/VervoerdersPage.d.ts.map +1 -0
  8. package/dist-lib/components/afhandeling/VervoerdersPage.js +41 -0
  9. package/dist-lib/index.d.ts +1 -0
  10. package/dist-lib/index.d.ts.map +1 -1
  11. package/dist-lib/index.js +5 -3
  12. package/dist-lib/integrations/supabase/auth-middleware.d.ts +1288 -21
  13. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
  14. package/dist-lib/integrations/supabase/client.d.ts +1288 -21
  15. package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
  16. package/dist-lib/integrations/supabase/client.server.d.ts +1288 -21
  17. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
  18. package/dist-lib/integrations/supabase/types.d.ts +1299 -7
  19. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  20. package/dist-lib/integrations/supabase/types.js +10 -0
  21. package/dist-lib/lib/carriers.functions.d.ts +20428 -0
  22. package/dist-lib/lib/carriers.functions.d.ts.map +1 -0
  23. package/dist-lib/lib/carriers.functions.js +131 -0
  24. package/dist-lib/lib/countries.d.ts +7 -0
  25. package/dist-lib/lib/countries.d.ts.map +1 -0
  26. package/dist-lib/lib/countries.js +47 -0
  27. package/dist-lib/lib/floriday.functions.d.ts +1290 -22
  28. package/dist-lib/lib/floriday.functions.d.ts.map +1 -1
  29. package/dist-lib/lib/floriday.functions.js +4 -5
  30. package/package.json +8 -3
@@ -229,6 +229,86 @@ export type Database = {
229
229
  };
230
230
  Relationships: [];
231
231
  };
232
+ carrier_shipping_rates: {
233
+ Row: {
234
+ carrier_id: string;
235
+ country_code: string;
236
+ created_at: string;
237
+ id: string;
238
+ price_per_trolley: number;
239
+ };
240
+ Insert: {
241
+ carrier_id: string;
242
+ country_code: string;
243
+ created_at?: string;
244
+ id?: string;
245
+ price_per_trolley: number;
246
+ };
247
+ Update: {
248
+ carrier_id?: string;
249
+ country_code?: string;
250
+ created_at?: string;
251
+ id?: string;
252
+ price_per_trolley?: number;
253
+ };
254
+ Relationships: [
255
+ {
256
+ foreignKeyName: "carrier_shipping_rates_carrier_id_fkey";
257
+ columns: ["carrier_id"];
258
+ isOneToOne: false;
259
+ referencedRelation: "carriers";
260
+ referencedColumns: ["id"];
261
+ }
262
+ ];
263
+ };
264
+ carriers: {
265
+ Row: {
266
+ address: string | null;
267
+ contact_person: string | null;
268
+ created_at: string;
269
+ delivery_days: number | null;
270
+ email: string | null;
271
+ id: string;
272
+ name: string;
273
+ notes: string | null;
274
+ phone: string | null;
275
+ signup_time_1: string | null;
276
+ signup_time_2: string | null;
277
+ updated_at: string;
278
+ user_id: string;
279
+ };
280
+ Insert: {
281
+ address?: string | null;
282
+ contact_person?: string | null;
283
+ created_at?: string;
284
+ delivery_days?: number | null;
285
+ email?: string | null;
286
+ id?: string;
287
+ name: string;
288
+ notes?: string | null;
289
+ phone?: string | null;
290
+ signup_time_1?: string | null;
291
+ signup_time_2?: string | null;
292
+ updated_at?: string;
293
+ user_id: string;
294
+ };
295
+ Update: {
296
+ address?: string | null;
297
+ contact_person?: string | null;
298
+ created_at?: string;
299
+ delivery_days?: number | null;
300
+ email?: string | null;
301
+ id?: string;
302
+ name?: string;
303
+ notes?: string | null;
304
+ phone?: string | null;
305
+ signup_time_1?: string | null;
306
+ signup_time_2?: string | null;
307
+ updated_at?: string;
308
+ user_id?: string;
309
+ };
310
+ Relationships: [];
311
+ };
232
312
  collections: {
233
313
  Row: {
234
314
  created_at: string;
@@ -958,6 +1038,99 @@ export type Database = {
958
1038
  };
959
1039
  Relationships: [];
960
1040
  };
1041
+ email_auth_connections: {
1042
+ Row: {
1043
+ access_token_encrypted: string | null;
1044
+ account_email: string | null;
1045
+ client_id_encrypted: string | null;
1046
+ client_secret_encrypted: string | null;
1047
+ created_at: string;
1048
+ created_by: string | null;
1049
+ display_name: string | null;
1050
+ id: string;
1051
+ imap_host: string | null;
1052
+ imap_password_encrypted: string | null;
1053
+ imap_port: number | null;
1054
+ imap_secure: boolean | null;
1055
+ imap_username: string | null;
1056
+ is_active: boolean;
1057
+ last_error: string | null;
1058
+ last_verified_at: string | null;
1059
+ oauth_mode: string | null;
1060
+ provider: string;
1061
+ refresh_token_encrypted: string | null;
1062
+ scopes: string[] | null;
1063
+ smtp_host: string | null;
1064
+ smtp_password_encrypted: string | null;
1065
+ smtp_port: number | null;
1066
+ smtp_secure: boolean | null;
1067
+ smtp_username: string | null;
1068
+ status: string;
1069
+ token_expires_at: string | null;
1070
+ updated_at: string;
1071
+ };
1072
+ Insert: {
1073
+ access_token_encrypted?: string | null;
1074
+ account_email?: string | null;
1075
+ client_id_encrypted?: string | null;
1076
+ client_secret_encrypted?: string | null;
1077
+ created_at?: string;
1078
+ created_by?: string | null;
1079
+ display_name?: string | null;
1080
+ id?: string;
1081
+ imap_host?: string | null;
1082
+ imap_password_encrypted?: string | null;
1083
+ imap_port?: number | null;
1084
+ imap_secure?: boolean | null;
1085
+ imap_username?: string | null;
1086
+ is_active?: boolean;
1087
+ last_error?: string | null;
1088
+ last_verified_at?: string | null;
1089
+ oauth_mode?: string | null;
1090
+ provider: string;
1091
+ refresh_token_encrypted?: string | null;
1092
+ scopes?: string[] | null;
1093
+ smtp_host?: string | null;
1094
+ smtp_password_encrypted?: string | null;
1095
+ smtp_port?: number | null;
1096
+ smtp_secure?: boolean | null;
1097
+ smtp_username?: string | null;
1098
+ status?: string;
1099
+ token_expires_at?: string | null;
1100
+ updated_at?: string;
1101
+ };
1102
+ Update: {
1103
+ access_token_encrypted?: string | null;
1104
+ account_email?: string | null;
1105
+ client_id_encrypted?: string | null;
1106
+ client_secret_encrypted?: string | null;
1107
+ created_at?: string;
1108
+ created_by?: string | null;
1109
+ display_name?: string | null;
1110
+ id?: string;
1111
+ imap_host?: string | null;
1112
+ imap_password_encrypted?: string | null;
1113
+ imap_port?: number | null;
1114
+ imap_secure?: boolean | null;
1115
+ imap_username?: string | null;
1116
+ is_active?: boolean;
1117
+ last_error?: string | null;
1118
+ last_verified_at?: string | null;
1119
+ oauth_mode?: string | null;
1120
+ provider?: string;
1121
+ refresh_token_encrypted?: string | null;
1122
+ scopes?: string[] | null;
1123
+ smtp_host?: string | null;
1124
+ smtp_password_encrypted?: string | null;
1125
+ smtp_port?: number | null;
1126
+ smtp_secure?: boolean | null;
1127
+ smtp_username?: string | null;
1128
+ status?: string;
1129
+ token_expires_at?: string | null;
1130
+ updated_at?: string;
1131
+ };
1132
+ Relationships: [];
1133
+ };
961
1134
  exact_account_analytics_cache: {
962
1135
  Row: {
963
1136
  account_id: string;
@@ -1327,11 +1500,15 @@ export type Database = {
1327
1500
  address_line1: string | null;
1328
1501
  address_line2: string | null;
1329
1502
  balance: number | null;
1503
+ chamber_of_commerce: string | null;
1330
1504
  city: string | null;
1505
+ classification_description: string | null;
1331
1506
  connection_id: string;
1332
1507
  contact_name: string | null;
1333
1508
  country: string | null;
1509
+ created_at_exact: string | null;
1334
1510
  credit_line: number | null;
1511
+ currency: string | null;
1335
1512
  data_raw: Json | null;
1336
1513
  email: string | null;
1337
1514
  exact_id: string;
@@ -1340,12 +1517,18 @@ export type Database = {
1340
1517
  id: string;
1341
1518
  is_sales: boolean | null;
1342
1519
  is_supplier: boolean | null;
1520
+ language: string | null;
1521
+ modified_at_exact: string | null;
1522
+ payment_condition_description: string | null;
1523
+ payment_condition_sales: string | null;
1343
1524
  phone: string | null;
1344
1525
  postal_code: string | null;
1526
+ remarks: string | null;
1345
1527
  search_text: string | null;
1346
1528
  status: string | null;
1347
1529
  updated_at: string;
1348
1530
  vat_number: string | null;
1531
+ website: string | null;
1349
1532
  };
1350
1533
  Insert: {
1351
1534
  account_name?: string | null;
@@ -1353,11 +1536,15 @@ export type Database = {
1353
1536
  address_line1?: string | null;
1354
1537
  address_line2?: string | null;
1355
1538
  balance?: number | null;
1539
+ chamber_of_commerce?: string | null;
1356
1540
  city?: string | null;
1541
+ classification_description?: string | null;
1357
1542
  connection_id: string;
1358
1543
  contact_name?: string | null;
1359
1544
  country?: string | null;
1545
+ created_at_exact?: string | null;
1360
1546
  credit_line?: number | null;
1547
+ currency?: string | null;
1361
1548
  data_raw?: Json | null;
1362
1549
  email?: string | null;
1363
1550
  exact_id: string;
@@ -1366,12 +1553,18 @@ export type Database = {
1366
1553
  id?: string;
1367
1554
  is_sales?: boolean | null;
1368
1555
  is_supplier?: boolean | null;
1556
+ language?: string | null;
1557
+ modified_at_exact?: string | null;
1558
+ payment_condition_description?: string | null;
1559
+ payment_condition_sales?: string | null;
1369
1560
  phone?: string | null;
1370
1561
  postal_code?: string | null;
1562
+ remarks?: string | null;
1371
1563
  search_text?: string | null;
1372
1564
  status?: string | null;
1373
1565
  updated_at?: string;
1374
1566
  vat_number?: string | null;
1567
+ website?: string | null;
1375
1568
  };
1376
1569
  Update: {
1377
1570
  account_name?: string | null;
@@ -1379,11 +1572,15 @@ export type Database = {
1379
1572
  address_line1?: string | null;
1380
1573
  address_line2?: string | null;
1381
1574
  balance?: number | null;
1575
+ chamber_of_commerce?: string | null;
1382
1576
  city?: string | null;
1577
+ classification_description?: string | null;
1383
1578
  connection_id?: string;
1384
1579
  contact_name?: string | null;
1385
1580
  country?: string | null;
1581
+ created_at_exact?: string | null;
1386
1582
  credit_line?: number | null;
1583
+ currency?: string | null;
1387
1584
  data_raw?: Json | null;
1388
1585
  email?: string | null;
1389
1586
  exact_id?: string;
@@ -1392,12 +1589,18 @@ export type Database = {
1392
1589
  id?: string;
1393
1590
  is_sales?: boolean | null;
1394
1591
  is_supplier?: boolean | null;
1592
+ language?: string | null;
1593
+ modified_at_exact?: string | null;
1594
+ payment_condition_description?: string | null;
1595
+ payment_condition_sales?: string | null;
1395
1596
  phone?: string | null;
1396
1597
  postal_code?: string | null;
1598
+ remarks?: string | null;
1397
1599
  search_text?: string | null;
1398
1600
  status?: string | null;
1399
1601
  updated_at?: string;
1400
1602
  vat_number?: string | null;
1603
+ website?: string | null;
1401
1604
  };
1402
1605
  Relationships: [
1403
1606
  {
@@ -1541,6 +1744,7 @@ export type Database = {
1541
1744
  connection_id: string;
1542
1745
  data_raw: Json | null;
1543
1746
  due_date: string | null;
1747
+ entry_id: string | null;
1544
1748
  exact_id: string;
1545
1749
  expires_at: string | null;
1546
1750
  fetched_at: string;
@@ -1566,6 +1770,7 @@ export type Database = {
1566
1770
  connection_id: string;
1567
1771
  data_raw?: Json | null;
1568
1772
  due_date?: string | null;
1773
+ entry_id?: string | null;
1569
1774
  exact_id: string;
1570
1775
  expires_at?: string | null;
1571
1776
  fetched_at?: string;
@@ -1591,6 +1796,7 @@ export type Database = {
1591
1796
  connection_id?: string;
1592
1797
  data_raw?: Json | null;
1593
1798
  due_date?: string | null;
1799
+ entry_id?: string | null;
1594
1800
  exact_id?: string;
1595
1801
  expires_at?: string | null;
1596
1802
  fetched_at?: string;
@@ -1671,6 +1877,27 @@ export type Database = {
1671
1877
  }
1672
1878
  ];
1673
1879
  };
1880
+ exact_refresh_locks: {
1881
+ Row: {
1882
+ environment: Database["public"]["Enums"]["exact_env"];
1883
+ locked_by: string;
1884
+ locked_until: string;
1885
+ updated_at: string;
1886
+ };
1887
+ Insert: {
1888
+ environment: Database["public"]["Enums"]["exact_env"];
1889
+ locked_by: string;
1890
+ locked_until: string;
1891
+ updated_at?: string;
1892
+ };
1893
+ Update: {
1894
+ environment?: Database["public"]["Enums"]["exact_env"];
1895
+ locked_by?: string;
1896
+ locked_until?: string;
1897
+ updated_at?: string;
1898
+ };
1899
+ Relationships: [];
1900
+ };
1674
1901
  exact_sync_state: {
1675
1902
  Row: {
1676
1903
  connection_id: string;
@@ -1845,6 +2072,50 @@ export type Database = {
1845
2072
  };
1846
2073
  Relationships: [];
1847
2074
  };
2075
+ floriday_connections_cache: {
2076
+ Row: {
2077
+ buyer_organization_id: string | null;
2078
+ buyer_organization_name: string | null;
2079
+ connection_id: string;
2080
+ data: Json;
2081
+ floriday_connection_id: string;
2082
+ is_deleted: boolean;
2083
+ sequence_number: number;
2084
+ status: string | null;
2085
+ synced_at: string;
2086
+ };
2087
+ Insert: {
2088
+ buyer_organization_id?: string | null;
2089
+ buyer_organization_name?: string | null;
2090
+ connection_id: string;
2091
+ data: Json;
2092
+ floriday_connection_id: string;
2093
+ is_deleted?: boolean;
2094
+ sequence_number: number;
2095
+ status?: string | null;
2096
+ synced_at?: string;
2097
+ };
2098
+ Update: {
2099
+ buyer_organization_id?: string | null;
2100
+ buyer_organization_name?: string | null;
2101
+ connection_id?: string;
2102
+ data?: Json;
2103
+ floriday_connection_id?: string;
2104
+ is_deleted?: boolean;
2105
+ sequence_number?: number;
2106
+ status?: string | null;
2107
+ synced_at?: string;
2108
+ };
2109
+ Relationships: [
2110
+ {
2111
+ foreignKeyName: "floriday_connections_cache_connection_id_fkey";
2112
+ columns: ["connection_id"];
2113
+ isOneToOne: false;
2114
+ referencedRelation: "floriday_connections";
2115
+ referencedColumns: ["id"];
2116
+ }
2117
+ ];
2118
+ };
1848
2119
  floriday_customers_cache: {
1849
2120
  Row: {
1850
2121
  connection_id: string | null;
@@ -1931,6 +2202,50 @@ export type Database = {
1931
2202
  };
1932
2203
  Relationships: [];
1933
2204
  };
2205
+ floriday_salesorders_cache: {
2206
+ Row: {
2207
+ buyer_organization_id: string | null;
2208
+ connection_id: string;
2209
+ created_at: string;
2210
+ data: Json;
2211
+ floriday_id: string;
2212
+ is_deleted: boolean;
2213
+ sequence_number: number;
2214
+ status: string | null;
2215
+ updated_at: string;
2216
+ };
2217
+ Insert: {
2218
+ buyer_organization_id?: string | null;
2219
+ connection_id: string;
2220
+ created_at?: string;
2221
+ data: Json;
2222
+ floriday_id: string;
2223
+ is_deleted?: boolean;
2224
+ sequence_number: number;
2225
+ status?: string | null;
2226
+ updated_at?: string;
2227
+ };
2228
+ Update: {
2229
+ buyer_organization_id?: string | null;
2230
+ connection_id?: string;
2231
+ created_at?: string;
2232
+ data?: Json;
2233
+ floriday_id?: string;
2234
+ is_deleted?: boolean;
2235
+ sequence_number?: number;
2236
+ status?: string | null;
2237
+ updated_at?: string;
2238
+ };
2239
+ Relationships: [
2240
+ {
2241
+ foreignKeyName: "floriday_salesorders_cache_connection_id_fkey";
2242
+ columns: ["connection_id"];
2243
+ isOneToOne: false;
2244
+ referencedRelation: "floriday_connections";
2245
+ referencedColumns: ["id"];
2246
+ }
2247
+ ];
2248
+ };
1934
2249
  floriday_settings: {
1935
2250
  Row: {
1936
2251
  active_environment: string;
@@ -1949,6 +2264,114 @@ export type Database = {
1949
2264
  };
1950
2265
  Relationships: [];
1951
2266
  };
2267
+ floriday_sync_state: {
2268
+ Row: {
2269
+ connection_id: string;
2270
+ entity_type: string;
2271
+ last_error: string | null;
2272
+ last_sequence_number: number;
2273
+ last_synced_at: string | null;
2274
+ updated_at: string;
2275
+ };
2276
+ Insert: {
2277
+ connection_id: string;
2278
+ entity_type: string;
2279
+ last_error?: string | null;
2280
+ last_sequence_number?: number;
2281
+ last_synced_at?: string | null;
2282
+ updated_at?: string;
2283
+ };
2284
+ Update: {
2285
+ connection_id?: string;
2286
+ entity_type?: string;
2287
+ last_error?: string | null;
2288
+ last_sequence_number?: number;
2289
+ last_synced_at?: string | null;
2290
+ updated_at?: string;
2291
+ };
2292
+ Relationships: [
2293
+ {
2294
+ foreignKeyName: "floriday_sync_state_connection_id_fkey";
2295
+ columns: ["connection_id"];
2296
+ isOneToOne: false;
2297
+ referencedRelation: "floriday_connections";
2298
+ referencedColumns: ["id"];
2299
+ }
2300
+ ];
2301
+ };
2302
+ floriday_token_refresh_log: {
2303
+ Row: {
2304
+ attempted_at: string;
2305
+ connection_id: string | null;
2306
+ environment: string;
2307
+ error: string | null;
2308
+ expires_at: string | null;
2309
+ id: string;
2310
+ ok: boolean;
2311
+ };
2312
+ Insert: {
2313
+ attempted_at?: string;
2314
+ connection_id?: string | null;
2315
+ environment: string;
2316
+ error?: string | null;
2317
+ expires_at?: string | null;
2318
+ id?: string;
2319
+ ok: boolean;
2320
+ };
2321
+ Update: {
2322
+ attempted_at?: string;
2323
+ connection_id?: string | null;
2324
+ environment?: string;
2325
+ error?: string | null;
2326
+ expires_at?: string | null;
2327
+ id?: string;
2328
+ ok?: boolean;
2329
+ };
2330
+ Relationships: [
2331
+ {
2332
+ foreignKeyName: "floriday_token_refresh_log_connection_id_fkey";
2333
+ columns: ["connection_id"];
2334
+ isOneToOne: false;
2335
+ referencedRelation: "floriday_connections";
2336
+ referencedColumns: ["id"];
2337
+ }
2338
+ ];
2339
+ };
2340
+ floriday_trade_items_cache: {
2341
+ Row: {
2342
+ connection_id: string;
2343
+ data: Json;
2344
+ fetched_at: string;
2345
+ floriday_id: string;
2346
+ is_deleted: boolean;
2347
+ sequence_number: number;
2348
+ };
2349
+ Insert: {
2350
+ connection_id: string;
2351
+ data?: Json;
2352
+ fetched_at?: string;
2353
+ floriday_id: string;
2354
+ is_deleted?: boolean;
2355
+ sequence_number?: number;
2356
+ };
2357
+ Update: {
2358
+ connection_id?: string;
2359
+ data?: Json;
2360
+ fetched_at?: string;
2361
+ floriday_id?: string;
2362
+ is_deleted?: boolean;
2363
+ sequence_number?: number;
2364
+ };
2365
+ Relationships: [
2366
+ {
2367
+ foreignKeyName: "floriday_trade_items_cache_connection_id_fkey";
2368
+ columns: ["connection_id"];
2369
+ isOneToOne: false;
2370
+ referencedRelation: "floriday_connections";
2371
+ referencedColumns: ["id"];
2372
+ }
2373
+ ];
2374
+ };
1952
2375
  imap_accounts: {
1953
2376
  Row: {
1954
2377
  created_at: string;
@@ -3631,35 +4054,204 @@ export type Database = {
3631
4054
  }
3632
4055
  ];
3633
4056
  };
3634
- quote_items: {
4057
+ quote_activities: {
3635
4058
  Row: {
3636
4059
  created_at: string;
3637
- description: string;
4060
+ event_type: string;
3638
4061
  id: string;
4062
+ metadata: Json;
4063
+ quote_id: string;
4064
+ user_id: string | null;
4065
+ };
4066
+ Insert: {
4067
+ created_at?: string;
4068
+ event_type: string;
4069
+ id?: string;
4070
+ metadata?: Json;
4071
+ quote_id: string;
4072
+ user_id?: string | null;
4073
+ };
4074
+ Update: {
4075
+ created_at?: string;
4076
+ event_type?: string;
4077
+ id?: string;
4078
+ metadata?: Json;
4079
+ quote_id?: string;
4080
+ user_id?: string | null;
4081
+ };
4082
+ Relationships: [
4083
+ {
4084
+ foreignKeyName: "quote_activities_quote_id_fkey";
4085
+ columns: ["quote_id"];
4086
+ isOneToOne: false;
4087
+ referencedRelation: "quotes";
4088
+ referencedColumns: ["id"];
4089
+ }
4090
+ ];
4091
+ };
4092
+ quote_attachments: {
4093
+ Row: {
4094
+ created_at: string;
4095
+ file_name: string;
4096
+ file_size: number | null;
4097
+ file_url: string;
4098
+ id: string;
4099
+ mime_type: string | null;
4100
+ quote_id: string;
4101
+ };
4102
+ Insert: {
4103
+ created_at?: string;
4104
+ file_name: string;
4105
+ file_size?: number | null;
4106
+ file_url: string;
4107
+ id?: string;
4108
+ mime_type?: string | null;
4109
+ quote_id: string;
4110
+ };
4111
+ Update: {
4112
+ created_at?: string;
4113
+ file_name?: string;
4114
+ file_size?: number | null;
4115
+ file_url?: string;
4116
+ id?: string;
4117
+ mime_type?: string | null;
4118
+ quote_id?: string;
4119
+ };
4120
+ Relationships: [
4121
+ {
4122
+ foreignKeyName: "quote_attachments_quote_id_fkey";
4123
+ columns: ["quote_id"];
4124
+ isOneToOne: false;
4125
+ referencedRelation: "quotes";
4126
+ referencedColumns: ["id"];
4127
+ }
4128
+ ];
4129
+ };
4130
+ quote_field_options: {
4131
+ Row: {
4132
+ created_at: string;
4133
+ field_id: string;
4134
+ id: string;
4135
+ label: string;
4136
+ sort_order: number;
4137
+ value: string;
4138
+ };
4139
+ Insert: {
4140
+ created_at?: string;
4141
+ field_id: string;
4142
+ id?: string;
4143
+ label: string;
4144
+ sort_order?: number;
4145
+ value: string;
4146
+ };
4147
+ Update: {
4148
+ created_at?: string;
4149
+ field_id?: string;
4150
+ id?: string;
4151
+ label?: string;
4152
+ sort_order?: number;
4153
+ value?: string;
4154
+ };
4155
+ Relationships: [
4156
+ {
4157
+ foreignKeyName: "quote_field_options_field_id_fkey";
4158
+ columns: ["field_id"];
4159
+ isOneToOne: false;
4160
+ referencedRelation: "quote_field_settings";
4161
+ referencedColumns: ["id"];
4162
+ }
4163
+ ];
4164
+ };
4165
+ quote_field_settings: {
4166
+ Row: {
4167
+ created_at: string;
4168
+ default_value: string | null;
4169
+ field_key: string;
4170
+ field_type: string;
4171
+ id: string;
4172
+ is_system: boolean;
4173
+ label: string;
4174
+ required: boolean;
4175
+ sort_order: number;
4176
+ updated_at: string;
4177
+ visible: boolean;
4178
+ };
4179
+ Insert: {
4180
+ created_at?: string;
4181
+ default_value?: string | null;
4182
+ field_key: string;
4183
+ field_type: string;
4184
+ id?: string;
4185
+ is_system?: boolean;
4186
+ label: string;
4187
+ required?: boolean;
4188
+ sort_order?: number;
4189
+ updated_at?: string;
4190
+ visible?: boolean;
4191
+ };
4192
+ Update: {
4193
+ created_at?: string;
4194
+ default_value?: string | null;
4195
+ field_key?: string;
4196
+ field_type?: string;
4197
+ id?: string;
4198
+ is_system?: boolean;
4199
+ label?: string;
4200
+ required?: boolean;
4201
+ sort_order?: number;
4202
+ updated_at?: string;
4203
+ visible?: boolean;
4204
+ };
4205
+ Relationships: [];
4206
+ };
4207
+ quote_items: {
4208
+ Row: {
4209
+ category: string | null;
4210
+ created_at: string;
4211
+ description: string;
4212
+ id: string;
4213
+ line_total: number;
4214
+ module_id: string | null;
4215
+ name: string | null;
3639
4216
  quantity: number;
3640
4217
  quote_id: string;
3641
4218
  sort_order: number;
3642
4219
  unit_price: number;
3643
4220
  };
3644
4221
  Insert: {
4222
+ category?: string | null;
3645
4223
  created_at?: string;
3646
4224
  description?: string;
3647
4225
  id?: string;
4226
+ line_total?: number;
4227
+ module_id?: string | null;
4228
+ name?: string | null;
3648
4229
  quantity?: number;
3649
4230
  quote_id: string;
3650
4231
  sort_order?: number;
3651
4232
  unit_price?: number;
3652
4233
  };
3653
4234
  Update: {
4235
+ category?: string | null;
3654
4236
  created_at?: string;
3655
4237
  description?: string;
3656
4238
  id?: string;
4239
+ line_total?: number;
4240
+ module_id?: string | null;
4241
+ name?: string | null;
3657
4242
  quantity?: number;
3658
4243
  quote_id?: string;
3659
4244
  sort_order?: number;
3660
4245
  unit_price?: number;
3661
4246
  };
3662
4247
  Relationships: [
4248
+ {
4249
+ foreignKeyName: "quote_items_module_id_fkey";
4250
+ columns: ["module_id"];
4251
+ isOneToOne: false;
4252
+ referencedRelation: "quote_modules";
4253
+ referencedColumns: ["id"];
4254
+ },
3663
4255
  {
3664
4256
  foreignKeyName: "quote_items_quote_id_fkey";
3665
4257
  columns: ["quote_id"];
@@ -3669,47 +4261,256 @@ export type Database = {
3669
4261
  }
3670
4262
  ];
3671
4263
  };
4264
+ quote_modules: {
4265
+ Row: {
4266
+ category: string | null;
4267
+ created_at: string;
4268
+ description: string | null;
4269
+ id: string;
4270
+ is_active: boolean;
4271
+ name: string;
4272
+ price: number;
4273
+ sort_order: number;
4274
+ updated_at: string;
4275
+ };
4276
+ Insert: {
4277
+ category?: string | null;
4278
+ created_at?: string;
4279
+ description?: string | null;
4280
+ id?: string;
4281
+ is_active?: boolean;
4282
+ name: string;
4283
+ price?: number;
4284
+ sort_order?: number;
4285
+ updated_at?: string;
4286
+ };
4287
+ Update: {
4288
+ category?: string | null;
4289
+ created_at?: string;
4290
+ description?: string | null;
4291
+ id?: string;
4292
+ is_active?: boolean;
4293
+ name?: string;
4294
+ price?: number;
4295
+ sort_order?: number;
4296
+ updated_at?: string;
4297
+ };
4298
+ Relationships: [];
4299
+ };
4300
+ quote_templates: {
4301
+ Row: {
4302
+ created_at: string;
4303
+ description: string | null;
4304
+ field_values: Json;
4305
+ id: string;
4306
+ is_default: boolean;
4307
+ items: Json;
4308
+ name: string;
4309
+ updated_at: string;
4310
+ vat_rate: number;
4311
+ };
4312
+ Insert: {
4313
+ created_at?: string;
4314
+ description?: string | null;
4315
+ field_values?: Json;
4316
+ id?: string;
4317
+ is_default?: boolean;
4318
+ items?: Json;
4319
+ name: string;
4320
+ updated_at?: string;
4321
+ vat_rate?: number;
4322
+ };
4323
+ Update: {
4324
+ created_at?: string;
4325
+ description?: string | null;
4326
+ field_values?: Json;
4327
+ id?: string;
4328
+ is_default?: boolean;
4329
+ items?: Json;
4330
+ name?: string;
4331
+ updated_at?: string;
4332
+ vat_rate?: number;
4333
+ };
4334
+ Relationships: [];
4335
+ };
4336
+ quote_terms: {
4337
+ Row: {
4338
+ content: string | null;
4339
+ created_at: string;
4340
+ file_url: string | null;
4341
+ id: string;
4342
+ is_active: boolean;
4343
+ name: string;
4344
+ published_at: string | null;
4345
+ updated_at: string;
4346
+ version: string;
4347
+ };
4348
+ Insert: {
4349
+ content?: string | null;
4350
+ created_at?: string;
4351
+ file_url?: string | null;
4352
+ id?: string;
4353
+ is_active?: boolean;
4354
+ name: string;
4355
+ published_at?: string | null;
4356
+ updated_at?: string;
4357
+ version?: string;
4358
+ };
4359
+ Update: {
4360
+ content?: string | null;
4361
+ created_at?: string;
4362
+ file_url?: string | null;
4363
+ id?: string;
4364
+ is_active?: boolean;
4365
+ name?: string;
4366
+ published_at?: string | null;
4367
+ updated_at?: string;
4368
+ version?: string;
4369
+ };
4370
+ Relationships: [];
4371
+ };
3672
4372
  quotes: {
3673
4373
  Row: {
4374
+ accepted_at: string | null;
4375
+ archived_at: string | null;
4376
+ contact_id: string | null;
3674
4377
  created_at: string;
4378
+ customer_id: string | null;
4379
+ discount: number;
4380
+ expires_at: string | null;
4381
+ field_values: Json;
3675
4382
  id: string;
3676
4383
  notes: string | null;
4384
+ owner_id: string | null;
4385
+ personal_message: string | null;
4386
+ project_id: string | null;
3677
4387
  prospect_id: string | null;
4388
+ public_token: string;
3678
4389
  quote_number: string | null;
4390
+ recipient_email: string | null;
4391
+ recipient_name: string | null;
4392
+ rejected_at: string | null;
4393
+ sent_at: string | null;
3679
4394
  status: string;
4395
+ subtotal: number;
4396
+ template_id: string | null;
4397
+ terms_id: string | null;
3680
4398
  title: string;
4399
+ total: number;
3681
4400
  updated_at: string;
3682
4401
  valid_until: string | null;
4402
+ vat_amount: number;
4403
+ vat_rate: number;
4404
+ viewed_at: string | null;
3683
4405
  };
3684
4406
  Insert: {
4407
+ accepted_at?: string | null;
4408
+ archived_at?: string | null;
4409
+ contact_id?: string | null;
3685
4410
  created_at?: string;
4411
+ customer_id?: string | null;
4412
+ discount?: number;
4413
+ expires_at?: string | null;
4414
+ field_values?: Json;
3686
4415
  id?: string;
3687
4416
  notes?: string | null;
4417
+ owner_id?: string | null;
4418
+ personal_message?: string | null;
4419
+ project_id?: string | null;
3688
4420
  prospect_id?: string | null;
4421
+ public_token?: string;
3689
4422
  quote_number?: string | null;
4423
+ recipient_email?: string | null;
4424
+ recipient_name?: string | null;
4425
+ rejected_at?: string | null;
4426
+ sent_at?: string | null;
3690
4427
  status?: string;
4428
+ subtotal?: number;
4429
+ template_id?: string | null;
4430
+ terms_id?: string | null;
3691
4431
  title?: string;
4432
+ total?: number;
3692
4433
  updated_at?: string;
3693
4434
  valid_until?: string | null;
4435
+ vat_amount?: number;
4436
+ vat_rate?: number;
4437
+ viewed_at?: string | null;
3694
4438
  };
3695
4439
  Update: {
4440
+ accepted_at?: string | null;
4441
+ archived_at?: string | null;
4442
+ contact_id?: string | null;
3696
4443
  created_at?: string;
4444
+ customer_id?: string | null;
4445
+ discount?: number;
4446
+ expires_at?: string | null;
4447
+ field_values?: Json;
3697
4448
  id?: string;
3698
4449
  notes?: string | null;
4450
+ owner_id?: string | null;
4451
+ personal_message?: string | null;
4452
+ project_id?: string | null;
3699
4453
  prospect_id?: string | null;
4454
+ public_token?: string;
3700
4455
  quote_number?: string | null;
4456
+ recipient_email?: string | null;
4457
+ recipient_name?: string | null;
4458
+ rejected_at?: string | null;
4459
+ sent_at?: string | null;
3701
4460
  status?: string;
4461
+ subtotal?: number;
4462
+ template_id?: string | null;
4463
+ terms_id?: string | null;
3702
4464
  title?: string;
4465
+ total?: number;
3703
4466
  updated_at?: string;
3704
4467
  valid_until?: string | null;
4468
+ vat_amount?: number;
4469
+ vat_rate?: number;
4470
+ viewed_at?: string | null;
3705
4471
  };
3706
4472
  Relationships: [
4473
+ {
4474
+ foreignKeyName: "quotes_contact_id_fkey";
4475
+ columns: ["contact_id"];
4476
+ isOneToOne: false;
4477
+ referencedRelation: "customer_contacts";
4478
+ referencedColumns: ["id"];
4479
+ },
4480
+ {
4481
+ foreignKeyName: "quotes_customer_id_fkey";
4482
+ columns: ["customer_id"];
4483
+ isOneToOne: false;
4484
+ referencedRelation: "customers";
4485
+ referencedColumns: ["id"];
4486
+ },
4487
+ {
4488
+ foreignKeyName: "quotes_project_id_fkey";
4489
+ columns: ["project_id"];
4490
+ isOneToOne: false;
4491
+ referencedRelation: "projects";
4492
+ referencedColumns: ["id"];
4493
+ },
3707
4494
  {
3708
4495
  foreignKeyName: "quotes_prospect_id_fkey";
3709
4496
  columns: ["prospect_id"];
3710
4497
  isOneToOne: false;
3711
4498
  referencedRelation: "prospects";
3712
4499
  referencedColumns: ["id"];
4500
+ },
4501
+ {
4502
+ foreignKeyName: "quotes_template_id_fkey";
4503
+ columns: ["template_id"];
4504
+ isOneToOne: false;
4505
+ referencedRelation: "quote_templates";
4506
+ referencedColumns: ["id"];
4507
+ },
4508
+ {
4509
+ foreignKeyName: "quotes_terms_id_fkey";
4510
+ columns: ["terms_id"];
4511
+ isOneToOne: false;
4512
+ referencedRelation: "quote_terms";
4513
+ referencedColumns: ["id"];
3713
4514
  }
3714
4515
  ];
3715
4516
  };
@@ -3835,23 +4636,337 @@ export type Database = {
3835
4636
  };
3836
4637
  Relationships: [];
3837
4638
  };
3838
- user_roles: {
4639
+ twinfield_credentials: {
3839
4640
  Row: {
4641
+ administration_code: string | null;
4642
+ client_id: string | null;
4643
+ client_secret: string | null;
4644
+ cluster: string | null;
4645
+ connected_at: string | null;
3840
4646
  created_at: string;
4647
+ environment: string | null;
3841
4648
  id: string;
3842
- role: Database["public"]["Enums"]["app_role"];
4649
+ redirect_uri: string | null;
4650
+ refresh_token: string | null;
4651
+ updated_at: string;
3843
4652
  user_id: string;
3844
4653
  };
3845
4654
  Insert: {
4655
+ administration_code?: string | null;
4656
+ client_id?: string | null;
4657
+ client_secret?: string | null;
4658
+ cluster?: string | null;
4659
+ connected_at?: string | null;
3846
4660
  created_at?: string;
4661
+ environment?: string | null;
3847
4662
  id?: string;
3848
- role: Database["public"]["Enums"]["app_role"];
4663
+ redirect_uri?: string | null;
4664
+ refresh_token?: string | null;
4665
+ updated_at?: string;
3849
4666
  user_id: string;
3850
4667
  };
3851
4668
  Update: {
4669
+ administration_code?: string | null;
4670
+ client_id?: string | null;
4671
+ client_secret?: string | null;
4672
+ cluster?: string | null;
4673
+ connected_at?: string | null;
3852
4674
  created_at?: string;
4675
+ environment?: string | null;
3853
4676
  id?: string;
3854
- role?: Database["public"]["Enums"]["app_role"];
4677
+ redirect_uri?: string | null;
4678
+ refresh_token?: string | null;
4679
+ updated_at?: string;
4680
+ user_id?: string;
4681
+ };
4682
+ Relationships: [];
4683
+ };
4684
+ twinfield_customers: {
4685
+ Row: {
4686
+ address: string | null;
4687
+ city: string | null;
4688
+ country: string | null;
4689
+ created_at: string;
4690
+ email: string | null;
4691
+ id: string;
4692
+ last_synced_at: string | null;
4693
+ name: string;
4694
+ phone: string | null;
4695
+ postal_code: string | null;
4696
+ status: string;
4697
+ sync_error: string | null;
4698
+ sync_status: string;
4699
+ twinfield_code: string | null;
4700
+ updated_at: string;
4701
+ user_id: string;
4702
+ };
4703
+ Insert: {
4704
+ address?: string | null;
4705
+ city?: string | null;
4706
+ country?: string | null;
4707
+ created_at?: string;
4708
+ email?: string | null;
4709
+ id?: string;
4710
+ last_synced_at?: string | null;
4711
+ name: string;
4712
+ phone?: string | null;
4713
+ postal_code?: string | null;
4714
+ status?: string;
4715
+ sync_error?: string | null;
4716
+ sync_status?: string;
4717
+ twinfield_code?: string | null;
4718
+ updated_at?: string;
4719
+ user_id: string;
4720
+ };
4721
+ Update: {
4722
+ address?: string | null;
4723
+ city?: string | null;
4724
+ country?: string | null;
4725
+ created_at?: string;
4726
+ email?: string | null;
4727
+ id?: string;
4728
+ last_synced_at?: string | null;
4729
+ name?: string;
4730
+ phone?: string | null;
4731
+ postal_code?: string | null;
4732
+ status?: string;
4733
+ sync_error?: string | null;
4734
+ sync_status?: string;
4735
+ twinfield_code?: string | null;
4736
+ updated_at?: string;
4737
+ user_id?: string;
4738
+ };
4739
+ Relationships: [];
4740
+ };
4741
+ twinfield_invoice_lines: {
4742
+ Row: {
4743
+ article_code: string | null;
4744
+ created_at: string;
4745
+ description: string | null;
4746
+ gl_account: string | null;
4747
+ id: string;
4748
+ invoice_id: string;
4749
+ line_number: number | null;
4750
+ line_total: number;
4751
+ quantity: number;
4752
+ unit_price: number;
4753
+ user_id: string;
4754
+ vat_code: string | null;
4755
+ vat_rate: number;
4756
+ };
4757
+ Insert: {
4758
+ article_code?: string | null;
4759
+ created_at?: string;
4760
+ description?: string | null;
4761
+ gl_account?: string | null;
4762
+ id?: string;
4763
+ invoice_id: string;
4764
+ line_number?: number | null;
4765
+ line_total?: number;
4766
+ quantity?: number;
4767
+ unit_price?: number;
4768
+ user_id: string;
4769
+ vat_code?: string | null;
4770
+ vat_rate?: number;
4771
+ };
4772
+ Update: {
4773
+ article_code?: string | null;
4774
+ created_at?: string;
4775
+ description?: string | null;
4776
+ gl_account?: string | null;
4777
+ id?: string;
4778
+ invoice_id?: string;
4779
+ line_number?: number | null;
4780
+ line_total?: number;
4781
+ quantity?: number;
4782
+ unit_price?: number;
4783
+ user_id?: string;
4784
+ vat_code?: string | null;
4785
+ vat_rate?: number;
4786
+ };
4787
+ Relationships: [
4788
+ {
4789
+ foreignKeyName: "twinfield_invoice_lines_invoice_id_fkey";
4790
+ columns: ["invoice_id"];
4791
+ isOneToOne: false;
4792
+ referencedRelation: "twinfield_invoices";
4793
+ referencedColumns: ["id"];
4794
+ }
4795
+ ];
4796
+ };
4797
+ twinfield_invoice_settings: {
4798
+ Row: {
4799
+ created_at: string;
4800
+ default_gl_account: string;
4801
+ default_invoice_type: string;
4802
+ default_payment_term_days: number;
4803
+ default_vat_code: string;
4804
+ updated_at: string;
4805
+ user_id: string;
4806
+ };
4807
+ Insert: {
4808
+ created_at?: string;
4809
+ default_gl_account?: string;
4810
+ default_invoice_type?: string;
4811
+ default_payment_term_days?: number;
4812
+ default_vat_code?: string;
4813
+ updated_at?: string;
4814
+ user_id: string;
4815
+ };
4816
+ Update: {
4817
+ created_at?: string;
4818
+ default_gl_account?: string;
4819
+ default_invoice_type?: string;
4820
+ default_payment_term_days?: number;
4821
+ default_vat_code?: string;
4822
+ updated_at?: string;
4823
+ user_id?: string;
4824
+ };
4825
+ Relationships: [];
4826
+ };
4827
+ twinfield_invoice_sync_logs: {
4828
+ Row: {
4829
+ created_at: string;
4830
+ details: Json | null;
4831
+ duration_ms: number | null;
4832
+ id: string;
4833
+ invoice_lines_fetched: number | null;
4834
+ invoices_fetched: number | null;
4835
+ message: string | null;
4836
+ status: string;
4837
+ step: string | null;
4838
+ user_id: string;
4839
+ };
4840
+ Insert: {
4841
+ created_at?: string;
4842
+ details?: Json | null;
4843
+ duration_ms?: number | null;
4844
+ id?: string;
4845
+ invoice_lines_fetched?: number | null;
4846
+ invoices_fetched?: number | null;
4847
+ message?: string | null;
4848
+ status: string;
4849
+ step?: string | null;
4850
+ user_id: string;
4851
+ };
4852
+ Update: {
4853
+ created_at?: string;
4854
+ details?: Json | null;
4855
+ duration_ms?: number | null;
4856
+ id?: string;
4857
+ invoice_lines_fetched?: number | null;
4858
+ invoices_fetched?: number | null;
4859
+ message?: string | null;
4860
+ status?: string;
4861
+ step?: string | null;
4862
+ user_id?: string;
4863
+ };
4864
+ Relationships: [];
4865
+ };
4866
+ twinfield_invoices: {
4867
+ Row: {
4868
+ administration_code: string | null;
4869
+ created_at: string;
4870
+ currency: string | null;
4871
+ customer_code: string | null;
4872
+ customer_email: string | null;
4873
+ customer_name: string | null;
4874
+ customer_phone: string | null;
4875
+ due_date: string | null;
4876
+ id: string;
4877
+ invoice_date: string | null;
4878
+ last_synced_at: string;
4879
+ local_invoice_number: string | null;
4880
+ outstanding_amount: number;
4881
+ paid_amount: number;
4882
+ payment_date: string | null;
4883
+ raw_payload: Json | null;
4884
+ status: string;
4885
+ subtotal: number;
4886
+ sync_error: string | null;
4887
+ sync_status: string;
4888
+ total: number;
4889
+ twinfield_invoice_number: string;
4890
+ twinfield_transaction_number: string | null;
4891
+ updated_at: string;
4892
+ user_id: string;
4893
+ vat_amount: number;
4894
+ };
4895
+ Insert: {
4896
+ administration_code?: string | null;
4897
+ created_at?: string;
4898
+ currency?: string | null;
4899
+ customer_code?: string | null;
4900
+ customer_email?: string | null;
4901
+ customer_name?: string | null;
4902
+ customer_phone?: string | null;
4903
+ due_date?: string | null;
4904
+ id?: string;
4905
+ invoice_date?: string | null;
4906
+ last_synced_at?: string;
4907
+ local_invoice_number?: string | null;
4908
+ outstanding_amount?: number;
4909
+ paid_amount?: number;
4910
+ payment_date?: string | null;
4911
+ raw_payload?: Json | null;
4912
+ status?: string;
4913
+ subtotal?: number;
4914
+ sync_error?: string | null;
4915
+ sync_status?: string;
4916
+ total?: number;
4917
+ twinfield_invoice_number: string;
4918
+ twinfield_transaction_number?: string | null;
4919
+ updated_at?: string;
4920
+ user_id: string;
4921
+ vat_amount?: number;
4922
+ };
4923
+ Update: {
4924
+ administration_code?: string | null;
4925
+ created_at?: string;
4926
+ currency?: string | null;
4927
+ customer_code?: string | null;
4928
+ customer_email?: string | null;
4929
+ customer_name?: string | null;
4930
+ customer_phone?: string | null;
4931
+ due_date?: string | null;
4932
+ id?: string;
4933
+ invoice_date?: string | null;
4934
+ last_synced_at?: string;
4935
+ local_invoice_number?: string | null;
4936
+ outstanding_amount?: number;
4937
+ paid_amount?: number;
4938
+ payment_date?: string | null;
4939
+ raw_payload?: Json | null;
4940
+ status?: string;
4941
+ subtotal?: number;
4942
+ sync_error?: string | null;
4943
+ sync_status?: string;
4944
+ total?: number;
4945
+ twinfield_invoice_number?: string;
4946
+ twinfield_transaction_number?: string | null;
4947
+ updated_at?: string;
4948
+ user_id?: string;
4949
+ vat_amount?: number;
4950
+ };
4951
+ Relationships: [];
4952
+ };
4953
+ user_roles: {
4954
+ Row: {
4955
+ created_at: string;
4956
+ id: string;
4957
+ role: Database["public"]["Enums"]["app_role"];
4958
+ user_id: string;
4959
+ };
4960
+ Insert: {
4961
+ created_at?: string;
4962
+ id?: string;
4963
+ role: Database["public"]["Enums"]["app_role"];
4964
+ user_id: string;
4965
+ };
4966
+ Update: {
4967
+ created_at?: string;
4968
+ id?: string;
4969
+ role?: Database["public"]["Enums"]["app_role"];
3855
4970
  user_id?: string;
3856
4971
  };
3857
4972
  Relationships: [
@@ -3866,7 +4981,99 @@ export type Database = {
3866
4981
  };
3867
4982
  };
3868
4983
  Views: {
3869
- [_ in never]: never;
4984
+ email_auth_connections_safe: {
4985
+ 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;
5014
+ };
5015
+ 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;
5029
+ imap_secure?: boolean | null;
5030
+ imap_username?: string | null;
5031
+ is_active?: boolean | null;
5032
+ last_error?: string | null;
5033
+ last_verified_at?: string | null;
5034
+ oauth_mode?: string | null;
5035
+ provider?: string | null;
5036
+ scopes?: string[] | null;
5037
+ smtp_host?: string | null;
5038
+ smtp_port?: number | null;
5039
+ smtp_secure?: boolean | null;
5040
+ smtp_username?: string | null;
5041
+ status?: string | null;
5042
+ token_expires_at?: string | null;
5043
+ updated_at?: string | null;
5044
+ };
5045
+ 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;
5071
+ status?: string | null;
5072
+ token_expires_at?: string | null;
5073
+ updated_at?: string | null;
5074
+ };
5075
+ Relationships: [];
5076
+ };
3870
5077
  };
3871
5078
  Functions: {
3872
5079
  dashboard_list_public_schema: {
@@ -3877,6 +5084,18 @@ export type Database = {
3877
5084
  table_name: string;
3878
5085
  }[];
3879
5086
  };
5087
+ email_auth_decrypt: {
5088
+ Args: {
5089
+ cipher: string;
5090
+ };
5091
+ Returns: string;
5092
+ };
5093
+ email_auth_encrypt: {
5094
+ Args: {
5095
+ plain: string;
5096
+ };
5097
+ Returns: string;
5098
+ };
3880
5099
  exact_decrypt: {
3881
5100
  Args: {
3882
5101
  cipher: string;
@@ -3889,6 +5108,49 @@ export type Database = {
3889
5108
  };
3890
5109
  Returns: string;
3891
5110
  };
5111
+ exact_lock_environment: {
5112
+ Args: {
5113
+ _environment: string;
5114
+ };
5115
+ Returns: undefined;
5116
+ };
5117
+ exact_release_refresh_lock: {
5118
+ Args: {
5119
+ _environment: Database["public"]["Enums"]["exact_env"];
5120
+ _locked_by: string;
5121
+ };
5122
+ Returns: undefined;
5123
+ };
5124
+ exact_try_acquire_refresh_lock: {
5125
+ Args: {
5126
+ _environment: Database["public"]["Enums"]["exact_env"];
5127
+ _lease_seconds?: number;
5128
+ _locked_by?: string;
5129
+ };
5130
+ Returns: boolean;
5131
+ };
5132
+ get_active_floriday_connection_public: {
5133
+ Args: never;
5134
+ Returns: {
5135
+ active_environment: string;
5136
+ environment: string;
5137
+ gln_code: string;
5138
+ id: string;
5139
+ label: string;
5140
+ organization_name: string;
5141
+ preferred_warehouse_id: string;
5142
+ preferred_warehouse_name: string;
5143
+ }[];
5144
+ };
5145
+ get_floriday_cron_jobs: {
5146
+ Args: never;
5147
+ Returns: {
5148
+ active: boolean;
5149
+ jobname: string;
5150
+ schedule: string;
5151
+ url: string;
5152
+ }[];
5153
+ };
3892
5154
  get_offer_by_link_code: {
3893
5155
  Args: {
3894
5156
  p_code: string;
@@ -3902,6 +5164,20 @@ export type Database = {
3902
5164
  };
3903
5165
  Returns: boolean;
3904
5166
  };
5167
+ schedule_floriday_connections_sync: {
5168
+ Args: {
5169
+ p_apikey: string;
5170
+ p_url: string;
5171
+ };
5172
+ Returns: number;
5173
+ };
5174
+ schedule_floriday_customer_organizations_sync: {
5175
+ Args: {
5176
+ p_apikey: string;
5177
+ p_url: string;
5178
+ };
5179
+ Returns: number;
5180
+ };
3905
5181
  schedule_floriday_network_sync: {
3906
5182
  Args: {
3907
5183
  p_apikey: string;
@@ -3909,6 +5185,13 @@ export type Database = {
3909
5185
  };
3910
5186
  Returns: number;
3911
5187
  };
5188
+ schedule_floriday_salesorders_sync: {
5189
+ Args: {
5190
+ p_apikey: string;
5191
+ p_url: string;
5192
+ };
5193
+ Returns: number;
5194
+ };
3912
5195
  schedule_floriday_token_refresh: {
3913
5196
  Args: {
3914
5197
  p_apikey: string;
@@ -3916,6 +5199,13 @@ export type Database = {
3916
5199
  };
3917
5200
  Returns: number;
3918
5201
  };
5202
+ schedule_floriday_trade_items_sync: {
5203
+ Args: {
5204
+ p_apikey: string;
5205
+ p_url: string;
5206
+ };
5207
+ Returns: number;
5208
+ };
3919
5209
  show_limit: {
3920
5210
  Args: never;
3921
5211
  Returns: number;
@@ -3930,6 +5220,7 @@ export type Database = {
3930
5220
  Enums: {
3931
5221
  app_role: "admin" | "manager" | "warehouse" | "sales" | "developer";
3932
5222
  exact_env: "staging" | "live";
5223
+ quote_status: "concept" | "verzonden" | "bekeken" | "in_behandeling" | "geaccepteerd" | "afgewezen" | "verlopen" | "gearchiveerd";
3933
5224
  };
3934
5225
  CompositeTypes: {
3935
5226
  [_ in never]: never;
@@ -3990,6 +5281,7 @@ export declare const Constants: {
3990
5281
  readonly Enums: {
3991
5282
  readonly app_role: readonly ["admin", "manager", "warehouse", "sales", "developer"];
3992
5283
  readonly exact_env: readonly ["staging", "live"];
5284
+ readonly quote_status: readonly ["concept", "verzonden", "bekeken", "in_behandeling", "geaccepteerd", "afgewezen", "verlopen", "gearchiveerd"];
3993
5285
  };
3994
5286
  };
3995
5287
  };