@flowselections/floriday-voorraad 1.0.23 → 1.0.26

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 (55) hide show
  1. package/dist-lib/assets/floriday-logo.png.asset.json +4 -4
  2. package/dist-lib/components/voorraad/ArtikelWizard.d.ts.map +1 -1
  3. package/dist-lib/components/voorraad/ArtikelWizard.js +633 -101
  4. package/dist-lib/components/voorraad/StepSamenstelling.d.ts +10 -0
  5. package/dist-lib/components/voorraad/StepSamenstelling.d.ts.map +1 -0
  6. package/dist-lib/components/voorraad/StepSamenstelling.js +333 -0
  7. package/dist-lib/components/voorraad/VoorraadPage.d.ts.map +1 -1
  8. package/dist-lib/components/voorraad/VoorraadPage.js +14 -3
  9. package/dist-lib/components/voorraad/VoorraadTable.d.ts.map +1 -1
  10. package/dist-lib/components/voorraad/VoorraadTable.js +6 -13
  11. package/dist-lib/hooks/useFloridayPriceGroups.d.ts +20 -0
  12. package/dist-lib/hooks/useFloridayPriceGroups.d.ts.map +1 -0
  13. package/dist-lib/hooks/useFloridayPriceGroups.js +55 -0
  14. package/dist-lib/hooks/useFloridayVbnRequired.d.ts +5 -0
  15. package/dist-lib/hooks/useFloridayVbnRequired.d.ts.map +1 -0
  16. package/dist-lib/hooks/useFloridayVbnRequired.js +16 -0
  17. package/dist-lib/hooks/useLocalTradeItems.d.ts.map +1 -1
  18. package/dist-lib/hooks/useLocalTradeItems.js +14 -0
  19. package/dist-lib/hooks/useTradeItemSpec.d.ts.map +1 -1
  20. package/dist-lib/hooks/useTradeItemSpec.js +48 -1
  21. package/dist-lib/integrations/supabase/auth-middleware.d.ts +2378 -361
  22. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
  23. package/dist-lib/integrations/supabase/client.d.ts +2378 -361
  24. package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
  25. package/dist-lib/integrations/supabase/client.server.d.ts +2378 -361
  26. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
  27. package/dist-lib/integrations/supabase/types.d.ts +2412 -344
  28. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  29. package/dist-lib/integrations/supabase/types.js +11 -9
  30. package/dist-lib/lib/centralSecrets.server.d.ts +21 -0
  31. package/dist-lib/lib/centralSecrets.server.d.ts.map +1 -0
  32. package/dist-lib/lib/centralSecrets.server.js +111 -0
  33. package/dist-lib/lib/floricode-required-features.functions.d.ts +2378 -361
  34. package/dist-lib/lib/floricode-required-features.functions.d.ts.map +1 -1
  35. package/dist-lib/lib/floriday-customer-offer.functions.d.ts +2378 -361
  36. package/dist-lib/lib/floriday-customer-offer.functions.d.ts.map +1 -1
  37. package/dist-lib/lib/floriday-gateway.functions.d.ts +10760 -675
  38. package/dist-lib/lib/floriday-gateway.functions.d.ts.map +1 -1
  39. package/dist-lib/lib/floriday-gateway.server.d.ts.map +1 -1
  40. package/dist-lib/lib/floriday-gateway.server.js +34 -9
  41. package/dist-lib/lib/floriday-payload.d.ts +21 -3
  42. package/dist-lib/lib/floriday-payload.d.ts.map +1 -1
  43. package/dist-lib/lib/floriday-payload.js +167 -34
  44. package/dist-lib/lib/floriday-vbn-required.functions.d.ts +27769 -0
  45. package/dist-lib/lib/floriday-vbn-required.functions.d.ts.map +1 -0
  46. package/dist-lib/lib/floriday-vbn-required.functions.js +85 -0
  47. package/dist-lib/lib/floriday-warehouse.functions.d.ts +6542 -491
  48. package/dist-lib/lib/floriday-warehouse.functions.d.ts.map +1 -1
  49. package/dist-lib/lib/floriday-writes.functions.d.ts +4647 -612
  50. package/dist-lib/lib/floriday-writes.functions.d.ts.map +1 -1
  51. package/dist-lib/lib/floriday-writes.functions.js +36 -1
  52. package/dist-lib/lib/trade-item-prices.d.ts +43 -0
  53. package/dist-lib/lib/trade-item-prices.d.ts.map +1 -0
  54. package/dist-lib/lib/trade-item-prices.js +229 -0
  55. package/package.json +3 -3
@@ -242,12 +242,98 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
242
242
  };
243
243
  Relationships: [];
244
244
  };
245
+ ai_admin_credentials: {
246
+ Row: {
247
+ active: boolean;
248
+ admin_key: string;
249
+ created_at: string;
250
+ id: string;
251
+ label: string;
252
+ provider_id: string;
253
+ updated_at: string;
254
+ };
255
+ Insert: {
256
+ active?: boolean;
257
+ admin_key: string;
258
+ created_at?: string;
259
+ id?: string;
260
+ label: string;
261
+ provider_id: string;
262
+ updated_at?: string;
263
+ };
264
+ Update: {
265
+ active?: boolean;
266
+ admin_key?: string;
267
+ created_at?: string;
268
+ id?: string;
269
+ label?: string;
270
+ provider_id?: string;
271
+ updated_at?: string;
272
+ };
273
+ Relationships: [{
274
+ foreignKeyName: "ai_admin_credentials_provider_id_fkey";
275
+ columns: ["provider_id"];
276
+ isOneToOne: true;
277
+ referencedRelation: "ai_providers";
278
+ referencedColumns: ["id"];
279
+ }];
280
+ };
281
+ ai_call_log: {
282
+ Row: {
283
+ consumer_module_id: string;
284
+ cost_usd: number | null;
285
+ created_at: string;
286
+ created_by: string | null;
287
+ duration_ms: number | null;
288
+ error_code: string | null;
289
+ error_message: string | null;
290
+ id: string;
291
+ input_tokens: number;
292
+ model_slug: string | null;
293
+ output_tokens: number;
294
+ provider_slug: string | null;
295
+ status: string;
296
+ total_tokens: number;
297
+ };
298
+ Insert: {
299
+ consumer_module_id: string;
300
+ cost_usd?: number | null;
301
+ created_at?: string;
302
+ created_by?: string | null;
303
+ duration_ms?: number | null;
304
+ error_code?: string | null;
305
+ error_message?: string | null;
306
+ id?: string;
307
+ input_tokens?: number;
308
+ model_slug?: string | null;
309
+ output_tokens?: number;
310
+ provider_slug?: string | null;
311
+ status: string;
312
+ total_tokens?: number;
313
+ };
314
+ Update: {
315
+ consumer_module_id?: string;
316
+ cost_usd?: number | null;
317
+ created_at?: string;
318
+ created_by?: string | null;
319
+ duration_ms?: number | null;
320
+ error_code?: string | null;
321
+ error_message?: string | null;
322
+ id?: string;
323
+ input_tokens?: number;
324
+ model_slug?: string | null;
325
+ output_tokens?: number;
326
+ provider_slug?: string | null;
327
+ status?: string;
328
+ total_tokens?: number;
329
+ };
330
+ Relationships: [];
331
+ };
245
332
  ai_credentials: {
246
333
  Row: {
247
334
  active: boolean;
248
335
  api_key: string;
249
336
  created_at: string;
250
- created_by: string | null;
251
337
  id: string;
252
338
  label: string;
253
339
  provider_id: string;
@@ -257,7 +343,6 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
257
343
  active?: boolean;
258
344
  api_key: string;
259
345
  created_at?: string;
260
- created_by?: string | null;
261
346
  id?: string;
262
347
  label: string;
263
348
  provider_id: string;
@@ -267,7 +352,6 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
267
352
  active?: boolean;
268
353
  api_key?: string;
269
354
  created_at?: string;
270
- created_by?: string | null;
271
355
  id?: string;
272
356
  label?: string;
273
357
  provider_id?: string;
@@ -281,6 +365,75 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
281
365
  referencedColumns: ["id"];
282
366
  }];
283
367
  };
368
+ ai_goals: {
369
+ Row: {
370
+ active: boolean;
371
+ created_at: string;
372
+ description: string | null;
373
+ key: string;
374
+ label: string;
375
+ sort_order: number;
376
+ updated_at: string;
377
+ };
378
+ Insert: {
379
+ active?: boolean;
380
+ created_at?: string;
381
+ description?: string | null;
382
+ key: string;
383
+ label: string;
384
+ sort_order?: number;
385
+ updated_at?: string;
386
+ };
387
+ Update: {
388
+ active?: boolean;
389
+ created_at?: string;
390
+ description?: string | null;
391
+ key?: string;
392
+ label?: string;
393
+ sort_order?: number;
394
+ updated_at?: string;
395
+ };
396
+ Relationships: [];
397
+ };
398
+ ai_model_pricing: {
399
+ Row: {
400
+ created_at: string;
401
+ currency: string;
402
+ fetched_at: string;
403
+ id: string;
404
+ input_per_mtok: number | null;
405
+ model_slug: string;
406
+ output_per_mtok: number | null;
407
+ provider_slug: string;
408
+ source: string;
409
+ updated_at: string;
410
+ };
411
+ Insert: {
412
+ created_at?: string;
413
+ currency?: string;
414
+ fetched_at?: string;
415
+ id?: string;
416
+ input_per_mtok?: number | null;
417
+ model_slug: string;
418
+ output_per_mtok?: number | null;
419
+ provider_slug: string;
420
+ source?: string;
421
+ updated_at?: string;
422
+ };
423
+ Update: {
424
+ created_at?: string;
425
+ currency?: string;
426
+ fetched_at?: string;
427
+ id?: string;
428
+ input_per_mtok?: number | null;
429
+ model_slug?: string;
430
+ output_per_mtok?: number | null;
431
+ provider_slug?: string;
432
+ source?: string;
433
+ updated_at?: string;
434
+ };
435
+ Relationships: [];
436
+ };
284
437
  ai_models: {
285
438
  Row: {
286
439
  active: boolean;
@@ -1028,6 +1181,141 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
1028
1181
  };
1029
1182
  Relationships: [];
1030
1183
  };
1184
+ cart_planning_pick_times: {
1185
+ Row: {
1186
+ created_at: string;
1187
+ id: string;
1188
+ pot_size: string;
1189
+ seconds_per_cart: number;
1190
+ updated_at: string;
1191
+ };
1192
+ Insert: {
1193
+ created_at?: string;
1194
+ id?: string;
1195
+ pot_size: string;
1196
+ seconds_per_cart: number;
1197
+ updated_at?: string;
1198
+ };
1199
+ Update: {
1200
+ created_at?: string;
1201
+ id?: string;
1202
+ pot_size?: string;
1203
+ seconds_per_cart?: number;
1204
+ updated_at?: string;
1205
+ };
1206
+ Relationships: [];
1207
+ };
1208
+ cart_planning_product_overrides: {
1209
+ Row: {
1210
+ created_at: string;
1211
+ id: string;
1212
+ max_party_share_per_layer_pct_override: number | null;
1213
+ never_mix: boolean;
1214
+ notes: string | null;
1215
+ product_id: string;
1216
+ updated_at: string;
1217
+ };
1218
+ Insert: {
1219
+ created_at?: string;
1220
+ id?: string;
1221
+ max_party_share_per_layer_pct_override?: number | null;
1222
+ never_mix?: boolean;
1223
+ notes?: string | null;
1224
+ product_id: string;
1225
+ updated_at?: string;
1226
+ };
1227
+ Update: {
1228
+ created_at?: string;
1229
+ id?: string;
1230
+ max_party_share_per_layer_pct_override?: number | null;
1231
+ never_mix?: boolean;
1232
+ notes?: string | null;
1233
+ product_id?: string;
1234
+ updated_at?: string;
1235
+ };
1236
+ Relationships: [{
1237
+ foreignKeyName: "cart_planning_product_overrides_product_id_fkey";
1238
+ columns: ["product_id"];
1239
+ isOneToOne: true;
1240
+ referencedRelation: "products";
1241
+ referencedColumns: ["id"];
1242
+ }];
1243
+ };
1244
+ cart_planning_settings: {
1245
+ Row: {
1246
+ allow_editing_after_pickstation_send: boolean;
1247
+ buffer_grouping_mode: string;
1248
+ combine_floriday_orders: boolean;
1249
+ combine_floriday_orders_window: string;
1250
+ combine_orders_scope: string;
1251
+ default_workers: number;
1252
+ id: number;
1253
+ max_beladingen_per_layer: number;
1254
+ max_customers_per_cart: number;
1255
+ max_one_customer_per_layer: boolean;
1256
+ max_party_share_per_layer_pct: number;
1257
+ optimization_strategy: string;
1258
+ own_cart_from_layers: number;
1259
+ pick_time_mode: string;
1260
+ plants_per_day: number;
1261
+ plants_per_hour: number;
1262
+ require_same_carrier: boolean;
1263
+ require_same_crate_type: boolean;
1264
+ require_same_delivery_date: boolean;
1265
+ require_same_delivery_location: boolean;
1266
+ updated_at: string;
1267
+ updated_by: string | null;
1268
+ };
1269
+ Insert: {
1270
+ allow_editing_after_pickstation_send?: boolean;
1271
+ buffer_grouping_mode?: string;
1272
+ combine_floriday_orders?: boolean;
1273
+ combine_floriday_orders_window?: string;
1274
+ combine_orders_scope?: string;
1275
+ default_workers?: number;
1276
+ id?: number;
1277
+ max_beladingen_per_layer?: number;
1278
+ max_customers_per_cart?: number;
1279
+ max_one_customer_per_layer?: boolean;
1280
+ max_party_share_per_layer_pct?: number;
1281
+ optimization_strategy?: string;
1282
+ own_cart_from_layers?: number;
1283
+ pick_time_mode?: string;
1284
+ plants_per_day?: number;
1285
+ plants_per_hour?: number;
1286
+ require_same_carrier?: boolean;
1287
+ require_same_crate_type?: boolean;
1288
+ require_same_delivery_date?: boolean;
1289
+ require_same_delivery_location?: boolean;
1290
+ updated_at?: string;
1291
+ updated_by?: string | null;
1292
+ };
1293
+ Update: {
1294
+ allow_editing_after_pickstation_send?: boolean;
1295
+ buffer_grouping_mode?: string;
1296
+ combine_floriday_orders?: boolean;
1297
+ combine_floriday_orders_window?: string;
1298
+ combine_orders_scope?: string;
1299
+ default_workers?: number;
1300
+ id?: number;
1301
+ max_beladingen_per_layer?: number;
1302
+ max_customers_per_cart?: number;
1303
+ max_one_customer_per_layer?: boolean;
1304
+ max_party_share_per_layer_pct?: number;
1305
+ optimization_strategy?: string;
1306
+ own_cart_from_layers?: number;
1307
+ pick_time_mode?: string;
1308
+ plants_per_day?: number;
1309
+ plants_per_hour?: number;
1310
+ require_same_carrier?: boolean;
1311
+ require_same_crate_type?: boolean;
1312
+ require_same_delivery_date?: boolean;
1313
+ require_same_delivery_location?: boolean;
1314
+ updated_at?: string;
1315
+ updated_by?: string | null;
1316
+ };
1317
+ Relationships: [];
1318
+ };
1031
1319
  cart_replan_queue: {
1032
1320
  Row: {
1033
1321
  attempts: number;
@@ -1058,111 +1346,237 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
1058
1346
  referencedColumns: ["id"];
1059
1347
  }];
1060
1348
  };
1061
- collections: {
1349
+ cart_types: {
1062
1350
  Row: {
1063
1351
  created_at: string;
1064
- created_by: string | null;
1065
1352
  id: string;
1353
+ is_default: boolean;
1354
+ layer_length_cm: number;
1355
+ layer_width_cm: number;
1356
+ layers_per_cart: number;
1066
1357
  name: string;
1067
1358
  updated_at: string;
1068
1359
  };
1069
1360
  Insert: {
1070
1361
  created_at?: string;
1071
- created_by?: string | null;
1072
1362
  id?: string;
1363
+ is_default?: boolean;
1364
+ layer_length_cm: number;
1365
+ layer_width_cm: number;
1366
+ layers_per_cart?: number;
1073
1367
  name: string;
1074
1368
  updated_at?: string;
1075
1369
  };
1076
1370
  Update: {
1077
1371
  created_at?: string;
1078
- created_by?: string | null;
1079
1372
  id?: string;
1373
+ is_default?: boolean;
1374
+ layer_length_cm?: number;
1375
+ layer_width_cm?: number;
1376
+ layers_per_cart?: number;
1080
1377
  name?: string;
1081
1378
  updated_at?: string;
1082
1379
  };
1083
1380
  Relationships: [];
1084
1381
  };
1085
- customer_audit_log: {
1382
+ catalog_articles_cache: {
1086
1383
  Row: {
1087
- action: string;
1088
- changes: import("./types").Json;
1089
1384
  created_at: string;
1090
- customer_id: string;
1385
+ default_price: number;
1386
+ default_vat_rate_ref: string | null;
1387
+ external_ref: string;
1091
1388
  id: string;
1092
- user_id: string | null;
1389
+ name: string;
1390
+ updated_at: string;
1391
+ user_id: string;
1093
1392
  };
1094
1393
  Insert: {
1095
- action: string;
1096
- changes?: import("./types").Json;
1097
1394
  created_at?: string;
1098
- customer_id: string;
1395
+ default_price?: number;
1396
+ default_vat_rate_ref?: string | null;
1397
+ external_ref: string;
1099
1398
  id?: string;
1100
- user_id?: string | null;
1399
+ name: string;
1400
+ updated_at?: string;
1401
+ user_id: string;
1101
1402
  };
1102
1403
  Update: {
1103
- action?: string;
1104
- changes?: import("./types").Json;
1105
1404
  created_at?: string;
1106
- customer_id?: string;
1405
+ default_price?: number;
1406
+ default_vat_rate_ref?: string | null;
1407
+ external_ref?: string;
1107
1408
  id?: string;
1108
- user_id?: string | null;
1409
+ name?: string;
1410
+ updated_at?: string;
1411
+ user_id?: string;
1109
1412
  };
1110
- Relationships: [{
1111
- foreignKeyName: "customer_audit_log_customer_id_fkey";
1112
- columns: ["customer_id"];
1113
- isOneToOne: false;
1114
- referencedRelation: "customers";
1115
- referencedColumns: ["id"];
1116
- }];
1413
+ Relationships: [];
1117
1414
  };
1118
- customer_contacts: {
1415
+ catalog_vat_rates_cache: {
1119
1416
  Row: {
1120
1417
  created_at: string;
1121
- customer_id: string;
1122
- email: string | null;
1123
- floriday_contact_id: string | null;
1124
- full_name: string;
1418
+ external_ref: string;
1125
1419
  id: string;
1126
- is_active: boolean;
1127
- job_title: string | null;
1128
- phone: string | null;
1129
- photo_url: string | null;
1130
- raw: import("./types").Json | null;
1420
+ label: string;
1421
+ percentage: number;
1131
1422
  updated_at: string;
1423
+ user_id: string;
1132
1424
  };
1133
1425
  Insert: {
1134
1426
  created_at?: string;
1135
- customer_id: string;
1136
- email?: string | null;
1137
- floriday_contact_id?: string | null;
1138
- full_name: string;
1427
+ external_ref: string;
1139
1428
  id?: string;
1140
- is_active?: boolean;
1141
- job_title?: string | null;
1142
- phone?: string | null;
1143
- photo_url?: string | null;
1144
- raw?: import("./types").Json | null;
1429
+ label: string;
1430
+ percentage?: number;
1145
1431
  updated_at?: string;
1432
+ user_id: string;
1146
1433
  };
1147
1434
  Update: {
1148
1435
  created_at?: string;
1149
- customer_id?: string;
1150
- email?: string | null;
1151
- floriday_contact_id?: string | null;
1152
- full_name?: string;
1436
+ external_ref?: string;
1153
1437
  id?: string;
1154
- is_active?: boolean;
1155
- job_title?: string | null;
1156
- phone?: string | null;
1157
- photo_url?: string | null;
1158
- raw?: import("./types").Json | null;
1438
+ label?: string;
1439
+ percentage?: number;
1159
1440
  updated_at?: string;
1441
+ user_id?: string;
1160
1442
  };
1161
- Relationships: [{
1162
- foreignKeyName: "customer_contacts_customer_id_fkey";
1163
- columns: ["customer_id"];
1164
- isOneToOne: false;
1165
- referencedRelation: "customers";
1443
+ Relationships: [];
1444
+ };
1445
+ collections: {
1446
+ Row: {
1447
+ created_at: string;
1448
+ created_by: string | null;
1449
+ id: string;
1450
+ name: string;
1451
+ updated_at: string;
1452
+ };
1453
+ Insert: {
1454
+ created_at?: string;
1455
+ created_by?: string | null;
1456
+ id?: string;
1457
+ name: string;
1458
+ updated_at?: string;
1459
+ };
1460
+ Update: {
1461
+ created_at?: string;
1462
+ created_by?: string | null;
1463
+ id?: string;
1464
+ name?: string;
1465
+ updated_at?: string;
1466
+ };
1467
+ Relationships: [];
1468
+ };
1469
+ crate_types: {
1470
+ Row: {
1471
+ created_at: string;
1472
+ id: string;
1473
+ length_cm: number;
1474
+ name: string;
1475
+ plants_per_crate: number;
1476
+ updated_at: string;
1477
+ width_cm: number;
1478
+ };
1479
+ Insert: {
1480
+ created_at?: string;
1481
+ id?: string;
1482
+ length_cm: number;
1483
+ name: string;
1484
+ plants_per_crate?: number;
1485
+ updated_at?: string;
1486
+ width_cm: number;
1487
+ };
1488
+ Update: {
1489
+ created_at?: string;
1490
+ id?: string;
1491
+ length_cm?: number;
1492
+ name?: string;
1493
+ plants_per_crate?: number;
1494
+ updated_at?: string;
1495
+ width_cm?: number;
1496
+ };
1497
+ Relationships: [];
1498
+ };
1499
+ customer_audit_log: {
1500
+ Row: {
1501
+ action: string;
1502
+ changes: import("./types").Json;
1503
+ created_at: string;
1504
+ customer_id: string;
1505
+ id: string;
1506
+ user_id: string | null;
1507
+ };
1508
+ Insert: {
1509
+ action: string;
1510
+ changes?: import("./types").Json;
1511
+ created_at?: string;
1512
+ customer_id: string;
1513
+ id?: string;
1514
+ user_id?: string | null;
1515
+ };
1516
+ Update: {
1517
+ action?: string;
1518
+ changes?: import("./types").Json;
1519
+ created_at?: string;
1520
+ customer_id?: string;
1521
+ id?: string;
1522
+ user_id?: string | null;
1523
+ };
1524
+ Relationships: [{
1525
+ foreignKeyName: "customer_audit_log_customer_id_fkey";
1526
+ columns: ["customer_id"];
1527
+ isOneToOne: false;
1528
+ referencedRelation: "customers";
1529
+ referencedColumns: ["id"];
1530
+ }];
1531
+ };
1532
+ customer_contacts: {
1533
+ Row: {
1534
+ created_at: string;
1535
+ customer_id: string;
1536
+ email: string | null;
1537
+ floriday_contact_id: string | null;
1538
+ full_name: string;
1539
+ id: string;
1540
+ is_active: boolean;
1541
+ job_title: string | null;
1542
+ phone: string | null;
1543
+ photo_url: string | null;
1544
+ raw: import("./types").Json | null;
1545
+ updated_at: string;
1546
+ };
1547
+ Insert: {
1548
+ created_at?: string;
1549
+ customer_id: string;
1550
+ email?: string | null;
1551
+ floriday_contact_id?: string | null;
1552
+ full_name: string;
1553
+ id?: string;
1554
+ is_active?: boolean;
1555
+ job_title?: string | null;
1556
+ phone?: string | null;
1557
+ photo_url?: string | null;
1558
+ raw?: import("./types").Json | null;
1559
+ updated_at?: string;
1560
+ };
1561
+ Update: {
1562
+ created_at?: string;
1563
+ customer_id?: string;
1564
+ email?: string | null;
1565
+ floriday_contact_id?: string | null;
1566
+ full_name?: string;
1567
+ id?: string;
1568
+ is_active?: boolean;
1569
+ job_title?: string | null;
1570
+ phone?: string | null;
1571
+ photo_url?: string | null;
1572
+ raw?: import("./types").Json | null;
1573
+ updated_at?: string;
1574
+ };
1575
+ Relationships: [{
1576
+ foreignKeyName: "customer_contacts_customer_id_fkey";
1577
+ columns: ["customer_id"];
1578
+ isOneToOne: false;
1579
+ referencedRelation: "customers";
1166
1580
  referencedColumns: ["id"];
1167
1581
  }];
1168
1582
  };
@@ -1307,6 +1721,105 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
1307
1721
  };
1308
1722
  Relationships: [];
1309
1723
  };
1724
+ customer_price_group_members: {
1725
+ Row: {
1726
+ created_at: string;
1727
+ customer_key: string;
1728
+ id: string;
1729
+ owner_id: string;
1730
+ price_group_id: string;
1731
+ };
1732
+ Insert: {
1733
+ created_at?: string;
1734
+ customer_key: string;
1735
+ id?: string;
1736
+ owner_id?: string;
1737
+ price_group_id: string;
1738
+ };
1739
+ Update: {
1740
+ created_at?: string;
1741
+ customer_key?: string;
1742
+ id?: string;
1743
+ owner_id?: string;
1744
+ price_group_id?: string;
1745
+ };
1746
+ Relationships: [{
1747
+ foreignKeyName: "customer_price_group_members_price_group_id_fkey";
1748
+ columns: ["price_group_id"];
1749
+ isOneToOne: false;
1750
+ referencedRelation: "customer_price_groups";
1751
+ referencedColumns: ["id"];
1752
+ }];
1753
+ };
1754
+ customer_price_groups: {
1755
+ Row: {
1756
+ calc_type: string | null;
1757
+ calc_value: number | null;
1758
+ calc_value_type: string | null;
1759
+ created_at: string;
1760
+ currency: string;
1761
+ distribute_over: string | null;
1762
+ group_type: string;
1763
+ handling_fee: number | null;
1764
+ id: string;
1765
+ include_stickers: boolean;
1766
+ is_active: boolean;
1767
+ name: string;
1768
+ owner_id: string;
1769
+ price_scope: string;
1770
+ pricing_mode: string;
1771
+ rounding: string;
1772
+ rounding_step: number;
1773
+ sort_order: number;
1774
+ unit: string;
1775
+ updated_at: string;
1776
+ };
1777
+ Insert: {
1778
+ calc_type?: string | null;
1779
+ calc_value?: number | null;
1780
+ calc_value_type?: string | null;
1781
+ created_at?: string;
1782
+ currency?: string;
1783
+ distribute_over?: string | null;
1784
+ group_type?: string;
1785
+ handling_fee?: number | null;
1786
+ id?: string;
1787
+ include_stickers?: boolean;
1788
+ is_active?: boolean;
1789
+ name: string;
1790
+ owner_id?: string;
1791
+ price_scope?: string;
1792
+ pricing_mode?: string;
1793
+ rounding?: string;
1794
+ rounding_step?: number;
1795
+ sort_order?: number;
1796
+ unit?: string;
1797
+ updated_at?: string;
1798
+ };
1799
+ Update: {
1800
+ calc_type?: string | null;
1801
+ calc_value?: number | null;
1802
+ calc_value_type?: string | null;
1803
+ created_at?: string;
1804
+ currency?: string;
1805
+ distribute_over?: string | null;
1806
+ group_type?: string;
1807
+ handling_fee?: number | null;
1808
+ id?: string;
1809
+ include_stickers?: boolean;
1810
+ is_active?: boolean;
1811
+ name?: string;
1812
+ owner_id?: string;
1813
+ price_scope?: string;
1814
+ pricing_mode?: string;
1815
+ rounding?: string;
1816
+ rounding_step?: number;
1817
+ sort_order?: number;
1818
+ unit?: string;
1819
+ updated_at?: string;
1820
+ };
1821
+ Relationships: [];
1822
+ };
1310
1823
  customer_selected_assortment: {
1311
1824
  Row: {
1312
1825
  article_number: string | null;
@@ -1460,6 +1973,10 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
1460
1973
  sync_error: string | null;
1461
1974
  sync_status: string;
1462
1975
  trade_forms: string[];
1976
+ twinfield_code: string | null;
1977
+ twinfield_last_hash: string | null;
1978
+ twinfield_sync_error: string | null;
1979
+ twinfield_synced_at: string | null;
1463
1980
  updated_at: string;
1464
1981
  vat_display: string | null;
1465
1982
  vat_number: string | null;
@@ -1527,6 +2044,10 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
1527
2044
  sync_error?: string | null;
1528
2045
  sync_status?: string;
1529
2046
  trade_forms?: string[];
2047
+ twinfield_code?: string | null;
2048
+ twinfield_last_hash?: string | null;
2049
+ twinfield_sync_error?: string | null;
2050
+ twinfield_synced_at?: string | null;
1530
2051
  updated_at?: string;
1531
2052
  vat_display?: string | null;
1532
2053
  vat_number?: string | null;
@@ -1594,6 +2115,10 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
1594
2115
  sync_error?: string | null;
1595
2116
  sync_status?: string;
1596
2117
  trade_forms?: string[];
2118
+ twinfield_code?: string | null;
2119
+ twinfield_last_hash?: string | null;
2120
+ twinfield_sync_error?: string | null;
2121
+ twinfield_synced_at?: string | null;
1597
2122
  updated_at?: string;
1598
2123
  vat_display?: string | null;
1599
2124
  vat_number?: string | null;
@@ -3407,74 +3932,173 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
3407
3932
  referencedColumns: ["id"];
3408
3933
  }];
3409
3934
  };
3410
- floriday_auction_letters_cache: {
3935
+ floriday_agreement_calloffs_cache: {
3411
3936
  Row: {
3412
- auction_letter_code: string;
3413
- clock_supply_id: string;
3937
+ agreement_id: string | null;
3414
3938
  connection_id: string;
3415
- content_type: string;
3939
+ data: import("./types").Json;
3940
+ delivery_date: string | null;
3416
3941
  fetched_at: string;
3942
+ floriday_id: string;
3417
3943
  id: string;
3418
- storage_path: string;
3944
+ is_deleted: boolean;
3945
+ sequence_number: number;
3946
+ status: string | null;
3947
+ updated_at: string;
3419
3948
  };
3420
3949
  Insert: {
3421
- auction_letter_code: string;
3422
- clock_supply_id: string;
3950
+ agreement_id?: string | null;
3423
3951
  connection_id: string;
3424
- content_type?: string;
3952
+ data?: import("./types").Json;
3953
+ delivery_date?: string | null;
3425
3954
  fetched_at?: string;
3955
+ floriday_id: string;
3426
3956
  id?: string;
3427
- storage_path: string;
3957
+ is_deleted?: boolean;
3958
+ sequence_number?: number;
3959
+ status?: string | null;
3960
+ updated_at?: string;
3428
3961
  };
3429
3962
  Update: {
3430
- auction_letter_code?: string;
3431
- clock_supply_id?: string;
3963
+ agreement_id?: string | null;
3432
3964
  connection_id?: string;
3433
- content_type?: string;
3965
+ data?: import("./types").Json;
3966
+ delivery_date?: string | null;
3434
3967
  fetched_at?: string;
3968
+ floriday_id?: string;
3435
3969
  id?: string;
3436
- storage_path?: string;
3970
+ is_deleted?: boolean;
3971
+ sequence_number?: number;
3972
+ status?: string | null;
3973
+ updated_at?: string;
3437
3974
  };
3438
3975
  Relationships: [{
3439
- foreignKeyName: "floriday_auction_letters_cache_connection_id_fkey";
3976
+ foreignKeyName: "floriday_agreement_calloffs_cache_connection_id_fkey";
3440
3977
  columns: ["connection_id"];
3441
3978
  isOneToOne: false;
3442
3979
  referencedRelation: "floriday_connections";
3443
3980
  referencedColumns: ["id"];
3444
3981
  }];
3445
3982
  };
3446
- floriday_auto_fulfillment_log: {
3983
+ floriday_agreements_cache: {
3447
3984
  Row: {
3448
- attempts: number;
3985
+ buyer_organization_id: string | null;
3449
3986
  connection_id: string;
3450
- created_at: string;
3451
- error: string | null;
3452
- fulfillment_order_id: string | null;
3987
+ data: import("./types").Json;
3988
+ fetched_at: string;
3989
+ floriday_id: string;
3453
3990
  id: string;
3454
- last_attempt_at: string | null;
3455
- reason: string | null;
3456
- sales_order_id: string;
3457
- status: string;
3991
+ is_deleted: boolean;
3992
+ sequence_number: number;
3993
+ status: string | null;
3458
3994
  updated_at: string;
3995
+ valid_from: string | null;
3996
+ valid_until: string | null;
3459
3997
  };
3460
3998
  Insert: {
3461
- attempts?: number;
3999
+ buyer_organization_id?: string | null;
3462
4000
  connection_id: string;
3463
- created_at?: string;
3464
- error?: string | null;
3465
- fulfillment_order_id?: string | null;
4001
+ data?: import("./types").Json;
4002
+ fetched_at?: string;
4003
+ floriday_id: string;
3466
4004
  id?: string;
3467
- last_attempt_at?: string | null;
3468
- reason?: string | null;
3469
- sales_order_id: string;
3470
- status?: string;
4005
+ is_deleted?: boolean;
4006
+ sequence_number?: number;
4007
+ status?: string | null;
3471
4008
  updated_at?: string;
4009
+ valid_from?: string | null;
4010
+ valid_until?: string | null;
3472
4011
  };
3473
4012
  Update: {
3474
- attempts?: number;
4013
+ buyer_organization_id?: string | null;
3475
4014
  connection_id?: string;
3476
- created_at?: string;
3477
- error?: string | null;
4015
+ data?: import("./types").Json;
4016
+ fetched_at?: string;
4017
+ floriday_id?: string;
4018
+ id?: string;
4019
+ is_deleted?: boolean;
4020
+ sequence_number?: number;
4021
+ status?: string | null;
4022
+ updated_at?: string;
4023
+ valid_from?: string | null;
4024
+ valid_until?: string | null;
4025
+ };
4026
+ Relationships: [{
4027
+ foreignKeyName: "floriday_agreements_cache_connection_id_fkey";
4028
+ columns: ["connection_id"];
4029
+ isOneToOne: false;
4030
+ referencedRelation: "floriday_connections";
4031
+ referencedColumns: ["id"];
4032
+ }];
4033
+ };
4034
+ floriday_auction_letters_cache: {
4035
+ Row: {
4036
+ auction_letter_code: string;
4037
+ clock_supply_id: string;
4038
+ connection_id: string;
4039
+ content_type: string;
4040
+ fetched_at: string;
4041
+ id: string;
4042
+ storage_path: string;
4043
+ };
4044
+ Insert: {
4045
+ auction_letter_code: string;
4046
+ clock_supply_id: string;
4047
+ connection_id: string;
4048
+ content_type?: string;
4049
+ fetched_at?: string;
4050
+ id?: string;
4051
+ storage_path: string;
4052
+ };
4053
+ Update: {
4054
+ auction_letter_code?: string;
4055
+ clock_supply_id?: string;
4056
+ connection_id?: string;
4057
+ content_type?: string;
4058
+ fetched_at?: string;
4059
+ id?: string;
4060
+ storage_path?: string;
4061
+ };
4062
+ Relationships: [{
4063
+ foreignKeyName: "floriday_auction_letters_cache_connection_id_fkey";
4064
+ columns: ["connection_id"];
4065
+ isOneToOne: false;
4066
+ referencedRelation: "floriday_connections";
4067
+ referencedColumns: ["id"];
4068
+ }];
4069
+ };
4070
+ floriday_auto_fulfillment_log: {
4071
+ Row: {
4072
+ attempts: number;
4073
+ connection_id: string;
4074
+ created_at: string;
4075
+ error: string | null;
4076
+ fulfillment_order_id: string | null;
4077
+ id: string;
4078
+ last_attempt_at: string | null;
4079
+ reason: string | null;
4080
+ sales_order_id: string;
4081
+ status: string;
4082
+ updated_at: string;
4083
+ };
4084
+ Insert: {
4085
+ attempts?: number;
4086
+ connection_id: string;
4087
+ created_at?: string;
4088
+ error?: string | null;
4089
+ fulfillment_order_id?: string | null;
4090
+ id?: string;
4091
+ last_attempt_at?: string | null;
4092
+ reason?: string | null;
4093
+ sales_order_id: string;
4094
+ status?: string;
4095
+ updated_at?: string;
4096
+ };
4097
+ Update: {
4098
+ attempts?: number;
4099
+ connection_id?: string;
4100
+ created_at?: string;
4101
+ error?: string | null;
3478
4102
  fulfillment_order_id?: string | null;
3479
4103
  id?: string;
3480
4104
  last_attempt_at?: string | null;
@@ -4701,8 +5325,6 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
4701
5325
  Row: {
4702
5326
  buyer_organization_id: string | null;
4703
5327
  connection_id: string;
4704
- controlled_at: string | null;
4705
- controlled_by: string | null;
4706
5328
  created_at: string;
4707
5329
  data: import("./types").Json;
4708
5330
  floriday_id: string;
@@ -4714,8 +5336,6 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
4714
5336
  Insert: {
4715
5337
  buyer_organization_id?: string | null;
4716
5338
  connection_id: string;
4717
- controlled_at?: string | null;
4718
- controlled_by?: string | null;
4719
5339
  created_at?: string;
4720
5340
  data: import("./types").Json;
4721
5341
  floriday_id: string;
@@ -4727,8 +5347,6 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
4727
5347
  Update: {
4728
5348
  buyer_organization_id?: string | null;
4729
5349
  connection_id?: string;
4730
- controlled_at?: string | null;
4731
- controlled_by?: string | null;
4732
5350
  created_at?: string;
4733
5351
  data?: import("./types").Json;
4734
5352
  floriday_id?: string;
@@ -4910,45 +5528,6 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
4910
5528
  referencedColumns: ["id"];
4911
5529
  }];
4912
5530
  };
4913
- floriday_trade_settings_customers_cache: {
4914
- Row: {
4915
- connection_id: string;
4916
- data: import("./types").Json;
4917
- fetched_at: string;
4918
- floriday_id: string;
4919
- id: string;
4920
- is_deleted: boolean;
4921
- sequence_number: number;
4922
- updated_at: string;
4923
- };
4924
- Insert: {
4925
- connection_id: string;
4926
- data: import("./types").Json;
4927
- fetched_at?: string;
4928
- floriday_id: string;
4929
- id?: string;
4930
- is_deleted?: boolean;
4931
- sequence_number?: number;
4932
- updated_at?: string;
4933
- };
4934
- Update: {
4935
- connection_id?: string;
4936
- data?: import("./types").Json;
4937
- fetched_at?: string;
4938
- floriday_id?: string;
4939
- id?: string;
4940
- is_deleted?: boolean;
4941
- sequence_number?: number;
4942
- updated_at?: string;
4943
- };
4944
- Relationships: [{
4945
- foreignKeyName: "floriday_trade_settings_customers_cache_connection_id_fkey";
4946
- columns: ["connection_id"];
4947
- isOneToOne: false;
4948
- referencedRelation: "floriday_connections";
4949
- referencedColumns: ["id"];
4950
- }];
4951
- };
4952
5531
  floriday_trips_cache: {
4953
5532
  Row: {
4954
5533
  carrier_organization_id: string | null;
@@ -4997,6 +5576,27 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
4997
5576
  referencedColumns: ["id"];
4998
5577
  }];
4999
5578
  };
5579
+ floriday_vbn_required_characteristics: {
5580
+ Row: {
5581
+ required_codes: string[];
5582
+ updated_at: string;
5583
+ updated_by: string | null;
5584
+ vbn_code: string;
5585
+ };
5586
+ Insert: {
5587
+ required_codes?: string[];
5588
+ updated_at?: string;
5589
+ updated_by?: string | null;
5590
+ vbn_code: string;
5591
+ };
5592
+ Update: {
5593
+ required_codes?: string[];
5594
+ updated_at?: string;
5595
+ updated_by?: string | null;
5596
+ vbn_code?: string;
5597
+ };
5598
+ Relationships: [];
5599
+ };
5000
5600
  floriday_warehouses_cache: {
5001
5601
  Row: {
5002
5602
  connection_id: string;
@@ -5477,172 +6077,454 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
5477
6077
  };
5478
6078
  Relationships: [];
5479
6079
  };
5480
- local_customer_agreements: {
6080
+ itk_contact_persons: {
5481
6081
  Row: {
5482
- base_price: number | null;
5483
6082
  created_at: string;
5484
- currency: string;
5485
6083
  customer_id: string;
6084
+ email: string | null;
5486
6085
  id: string;
5487
- min_quantity: number;
5488
- net_price: number;
5489
- notes: string | null;
5490
- product_category_id: string | null;
5491
- product_id: string | null;
6086
+ name: string;
6087
+ phone: string | null;
6088
+ role: string | null;
5492
6089
  updated_at: string;
5493
- valid_from: string | null;
5494
- valid_until: string | null;
5495
6090
  };
5496
6091
  Insert: {
5497
- base_price?: number | null;
5498
6092
  created_at?: string;
5499
- currency?: string;
5500
6093
  customer_id: string;
6094
+ email?: string | null;
5501
6095
  id?: string;
5502
- min_quantity?: number;
5503
- net_price: number;
5504
- notes?: string | null;
5505
- product_category_id?: string | null;
5506
- product_id?: string | null;
6096
+ name: string;
6097
+ phone?: string | null;
6098
+ role?: string | null;
5507
6099
  updated_at?: string;
5508
- valid_from?: string | null;
5509
- valid_until?: string | null;
5510
6100
  };
5511
6101
  Update: {
5512
- base_price?: number | null;
5513
6102
  created_at?: string;
5514
- currency?: string;
5515
6103
  customer_id?: string;
6104
+ email?: string | null;
5516
6105
  id?: string;
5517
- min_quantity?: number;
5518
- net_price?: number;
5519
- notes?: string | null;
5520
- product_category_id?: string | null;
5521
- product_id?: string | null;
6106
+ name?: string;
6107
+ phone?: string | null;
6108
+ role?: string | null;
5522
6109
  updated_at?: string;
5523
- valid_from?: string | null;
5524
- valid_until?: string | null;
5525
6110
  };
5526
6111
  Relationships: [{
5527
- foreignKeyName: "local_customer_agreements_customer_id_fkey";
6112
+ foreignKeyName: "itk_contact_persons_customer_id_fkey";
5528
6113
  columns: ["customer_id"];
5529
6114
  isOneToOne: false;
5530
- referencedRelation: "customers";
5531
- referencedColumns: ["id"];
5532
- }, {
5533
- foreignKeyName: "local_customer_agreements_product_category_id_fkey";
5534
- columns: ["product_category_id"];
5535
- isOneToOne: false;
5536
- referencedRelation: "product_categories";
5537
- referencedColumns: ["id"];
5538
- }, {
5539
- foreignKeyName: "local_customer_agreements_product_id_fkey";
5540
- columns: ["product_id"];
5541
- isOneToOne: false;
5542
- referencedRelation: "products";
6115
+ referencedRelation: "itk_customers";
5543
6116
  referencedColumns: ["id"];
5544
6117
  }];
5545
6118
  };
5546
- local_customer_price_groups: {
6119
+ itk_customer_dynamic_values: {
5547
6120
  Row: {
5548
6121
  created_at: string;
5549
- currency: string;
5550
6122
  customer_id: string;
5551
- discount_type: string;
5552
- discount_value: number;
6123
+ field_id: string;
5553
6124
  id: string;
5554
- min_quantity: number;
5555
- notes: string | null;
5556
- product_category_id: string | null;
5557
- product_id: string | null;
5558
6125
  updated_at: string;
5559
- valid_from: string | null;
5560
- valid_until: string | null;
6126
+ value: string | null;
5561
6127
  };
5562
6128
  Insert: {
5563
6129
  created_at?: string;
5564
- currency?: string;
5565
6130
  customer_id: string;
5566
- discount_type: string;
5567
- discount_value: number;
6131
+ field_id: string;
5568
6132
  id?: string;
5569
- min_quantity?: number;
5570
- notes?: string | null;
5571
- product_category_id?: string | null;
5572
- product_id?: string | null;
5573
6133
  updated_at?: string;
5574
- valid_from?: string | null;
5575
- valid_until?: string | null;
6134
+ value?: string | null;
5576
6135
  };
5577
6136
  Update: {
5578
6137
  created_at?: string;
5579
- currency?: string;
5580
6138
  customer_id?: string;
5581
- discount_type?: string;
5582
- discount_value?: number;
6139
+ field_id?: string;
5583
6140
  id?: string;
5584
- min_quantity?: number;
5585
- notes?: string | null;
5586
- product_category_id?: string | null;
5587
- product_id?: string | null;
5588
6141
  updated_at?: string;
5589
- valid_from?: string | null;
5590
- valid_until?: string | null;
6142
+ value?: string | null;
5591
6143
  };
5592
6144
  Relationships: [{
5593
- foreignKeyName: "local_customer_price_groups_customer_id_fkey";
6145
+ foreignKeyName: "itk_customer_dynamic_values_customer_id_fkey";
5594
6146
  columns: ["customer_id"];
5595
6147
  isOneToOne: false;
5596
- referencedRelation: "customers";
5597
- referencedColumns: ["id"];
5598
- }, {
5599
- foreignKeyName: "local_customer_price_groups_product_category_id_fkey";
5600
- columns: ["product_category_id"];
5601
- isOneToOne: false;
5602
- referencedRelation: "product_categories";
6148
+ referencedRelation: "itk_customers";
5603
6149
  referencedColumns: ["id"];
5604
6150
  }, {
5605
- foreignKeyName: "local_customer_price_groups_product_id_fkey";
5606
- columns: ["product_id"];
6151
+ foreignKeyName: "itk_customer_dynamic_values_field_id_fkey";
6152
+ columns: ["field_id"];
5607
6153
  isOneToOne: false;
5608
- referencedRelation: "products";
6154
+ referencedRelation: "itk_dynamic_fields";
5609
6155
  referencedColumns: ["id"];
5610
6156
  }];
5611
6157
  };
5612
- local_customer_sales_strategies: {
6158
+ itk_customer_notes: {
5613
6159
  Row: {
6160
+ body: string;
5614
6161
  created_at: string;
5615
- currency: string;
6162
+ created_by: string | null;
5616
6163
  customer_id: string;
5617
- discount_type: string;
5618
- discount_value: number;
5619
6164
  id: string;
5620
- min_quantity: number;
5621
- notes: string | null;
5622
- product_category_id: string | null;
5623
- product_id: string | null;
6165
+ note_type: string;
5624
6166
  updated_at: string;
5625
- valid_from: string | null;
5626
- valid_until: string | null;
5627
6167
  };
5628
6168
  Insert: {
6169
+ body: string;
5629
6170
  created_at?: string;
5630
- currency?: string;
6171
+ created_by?: string | null;
5631
6172
  customer_id: string;
5632
- discount_type: string;
5633
- discount_value: number;
5634
6173
  id?: string;
5635
- min_quantity?: number;
5636
- notes?: string | null;
5637
- product_category_id?: string | null;
5638
- product_id?: string | null;
6174
+ note_type?: string;
5639
6175
  updated_at?: string;
5640
- valid_from?: string | null;
5641
- valid_until?: string | null;
5642
6176
  };
5643
6177
  Update: {
6178
+ body?: string;
5644
6179
  created_at?: string;
5645
- currency?: string;
6180
+ created_by?: string | null;
6181
+ customer_id?: string;
6182
+ id?: string;
6183
+ note_type?: string;
6184
+ updated_at?: string;
6185
+ };
6186
+ Relationships: [{
6187
+ foreignKeyName: "itk_customer_notes_customer_id_fkey";
6188
+ columns: ["customer_id"];
6189
+ isOneToOne: false;
6190
+ referencedRelation: "itk_customers";
6191
+ referencedColumns: ["id"];
6192
+ }];
6193
+ };
6194
+ itk_customers: {
6195
+ Row: {
6196
+ billing_city: string | null;
6197
+ billing_postcode: string | null;
6198
+ billing_street: string | null;
6199
+ created_at: string;
6200
+ general_email: string | null;
6201
+ general_phone: string | null;
6202
+ id: string;
6203
+ legacy_customer_id: string | null;
6204
+ name: string;
6205
+ segment: Database["public"]["Enums"]["itk_customer_segment"];
6206
+ updated_at: string;
6207
+ };
6208
+ Insert: {
6209
+ billing_city?: string | null;
6210
+ billing_postcode?: string | null;
6211
+ billing_street?: string | null;
6212
+ created_at?: string;
6213
+ general_email?: string | null;
6214
+ general_phone?: string | null;
6215
+ id?: string;
6216
+ legacy_customer_id?: string | null;
6217
+ name: string;
6218
+ segment?: Database["public"]["Enums"]["itk_customer_segment"];
6219
+ updated_at?: string;
6220
+ };
6221
+ Update: {
6222
+ billing_city?: string | null;
6223
+ billing_postcode?: string | null;
6224
+ billing_street?: string | null;
6225
+ created_at?: string;
6226
+ general_email?: string | null;
6227
+ general_phone?: string | null;
6228
+ id?: string;
6229
+ legacy_customer_id?: string | null;
6230
+ name?: string;
6231
+ segment?: Database["public"]["Enums"]["itk_customer_segment"];
6232
+ updated_at?: string;
6233
+ };
6234
+ Relationships: [{
6235
+ foreignKeyName: "itk_customers_legacy_customer_id_fkey";
6236
+ columns: ["legacy_customer_id"];
6237
+ isOneToOne: false;
6238
+ referencedRelation: "customers";
6239
+ referencedColumns: ["id"];
6240
+ }];
6241
+ };
6242
+ itk_dynamic_fields: {
6243
+ Row: {
6244
+ created_at: string;
6245
+ field_name: string;
6246
+ field_type: Database["public"]["Enums"]["itk_dynamic_field_type"];
6247
+ id: string;
6248
+ options: import("./types").Json;
6249
+ sort_order: number;
6250
+ updated_at: string;
6251
+ };
6252
+ Insert: {
6253
+ created_at?: string;
6254
+ field_name: string;
6255
+ field_type?: Database["public"]["Enums"]["itk_dynamic_field_type"];
6256
+ id?: string;
6257
+ options?: import("./types").Json;
6258
+ sort_order?: number;
6259
+ updated_at?: string;
6260
+ };
6261
+ Update: {
6262
+ created_at?: string;
6263
+ field_name?: string;
6264
+ field_type?: Database["public"]["Enums"]["itk_dynamic_field_type"];
6265
+ id?: string;
6266
+ options?: import("./types").Json;
6267
+ sort_order?: number;
6268
+ updated_at?: string;
6269
+ };
6270
+ Relationships: [];
6271
+ };
6272
+ itk_work_locations: {
6273
+ Row: {
6274
+ city: string | null;
6275
+ created_at: string;
6276
+ customer_id: string;
6277
+ id: string;
6278
+ instructions: string | null;
6279
+ label: string;
6280
+ latitude: number | null;
6281
+ longitude: number | null;
6282
+ postcode: string | null;
6283
+ street: string | null;
6284
+ updated_at: string;
6285
+ };
6286
+ Insert: {
6287
+ city?: string | null;
6288
+ created_at?: string;
6289
+ customer_id: string;
6290
+ id?: string;
6291
+ instructions?: string | null;
6292
+ label: string;
6293
+ latitude?: number | null;
6294
+ longitude?: number | null;
6295
+ postcode?: string | null;
6296
+ street?: string | null;
6297
+ updated_at?: string;
6298
+ };
6299
+ Update: {
6300
+ city?: string | null;
6301
+ created_at?: string;
6302
+ customer_id?: string;
6303
+ id?: string;
6304
+ instructions?: string | null;
6305
+ label?: string;
6306
+ latitude?: number | null;
6307
+ longitude?: number | null;
6308
+ postcode?: string | null;
6309
+ street?: string | null;
6310
+ updated_at?: string;
6311
+ };
6312
+ Relationships: [{
6313
+ foreignKeyName: "itk_work_locations_customer_id_fkey";
6314
+ columns: ["customer_id"];
6315
+ isOneToOne: false;
6316
+ referencedRelation: "itk_customers";
6317
+ referencedColumns: ["id"];
6318
+ }];
6319
+ };
6320
+ leave_requests: {
6321
+ Row: {
6322
+ created_at: string;
6323
+ end_date: string;
6324
+ id: string;
6325
+ reason: string | null;
6326
+ start_date: string;
6327
+ status: string;
6328
+ tenant_id: string;
6329
+ updated_at: string;
6330
+ user_id: string;
6331
+ };
6332
+ Insert: {
6333
+ created_at?: string;
6334
+ end_date: string;
6335
+ id?: string;
6336
+ reason?: string | null;
6337
+ start_date: string;
6338
+ status?: string;
6339
+ tenant_id?: string;
6340
+ updated_at?: string;
6341
+ user_id: string;
6342
+ };
6343
+ Update: {
6344
+ created_at?: string;
6345
+ end_date?: string;
6346
+ id?: string;
6347
+ reason?: string | null;
6348
+ start_date?: string;
6349
+ status?: string;
6350
+ tenant_id?: string;
6351
+ updated_at?: string;
6352
+ user_id?: string;
6353
+ };
6354
+ Relationships: [{
6355
+ foreignKeyName: "leave_requests_user_id_fkey";
6356
+ columns: ["user_id"];
6357
+ isOneToOne: false;
6358
+ referencedRelation: "monteurs";
6359
+ referencedColumns: ["id"];
6360
+ }];
6361
+ };
6362
+ local_customer_agreements: {
6363
+ Row: {
6364
+ base_price: number | null;
6365
+ created_at: string;
6366
+ currency: string;
6367
+ customer_id: string;
6368
+ id: string;
6369
+ min_quantity: number;
6370
+ net_price: number;
6371
+ notes: string | null;
6372
+ product_category_id: string | null;
6373
+ product_id: string | null;
6374
+ updated_at: string;
6375
+ valid_from: string | null;
6376
+ valid_until: string | null;
6377
+ };
6378
+ Insert: {
6379
+ base_price?: number | null;
6380
+ created_at?: string;
6381
+ currency?: string;
6382
+ customer_id: string;
6383
+ id?: string;
6384
+ min_quantity?: number;
6385
+ net_price: number;
6386
+ notes?: string | null;
6387
+ product_category_id?: string | null;
6388
+ product_id?: string | null;
6389
+ updated_at?: string;
6390
+ valid_from?: string | null;
6391
+ valid_until?: string | null;
6392
+ };
6393
+ Update: {
6394
+ base_price?: number | null;
6395
+ created_at?: string;
6396
+ currency?: string;
6397
+ customer_id?: string;
6398
+ id?: string;
6399
+ min_quantity?: number;
6400
+ net_price?: number;
6401
+ notes?: string | null;
6402
+ product_category_id?: string | null;
6403
+ product_id?: string | null;
6404
+ updated_at?: string;
6405
+ valid_from?: string | null;
6406
+ valid_until?: string | null;
6407
+ };
6408
+ Relationships: [{
6409
+ foreignKeyName: "local_customer_agreements_customer_id_fkey";
6410
+ columns: ["customer_id"];
6411
+ isOneToOne: false;
6412
+ referencedRelation: "customers";
6413
+ referencedColumns: ["id"];
6414
+ }, {
6415
+ foreignKeyName: "local_customer_agreements_product_category_id_fkey";
6416
+ columns: ["product_category_id"];
6417
+ isOneToOne: false;
6418
+ referencedRelation: "product_categories";
6419
+ referencedColumns: ["id"];
6420
+ }, {
6421
+ foreignKeyName: "local_customer_agreements_product_id_fkey";
6422
+ columns: ["product_id"];
6423
+ isOneToOne: false;
6424
+ referencedRelation: "products";
6425
+ referencedColumns: ["id"];
6426
+ }];
6427
+ };
6428
+ local_customer_price_groups: {
6429
+ Row: {
6430
+ created_at: string;
6431
+ currency: string;
6432
+ customer_id: string;
6433
+ discount_type: string;
6434
+ discount_value: number;
6435
+ id: string;
6436
+ min_quantity: number;
6437
+ notes: string | null;
6438
+ product_category_id: string | null;
6439
+ product_id: string | null;
6440
+ updated_at: string;
6441
+ valid_from: string | null;
6442
+ valid_until: string | null;
6443
+ };
6444
+ Insert: {
6445
+ created_at?: string;
6446
+ currency?: string;
6447
+ customer_id: string;
6448
+ discount_type: string;
6449
+ discount_value: number;
6450
+ id?: string;
6451
+ min_quantity?: number;
6452
+ notes?: string | null;
6453
+ product_category_id?: string | null;
6454
+ product_id?: string | null;
6455
+ updated_at?: string;
6456
+ valid_from?: string | null;
6457
+ valid_until?: string | null;
6458
+ };
6459
+ Update: {
6460
+ created_at?: string;
6461
+ currency?: string;
6462
+ customer_id?: string;
6463
+ discount_type?: string;
6464
+ discount_value?: number;
6465
+ id?: string;
6466
+ min_quantity?: number;
6467
+ notes?: string | null;
6468
+ product_category_id?: string | null;
6469
+ product_id?: string | null;
6470
+ updated_at?: string;
6471
+ valid_from?: string | null;
6472
+ valid_until?: string | null;
6473
+ };
6474
+ Relationships: [{
6475
+ foreignKeyName: "local_customer_price_groups_customer_id_fkey";
6476
+ columns: ["customer_id"];
6477
+ isOneToOne: false;
6478
+ referencedRelation: "customers";
6479
+ referencedColumns: ["id"];
6480
+ }, {
6481
+ foreignKeyName: "local_customer_price_groups_product_category_id_fkey";
6482
+ columns: ["product_category_id"];
6483
+ isOneToOne: false;
6484
+ referencedRelation: "product_categories";
6485
+ referencedColumns: ["id"];
6486
+ }, {
6487
+ foreignKeyName: "local_customer_price_groups_product_id_fkey";
6488
+ columns: ["product_id"];
6489
+ isOneToOne: false;
6490
+ referencedRelation: "products";
6491
+ referencedColumns: ["id"];
6492
+ }];
6493
+ };
6494
+ local_customer_sales_strategies: {
6495
+ Row: {
6496
+ created_at: string;
6497
+ currency: string;
6498
+ customer_id: string;
6499
+ discount_type: string;
6500
+ discount_value: number;
6501
+ id: string;
6502
+ min_quantity: number;
6503
+ notes: string | null;
6504
+ product_category_id: string | null;
6505
+ product_id: string | null;
6506
+ updated_at: string;
6507
+ valid_from: string | null;
6508
+ valid_until: string | null;
6509
+ };
6510
+ Insert: {
6511
+ created_at?: string;
6512
+ currency?: string;
6513
+ customer_id: string;
6514
+ discount_type: string;
6515
+ discount_value: number;
6516
+ id?: string;
6517
+ min_quantity?: number;
6518
+ notes?: string | null;
6519
+ product_category_id?: string | null;
6520
+ product_id?: string | null;
6521
+ updated_at?: string;
6522
+ valid_from?: string | null;
6523
+ valid_until?: string | null;
6524
+ };
6525
+ Update: {
6526
+ created_at?: string;
6527
+ currency?: string;
5646
6528
  customer_id?: string;
5647
6529
  discount_type?: string;
5648
6530
  discount_value?: number;
@@ -5671,31 +6553,310 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
5671
6553
  foreignKeyName: "local_customer_sales_strategies_product_id_fkey";
5672
6554
  columns: ["product_id"];
5673
6555
  isOneToOne: false;
5674
- referencedRelation: "products";
6556
+ referencedRelation: "products";
6557
+ referencedColumns: ["id"];
6558
+ }];
6559
+ };
6560
+ locations: {
6561
+ Row: {
6562
+ created_at: string;
6563
+ id: string;
6564
+ name: string;
6565
+ sort_order: number;
6566
+ updated_at: string;
6567
+ };
6568
+ Insert: {
6569
+ created_at?: string;
6570
+ id?: string;
6571
+ name: string;
6572
+ sort_order?: number;
6573
+ updated_at?: string;
6574
+ };
6575
+ Update: {
6576
+ created_at?: string;
6577
+ id?: string;
6578
+ name?: string;
6579
+ sort_order?: number;
6580
+ updated_at?: string;
6581
+ };
6582
+ Relationships: [];
6583
+ };
6584
+ logistics_capacity_events: {
6585
+ Row: {
6586
+ available_carts: number;
6587
+ created_at: string;
6588
+ id: string;
6589
+ measures: import("./types").Json;
6590
+ note: string | null;
6591
+ outcome: string;
6592
+ required_carts: number;
6593
+ reserve_minutes: number;
6594
+ shortage_carts: number;
6595
+ status: string;
6596
+ user_id: string;
6597
+ };
6598
+ Insert: {
6599
+ available_carts?: number;
6600
+ created_at?: string;
6601
+ id?: string;
6602
+ measures?: import("./types").Json;
6603
+ note?: string | null;
6604
+ outcome?: string;
6605
+ required_carts?: number;
6606
+ reserve_minutes?: number;
6607
+ shortage_carts?: number;
6608
+ status: string;
6609
+ user_id: string;
6610
+ };
6611
+ Update: {
6612
+ available_carts?: number;
6613
+ created_at?: string;
6614
+ id?: string;
6615
+ measures?: import("./types").Json;
6616
+ note?: string | null;
6617
+ outcome?: string;
6618
+ required_carts?: number;
6619
+ reserve_minutes?: number;
6620
+ shortage_carts?: number;
6621
+ status?: string;
6622
+ user_id?: string;
6623
+ };
6624
+ Relationships: [];
6625
+ };
6626
+ logistics_capacity_settings: {
6627
+ Row: {
6628
+ created_at: string;
6629
+ settings: import("./types").Json;
6630
+ updated_at: string;
6631
+ user_id: string;
6632
+ };
6633
+ Insert: {
6634
+ created_at?: string;
6635
+ settings?: import("./types").Json;
6636
+ updated_at?: string;
6637
+ user_id: string;
6638
+ };
6639
+ Update: {
6640
+ created_at?: string;
6641
+ settings?: import("./types").Json;
6642
+ updated_at?: string;
6643
+ user_id?: string;
6644
+ };
6645
+ Relationships: [];
6646
+ };
6647
+ logistics_decisions: {
6648
+ Row: {
6649
+ created_at: string;
6650
+ explanation: string | null;
6651
+ id: string;
6652
+ input_snapshot: import("./types").Json;
6653
+ result: import("./types").Json;
6654
+ slot: string;
6655
+ strategy_id: string | null;
6656
+ subject_id: string;
6657
+ subject_type: string;
6658
+ user_id: string;
6659
+ };
6660
+ Insert: {
6661
+ created_at?: string;
6662
+ explanation?: string | null;
6663
+ id?: string;
6664
+ input_snapshot?: import("./types").Json;
6665
+ result?: import("./types").Json;
6666
+ slot: string;
6667
+ strategy_id?: string | null;
6668
+ subject_id: string;
6669
+ subject_type: string;
6670
+ user_id: string;
6671
+ };
6672
+ Update: {
6673
+ created_at?: string;
6674
+ explanation?: string | null;
6675
+ id?: string;
6676
+ input_snapshot?: import("./types").Json;
6677
+ result?: import("./types").Json;
6678
+ slot?: string;
6679
+ strategy_id?: string | null;
6680
+ subject_id?: string;
6681
+ subject_type?: string;
6682
+ user_id?: string;
6683
+ };
6684
+ Relationships: [{
6685
+ foreignKeyName: "logistics_decisions_strategy_id_fkey";
6686
+ columns: ["strategy_id"];
6687
+ isOneToOne: false;
6688
+ referencedRelation: "logistics_strategies";
6689
+ referencedColumns: ["id"];
6690
+ }];
6691
+ };
6692
+ logistics_formulas: {
6693
+ Row: {
6694
+ created_at: string;
6695
+ expression: string;
6696
+ id: string;
6697
+ notes: string | null;
6698
+ slot: string;
6699
+ strategy_id: string;
6700
+ updated_at: string;
6701
+ user_id: string;
6702
+ version: number;
6703
+ };
6704
+ Insert: {
6705
+ created_at?: string;
6706
+ expression?: string;
6707
+ id?: string;
6708
+ notes?: string | null;
6709
+ slot: string;
6710
+ strategy_id: string;
6711
+ updated_at?: string;
6712
+ user_id: string;
6713
+ version?: number;
6714
+ };
6715
+ Update: {
6716
+ created_at?: string;
6717
+ expression?: string;
6718
+ id?: string;
6719
+ notes?: string | null;
6720
+ slot?: string;
6721
+ strategy_id?: string;
6722
+ updated_at?: string;
6723
+ user_id?: string;
6724
+ version?: number;
6725
+ };
6726
+ Relationships: [{
6727
+ foreignKeyName: "logistics_formulas_strategy_id_fkey";
6728
+ columns: ["strategy_id"];
6729
+ isOneToOne: false;
6730
+ referencedRelation: "logistics_strategies";
6731
+ referencedColumns: ["id"];
6732
+ }];
6733
+ };
6734
+ logistics_strategies: {
6735
+ Row: {
6736
+ color: string;
6737
+ created_at: string;
6738
+ description: string | null;
6739
+ id: string;
6740
+ is_active: boolean;
6741
+ name: string;
6742
+ priority: number;
6743
+ updated_at: string;
6744
+ updated_by: string | null;
6745
+ user_id: string;
6746
+ version: number;
6747
+ };
6748
+ Insert: {
6749
+ color?: string;
6750
+ created_at?: string;
6751
+ description?: string | null;
6752
+ id?: string;
6753
+ is_active?: boolean;
6754
+ name: string;
6755
+ priority?: number;
6756
+ updated_at?: string;
6757
+ updated_by?: string | null;
6758
+ user_id: string;
6759
+ version?: number;
6760
+ };
6761
+ Update: {
6762
+ color?: string;
6763
+ created_at?: string;
6764
+ description?: string | null;
6765
+ id?: string;
6766
+ is_active?: boolean;
6767
+ name?: string;
6768
+ priority?: number;
6769
+ updated_at?: string;
6770
+ updated_by?: string | null;
6771
+ user_id?: string;
6772
+ version?: number;
6773
+ };
6774
+ Relationships: [];
6775
+ };
6776
+ logistics_strategy_schedules: {
6777
+ Row: {
6778
+ condition_expression: string | null;
6779
+ created_at: string;
6780
+ end_date: string | null;
6781
+ id: string;
6782
+ is_enabled: boolean;
6783
+ priority: number;
6784
+ rule_type: string;
6785
+ start_date: string | null;
6786
+ strategy_id: string;
6787
+ updated_at: string;
6788
+ user_id: string;
6789
+ };
6790
+ Insert: {
6791
+ condition_expression?: string | null;
6792
+ created_at?: string;
6793
+ end_date?: string | null;
6794
+ id?: string;
6795
+ is_enabled?: boolean;
6796
+ priority?: number;
6797
+ rule_type: string;
6798
+ start_date?: string | null;
6799
+ strategy_id: string;
6800
+ updated_at?: string;
6801
+ user_id: string;
6802
+ };
6803
+ Update: {
6804
+ condition_expression?: string | null;
6805
+ created_at?: string;
6806
+ end_date?: string | null;
6807
+ id?: string;
6808
+ is_enabled?: boolean;
6809
+ priority?: number;
6810
+ rule_type?: string;
6811
+ start_date?: string | null;
6812
+ strategy_id?: string;
6813
+ updated_at?: string;
6814
+ user_id?: string;
6815
+ };
6816
+ Relationships: [{
6817
+ foreignKeyName: "logistics_strategy_schedules_strategy_id_fkey";
6818
+ columns: ["strategy_id"];
6819
+ isOneToOne: false;
6820
+ referencedRelation: "logistics_strategies";
5675
6821
  referencedColumns: ["id"];
5676
6822
  }];
5677
6823
  };
5678
- locations: {
6824
+ logistics_variables: {
5679
6825
  Row: {
5680
6826
  created_at: string;
6827
+ default_value: string | null;
6828
+ description: string | null;
5681
6829
  id: string;
5682
- name: string;
5683
- sort_order: number;
6830
+ is_builtin: boolean;
6831
+ key: string;
6832
+ label: string;
5684
6833
  updated_at: string;
6834
+ user_id: string;
6835
+ value_type: string;
5685
6836
  };
5686
6837
  Insert: {
5687
6838
  created_at?: string;
6839
+ default_value?: string | null;
6840
+ description?: string | null;
5688
6841
  id?: string;
5689
- name: string;
5690
- sort_order?: number;
6842
+ is_builtin?: boolean;
6843
+ key: string;
6844
+ label: string;
5691
6845
  updated_at?: string;
6846
+ user_id: string;
6847
+ value_type: string;
5692
6848
  };
5693
6849
  Update: {
5694
6850
  created_at?: string;
6851
+ default_value?: string | null;
6852
+ description?: string | null;
5695
6853
  id?: string;
5696
- name?: string;
5697
- sort_order?: number;
6854
+ is_builtin?: boolean;
6855
+ key?: string;
6856
+ label?: string;
5698
6857
  updated_at?: string;
6858
+ user_id?: string;
6859
+ value_type?: string;
5699
6860
  };
5700
6861
  Relationships: [];
5701
6862
  };
@@ -6094,60 +7255,66 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
6094
7255
  };
6095
7256
  manufacture_products: {
6096
7257
  Row: {
6097
- aantal_te_produceren: number;
6098
7258
  created_at: string;
6099
7259
  description: string | null;
6100
7260
  id: string;
6101
7261
  is_active: boolean;
6102
- location_id: string | null;
6103
7262
  name: string;
6104
- partij_nummer: string | null;
6105
- photos: import("./types").Json;
6106
7263
  produced_stock: number;
6107
7264
  product_code: string;
6108
7265
  tenant_id: string;
6109
- unit: string;
6110
7266
  updated_at: string;
6111
7267
  };
6112
7268
  Insert: {
6113
- aantal_te_produceren?: number;
6114
7269
  created_at?: string;
6115
7270
  description?: string | null;
6116
7271
  id?: string;
6117
7272
  is_active?: boolean;
6118
- location_id?: string | null;
6119
7273
  name: string;
6120
- partij_nummer?: string | null;
6121
- photos?: import("./types").Json;
6122
7274
  produced_stock?: number;
6123
7275
  product_code: string;
6124
7276
  tenant_id: string;
6125
- unit?: string;
6126
7277
  updated_at?: string;
6127
7278
  };
6128
7279
  Update: {
6129
- aantal_te_produceren?: number;
6130
7280
  created_at?: string;
6131
7281
  description?: string | null;
6132
7282
  id?: string;
6133
7283
  is_active?: boolean;
6134
- location_id?: string | null;
6135
7284
  name?: string;
6136
- partij_nummer?: string | null;
6137
- photos?: import("./types").Json;
6138
7285
  produced_stock?: number;
6139
7286
  product_code?: string;
6140
7287
  tenant_id?: string;
6141
- unit?: string;
6142
7288
  updated_at?: string;
6143
7289
  };
6144
- Relationships: [{
6145
- foreignKeyName: "manufacture_products_location_id_fkey";
6146
- columns: ["location_id"];
6147
- isOneToOne: false;
6148
- referencedRelation: "locations";
6149
- referencedColumns: ["id"];
6150
- }];
7290
+ Relationships: [];
7291
+ };
7292
+ module_permissions: {
7293
+ Row: {
7294
+ created_at: string;
7295
+ id: string;
7296
+ module_id: string;
7297
+ permission: string;
7298
+ role: Database["public"]["Enums"]["app_role"];
7299
+ updated_at: string;
7300
+ };
7301
+ Insert: {
7302
+ created_at?: string;
7303
+ id?: string;
7304
+ module_id: string;
7305
+ permission: string;
7306
+ role: Database["public"]["Enums"]["app_role"];
7307
+ updated_at?: string;
7308
+ };
7309
+ Update: {
7310
+ created_at?: string;
7311
+ id?: string;
7312
+ module_id?: string;
7313
+ permission?: string;
7314
+ role?: Database["public"]["Enums"]["app_role"];
7315
+ updated_at?: string;
7316
+ };
7317
+ Relationships: [];
6151
7318
  };
6152
7319
  monteurs: {
6153
7320
  Row: {
@@ -6878,6 +8045,42 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
6878
8045
  };
6879
8046
  Relationships: [];
6880
8047
  };
8048
+ order_buffers: {
8049
+ Row: {
8050
+ buffer_key: string;
8051
+ created_at: string;
8052
+ customer_id: string | null;
8053
+ grouping_mode: string;
8054
+ id: string;
8055
+ pickup_date: string | null;
8056
+ pickup_location: string | null;
8057
+ plan_locked_at: string | null;
8058
+ updated_at: string;
8059
+ };
8060
+ Insert: {
8061
+ buffer_key: string;
8062
+ created_at?: string;
8063
+ customer_id?: string | null;
8064
+ grouping_mode: string;
8065
+ id?: string;
8066
+ pickup_date?: string | null;
8067
+ pickup_location?: string | null;
8068
+ plan_locked_at?: string | null;
8069
+ updated_at?: string;
8070
+ };
8071
+ Update: {
8072
+ buffer_key?: string;
8073
+ created_at?: string;
8074
+ customer_id?: string | null;
8075
+ grouping_mode?: string;
8076
+ id?: string;
8077
+ pickup_date?: string | null;
8078
+ pickup_location?: string | null;
8079
+ plan_locked_at?: string | null;
8080
+ updated_at?: string;
8081
+ };
8082
+ Relationships: [];
8083
+ };
6881
8084
  order_cart_items: {
6882
8085
  Row: {
6883
8086
  cart_id: string;
@@ -6944,6 +8147,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
6944
8147
  order_carts: {
6945
8148
  Row: {
6946
8149
  algorithm_version: number;
8150
+ buffer_id: string | null;
6947
8151
  cart_number: number;
6948
8152
  created_at: string;
6949
8153
  id: string;
@@ -6951,13 +8155,14 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
6951
8155
  is_complete: boolean;
6952
8156
  notes: string | null;
6953
8157
  occupancy_pct: number;
6954
- order_id: string;
8158
+ order_id: string | null;
6955
8159
  source: string;
6956
8160
  total_layers_used: number;
6957
8161
  updated_at: string;
6958
8162
  };
6959
8163
  Insert: {
6960
8164
  algorithm_version?: number;
8165
+ buffer_id?: string | null;
6961
8166
  cart_number: number;
6962
8167
  created_at?: string;
6963
8168
  id?: string;
@@ -6965,13 +8170,14 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
6965
8170
  is_complete?: boolean;
6966
8171
  notes?: string | null;
6967
8172
  occupancy_pct?: number;
6968
- order_id: string;
8173
+ order_id?: string | null;
6969
8174
  source?: string;
6970
8175
  total_layers_used?: number;
6971
8176
  updated_at?: string;
6972
8177
  };
6973
8178
  Update: {
6974
8179
  algorithm_version?: number;
8180
+ buffer_id?: string | null;
6975
8181
  cart_number?: number;
6976
8182
  created_at?: string;
6977
8183
  id?: string;
@@ -6979,12 +8185,18 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
6979
8185
  is_complete?: boolean;
6980
8186
  notes?: string | null;
6981
8187
  occupancy_pct?: number;
6982
- order_id?: string;
8188
+ order_id?: string | null;
6983
8189
  source?: string;
6984
8190
  total_layers_used?: number;
6985
8191
  updated_at?: string;
6986
8192
  };
6987
8193
  Relationships: [{
8194
+ foreignKeyName: "order_carts_buffer_id_fkey";
8195
+ columns: ["buffer_id"];
8196
+ isOneToOne: false;
8197
+ referencedRelation: "order_buffers";
8198
+ referencedColumns: ["id"];
8199
+ }, {
6988
8200
  foreignKeyName: "order_carts_order_id_fkey";
6989
8201
  columns: ["order_id"];
6990
8202
  isOneToOne: false;
@@ -7222,12 +8434,14 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7222
8434
  };
7223
8435
  orders: {
7224
8436
  Row: {
8437
+ buffer_id: string | null;
7225
8438
  created_at: string;
7226
8439
  custom_fields: import("./types").Json;
7227
8440
  customer_id: string | null;
7228
8441
  customer_name: string;
7229
8442
  deleted_at: string | null;
7230
8443
  delivery_date: string | null;
8444
+ floriday_sales_order_id: string | null;
7231
8445
  id: string;
7232
8446
  is_reservation: boolean;
7233
8447
  notes: string | null;
@@ -7241,12 +8455,14 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7241
8455
  updated_at: string;
7242
8456
  };
7243
8457
  Insert: {
8458
+ buffer_id?: string | null;
7244
8459
  created_at?: string;
7245
8460
  custom_fields?: import("./types").Json;
7246
8461
  customer_id?: string | null;
7247
8462
  customer_name?: string;
7248
8463
  deleted_at?: string | null;
7249
8464
  delivery_date?: string | null;
8465
+ floriday_sales_order_id?: string | null;
7250
8466
  id?: string;
7251
8467
  is_reservation?: boolean;
7252
8468
  notes?: string | null;
@@ -7260,12 +8476,14 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7260
8476
  updated_at?: string;
7261
8477
  };
7262
8478
  Update: {
8479
+ buffer_id?: string | null;
7263
8480
  created_at?: string;
7264
8481
  custom_fields?: import("./types").Json;
7265
8482
  customer_id?: string | null;
7266
8483
  customer_name?: string;
7267
8484
  deleted_at?: string | null;
7268
8485
  delivery_date?: string | null;
8486
+ floriday_sales_order_id?: string | null;
7269
8487
  id?: string;
7270
8488
  is_reservation?: boolean;
7271
8489
  notes?: string | null;
@@ -7279,6 +8497,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7279
8497
  updated_at?: string;
7280
8498
  };
7281
8499
  Relationships: [{
8500
+ foreignKeyName: "orders_buffer_id_fkey";
8501
+ columns: ["buffer_id"];
8502
+ isOneToOne: false;
8503
+ referencedRelation: "order_buffers";
8504
+ referencedColumns: ["id"];
8505
+ }, {
7282
8506
  foreignKeyName: "orders_customer_id_fkey";
7283
8507
  columns: ["customer_id"];
7284
8508
  isOneToOne: false;
@@ -7409,6 +8633,78 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7409
8633
  };
7410
8634
  Relationships: [];
7411
8635
  };
8636
+ planning_item_assistants: {
8637
+ Row: {
8638
+ created_at: string;
8639
+ created_by: string | null;
8640
+ monteur_id: string;
8641
+ planning_item_id: string;
8642
+ };
8643
+ Insert: {
8644
+ created_at?: string;
8645
+ created_by?: string | null;
8646
+ monteur_id: string;
8647
+ planning_item_id: string;
8648
+ };
8649
+ Update: {
8650
+ created_at?: string;
8651
+ created_by?: string | null;
8652
+ monteur_id?: string;
8653
+ planning_item_id?: string;
8654
+ };
8655
+ Relationships: [{
8656
+ foreignKeyName: "planning_item_assistants_planning_item_id_fkey";
8657
+ columns: ["planning_item_id"];
8658
+ isOneToOne: false;
8659
+ referencedRelation: "planning_items";
8660
+ referencedColumns: ["id"];
8661
+ }];
8662
+ };
8663
+ planning_items: {
8664
+ Row: {
8665
+ assigned_monteur_id: string;
8666
+ created_at: string;
8667
+ created_by: string | null;
8668
+ end_at: string;
8669
+ id: string;
8670
+ notes: string | null;
8671
+ start_at: string;
8672
+ status: Database["public"]["Enums"]["planning_item_status"];
8673
+ updated_at: string;
8674
+ werkbon_id: string;
8675
+ };
8676
+ Insert: {
8677
+ assigned_monteur_id: string;
8678
+ created_at?: string;
8679
+ created_by?: string | null;
8680
+ end_at: string;
8681
+ id?: string;
8682
+ notes?: string | null;
8683
+ start_at: string;
8684
+ status?: Database["public"]["Enums"]["planning_item_status"];
8685
+ updated_at?: string;
8686
+ werkbon_id: string;
8687
+ };
8688
+ Update: {
8689
+ assigned_monteur_id?: string;
8690
+ created_at?: string;
8691
+ created_by?: string | null;
8692
+ end_at?: string;
8693
+ id?: string;
8694
+ notes?: string | null;
8695
+ start_at?: string;
8696
+ status?: Database["public"]["Enums"]["planning_item_status"];
8697
+ updated_at?: string;
8698
+ werkbon_id?: string;
8699
+ };
8700
+ Relationships: [{
8701
+ foreignKeyName: "planning_items_werkbon_id_fkey";
8702
+ columns: ["werkbon_id"];
8703
+ isOneToOne: false;
8704
+ referencedRelation: "werkbonnen";
8705
+ referencedColumns: ["id"];
8706
+ }];
8707
+ };
7412
8708
  product_bom_items: {
7413
8709
  Row: {
7414
8710
  component_product_id: string | null;
@@ -7416,6 +8712,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7416
8712
  created_at: string;
7417
8713
  id: string;
7418
8714
  notes: string | null;
8715
+ packing_configuration_id: string | null;
7419
8716
  parent_product_id: string | null;
7420
8717
  parent_trade_item_floriday_id: string | null;
7421
8718
  quantity: number;
@@ -7430,6 +8727,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7430
8727
  created_at?: string;
7431
8728
  id?: string;
7432
8729
  notes?: string | null;
8730
+ packing_configuration_id?: string | null;
7433
8731
  parent_product_id?: string | null;
7434
8732
  parent_trade_item_floriday_id?: string | null;
7435
8733
  quantity?: number;
@@ -7444,6 +8742,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7444
8742
  created_at?: string;
7445
8743
  id?: string;
7446
8744
  notes?: string | null;
8745
+ packing_configuration_id?: string | null;
7447
8746
  parent_product_id?: string | null;
7448
8747
  parent_trade_item_floriday_id?: string | null;
7449
8748
  quantity?: number;
@@ -7645,11 +8944,13 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7645
8944
  created_at: string;
7646
8945
  id: string;
7647
8946
  is_package: boolean;
8947
+ label: string | null;
7648
8948
  layers_per_load_carrier: number | null;
7649
8949
  load_carrier: string | null;
7650
8950
  package_id: string | null;
7651
8951
  package_label: string | null;
7652
8952
  packages_per_layer: number | null;
8953
+ packing_configuration_id: string;
7653
8954
  product_id: string | null;
7654
8955
  tenant_id: string;
7655
8956
  trade_item_floriday_id: string | null;
@@ -7660,11 +8961,13 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7660
8961
  created_at?: string;
7661
8962
  id?: string;
7662
8963
  is_package?: boolean;
8964
+ label?: string | null;
7663
8965
  layers_per_load_carrier?: number | null;
7664
8966
  load_carrier?: string | null;
7665
8967
  package_id?: string | null;
7666
8968
  package_label?: string | null;
7667
8969
  packages_per_layer?: number | null;
8970
+ packing_configuration_id?: string;
7668
8971
  product_id?: string | null;
7669
8972
  tenant_id: string;
7670
8973
  trade_item_floriday_id?: string | null;
@@ -7675,11 +8978,13 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7675
8978
  created_at?: string;
7676
8979
  id?: string;
7677
8980
  is_package?: boolean;
8981
+ label?: string | null;
7678
8982
  layers_per_load_carrier?: number | null;
7679
8983
  load_carrier?: string | null;
7680
8984
  package_id?: string | null;
7681
8985
  package_label?: string | null;
7682
8986
  packages_per_layer?: number | null;
8987
+ packing_configuration_id?: string;
7683
8988
  product_id?: string | null;
7684
8989
  tenant_id?: string;
7685
8990
  trade_item_floriday_id?: string | null;
@@ -7741,8 +9046,6 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7741
9046
  crates_per_layer: number;
7742
9047
  created_at: string;
7743
9048
  custom_fields: import("./types").Json;
7744
- floriday_active: boolean;
7745
- floriday_payload: import("./types").Json;
7746
9049
  floriday_trade_item_id: string | null;
7747
9050
  id: string;
7748
9051
  image_url: string | null;
@@ -7769,8 +9072,6 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7769
9072
  crates_per_layer?: number;
7770
9073
  created_at?: string;
7771
9074
  custom_fields?: import("./types").Json;
7772
- floriday_active?: boolean;
7773
- floriday_payload?: import("./types").Json;
7774
9075
  floriday_trade_item_id?: string | null;
7775
9076
  id?: string;
7776
9077
  image_url?: string | null;
@@ -7797,8 +9098,6 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7797
9098
  crates_per_layer?: number;
7798
9099
  created_at?: string;
7799
9100
  custom_fields?: import("./types").Json;
7800
- floriday_active?: boolean;
7801
- floriday_payload?: import("./types").Json;
7802
9101
  floriday_trade_item_id?: string | null;
7803
9102
  id?: string;
7804
9103
  image_url?: string | null;
@@ -7823,6 +9122,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7823
9122
  profiles: {
7824
9123
  Row: {
7825
9124
  address: string | null;
9125
+ avatar_url: string | null;
7826
9126
  created_at: string;
7827
9127
  display_name: string | null;
7828
9128
  email: string | null;
@@ -7834,6 +9134,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7834
9134
  };
7835
9135
  Insert: {
7836
9136
  address?: string | null;
9137
+ avatar_url?: string | null;
7837
9138
  created_at?: string;
7838
9139
  display_name?: string | null;
7839
9140
  email?: string | null;
@@ -7845,6 +9146,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7845
9146
  };
7846
9147
  Update: {
7847
9148
  address?: string | null;
9149
+ avatar_url?: string | null;
7848
9150
  created_at?: string;
7849
9151
  display_name?: string | null;
7850
9152
  email?: string | null;
@@ -8709,7 +10011,6 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
8709
10011
  order_id: string | null;
8710
10012
  order_item_id: string | null;
8711
10013
  order_source: string | null;
8712
- parent_trade_item_key: string | null;
8713
10014
  physical_after: number | null;
8714
10015
  physical_before: number | null;
8715
10016
  production_batch_id: string | null;
@@ -8728,7 +10029,6 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
8728
10029
  order_id?: string | null;
8729
10030
  order_item_id?: string | null;
8730
10031
  order_source?: string | null;
8731
- parent_trade_item_key?: string | null;
8732
10032
  physical_after?: number | null;
8733
10033
  physical_before?: number | null;
8734
10034
  production_batch_id?: string | null;
@@ -8747,7 +10047,6 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
8747
10047
  order_id?: string | null;
8748
10048
  order_item_id?: string | null;
8749
10049
  order_source?: string | null;
8750
- parent_trade_item_key?: string | null;
8751
10050
  physical_after?: number | null;
8752
10051
  physical_before?: number | null;
8753
10052
  production_batch_id?: string | null;
@@ -8852,6 +10151,27 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
8852
10151
  };
8853
10152
  Relationships: [];
8854
10153
  };
10154
+ technician_rates: {
10155
+ Row: {
10156
+ created_at: string;
10157
+ hourly_rate_cents: number;
10158
+ updated_at: string;
10159
+ user_id: string;
10160
+ };
10161
+ Insert: {
10162
+ created_at?: string;
10163
+ hourly_rate_cents?: number;
10164
+ updated_at?: string;
10165
+ user_id: string;
10166
+ };
10167
+ Update: {
10168
+ created_at?: string;
10169
+ hourly_rate_cents?: number;
10170
+ updated_at?: string;
10171
+ user_id?: string;
10172
+ };
10173
+ Relationships: [];
10174
+ };
8855
10175
  tenants: {
8856
10176
  Row: {
8857
10177
  created_at: string;
@@ -9056,6 +10376,48 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9056
10376
  };
9057
10377
  Relationships: [];
9058
10378
  };
10379
+ trade_item_prices: {
10380
+ Row: {
10381
+ created_at: string;
10382
+ currency: string;
10383
+ id: string;
10384
+ last_push_error: string | null;
10385
+ last_pushed_at: string | null;
10386
+ price_group_id: string | null;
10387
+ price_per_piece: number;
10388
+ supply_line_id: string | null;
10389
+ trade_item_key: string;
10390
+ updated_at: string;
10391
+ user_id: string;
10392
+ };
10393
+ Insert: {
10394
+ created_at?: string;
10395
+ currency?: string;
10396
+ id?: string;
10397
+ last_push_error?: string | null;
10398
+ last_pushed_at?: string | null;
10399
+ price_group_id?: string | null;
10400
+ price_per_piece: number;
10401
+ supply_line_id?: string | null;
10402
+ trade_item_key: string;
10403
+ updated_at?: string;
10404
+ user_id: string;
10405
+ };
10406
+ Update: {
10407
+ created_at?: string;
10408
+ currency?: string;
10409
+ id?: string;
10410
+ last_push_error?: string | null;
10411
+ last_pushed_at?: string | null;
10412
+ price_group_id?: string | null;
10413
+ price_per_piece?: number;
10414
+ supply_line_id?: string | null;
10415
+ trade_item_key?: string;
10416
+ updated_at?: string;
10417
+ user_id?: string;
10418
+ };
10419
+ Relationships: [];
10420
+ };
9059
10421
  trade_item_stock: {
9060
10422
  Row: {
9061
10423
  connection_id: string;
@@ -9209,7 +10571,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9209
10571
  twinfield_connections: {
9210
10572
  Row: {
9211
10573
  access_token: string | null;
9212
- client_id: string | null;
10574
+ client_id: string;
9213
10575
  client_secret: string | null;
9214
10576
  cluster_uri: string | null;
9215
10577
  company_code: string | null;
@@ -9221,7 +10583,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9221
10583
  is_active: boolean;
9222
10584
  label: string | null;
9223
10585
  office_code: string | null;
9224
- redirect_uri: string | null;
10586
+ redirect_uri: string;
9225
10587
  refresh_token: string | null;
9226
10588
  token_expires_at: string | null;
9227
10589
  updated_at: string;
@@ -9229,7 +10591,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9229
10591
  };
9230
10592
  Insert: {
9231
10593
  access_token?: string | null;
9232
- client_id?: string | null;
10594
+ client_id: string;
9233
10595
  client_secret?: string | null;
9234
10596
  cluster_uri?: string | null;
9235
10597
  company_code?: string | null;
@@ -9241,7 +10603,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9241
10603
  is_active?: boolean;
9242
10604
  label?: string | null;
9243
10605
  office_code?: string | null;
9244
- redirect_uri?: string | null;
10606
+ redirect_uri: string;
9245
10607
  refresh_token?: string | null;
9246
10608
  token_expires_at?: string | null;
9247
10609
  updated_at?: string;
@@ -9249,7 +10611,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9249
10611
  };
9250
10612
  Update: {
9251
10613
  access_token?: string | null;
9252
- client_id?: string | null;
10614
+ client_id?: string;
9253
10615
  client_secret?: string | null;
9254
10616
  cluster_uri?: string | null;
9255
10617
  company_code?: string | null;
@@ -9261,7 +10623,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9261
10623
  is_active?: boolean;
9262
10624
  label?: string | null;
9263
10625
  office_code?: string | null;
9264
- redirect_uri?: string | null;
10626
+ redirect_uri?: string;
9265
10627
  refresh_token?: string | null;
9266
10628
  token_expires_at?: string | null;
9267
10629
  updated_at?: string;
@@ -9321,6 +10683,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9321
10683
  country: string | null;
9322
10684
  created_at: string;
9323
10685
  email: string | null;
10686
+ external_group_key: string | null;
9324
10687
  id: string;
9325
10688
  last_synced_at: string | null;
9326
10689
  name: string;
@@ -9339,6 +10702,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9339
10702
  country?: string | null;
9340
10703
  created_at?: string;
9341
10704
  email?: string | null;
10705
+ external_group_key?: string | null;
9342
10706
  id?: string;
9343
10707
  last_synced_at?: string | null;
9344
10708
  name: string;
@@ -9357,6 +10721,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9357
10721
  country?: string | null;
9358
10722
  created_at?: string;
9359
10723
  email?: string | null;
10724
+ external_group_key?: string | null;
9360
10725
  id?: string;
9361
10726
  last_synced_at?: string | null;
9362
10727
  name?: string;
@@ -9483,35 +10848,80 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9483
10848
  vat_rate: number | null;
9484
10849
  };
9485
10850
  Insert: {
9486
- article_code?: string | null;
10851
+ article_code?: string | null;
10852
+ connection_id: string;
10853
+ data?: import("./types").Json;
10854
+ description?: string | null;
10855
+ fetched_at?: string;
10856
+ invoice_number: string;
10857
+ line_number: number;
10858
+ line_total?: number | null;
10859
+ quantity?: number | null;
10860
+ unit_price?: number | null;
10861
+ vat_code?: string | null;
10862
+ vat_rate?: number | null;
10863
+ };
10864
+ Update: {
10865
+ article_code?: string | null;
10866
+ connection_id?: string;
10867
+ data?: import("./types").Json;
10868
+ description?: string | null;
10869
+ fetched_at?: string;
10870
+ invoice_number?: string;
10871
+ line_number?: number;
10872
+ line_total?: number | null;
10873
+ quantity?: number | null;
10874
+ unit_price?: number | null;
10875
+ vat_code?: string | null;
10876
+ vat_rate?: number | null;
10877
+ };
10878
+ Relationships: [{
10879
+ foreignKeyName: "twinfield_invoice_lines_cache_v2_connection_id_fkey";
10880
+ columns: ["connection_id"];
10881
+ isOneToOne: false;
10882
+ referencedRelation: "twinfield_connections";
10883
+ referencedColumns: ["id"];
10884
+ }];
10885
+ };
10886
+ twinfield_invoice_pdf_cache: {
10887
+ Row: {
10888
+ connection_id: string;
10889
+ created_at: string;
10890
+ fetched_at: string;
10891
+ id: string;
10892
+ invoice_number: string;
10893
+ last_accessed_at: string;
10894
+ object_path: string;
10895
+ office_code: string;
10896
+ size_bytes: number;
10897
+ updated_at: string;
10898
+ };
10899
+ Insert: {
9487
10900
  connection_id: string;
9488
- data?: import("./types").Json;
9489
- description?: string | null;
10901
+ created_at?: string;
9490
10902
  fetched_at?: string;
10903
+ id?: string;
9491
10904
  invoice_number: string;
9492
- line_number: number;
9493
- line_total?: number | null;
9494
- quantity?: number | null;
9495
- unit_price?: number | null;
9496
- vat_code?: string | null;
9497
- vat_rate?: number | null;
10905
+ last_accessed_at?: string;
10906
+ object_path: string;
10907
+ office_code: string;
10908
+ size_bytes?: number;
10909
+ updated_at?: string;
9498
10910
  };
9499
10911
  Update: {
9500
- article_code?: string | null;
9501
10912
  connection_id?: string;
9502
- data?: import("./types").Json;
9503
- description?: string | null;
10913
+ created_at?: string;
9504
10914
  fetched_at?: string;
10915
+ id?: string;
9505
10916
  invoice_number?: string;
9506
- line_number?: number;
9507
- line_total?: number | null;
9508
- quantity?: number | null;
9509
- unit_price?: number | null;
9510
- vat_code?: string | null;
9511
- vat_rate?: number | null;
10917
+ last_accessed_at?: string;
10918
+ object_path?: string;
10919
+ office_code?: string;
10920
+ size_bytes?: number;
10921
+ updated_at?: string;
9512
10922
  };
9513
10923
  Relationships: [{
9514
- foreignKeyName: "twinfield_invoice_lines_cache_v2_connection_id_fkey";
10924
+ foreignKeyName: "twinfield_invoice_pdf_cache_connection_id_fkey";
9515
10925
  columns: ["connection_id"];
9516
10926
  isOneToOne: false;
9517
10927
  referencedRelation: "twinfield_connections";
@@ -9521,6 +10931,8 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9521
10931
  twinfield_invoice_settings: {
9522
10932
  Row: {
9523
10933
  created_at: string;
10934
+ debtor_gl_account: string;
10935
+ default_credit_invoice_type: string | null;
9524
10936
  default_gl_account: string;
9525
10937
  default_invoice_type: string;
9526
10938
  default_payment_term_days: number;
@@ -9529,11 +10941,15 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9529
10941
  invoice_enabled_fo: boolean;
9530
10942
  invoice_enabled_ho: boolean;
9531
10943
  invoice_enabled_mo: boolean;
10944
+ payment_gl_account: string;
10945
+ payment_journal_code: string;
9532
10946
  updated_at: string;
9533
10947
  user_id: string;
9534
10948
  };
9535
10949
  Insert: {
9536
10950
  created_at?: string;
10951
+ debtor_gl_account?: string;
10952
+ default_credit_invoice_type?: string | null;
9537
10953
  default_gl_account?: string;
9538
10954
  default_invoice_type?: string;
9539
10955
  default_payment_term_days?: number;
@@ -9542,11 +10958,15 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9542
10958
  invoice_enabled_fo?: boolean;
9543
10959
  invoice_enabled_ho?: boolean;
9544
10960
  invoice_enabled_mo?: boolean;
10961
+ payment_gl_account?: string;
10962
+ payment_journal_code?: string;
9545
10963
  updated_at?: string;
9546
10964
  user_id: string;
9547
10965
  };
9548
10966
  Update: {
9549
10967
  created_at?: string;
10968
+ debtor_gl_account?: string;
10969
+ default_credit_invoice_type?: string | null;
9550
10970
  default_gl_account?: string;
9551
10971
  default_invoice_type?: string;
9552
10972
  default_payment_term_days?: number;
@@ -9555,6 +10975,8 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9555
10975
  invoice_enabled_fo?: boolean;
9556
10976
  invoice_enabled_ho?: boolean;
9557
10977
  invoice_enabled_mo?: boolean;
10978
+ payment_gl_account?: string;
10979
+ payment_journal_code?: string;
9558
10980
  updated_at?: string;
9559
10981
  user_id?: string;
9560
10982
  };
@@ -9775,43 +11197,49 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9775
11197
  };
9776
11198
  twinfield_push_queue: {
9777
11199
  Row: {
11200
+ action: string;
9778
11201
  attempts: number;
9779
11202
  connection_id: string;
9780
11203
  created_at: string;
11204
+ customer_id: string | null;
9781
11205
  external_id: string | null;
9782
11206
  id: string;
9783
11207
  idempotency_key: string;
9784
11208
  last_error: string | null;
9785
11209
  next_attempt_at: string;
9786
- office_code: string;
11210
+ office_code: string | null;
9787
11211
  payload: import("./types").Json;
9788
11212
  status: string;
9789
11213
  updated_at: string;
9790
11214
  };
9791
11215
  Insert: {
11216
+ action?: string;
9792
11217
  attempts?: number;
9793
11218
  connection_id: string;
9794
11219
  created_at?: string;
11220
+ customer_id?: string | null;
9795
11221
  external_id?: string | null;
9796
11222
  id?: string;
9797
11223
  idempotency_key: string;
9798
11224
  last_error?: string | null;
9799
11225
  next_attempt_at?: string;
9800
- office_code: string;
11226
+ office_code?: string | null;
9801
11227
  payload: import("./types").Json;
9802
11228
  status?: string;
9803
11229
  updated_at?: string;
9804
11230
  };
9805
11231
  Update: {
11232
+ action?: string;
9806
11233
  attempts?: number;
9807
11234
  connection_id?: string;
9808
11235
  created_at?: string;
11236
+ customer_id?: string | null;
9809
11237
  external_id?: string | null;
9810
11238
  id?: string;
9811
11239
  idempotency_key?: string;
9812
11240
  last_error?: string | null;
9813
11241
  next_attempt_at?: string;
9814
- office_code?: string;
11242
+ office_code?: string | null;
9815
11243
  payload?: import("./types").Json;
9816
11244
  status?: string;
9817
11245
  updated_at?: string;
@@ -9822,6 +11250,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9822
11250
  isOneToOne: false;
9823
11251
  referencedRelation: "twinfield_connections";
9824
11252
  referencedColumns: ["id"];
11253
+ }, {
11254
+ foreignKeyName: "twinfield_push_queue_customer_id_fkey";
11255
+ columns: ["customer_id"];
11256
+ isOneToOne: false;
11257
+ referencedRelation: "customers";
11258
+ referencedColumns: ["id"];
9825
11259
  }];
9826
11260
  };
9827
11261
  twinfield_request_metrics: {
@@ -10030,72 +11464,420 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10030
11464
  size_bytes?: number | null;
10031
11465
  };
10032
11466
  Update: {
10033
- action?: string;
10034
- attempt_number?: number;
10035
- caller?: string;
10036
- client_user_id?: string | null;
10037
- content_type?: string | null;
11467
+ action?: string;
11468
+ attempt_number?: number;
11469
+ caller?: string;
11470
+ client_user_id?: string | null;
11471
+ content_type?: string | null;
11472
+ created_at?: string;
11473
+ environment?: string;
11474
+ error_message?: string | null;
11475
+ filename?: string | null;
11476
+ id?: string;
11477
+ idempotency_key?: string | null;
11478
+ module?: string;
11479
+ path?: string;
11480
+ reference_id?: string | null;
11481
+ request_body_hash?: string | null;
11482
+ request_timestamp?: number | null;
11483
+ response_content_type?: string | null;
11484
+ response_status?: number | null;
11485
+ size_bytes?: number | null;
11486
+ };
11487
+ Relationships: [];
11488
+ };
11489
+ voorraad_publish_attempts: {
11490
+ Row: {
11491
+ action: string;
11492
+ connection_id: string | null;
11493
+ created_at: string;
11494
+ error: string | null;
11495
+ gateway_attempt_id: string | null;
11496
+ gateway_status: number | null;
11497
+ id: string;
11498
+ intent: string;
11499
+ ok: boolean;
11500
+ request_summary: import("./types").Json | null;
11501
+ trade_item_id: string | null;
11502
+ user_id: string;
11503
+ };
11504
+ Insert: {
11505
+ action: string;
11506
+ connection_id?: string | null;
11507
+ created_at?: string;
11508
+ error?: string | null;
11509
+ gateway_attempt_id?: string | null;
11510
+ gateway_status?: number | null;
11511
+ id?: string;
11512
+ intent: string;
11513
+ ok: boolean;
11514
+ request_summary?: import("./types").Json | null;
11515
+ trade_item_id?: string | null;
11516
+ user_id: string;
11517
+ };
11518
+ Update: {
11519
+ action?: string;
11520
+ connection_id?: string | null;
11521
+ created_at?: string;
11522
+ error?: string | null;
11523
+ gateway_attempt_id?: string | null;
11524
+ gateway_status?: number | null;
11525
+ id?: string;
11526
+ intent?: string;
11527
+ ok?: boolean;
11528
+ request_summary?: import("./types").Json | null;
11529
+ trade_item_id?: string | null;
11530
+ user_id?: string;
11531
+ };
11532
+ Relationships: [];
11533
+ };
11534
+ werkbon_package_ai_rules: {
11535
+ Row: {
11536
+ active: boolean;
11537
+ case_sensitive: boolean;
11538
+ created_at: string;
11539
+ id: string;
11540
+ package_id: string;
11541
+ priority: number;
11542
+ rule_type: string;
11543
+ updated_at: string;
11544
+ value: string;
11545
+ };
11546
+ Insert: {
11547
+ active?: boolean;
11548
+ case_sensitive?: boolean;
11549
+ created_at?: string;
11550
+ id?: string;
11551
+ package_id: string;
11552
+ priority?: number;
11553
+ rule_type: string;
11554
+ updated_at?: string;
11555
+ value: string;
11556
+ };
11557
+ Update: {
11558
+ active?: boolean;
11559
+ case_sensitive?: boolean;
11560
+ created_at?: string;
11561
+ id?: string;
11562
+ package_id?: string;
11563
+ priority?: number;
11564
+ rule_type?: string;
11565
+ updated_at?: string;
11566
+ value?: string;
11567
+ };
11568
+ Relationships: [{
11569
+ foreignKeyName: "werkbon_package_ai_rules_package_id_fkey";
11570
+ columns: ["package_id"];
11571
+ isOneToOne: false;
11572
+ referencedRelation: "werkbon_packages";
11573
+ referencedColumns: ["id"];
11574
+ }];
11575
+ };
11576
+ werkbon_package_categories: {
11577
+ Row: {
11578
+ active: boolean;
11579
+ created_at: string;
11580
+ id: string;
11581
+ kleur: string | null;
11582
+ naam: string;
11583
+ sort_order: number;
11584
+ updated_at: string;
11585
+ };
11586
+ Insert: {
11587
+ active?: boolean;
11588
+ created_at?: string;
11589
+ id?: string;
11590
+ kleur?: string | null;
11591
+ naam: string;
11592
+ sort_order?: number;
11593
+ updated_at?: string;
11594
+ };
11595
+ Update: {
11596
+ active?: boolean;
11597
+ created_at?: string;
11598
+ id?: string;
11599
+ kleur?: string | null;
11600
+ naam?: string;
11601
+ sort_order?: number;
11602
+ updated_at?: string;
11603
+ };
11604
+ Relationships: [];
11605
+ };
11606
+ werkbon_package_lines: {
11607
+ Row: {
11608
+ created_at: string;
11609
+ created_by: string | null;
11610
+ id: string;
11611
+ package_id: string;
11612
+ quantity: number;
11613
+ unit_price_cents_snapshot: number;
11614
+ werkbon_id: string;
11615
+ };
11616
+ Insert: {
11617
+ created_at?: string;
11618
+ created_by?: string | null;
11619
+ id?: string;
11620
+ package_id: string;
11621
+ quantity?: number;
11622
+ unit_price_cents_snapshot?: number;
11623
+ werkbon_id: string;
11624
+ };
11625
+ Update: {
11626
+ created_at?: string;
11627
+ created_by?: string | null;
11628
+ id?: string;
11629
+ package_id?: string;
11630
+ quantity?: number;
11631
+ unit_price_cents_snapshot?: number;
11632
+ werkbon_id?: string;
11633
+ };
11634
+ Relationships: [{
11635
+ foreignKeyName: "werkbon_package_lines_package_id_fkey";
11636
+ columns: ["package_id"];
11637
+ isOneToOne: false;
11638
+ referencedRelation: "werkbon_packages";
11639
+ referencedColumns: ["id"];
11640
+ }, {
11641
+ foreignKeyName: "werkbon_package_lines_werkbon_id_fkey";
11642
+ columns: ["werkbon_id"];
11643
+ isOneToOne: false;
11644
+ referencedRelation: "werkbonnen";
11645
+ referencedColumns: ["id"];
11646
+ }];
11647
+ };
11648
+ werkbon_packages: {
11649
+ Row: {
11650
+ active: boolean;
11651
+ ai_tags: string[];
11652
+ category_id: string | null;
11653
+ code: string;
11654
+ created_at: string;
11655
+ default_quantity: number;
11656
+ description: string | null;
11657
+ duration_minutes: number | null;
11658
+ id: string;
11659
+ mandaat_type: string | null;
11660
+ name: string;
11661
+ sort_order: number;
11662
+ unit_price_cents: number;
11663
+ updated_at: string;
11664
+ };
11665
+ Insert: {
11666
+ active?: boolean;
11667
+ ai_tags?: string[];
11668
+ category_id?: string | null;
11669
+ code: string;
11670
+ created_at?: string;
11671
+ default_quantity?: number;
11672
+ description?: string | null;
11673
+ duration_minutes?: number | null;
11674
+ id?: string;
11675
+ mandaat_type?: string | null;
11676
+ name: string;
11677
+ sort_order?: number;
11678
+ unit_price_cents?: number;
11679
+ updated_at?: string;
11680
+ };
11681
+ Update: {
11682
+ active?: boolean;
11683
+ ai_tags?: string[];
11684
+ category_id?: string | null;
11685
+ code?: string;
11686
+ created_at?: string;
11687
+ default_quantity?: number;
11688
+ description?: string | null;
11689
+ duration_minutes?: number | null;
11690
+ id?: string;
11691
+ mandaat_type?: string | null;
11692
+ name?: string;
11693
+ sort_order?: number;
11694
+ unit_price_cents?: number;
11695
+ updated_at?: string;
11696
+ };
11697
+ Relationships: [{
11698
+ foreignKeyName: "werkbon_packages_category_id_fkey";
11699
+ columns: ["category_id"];
11700
+ isOneToOne: false;
11701
+ referencedRelation: "werkbon_package_categories";
11702
+ referencedColumns: ["id"];
11703
+ }];
11704
+ };
11705
+ werkbon_photos: {
11706
+ Row: {
11707
+ created_at: string;
11708
+ id: string;
11709
+ storage_path: string;
11710
+ user_id: string;
11711
+ werkbon_id: string;
11712
+ };
11713
+ Insert: {
11714
+ created_at?: string;
11715
+ id?: string;
11716
+ storage_path: string;
11717
+ user_id: string;
11718
+ werkbon_id: string;
11719
+ };
11720
+ Update: {
11721
+ created_at?: string;
11722
+ id?: string;
11723
+ storage_path?: string;
11724
+ user_id?: string;
11725
+ werkbon_id?: string;
11726
+ };
11727
+ Relationships: [{
11728
+ foreignKeyName: "werkbon_photos_werkbon_id_fkey";
11729
+ columns: ["werkbon_id"];
11730
+ isOneToOne: false;
11731
+ referencedRelation: "werkbonnen";
11732
+ referencedColumns: ["id"];
11733
+ }];
11734
+ };
11735
+ werkbon_time_logs: {
11736
+ Row: {
11737
+ activity: string;
11738
+ created_at: string;
11739
+ ended_at: string | null;
11740
+ id: string;
11741
+ started_at: string;
11742
+ user_id: string;
11743
+ werkbon_id: string;
11744
+ };
11745
+ Insert: {
11746
+ activity: string;
11747
+ created_at?: string;
11748
+ ended_at?: string | null;
11749
+ id?: string;
11750
+ started_at?: string;
11751
+ user_id: string;
11752
+ werkbon_id: string;
11753
+ };
11754
+ Update: {
11755
+ activity?: string;
10038
11756
  created_at?: string;
10039
- environment?: string;
10040
- error_message?: string | null;
10041
- filename?: string | null;
11757
+ ended_at?: string | null;
10042
11758
  id?: string;
10043
- idempotency_key?: string | null;
10044
- module?: string;
10045
- path?: string;
10046
- reference_id?: string | null;
10047
- request_body_hash?: string | null;
10048
- request_timestamp?: number | null;
10049
- response_content_type?: string | null;
10050
- response_status?: number | null;
10051
- size_bytes?: number | null;
11759
+ started_at?: string;
11760
+ user_id?: string;
11761
+ werkbon_id?: string;
10052
11762
  };
10053
- Relationships: [];
11763
+ Relationships: [{
11764
+ foreignKeyName: "werkbon_time_logs_werkbon_id_fkey";
11765
+ columns: ["werkbon_id"];
11766
+ isOneToOne: false;
11767
+ referencedRelation: "werkbonnen";
11768
+ referencedColumns: ["id"];
11769
+ }];
10054
11770
  };
10055
- voorraad_publish_attempts: {
11771
+ werkbonnen: {
10056
11772
  Row: {
10057
- action: string;
10058
- connection_id: string | null;
11773
+ assigned_user_id: string | null;
11774
+ budget_mandate_cents: number;
11775
+ complaint_description: string | null;
10059
11776
  created_at: string;
10060
- error: string | null;
10061
- gateway_attempt_id: string | null;
10062
- gateway_status: number | null;
11777
+ created_by: string | null;
11778
+ customer_id: string | null;
11779
+ externe_referentie: string | null;
11780
+ first_time_fix: boolean | null;
10063
11781
  id: string;
10064
- intent: string;
10065
- ok: boolean;
10066
- request_summary: import("./types").Json | null;
10067
- trade_item_id: string | null;
10068
- user_id: string;
11782
+ internal_notes: string | null;
11783
+ parent_werkbon_id: string | null;
11784
+ parsed_payload: import("./types").Json | null;
11785
+ planning_status: string;
11786
+ project_number: string | null;
11787
+ room_number: string | null;
11788
+ scheduled_end_time: string | null;
11789
+ scheduled_start_time: string | null;
11790
+ sequence_number: number;
11791
+ source_email_meta: import("./types").Json | null;
11792
+ source_mailbox_message_id: string | null;
11793
+ source_pdf_path: string | null;
11794
+ source_type: string;
11795
+ status: string;
11796
+ technician_id: string | null;
11797
+ technician_notes: string | null;
11798
+ technician_notes_raw: string | null;
11799
+ technician_task_description: string | null;
11800
+ updated_at: string;
11801
+ version: number;
11802
+ work_address: string | null;
10069
11803
  };
10070
11804
  Insert: {
10071
- action: string;
10072
- connection_id?: string | null;
11805
+ assigned_user_id?: string | null;
11806
+ budget_mandate_cents?: number;
11807
+ complaint_description?: string | null;
10073
11808
  created_at?: string;
10074
- error?: string | null;
10075
- gateway_attempt_id?: string | null;
10076
- gateway_status?: number | null;
11809
+ created_by?: string | null;
11810
+ customer_id?: string | null;
11811
+ externe_referentie?: string | null;
11812
+ first_time_fix?: boolean | null;
10077
11813
  id?: string;
10078
- intent: string;
10079
- ok: boolean;
10080
- request_summary?: import("./types").Json | null;
10081
- trade_item_id?: string | null;
10082
- user_id: string;
11814
+ internal_notes?: string | null;
11815
+ parent_werkbon_id?: string | null;
11816
+ parsed_payload?: import("./types").Json | null;
11817
+ planning_status?: string;
11818
+ project_number?: string | null;
11819
+ room_number?: string | null;
11820
+ scheduled_end_time?: string | null;
11821
+ scheduled_start_time?: string | null;
11822
+ sequence_number: number;
11823
+ source_email_meta?: import("./types").Json | null;
11824
+ source_mailbox_message_id?: string | null;
11825
+ source_pdf_path?: string | null;
11826
+ source_type?: string;
11827
+ status?: string;
11828
+ technician_id?: string | null;
11829
+ technician_notes?: string | null;
11830
+ technician_notes_raw?: string | null;
11831
+ technician_task_description?: string | null;
11832
+ updated_at?: string;
11833
+ version?: number;
11834
+ work_address?: string | null;
10083
11835
  };
10084
11836
  Update: {
10085
- action?: string;
10086
- connection_id?: string | null;
11837
+ assigned_user_id?: string | null;
11838
+ budget_mandate_cents?: number;
11839
+ complaint_description?: string | null;
10087
11840
  created_at?: string;
10088
- error?: string | null;
10089
- gateway_attempt_id?: string | null;
10090
- gateway_status?: number | null;
11841
+ created_by?: string | null;
11842
+ customer_id?: string | null;
11843
+ externe_referentie?: string | null;
11844
+ first_time_fix?: boolean | null;
10091
11845
  id?: string;
10092
- intent?: string;
10093
- ok?: boolean;
10094
- request_summary?: import("./types").Json | null;
10095
- trade_item_id?: string | null;
10096
- user_id?: string;
11846
+ internal_notes?: string | null;
11847
+ parent_werkbon_id?: string | null;
11848
+ parsed_payload?: import("./types").Json | null;
11849
+ planning_status?: string;
11850
+ project_number?: string | null;
11851
+ room_number?: string | null;
11852
+ scheduled_end_time?: string | null;
11853
+ scheduled_start_time?: string | null;
11854
+ sequence_number?: number;
11855
+ source_email_meta?: import("./types").Json | null;
11856
+ source_mailbox_message_id?: string | null;
11857
+ source_pdf_path?: string | null;
11858
+ source_type?: string;
11859
+ status?: string;
11860
+ technician_id?: string | null;
11861
+ technician_notes?: string | null;
11862
+ technician_notes_raw?: string | null;
11863
+ technician_task_description?: string | null;
11864
+ updated_at?: string;
11865
+ version?: number;
11866
+ work_address?: string | null;
10097
11867
  };
10098
- Relationships: [];
11868
+ Relationships: [{
11869
+ foreignKeyName: "werkbonnen_parent_werkbon_id_fkey";
11870
+ columns: ["parent_werkbon_id"];
11871
+ isOneToOne: false;
11872
+ referencedRelation: "werkbonnen";
11873
+ referencedColumns: ["id"];
11874
+ }, {
11875
+ foreignKeyName: "werkbonnen_source_mailbox_message_id_fkey";
11876
+ columns: ["source_mailbox_message_id"];
11877
+ isOneToOne: false;
11878
+ referencedRelation: "mailbox_messages";
11879
+ referencedColumns: ["id"];
11880
+ }];
10099
11881
  };
10100
11882
  work_order_monteurs: {
10101
11883
  Row: {
@@ -10267,6 +12049,8 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10267
12049
  created_at: string | null;
10268
12050
  created_by: string | null;
10269
12051
  display_name: string | null;
12052
+ graph_subscription_expires_at: string | null;
12053
+ graph_subscription_id: string | null;
10270
12054
  has_access_token: boolean | null;
10271
12055
  has_client_id: boolean | null;
10272
12056
  has_client_secret: boolean | null;
@@ -10284,6 +12068,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10284
12068
  oauth_mode: string | null;
10285
12069
  provider: string | null;
10286
12070
  purpose_assignments: import("./types").Json | null;
12071
+ realtime_mode: string | null;
10287
12072
  scopes: string[] | null;
10288
12073
  smtp_host: string | null;
10289
12074
  smtp_port: number | null;
@@ -10298,6 +12083,8 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10298
12083
  created_at?: string | null;
10299
12084
  created_by?: string | null;
10300
12085
  display_name?: string | null;
12086
+ graph_subscription_expires_at?: string | null;
12087
+ graph_subscription_id?: string | null;
10301
12088
  has_access_token?: never;
10302
12089
  has_client_id?: never;
10303
12090
  has_client_secret?: never;
@@ -10315,6 +12102,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10315
12102
  oauth_mode?: string | null;
10316
12103
  provider?: string | null;
10317
12104
  purpose_assignments?: import("./types").Json | null;
12105
+ realtime_mode?: string | null;
10318
12106
  scopes?: string[] | null;
10319
12107
  smtp_host?: string | null;
10320
12108
  smtp_port?: number | null;
@@ -10329,6 +12117,8 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10329
12117
  created_at?: string | null;
10330
12118
  created_by?: string | null;
10331
12119
  display_name?: string | null;
12120
+ graph_subscription_expires_at?: string | null;
12121
+ graph_subscription_id?: string | null;
10332
12122
  has_access_token?: never;
10333
12123
  has_client_id?: never;
10334
12124
  has_client_secret?: never;
@@ -10346,6 +12136,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10346
12136
  oauth_mode?: string | null;
10347
12137
  provider?: string | null;
10348
12138
  purpose_assignments?: import("./types").Json | null;
12139
+ realtime_mode?: string | null;
10349
12140
  scopes?: string[] | null;
10350
12141
  smtp_host?: string | null;
10351
12142
  smtp_port?: number | null;
@@ -10456,6 +12247,25 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10456
12247
  };
10457
12248
  Relationships: [];
10458
12249
  };
12250
+ floriday_customer_discounts: {
12251
+ Row: {
12252
+ base_price: number | null;
12253
+ buyer_organization_id: string | null;
12254
+ currency: string | null;
12255
+ discount_type: string | null;
12256
+ discount_value: number | null;
12257
+ min_quantity: number | null;
12258
+ net_price: number | null;
12259
+ product_group_id: string | null;
12260
+ raw: import("./types").Json | null;
12261
+ source: string | null;
12262
+ source_id: string | null;
12263
+ trade_item_id: string | null;
12264
+ valid_from: string | null;
12265
+ valid_until: string | null;
12266
+ };
12267
+ Relationships: [];
12268
+ };
10459
12269
  local_customer_discounts: {
10460
12270
  Row: {
10461
12271
  base_price: number | null;
@@ -10792,6 +12602,21 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10792
12602
  };
10793
12603
  Returns: string;
10794
12604
  };
12605
+ ai_usage_by_module: {
12606
+ Args: {
12607
+ _from: string;
12608
+ _to: string;
12609
+ };
12610
+ Returns: {
12611
+ calls: number;
12612
+ consumer_module_id: string;
12613
+ cost_usd: number;
12614
+ errors: number;
12615
+ input_tokens: number;
12616
+ output_tokens: number;
12617
+ total_tokens: number;
12618
+ }[];
12619
+ };
10795
12620
  apply_stock_consumption: {
10796
12621
  Args: {
10797
12622
  p_order_id: string;
@@ -10849,6 +12674,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10849
12674
  processed_items: number;
10850
12675
  }[];
10851
12676
  };
12677
+ calculate_layer_stock: {
12678
+ Args: {
12679
+ p_product_id: string;
12680
+ };
12681
+ Returns: number;
12682
+ };
10852
12683
  call_exact_route: {
10853
12684
  Args: {
10854
12685
  path: string;
@@ -10877,6 +12708,33 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10877
12708
  };
10878
12709
  Returns: import("./types").Json;
10879
12710
  };
12711
+ claim_twinfield_push_batch: {
12712
+ Args: {
12713
+ _limit?: number;
12714
+ };
12715
+ Returns: {
12716
+ action: string;
12717
+ attempts: number;
12718
+ connection_id: string;
12719
+ created_at: string;
12720
+ customer_id: string | null;
12721
+ external_id: string | null;
12722
+ id: string;
12723
+ idempotency_key: string;
12724
+ last_error: string | null;
12725
+ next_attempt_at: string;
12726
+ office_code: string | null;
12727
+ payload: import("./types").Json;
12728
+ status: string;
12729
+ updated_at: string;
12730
+ }[];
12731
+ SetofOptions: {
12732
+ from: "*";
12733
+ to: "twinfield_push_queue";
12734
+ isOneToOne: false;
12735
+ isSetofReturn: true;
12736
+ };
12737
+ };
10880
12738
  cleanup_old_bookings: {
10881
12739
  Args: never;
10882
12740
  Returns: undefined;
@@ -10935,6 +12793,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10935
12793
  Args: never;
10936
12794
  Returns: string;
10937
12795
  };
12796
+ custom_access_token_hook: {
12797
+ Args: {
12798
+ event: import("./types").Json;
12799
+ };
12800
+ Returns: import("./types").Json;
12801
+ };
10938
12802
  dashboard_alert_counts: {
10939
12803
  Args: never;
10940
12804
  Returns: import("./types").Json;
@@ -11002,6 +12866,16 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
11002
12866
  status: string;
11003
12867
  }[];
11004
12868
  };
12869
+ email_auth_upsert_connection: {
12870
+ Args: {
12871
+ _account_email: string;
12872
+ _created_by: string;
12873
+ _is_active: boolean;
12874
+ _provider: string;
12875
+ _status: string;
12876
+ };
12877
+ Returns: string;
12878
+ };
11005
12879
  enqueue_cart_replan_if_unlocked: {
11006
12880
  Args: {
11007
12881
  p_order_id: string;
@@ -11121,6 +12995,19 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
11121
12995
  resource: string;
11122
12996
  }[];
11123
12997
  };
12998
+ get_floriday_agreements_active: {
12999
+ Args: {
13000
+ p_on_date?: string;
13001
+ };
13002
+ Returns: {
13003
+ buyer_organization_id: string;
13004
+ data: import("./types").Json;
13005
+ floriday_id: string;
13006
+ status: string;
13007
+ valid_from: string;
13008
+ valid_until: string;
13009
+ }[];
13010
+ };
11124
13011
  get_floriday_clock_supplies_window: {
11125
13012
  Args: {
11126
13013
  p_from: string;
@@ -11208,6 +13095,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
11208
13095
  };
11209
13096
  Returns: string;
11210
13097
  };
13098
+ get_inventory_stock_for_key: {
13099
+ Args: {
13100
+ p_key: string;
13101
+ };
13102
+ Returns: number;
13103
+ };
11211
13104
  get_offer_by_link_code: {
11212
13105
  Args: {
11213
13106
  p_code: string;
@@ -11238,6 +13131,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
11238
13131
  };
11239
13132
  Returns: string;
11240
13133
  };
13134
+ get_product_group_available_stock: {
13135
+ Args: {
13136
+ p_group_id: string;
13137
+ };
13138
+ Returns: number;
13139
+ };
11241
13140
  get_room_busy_windows: {
11242
13141
  Args: {
11243
13142
  p_from: string;
@@ -11269,6 +13168,14 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
11269
13168
  };
11270
13169
  Returns: string;
11271
13170
  };
13171
+ has_module_permission: {
13172
+ Args: {
13173
+ _min: string;
13174
+ _module_id: string;
13175
+ _user_id: string;
13176
+ };
13177
+ Returns: boolean;
13178
+ };
11272
13179
  has_role: {
11273
13180
  Args: {
11274
13181
  _role: Database["public"]["Enums"]["app_role"];
@@ -11276,6 +13183,10 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
11276
13183
  };
11277
13184
  Returns: boolean;
11278
13185
  };
13186
+ has_twinfield_link: {
13187
+ Args: never;
13188
+ Returns: boolean;
13189
+ };
11279
13190
  is_authenticated: {
11280
13191
  Args: never;
11281
13192
  Returns: boolean;
@@ -11290,6 +13201,37 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
11290
13201
  };
11291
13202
  Returns: boolean;
11292
13203
  };
13204
+ jwt_has_role: {
13205
+ Args: {
13206
+ _role: Database["public"]["Enums"]["app_role"];
13207
+ };
13208
+ Returns: boolean;
13209
+ };
13210
+ list_monteurs: {
13211
+ Args: never;
13212
+ Returns: {
13213
+ avatar_url: string;
13214
+ display_name: string;
13215
+ email: string;
13216
+ id: string;
13217
+ }[];
13218
+ };
13219
+ list_my_planning_items: {
13220
+ Args: {
13221
+ _from: string;
13222
+ _to: string;
13223
+ };
13224
+ Returns: {
13225
+ assigned_monteur_id: string;
13226
+ end_at: string;
13227
+ id: string;
13228
+ notes: string;
13229
+ role: string;
13230
+ start_at: string;
13231
+ status: Database["public"]["Enums"]["planning_item_status"];
13232
+ werkbon_id: string;
13233
+ }[];
13234
+ };
11293
13235
  local_effective_price: {
11294
13236
  Args: {
11295
13237
  _customer_id: string;
@@ -11306,6 +13248,22 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
11306
13248
  source_id: string;
11307
13249
  }[];
11308
13250
  };
13251
+ log_ai_call: {
13252
+ Args: {
13253
+ _consumer_module_id: string;
13254
+ _cost_usd: number;
13255
+ _duration_ms: number;
13256
+ _error_code: string;
13257
+ _error_message: string;
13258
+ _input_tokens: number;
13259
+ _model_slug: string;
13260
+ _output_tokens: number;
13261
+ _provider_slug: string;
13262
+ _status: string;
13263
+ _total_tokens: number;
13264
+ };
13265
+ Returns: string;
13266
+ };
11309
13267
  mark_offer_clicked: {
11310
13268
  Args: {
11311
13269
  p_code: string;
@@ -11357,6 +13315,10 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
11357
13315
  };
11358
13316
  Returns: string;
11359
13317
  };
13318
+ next_twinfield_code: {
13319
+ Args: never;
13320
+ Returns: string;
13321
+ };
11360
13322
  next_work_order_number: {
11361
13323
  Args: {
11362
13324
  p_parent_work_order_id?: string;
@@ -11413,6 +13375,15 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
11413
13375
  };
11414
13376
  Returns: undefined;
11415
13377
  };
13378
+ pickstation_resolve_delivery_orders: {
13379
+ Args: {
13380
+ p_sales_order_ids: string[];
13381
+ };
13382
+ Returns: {
13383
+ delivery_order_id: string;
13384
+ sales_order_id: string;
13385
+ }[];
13386
+ };
11416
13387
  pickstation_set_cart_status: {
11417
13388
  Args: {
11418
13389
  p_cart_index: number;
@@ -11483,6 +13454,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
11483
13454
  };
11484
13455
  Returns: number;
11485
13456
  };
13457
+ reorder_customer_price_groups: {
13458
+ Args: {
13459
+ _ids: string[];
13460
+ };
13461
+ Returns: undefined;
13462
+ };
11486
13463
  reset_floriday_sync_cursor: {
11487
13464
  Args: {
11488
13465
  p_connection_id: string;
@@ -11518,6 +13495,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
11518
13495
  };
11519
13496
  Returns: string;
11520
13497
  };
13498
+ retry_twinfield_push: {
13499
+ Args: {
13500
+ _customer_id: string;
13501
+ };
13502
+ Returns: number;
13503
+ };
11521
13504
  reverse_production: {
11522
13505
  Args: {
11523
13506
  p_connection_id?: string;
@@ -11535,6 +13518,20 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
11535
13518
  };
11536
13519
  Returns: number;
11537
13520
  };
13521
+ schedule_floriday_agreement_calloffs_sync: {
13522
+ Args: {
13523
+ p_apikey: string;
13524
+ p_url: string;
13525
+ };
13526
+ Returns: number;
13527
+ };
13528
+ schedule_floriday_agreements_sync: {
13529
+ Args: {
13530
+ p_apikey: string;
13531
+ p_url: string;
13532
+ };
13533
+ Returns: number;
13534
+ };
11538
13535
  schedule_floriday_base_items_sync: {
11539
13536
  Args: {
11540
13537
  p_apikey: string;
@@ -11785,6 +13782,13 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
11785
13782
  Args: never;
11786
13783
  Returns: number;
11787
13784
  };
13785
+ set_planning_status: {
13786
+ Args: {
13787
+ _id: string;
13788
+ _status: Database["public"]["Enums"]["planning_item_status"];
13789
+ };
13790
+ Returns: undefined;
13791
+ };
11788
13792
  show_limit: {
11789
13793
  Args: never;
11790
13794
  Returns: number;
@@ -11795,12 +13799,22 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
11795
13799
  };
11796
13800
  Returns: string[];
11797
13801
  };
13802
+ sync_all_layer_stocks: {
13803
+ Args: never;
13804
+ Returns: undefined;
13805
+ };
11798
13806
  sync_cached_packing_from_product: {
11799
13807
  Args: {
11800
13808
  p_product_id: string;
11801
13809
  };
11802
13810
  Returns: undefined;
11803
13811
  };
13812
+ sync_layer_stock: {
13813
+ Args: {
13814
+ p_product_id: string;
13815
+ };
13816
+ Returns: undefined;
13817
+ };
11804
13818
  sync_order_cart_item_packing_from_product: {
11805
13819
  Args: {
11806
13820
  p_product_id: string;
@@ -11844,9 +13858,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
11844
13858
  };
11845
13859
  };
11846
13860
  Enums: {
11847
- app_role: "admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie" | "monteur";
13861
+ app_role: "admin" | "planner" | "monteur" | "administratie" | "ai_admin";
11848
13862
  exact_env: "staging" | "live";
11849
13863
  exact_push_status: "pending" | "sent" | "error";
13864
+ itk_customer_segment: "Business" | "Private";
13865
+ itk_dynamic_field_type: "text" | "select" | "date" | "checkbox";
13866
+ planning_item_status: "gepland" | "bezig" | "afgerond" | "geannuleerd" | "concept" | "vrijgegeven";
11850
13867
  quote_status: "concept" | "verzonden" | "bekeken" | "in_behandeling" | "geaccepteerd" | "afgewezen" | "verlopen" | "gearchiveerd";
11851
13868
  };
11852
13869
  CompositeTypes: { [_ in never]: never; };