@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
@@ -270,12 +270,98 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
270
270
  };
271
271
  Relationships: [];
272
272
  };
273
+ ai_admin_credentials: {
274
+ Row: {
275
+ active: boolean;
276
+ admin_key: string;
277
+ created_at: string;
278
+ id: string;
279
+ label: string;
280
+ provider_id: string;
281
+ updated_at: string;
282
+ };
283
+ Insert: {
284
+ active?: boolean;
285
+ admin_key: string;
286
+ created_at?: string;
287
+ id?: string;
288
+ label: string;
289
+ provider_id: string;
290
+ updated_at?: string;
291
+ };
292
+ Update: {
293
+ active?: boolean;
294
+ admin_key?: string;
295
+ created_at?: string;
296
+ id?: string;
297
+ label?: string;
298
+ provider_id?: string;
299
+ updated_at?: string;
300
+ };
301
+ Relationships: [{
302
+ foreignKeyName: "ai_admin_credentials_provider_id_fkey";
303
+ columns: ["provider_id"];
304
+ isOneToOne: true;
305
+ referencedRelation: "ai_providers";
306
+ referencedColumns: ["id"];
307
+ }];
308
+ };
309
+ ai_call_log: {
310
+ Row: {
311
+ consumer_module_id: string;
312
+ cost_usd: number | null;
313
+ created_at: string;
314
+ created_by: string | null;
315
+ duration_ms: number | null;
316
+ error_code: string | null;
317
+ error_message: string | null;
318
+ id: string;
319
+ input_tokens: number;
320
+ model_slug: string | null;
321
+ output_tokens: number;
322
+ provider_slug: string | null;
323
+ status: string;
324
+ total_tokens: number;
325
+ };
326
+ Insert: {
327
+ consumer_module_id: string;
328
+ cost_usd?: number | null;
329
+ created_at?: string;
330
+ created_by?: string | null;
331
+ duration_ms?: number | null;
332
+ error_code?: string | null;
333
+ error_message?: string | null;
334
+ id?: string;
335
+ input_tokens?: number;
336
+ model_slug?: string | null;
337
+ output_tokens?: number;
338
+ provider_slug?: string | null;
339
+ status: string;
340
+ total_tokens?: number;
341
+ };
342
+ Update: {
343
+ consumer_module_id?: string;
344
+ cost_usd?: number | null;
345
+ created_at?: string;
346
+ created_by?: string | null;
347
+ duration_ms?: number | null;
348
+ error_code?: string | null;
349
+ error_message?: string | null;
350
+ id?: string;
351
+ input_tokens?: number;
352
+ model_slug?: string | null;
353
+ output_tokens?: number;
354
+ provider_slug?: string | null;
355
+ status?: string;
356
+ total_tokens?: number;
357
+ };
358
+ Relationships: [];
359
+ };
273
360
  ai_credentials: {
274
361
  Row: {
275
362
  active: boolean;
276
363
  api_key: string;
277
364
  created_at: string;
278
- created_by: string | null;
279
365
  id: string;
280
366
  label: string;
281
367
  provider_id: string;
@@ -285,7 +371,6 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
285
371
  active?: boolean;
286
372
  api_key: string;
287
373
  created_at?: string;
288
- created_by?: string | null;
289
374
  id?: string;
290
375
  label: string;
291
376
  provider_id: string;
@@ -295,7 +380,6 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
295
380
  active?: boolean;
296
381
  api_key?: string;
297
382
  created_at?: string;
298
- created_by?: string | null;
299
383
  id?: string;
300
384
  label?: string;
301
385
  provider_id?: string;
@@ -309,6 +393,75 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
309
393
  referencedColumns: ["id"];
310
394
  }];
311
395
  };
396
+ ai_goals: {
397
+ Row: {
398
+ active: boolean;
399
+ created_at: string;
400
+ description: string | null;
401
+ key: string;
402
+ label: string;
403
+ sort_order: number;
404
+ updated_at: string;
405
+ };
406
+ Insert: {
407
+ active?: boolean;
408
+ created_at?: string;
409
+ description?: string | null;
410
+ key: string;
411
+ label: string;
412
+ sort_order?: number;
413
+ updated_at?: string;
414
+ };
415
+ Update: {
416
+ active?: boolean;
417
+ created_at?: string;
418
+ description?: string | null;
419
+ key?: string;
420
+ label?: string;
421
+ sort_order?: number;
422
+ updated_at?: string;
423
+ };
424
+ Relationships: [];
425
+ };
426
+ ai_model_pricing: {
427
+ Row: {
428
+ created_at: string;
429
+ currency: string;
430
+ fetched_at: string;
431
+ id: string;
432
+ input_per_mtok: number | null;
433
+ model_slug: string;
434
+ output_per_mtok: number | null;
435
+ provider_slug: string;
436
+ source: string;
437
+ updated_at: string;
438
+ };
439
+ Insert: {
440
+ created_at?: string;
441
+ currency?: string;
442
+ fetched_at?: string;
443
+ id?: string;
444
+ input_per_mtok?: number | null;
445
+ model_slug: string;
446
+ output_per_mtok?: number | null;
447
+ provider_slug: string;
448
+ source?: string;
449
+ updated_at?: string;
450
+ };
451
+ Update: {
452
+ created_at?: string;
453
+ currency?: string;
454
+ fetched_at?: string;
455
+ id?: string;
456
+ input_per_mtok?: number | null;
457
+ model_slug?: string;
458
+ output_per_mtok?: number | null;
459
+ provider_slug?: string;
460
+ source?: string;
461
+ updated_at?: string;
462
+ };
463
+ Relationships: [];
464
+ };
312
465
  ai_models: {
313
466
  Row: {
314
467
  active: boolean;
@@ -1056,6 +1209,141 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
1056
1209
  };
1057
1210
  Relationships: [];
1058
1211
  };
1212
+ cart_planning_pick_times: {
1213
+ Row: {
1214
+ created_at: string;
1215
+ id: string;
1216
+ pot_size: string;
1217
+ seconds_per_cart: number;
1218
+ updated_at: string;
1219
+ };
1220
+ Insert: {
1221
+ created_at?: string;
1222
+ id?: string;
1223
+ pot_size: string;
1224
+ seconds_per_cart: number;
1225
+ updated_at?: string;
1226
+ };
1227
+ Update: {
1228
+ created_at?: string;
1229
+ id?: string;
1230
+ pot_size?: string;
1231
+ seconds_per_cart?: number;
1232
+ updated_at?: string;
1233
+ };
1234
+ Relationships: [];
1235
+ };
1236
+ cart_planning_product_overrides: {
1237
+ Row: {
1238
+ created_at: string;
1239
+ id: string;
1240
+ max_party_share_per_layer_pct_override: number | null;
1241
+ never_mix: boolean;
1242
+ notes: string | null;
1243
+ product_id: string;
1244
+ updated_at: string;
1245
+ };
1246
+ Insert: {
1247
+ created_at?: string;
1248
+ id?: string;
1249
+ max_party_share_per_layer_pct_override?: number | null;
1250
+ never_mix?: boolean;
1251
+ notes?: string | null;
1252
+ product_id: string;
1253
+ updated_at?: string;
1254
+ };
1255
+ Update: {
1256
+ created_at?: string;
1257
+ id?: string;
1258
+ max_party_share_per_layer_pct_override?: number | null;
1259
+ never_mix?: boolean;
1260
+ notes?: string | null;
1261
+ product_id?: string;
1262
+ updated_at?: string;
1263
+ };
1264
+ Relationships: [{
1265
+ foreignKeyName: "cart_planning_product_overrides_product_id_fkey";
1266
+ columns: ["product_id"];
1267
+ isOneToOne: true;
1268
+ referencedRelation: "products";
1269
+ referencedColumns: ["id"];
1270
+ }];
1271
+ };
1272
+ cart_planning_settings: {
1273
+ Row: {
1274
+ allow_editing_after_pickstation_send: boolean;
1275
+ buffer_grouping_mode: string;
1276
+ combine_floriday_orders: boolean;
1277
+ combine_floriday_orders_window: string;
1278
+ combine_orders_scope: string;
1279
+ default_workers: number;
1280
+ id: number;
1281
+ max_beladingen_per_layer: number;
1282
+ max_customers_per_cart: number;
1283
+ max_one_customer_per_layer: boolean;
1284
+ max_party_share_per_layer_pct: number;
1285
+ optimization_strategy: string;
1286
+ own_cart_from_layers: number;
1287
+ pick_time_mode: string;
1288
+ plants_per_day: number;
1289
+ plants_per_hour: number;
1290
+ require_same_carrier: boolean;
1291
+ require_same_crate_type: boolean;
1292
+ require_same_delivery_date: boolean;
1293
+ require_same_delivery_location: boolean;
1294
+ updated_at: string;
1295
+ updated_by: string | null;
1296
+ };
1297
+ Insert: {
1298
+ allow_editing_after_pickstation_send?: boolean;
1299
+ buffer_grouping_mode?: string;
1300
+ combine_floriday_orders?: boolean;
1301
+ combine_floriday_orders_window?: string;
1302
+ combine_orders_scope?: string;
1303
+ default_workers?: number;
1304
+ id?: number;
1305
+ max_beladingen_per_layer?: number;
1306
+ max_customers_per_cart?: number;
1307
+ max_one_customer_per_layer?: boolean;
1308
+ max_party_share_per_layer_pct?: number;
1309
+ optimization_strategy?: string;
1310
+ own_cart_from_layers?: number;
1311
+ pick_time_mode?: string;
1312
+ plants_per_day?: number;
1313
+ plants_per_hour?: number;
1314
+ require_same_carrier?: boolean;
1315
+ require_same_crate_type?: boolean;
1316
+ require_same_delivery_date?: boolean;
1317
+ require_same_delivery_location?: boolean;
1318
+ updated_at?: string;
1319
+ updated_by?: string | null;
1320
+ };
1321
+ Update: {
1322
+ allow_editing_after_pickstation_send?: boolean;
1323
+ buffer_grouping_mode?: string;
1324
+ combine_floriday_orders?: boolean;
1325
+ combine_floriday_orders_window?: string;
1326
+ combine_orders_scope?: string;
1327
+ default_workers?: number;
1328
+ id?: number;
1329
+ max_beladingen_per_layer?: number;
1330
+ max_customers_per_cart?: number;
1331
+ max_one_customer_per_layer?: boolean;
1332
+ max_party_share_per_layer_pct?: number;
1333
+ optimization_strategy?: string;
1334
+ own_cart_from_layers?: number;
1335
+ pick_time_mode?: string;
1336
+ plants_per_day?: number;
1337
+ plants_per_hour?: number;
1338
+ require_same_carrier?: boolean;
1339
+ require_same_crate_type?: boolean;
1340
+ require_same_delivery_date?: boolean;
1341
+ require_same_delivery_location?: boolean;
1342
+ updated_at?: string;
1343
+ updated_by?: string | null;
1344
+ };
1345
+ Relationships: [];
1346
+ };
1059
1347
  cart_replan_queue: {
1060
1348
  Row: {
1061
1349
  attempts: number;
@@ -1086,111 +1374,237 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
1086
1374
  referencedColumns: ["id"];
1087
1375
  }];
1088
1376
  };
1089
- collections: {
1377
+ cart_types: {
1090
1378
  Row: {
1091
1379
  created_at: string;
1092
- created_by: string | null;
1093
1380
  id: string;
1381
+ is_default: boolean;
1382
+ layer_length_cm: number;
1383
+ layer_width_cm: number;
1384
+ layers_per_cart: number;
1094
1385
  name: string;
1095
1386
  updated_at: string;
1096
1387
  };
1097
1388
  Insert: {
1098
1389
  created_at?: string;
1099
- created_by?: string | null;
1100
1390
  id?: string;
1391
+ is_default?: boolean;
1392
+ layer_length_cm: number;
1393
+ layer_width_cm: number;
1394
+ layers_per_cart?: number;
1101
1395
  name: string;
1102
1396
  updated_at?: string;
1103
1397
  };
1104
1398
  Update: {
1105
1399
  created_at?: string;
1106
- created_by?: string | null;
1107
1400
  id?: string;
1401
+ is_default?: boolean;
1402
+ layer_length_cm?: number;
1403
+ layer_width_cm?: number;
1404
+ layers_per_cart?: number;
1108
1405
  name?: string;
1109
1406
  updated_at?: string;
1110
1407
  };
1111
1408
  Relationships: [];
1112
1409
  };
1113
- customer_audit_log: {
1410
+ catalog_articles_cache: {
1114
1411
  Row: {
1115
- action: string;
1116
- changes: import("../integrations/supabase/types").Json;
1117
1412
  created_at: string;
1118
- customer_id: string;
1413
+ default_price: number;
1414
+ default_vat_rate_ref: string | null;
1415
+ external_ref: string;
1119
1416
  id: string;
1120
- user_id: string | null;
1417
+ name: string;
1418
+ updated_at: string;
1419
+ user_id: string;
1121
1420
  };
1122
1421
  Insert: {
1123
- action: string;
1124
- changes?: import("../integrations/supabase/types").Json;
1125
1422
  created_at?: string;
1126
- customer_id: string;
1423
+ default_price?: number;
1424
+ default_vat_rate_ref?: string | null;
1425
+ external_ref: string;
1127
1426
  id?: string;
1128
- user_id?: string | null;
1427
+ name: string;
1428
+ updated_at?: string;
1429
+ user_id: string;
1129
1430
  };
1130
1431
  Update: {
1131
- action?: string;
1132
- changes?: import("../integrations/supabase/types").Json;
1133
1432
  created_at?: string;
1134
- customer_id?: string;
1433
+ default_price?: number;
1434
+ default_vat_rate_ref?: string | null;
1435
+ external_ref?: string;
1135
1436
  id?: string;
1136
- user_id?: string | null;
1437
+ name?: string;
1438
+ updated_at?: string;
1439
+ user_id?: string;
1137
1440
  };
1138
- Relationships: [{
1139
- foreignKeyName: "customer_audit_log_customer_id_fkey";
1140
- columns: ["customer_id"];
1141
- isOneToOne: false;
1142
- referencedRelation: "customers";
1143
- referencedColumns: ["id"];
1144
- }];
1441
+ Relationships: [];
1145
1442
  };
1146
- customer_contacts: {
1443
+ catalog_vat_rates_cache: {
1147
1444
  Row: {
1148
1445
  created_at: string;
1149
- customer_id: string;
1150
- email: string | null;
1151
- floriday_contact_id: string | null;
1152
- full_name: string;
1446
+ external_ref: string;
1153
1447
  id: string;
1154
- is_active: boolean;
1155
- job_title: string | null;
1156
- phone: string | null;
1157
- photo_url: string | null;
1158
- raw: import("../integrations/supabase/types").Json | null;
1448
+ label: string;
1449
+ percentage: number;
1159
1450
  updated_at: string;
1451
+ user_id: string;
1160
1452
  };
1161
1453
  Insert: {
1162
1454
  created_at?: string;
1163
- customer_id: string;
1164
- email?: string | null;
1165
- floriday_contact_id?: string | null;
1166
- full_name: string;
1455
+ external_ref: string;
1167
1456
  id?: string;
1168
- is_active?: boolean;
1169
- job_title?: string | null;
1170
- phone?: string | null;
1171
- photo_url?: string | null;
1172
- raw?: import("../integrations/supabase/types").Json | null;
1457
+ label: string;
1458
+ percentage?: number;
1173
1459
  updated_at?: string;
1460
+ user_id: string;
1174
1461
  };
1175
1462
  Update: {
1176
1463
  created_at?: string;
1177
- customer_id?: string;
1178
- email?: string | null;
1179
- floriday_contact_id?: string | null;
1180
- full_name?: string;
1464
+ external_ref?: string;
1181
1465
  id?: string;
1182
- is_active?: boolean;
1183
- job_title?: string | null;
1184
- phone?: string | null;
1185
- photo_url?: string | null;
1186
- raw?: import("../integrations/supabase/types").Json | null;
1466
+ label?: string;
1467
+ percentage?: number;
1187
1468
  updated_at?: string;
1469
+ user_id?: string;
1188
1470
  };
1189
- Relationships: [{
1190
- foreignKeyName: "customer_contacts_customer_id_fkey";
1191
- columns: ["customer_id"];
1192
- isOneToOne: false;
1193
- referencedRelation: "customers";
1471
+ Relationships: [];
1472
+ };
1473
+ collections: {
1474
+ Row: {
1475
+ created_at: string;
1476
+ created_by: string | null;
1477
+ id: string;
1478
+ name: string;
1479
+ updated_at: string;
1480
+ };
1481
+ Insert: {
1482
+ created_at?: string;
1483
+ created_by?: string | null;
1484
+ id?: string;
1485
+ name: string;
1486
+ updated_at?: string;
1487
+ };
1488
+ Update: {
1489
+ created_at?: string;
1490
+ created_by?: string | null;
1491
+ id?: string;
1492
+ name?: string;
1493
+ updated_at?: string;
1494
+ };
1495
+ Relationships: [];
1496
+ };
1497
+ crate_types: {
1498
+ Row: {
1499
+ created_at: string;
1500
+ id: string;
1501
+ length_cm: number;
1502
+ name: string;
1503
+ plants_per_crate: number;
1504
+ updated_at: string;
1505
+ width_cm: number;
1506
+ };
1507
+ Insert: {
1508
+ created_at?: string;
1509
+ id?: string;
1510
+ length_cm: number;
1511
+ name: string;
1512
+ plants_per_crate?: number;
1513
+ updated_at?: string;
1514
+ width_cm: number;
1515
+ };
1516
+ Update: {
1517
+ created_at?: string;
1518
+ id?: string;
1519
+ length_cm?: number;
1520
+ name?: string;
1521
+ plants_per_crate?: number;
1522
+ updated_at?: string;
1523
+ width_cm?: number;
1524
+ };
1525
+ Relationships: [];
1526
+ };
1527
+ customer_audit_log: {
1528
+ Row: {
1529
+ action: string;
1530
+ changes: import("../integrations/supabase/types").Json;
1531
+ created_at: string;
1532
+ customer_id: string;
1533
+ id: string;
1534
+ user_id: string | null;
1535
+ };
1536
+ Insert: {
1537
+ action: string;
1538
+ changes?: import("../integrations/supabase/types").Json;
1539
+ created_at?: string;
1540
+ customer_id: string;
1541
+ id?: string;
1542
+ user_id?: string | null;
1543
+ };
1544
+ Update: {
1545
+ action?: string;
1546
+ changes?: import("../integrations/supabase/types").Json;
1547
+ created_at?: string;
1548
+ customer_id?: string;
1549
+ id?: string;
1550
+ user_id?: string | null;
1551
+ };
1552
+ Relationships: [{
1553
+ foreignKeyName: "customer_audit_log_customer_id_fkey";
1554
+ columns: ["customer_id"];
1555
+ isOneToOne: false;
1556
+ referencedRelation: "customers";
1557
+ referencedColumns: ["id"];
1558
+ }];
1559
+ };
1560
+ customer_contacts: {
1561
+ Row: {
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("../integrations/supabase/types").Json | null;
1573
+ updated_at: string;
1574
+ };
1575
+ Insert: {
1576
+ created_at?: string;
1577
+ customer_id: string;
1578
+ email?: string | null;
1579
+ floriday_contact_id?: string | null;
1580
+ full_name: string;
1581
+ id?: string;
1582
+ is_active?: boolean;
1583
+ job_title?: string | null;
1584
+ phone?: string | null;
1585
+ photo_url?: string | null;
1586
+ raw?: import("../integrations/supabase/types").Json | null;
1587
+ updated_at?: string;
1588
+ };
1589
+ Update: {
1590
+ created_at?: string;
1591
+ customer_id?: string;
1592
+ email?: string | null;
1593
+ floriday_contact_id?: string | null;
1594
+ full_name?: string;
1595
+ id?: string;
1596
+ is_active?: boolean;
1597
+ job_title?: string | null;
1598
+ phone?: string | null;
1599
+ photo_url?: string | null;
1600
+ raw?: import("../integrations/supabase/types").Json | null;
1601
+ updated_at?: string;
1602
+ };
1603
+ Relationships: [{
1604
+ foreignKeyName: "customer_contacts_customer_id_fkey";
1605
+ columns: ["customer_id"];
1606
+ isOneToOne: false;
1607
+ referencedRelation: "customers";
1194
1608
  referencedColumns: ["id"];
1195
1609
  }];
1196
1610
  };
@@ -1335,6 +1749,105 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
1335
1749
  };
1336
1750
  Relationships: [];
1337
1751
  };
1752
+ customer_price_group_members: {
1753
+ Row: {
1754
+ created_at: string;
1755
+ customer_key: string;
1756
+ id: string;
1757
+ owner_id: string;
1758
+ price_group_id: string;
1759
+ };
1760
+ Insert: {
1761
+ created_at?: string;
1762
+ customer_key: string;
1763
+ id?: string;
1764
+ owner_id?: string;
1765
+ price_group_id: string;
1766
+ };
1767
+ Update: {
1768
+ created_at?: string;
1769
+ customer_key?: string;
1770
+ id?: string;
1771
+ owner_id?: string;
1772
+ price_group_id?: string;
1773
+ };
1774
+ Relationships: [{
1775
+ foreignKeyName: "customer_price_group_members_price_group_id_fkey";
1776
+ columns: ["price_group_id"];
1777
+ isOneToOne: false;
1778
+ referencedRelation: "customer_price_groups";
1779
+ referencedColumns: ["id"];
1780
+ }];
1781
+ };
1782
+ customer_price_groups: {
1783
+ Row: {
1784
+ calc_type: string | null;
1785
+ calc_value: number | null;
1786
+ calc_value_type: string | null;
1787
+ created_at: string;
1788
+ currency: string;
1789
+ distribute_over: string | null;
1790
+ group_type: string;
1791
+ handling_fee: number | null;
1792
+ id: string;
1793
+ include_stickers: boolean;
1794
+ is_active: boolean;
1795
+ name: string;
1796
+ owner_id: string;
1797
+ price_scope: string;
1798
+ pricing_mode: string;
1799
+ rounding: string;
1800
+ rounding_step: number;
1801
+ sort_order: number;
1802
+ unit: string;
1803
+ updated_at: string;
1804
+ };
1805
+ Insert: {
1806
+ calc_type?: string | null;
1807
+ calc_value?: number | null;
1808
+ calc_value_type?: string | null;
1809
+ created_at?: string;
1810
+ currency?: string;
1811
+ distribute_over?: string | null;
1812
+ group_type?: string;
1813
+ handling_fee?: number | null;
1814
+ id?: string;
1815
+ include_stickers?: boolean;
1816
+ is_active?: boolean;
1817
+ name: string;
1818
+ owner_id?: string;
1819
+ price_scope?: string;
1820
+ pricing_mode?: string;
1821
+ rounding?: string;
1822
+ rounding_step?: number;
1823
+ sort_order?: number;
1824
+ unit?: string;
1825
+ updated_at?: string;
1826
+ };
1827
+ Update: {
1828
+ calc_type?: string | null;
1829
+ calc_value?: number | null;
1830
+ calc_value_type?: string | null;
1831
+ created_at?: string;
1832
+ currency?: string;
1833
+ distribute_over?: string | null;
1834
+ group_type?: string;
1835
+ handling_fee?: number | null;
1836
+ id?: string;
1837
+ include_stickers?: boolean;
1838
+ is_active?: boolean;
1839
+ name?: string;
1840
+ owner_id?: string;
1841
+ price_scope?: string;
1842
+ pricing_mode?: string;
1843
+ rounding?: string;
1844
+ rounding_step?: number;
1845
+ sort_order?: number;
1846
+ unit?: string;
1847
+ updated_at?: string;
1848
+ };
1849
+ Relationships: [];
1850
+ };
1338
1851
  customer_selected_assortment: {
1339
1852
  Row: {
1340
1853
  article_number: string | null;
@@ -1488,6 +2001,10 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
1488
2001
  sync_error: string | null;
1489
2002
  sync_status: string;
1490
2003
  trade_forms: string[];
2004
+ twinfield_code: string | null;
2005
+ twinfield_last_hash: string | null;
2006
+ twinfield_sync_error: string | null;
2007
+ twinfield_synced_at: string | null;
1491
2008
  updated_at: string;
1492
2009
  vat_display: string | null;
1493
2010
  vat_number: string | null;
@@ -1555,6 +2072,10 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
1555
2072
  sync_error?: string | null;
1556
2073
  sync_status?: string;
1557
2074
  trade_forms?: string[];
2075
+ twinfield_code?: string | null;
2076
+ twinfield_last_hash?: string | null;
2077
+ twinfield_sync_error?: string | null;
2078
+ twinfield_synced_at?: string | null;
1558
2079
  updated_at?: string;
1559
2080
  vat_display?: string | null;
1560
2081
  vat_number?: string | null;
@@ -1622,6 +2143,10 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
1622
2143
  sync_error?: string | null;
1623
2144
  sync_status?: string;
1624
2145
  trade_forms?: string[];
2146
+ twinfield_code?: string | null;
2147
+ twinfield_last_hash?: string | null;
2148
+ twinfield_sync_error?: string | null;
2149
+ twinfield_synced_at?: string | null;
1625
2150
  updated_at?: string;
1626
2151
  vat_display?: string | null;
1627
2152
  vat_number?: string | null;
@@ -3435,74 +3960,173 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
3435
3960
  referencedColumns: ["id"];
3436
3961
  }];
3437
3962
  };
3438
- floriday_auction_letters_cache: {
3963
+ floriday_agreement_calloffs_cache: {
3439
3964
  Row: {
3440
- auction_letter_code: string;
3441
- clock_supply_id: string;
3965
+ agreement_id: string | null;
3442
3966
  connection_id: string;
3443
- content_type: string;
3967
+ data: import("../integrations/supabase/types").Json;
3968
+ delivery_date: string | null;
3444
3969
  fetched_at: string;
3970
+ floriday_id: string;
3445
3971
  id: string;
3446
- storage_path: string;
3972
+ is_deleted: boolean;
3973
+ sequence_number: number;
3974
+ status: string | null;
3975
+ updated_at: string;
3447
3976
  };
3448
3977
  Insert: {
3449
- auction_letter_code: string;
3450
- clock_supply_id: string;
3978
+ agreement_id?: string | null;
3451
3979
  connection_id: string;
3452
- content_type?: string;
3980
+ data?: import("../integrations/supabase/types").Json;
3981
+ delivery_date?: string | null;
3453
3982
  fetched_at?: string;
3983
+ floriday_id: string;
3454
3984
  id?: string;
3455
- storage_path: string;
3985
+ is_deleted?: boolean;
3986
+ sequence_number?: number;
3987
+ status?: string | null;
3988
+ updated_at?: string;
3456
3989
  };
3457
3990
  Update: {
3458
- auction_letter_code?: string;
3459
- clock_supply_id?: string;
3991
+ agreement_id?: string | null;
3460
3992
  connection_id?: string;
3461
- content_type?: string;
3993
+ data?: import("../integrations/supabase/types").Json;
3994
+ delivery_date?: string | null;
3462
3995
  fetched_at?: string;
3996
+ floriday_id?: string;
3463
3997
  id?: string;
3464
- storage_path?: string;
3998
+ is_deleted?: boolean;
3999
+ sequence_number?: number;
4000
+ status?: string | null;
4001
+ updated_at?: string;
3465
4002
  };
3466
4003
  Relationships: [{
3467
- foreignKeyName: "floriday_auction_letters_cache_connection_id_fkey";
4004
+ foreignKeyName: "floriday_agreement_calloffs_cache_connection_id_fkey";
3468
4005
  columns: ["connection_id"];
3469
4006
  isOneToOne: false;
3470
4007
  referencedRelation: "floriday_connections";
3471
4008
  referencedColumns: ["id"];
3472
4009
  }];
3473
4010
  };
3474
- floriday_auto_fulfillment_log: {
4011
+ floriday_agreements_cache: {
3475
4012
  Row: {
3476
- attempts: number;
4013
+ buyer_organization_id: string | null;
3477
4014
  connection_id: string;
3478
- created_at: string;
3479
- error: string | null;
3480
- fulfillment_order_id: string | null;
4015
+ data: import("../integrations/supabase/types").Json;
4016
+ fetched_at: string;
4017
+ floriday_id: string;
3481
4018
  id: string;
3482
- last_attempt_at: string | null;
3483
- reason: string | null;
3484
- sales_order_id: string;
3485
- status: string;
4019
+ is_deleted: boolean;
4020
+ sequence_number: number;
4021
+ status: string | null;
3486
4022
  updated_at: string;
4023
+ valid_from: string | null;
4024
+ valid_until: string | null;
3487
4025
  };
3488
4026
  Insert: {
3489
- attempts?: number;
4027
+ buyer_organization_id?: string | null;
3490
4028
  connection_id: string;
3491
- created_at?: string;
3492
- error?: string | null;
3493
- fulfillment_order_id?: string | null;
4029
+ data?: import("../integrations/supabase/types").Json;
4030
+ fetched_at?: string;
4031
+ floriday_id: string;
3494
4032
  id?: string;
3495
- last_attempt_at?: string | null;
3496
- reason?: string | null;
3497
- sales_order_id: string;
3498
- status?: string;
4033
+ is_deleted?: boolean;
4034
+ sequence_number?: number;
4035
+ status?: string | null;
3499
4036
  updated_at?: string;
4037
+ valid_from?: string | null;
4038
+ valid_until?: string | null;
3500
4039
  };
3501
4040
  Update: {
3502
- attempts?: number;
4041
+ buyer_organization_id?: string | null;
3503
4042
  connection_id?: string;
3504
- created_at?: string;
3505
- error?: string | null;
4043
+ data?: import("../integrations/supabase/types").Json;
4044
+ fetched_at?: string;
4045
+ floriday_id?: string;
4046
+ id?: string;
4047
+ is_deleted?: boolean;
4048
+ sequence_number?: number;
4049
+ status?: string | null;
4050
+ updated_at?: string;
4051
+ valid_from?: string | null;
4052
+ valid_until?: string | null;
4053
+ };
4054
+ Relationships: [{
4055
+ foreignKeyName: "floriday_agreements_cache_connection_id_fkey";
4056
+ columns: ["connection_id"];
4057
+ isOneToOne: false;
4058
+ referencedRelation: "floriday_connections";
4059
+ referencedColumns: ["id"];
4060
+ }];
4061
+ };
4062
+ floriday_auction_letters_cache: {
4063
+ Row: {
4064
+ auction_letter_code: string;
4065
+ clock_supply_id: string;
4066
+ connection_id: string;
4067
+ content_type: string;
4068
+ fetched_at: string;
4069
+ id: string;
4070
+ storage_path: string;
4071
+ };
4072
+ Insert: {
4073
+ auction_letter_code: string;
4074
+ clock_supply_id: string;
4075
+ connection_id: string;
4076
+ content_type?: string;
4077
+ fetched_at?: string;
4078
+ id?: string;
4079
+ storage_path: string;
4080
+ };
4081
+ Update: {
4082
+ auction_letter_code?: string;
4083
+ clock_supply_id?: string;
4084
+ connection_id?: string;
4085
+ content_type?: string;
4086
+ fetched_at?: string;
4087
+ id?: string;
4088
+ storage_path?: string;
4089
+ };
4090
+ Relationships: [{
4091
+ foreignKeyName: "floriday_auction_letters_cache_connection_id_fkey";
4092
+ columns: ["connection_id"];
4093
+ isOneToOne: false;
4094
+ referencedRelation: "floriday_connections";
4095
+ referencedColumns: ["id"];
4096
+ }];
4097
+ };
4098
+ floriday_auto_fulfillment_log: {
4099
+ Row: {
4100
+ attempts: number;
4101
+ connection_id: string;
4102
+ created_at: string;
4103
+ error: string | null;
4104
+ fulfillment_order_id: string | null;
4105
+ id: string;
4106
+ last_attempt_at: string | null;
4107
+ reason: string | null;
4108
+ sales_order_id: string;
4109
+ status: string;
4110
+ updated_at: string;
4111
+ };
4112
+ Insert: {
4113
+ attempts?: number;
4114
+ connection_id: string;
4115
+ created_at?: string;
4116
+ error?: string | null;
4117
+ fulfillment_order_id?: string | null;
4118
+ id?: string;
4119
+ last_attempt_at?: string | null;
4120
+ reason?: string | null;
4121
+ sales_order_id: string;
4122
+ status?: string;
4123
+ updated_at?: string;
4124
+ };
4125
+ Update: {
4126
+ attempts?: number;
4127
+ connection_id?: string;
4128
+ created_at?: string;
4129
+ error?: string | null;
3506
4130
  fulfillment_order_id?: string | null;
3507
4131
  id?: string;
3508
4132
  last_attempt_at?: string | null;
@@ -4729,8 +5353,6 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
4729
5353
  Row: {
4730
5354
  buyer_organization_id: string | null;
4731
5355
  connection_id: string;
4732
- controlled_at: string | null;
4733
- controlled_by: string | null;
4734
5356
  created_at: string;
4735
5357
  data: import("../integrations/supabase/types").Json;
4736
5358
  floriday_id: string;
@@ -4742,8 +5364,6 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
4742
5364
  Insert: {
4743
5365
  buyer_organization_id?: string | null;
4744
5366
  connection_id: string;
4745
- controlled_at?: string | null;
4746
- controlled_by?: string | null;
4747
5367
  created_at?: string;
4748
5368
  data: import("../integrations/supabase/types").Json;
4749
5369
  floriday_id: string;
@@ -4755,8 +5375,6 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
4755
5375
  Update: {
4756
5376
  buyer_organization_id?: string | null;
4757
5377
  connection_id?: string;
4758
- controlled_at?: string | null;
4759
- controlled_by?: string | null;
4760
5378
  created_at?: string;
4761
5379
  data?: import("../integrations/supabase/types").Json;
4762
5380
  floriday_id?: string;
@@ -4938,45 +5556,6 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
4938
5556
  referencedColumns: ["id"];
4939
5557
  }];
4940
5558
  };
4941
- floriday_trade_settings_customers_cache: {
4942
- Row: {
4943
- connection_id: string;
4944
- data: import("../integrations/supabase/types").Json;
4945
- fetched_at: string;
4946
- floriday_id: string;
4947
- id: string;
4948
- is_deleted: boolean;
4949
- sequence_number: number;
4950
- updated_at: string;
4951
- };
4952
- Insert: {
4953
- connection_id: string;
4954
- data: import("../integrations/supabase/types").Json;
4955
- fetched_at?: string;
4956
- floriday_id: string;
4957
- id?: string;
4958
- is_deleted?: boolean;
4959
- sequence_number?: number;
4960
- updated_at?: string;
4961
- };
4962
- Update: {
4963
- connection_id?: string;
4964
- data?: import("../integrations/supabase/types").Json;
4965
- fetched_at?: string;
4966
- floriday_id?: string;
4967
- id?: string;
4968
- is_deleted?: boolean;
4969
- sequence_number?: number;
4970
- updated_at?: string;
4971
- };
4972
- Relationships: [{
4973
- foreignKeyName: "floriday_trade_settings_customers_cache_connection_id_fkey";
4974
- columns: ["connection_id"];
4975
- isOneToOne: false;
4976
- referencedRelation: "floriday_connections";
4977
- referencedColumns: ["id"];
4978
- }];
4979
- };
4980
5559
  floriday_trips_cache: {
4981
5560
  Row: {
4982
5561
  carrier_organization_id: string | null;
@@ -5025,6 +5604,27 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
5025
5604
  referencedColumns: ["id"];
5026
5605
  }];
5027
5606
  };
5607
+ floriday_vbn_required_characteristics: {
5608
+ Row: {
5609
+ required_codes: string[];
5610
+ updated_at: string;
5611
+ updated_by: string | null;
5612
+ vbn_code: string;
5613
+ };
5614
+ Insert: {
5615
+ required_codes?: string[];
5616
+ updated_at?: string;
5617
+ updated_by?: string | null;
5618
+ vbn_code: string;
5619
+ };
5620
+ Update: {
5621
+ required_codes?: string[];
5622
+ updated_at?: string;
5623
+ updated_by?: string | null;
5624
+ vbn_code?: string;
5625
+ };
5626
+ Relationships: [];
5627
+ };
5028
5628
  floriday_warehouses_cache: {
5029
5629
  Row: {
5030
5630
  connection_id: string;
@@ -5505,172 +6105,454 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
5505
6105
  };
5506
6106
  Relationships: [];
5507
6107
  };
5508
- local_customer_agreements: {
6108
+ itk_contact_persons: {
5509
6109
  Row: {
5510
- base_price: number | null;
5511
6110
  created_at: string;
5512
- currency: string;
5513
6111
  customer_id: string;
6112
+ email: string | null;
5514
6113
  id: string;
5515
- min_quantity: number;
5516
- net_price: number;
5517
- notes: string | null;
5518
- product_category_id: string | null;
5519
- product_id: string | null;
6114
+ name: string;
6115
+ phone: string | null;
6116
+ role: string | null;
5520
6117
  updated_at: string;
5521
- valid_from: string | null;
5522
- valid_until: string | null;
5523
6118
  };
5524
6119
  Insert: {
5525
- base_price?: number | null;
5526
6120
  created_at?: string;
5527
- currency?: string;
5528
6121
  customer_id: string;
6122
+ email?: string | null;
5529
6123
  id?: string;
5530
- min_quantity?: number;
5531
- net_price: number;
5532
- notes?: string | null;
5533
- product_category_id?: string | null;
5534
- product_id?: string | null;
6124
+ name: string;
6125
+ phone?: string | null;
6126
+ role?: string | null;
5535
6127
  updated_at?: string;
5536
- valid_from?: string | null;
5537
- valid_until?: string | null;
5538
6128
  };
5539
6129
  Update: {
5540
- base_price?: number | null;
5541
6130
  created_at?: string;
5542
- currency?: string;
5543
6131
  customer_id?: string;
6132
+ email?: string | null;
5544
6133
  id?: string;
5545
- min_quantity?: number;
5546
- net_price?: number;
5547
- notes?: string | null;
5548
- product_category_id?: string | null;
5549
- product_id?: string | null;
6134
+ name?: string;
6135
+ phone?: string | null;
6136
+ role?: string | null;
5550
6137
  updated_at?: string;
5551
- valid_from?: string | null;
5552
- valid_until?: string | null;
5553
6138
  };
5554
6139
  Relationships: [{
5555
- foreignKeyName: "local_customer_agreements_customer_id_fkey";
6140
+ foreignKeyName: "itk_contact_persons_customer_id_fkey";
5556
6141
  columns: ["customer_id"];
5557
6142
  isOneToOne: false;
5558
- referencedRelation: "customers";
5559
- referencedColumns: ["id"];
5560
- }, {
5561
- foreignKeyName: "local_customer_agreements_product_category_id_fkey";
5562
- columns: ["product_category_id"];
5563
- isOneToOne: false;
5564
- referencedRelation: "product_categories";
5565
- referencedColumns: ["id"];
5566
- }, {
5567
- foreignKeyName: "local_customer_agreements_product_id_fkey";
5568
- columns: ["product_id"];
5569
- isOneToOne: false;
5570
- referencedRelation: "products";
6143
+ referencedRelation: "itk_customers";
5571
6144
  referencedColumns: ["id"];
5572
6145
  }];
5573
6146
  };
5574
- local_customer_price_groups: {
6147
+ itk_customer_dynamic_values: {
5575
6148
  Row: {
5576
6149
  created_at: string;
5577
- currency: string;
5578
6150
  customer_id: string;
5579
- discount_type: string;
5580
- discount_value: number;
6151
+ field_id: string;
5581
6152
  id: string;
5582
- min_quantity: number;
5583
- notes: string | null;
5584
- product_category_id: string | null;
5585
- product_id: string | null;
5586
6153
  updated_at: string;
5587
- valid_from: string | null;
5588
- valid_until: string | null;
6154
+ value: string | null;
5589
6155
  };
5590
6156
  Insert: {
5591
6157
  created_at?: string;
5592
- currency?: string;
5593
6158
  customer_id: string;
5594
- discount_type: string;
5595
- discount_value: number;
6159
+ field_id: string;
5596
6160
  id?: string;
5597
- min_quantity?: number;
5598
- notes?: string | null;
5599
- product_category_id?: string | null;
5600
- product_id?: string | null;
5601
6161
  updated_at?: string;
5602
- valid_from?: string | null;
5603
- valid_until?: string | null;
6162
+ value?: string | null;
5604
6163
  };
5605
6164
  Update: {
5606
6165
  created_at?: string;
5607
- currency?: string;
5608
6166
  customer_id?: string;
5609
- discount_type?: string;
5610
- discount_value?: number;
6167
+ field_id?: string;
5611
6168
  id?: string;
5612
- min_quantity?: number;
5613
- notes?: string | null;
5614
- product_category_id?: string | null;
5615
- product_id?: string | null;
5616
6169
  updated_at?: string;
5617
- valid_from?: string | null;
5618
- valid_until?: string | null;
6170
+ value?: string | null;
5619
6171
  };
5620
6172
  Relationships: [{
5621
- foreignKeyName: "local_customer_price_groups_customer_id_fkey";
6173
+ foreignKeyName: "itk_customer_dynamic_values_customer_id_fkey";
5622
6174
  columns: ["customer_id"];
5623
6175
  isOneToOne: false;
5624
- referencedRelation: "customers";
5625
- referencedColumns: ["id"];
5626
- }, {
5627
- foreignKeyName: "local_customer_price_groups_product_category_id_fkey";
5628
- columns: ["product_category_id"];
5629
- isOneToOne: false;
5630
- referencedRelation: "product_categories";
6176
+ referencedRelation: "itk_customers";
5631
6177
  referencedColumns: ["id"];
5632
6178
  }, {
5633
- foreignKeyName: "local_customer_price_groups_product_id_fkey";
5634
- columns: ["product_id"];
6179
+ foreignKeyName: "itk_customer_dynamic_values_field_id_fkey";
6180
+ columns: ["field_id"];
5635
6181
  isOneToOne: false;
5636
- referencedRelation: "products";
6182
+ referencedRelation: "itk_dynamic_fields";
5637
6183
  referencedColumns: ["id"];
5638
6184
  }];
5639
6185
  };
5640
- local_customer_sales_strategies: {
6186
+ itk_customer_notes: {
5641
6187
  Row: {
6188
+ body: string;
5642
6189
  created_at: string;
5643
- currency: string;
6190
+ created_by: string | null;
5644
6191
  customer_id: string;
5645
- discount_type: string;
5646
- discount_value: number;
5647
6192
  id: string;
5648
- min_quantity: number;
5649
- notes: string | null;
5650
- product_category_id: string | null;
5651
- product_id: string | null;
6193
+ note_type: string;
5652
6194
  updated_at: string;
5653
- valid_from: string | null;
5654
- valid_until: string | null;
5655
6195
  };
5656
6196
  Insert: {
6197
+ body: string;
5657
6198
  created_at?: string;
5658
- currency?: string;
6199
+ created_by?: string | null;
5659
6200
  customer_id: string;
5660
- discount_type: string;
5661
- discount_value: number;
5662
6201
  id?: string;
5663
- min_quantity?: number;
5664
- notes?: string | null;
5665
- product_category_id?: string | null;
5666
- product_id?: string | null;
6202
+ note_type?: string;
5667
6203
  updated_at?: string;
5668
- valid_from?: string | null;
5669
- valid_until?: string | null;
5670
6204
  };
5671
6205
  Update: {
6206
+ body?: string;
5672
6207
  created_at?: string;
5673
- currency?: string;
6208
+ created_by?: string | null;
6209
+ customer_id?: string;
6210
+ id?: string;
6211
+ note_type?: string;
6212
+ updated_at?: string;
6213
+ };
6214
+ Relationships: [{
6215
+ foreignKeyName: "itk_customer_notes_customer_id_fkey";
6216
+ columns: ["customer_id"];
6217
+ isOneToOne: false;
6218
+ referencedRelation: "itk_customers";
6219
+ referencedColumns: ["id"];
6220
+ }];
6221
+ };
6222
+ itk_customers: {
6223
+ Row: {
6224
+ billing_city: string | null;
6225
+ billing_postcode: string | null;
6226
+ billing_street: string | null;
6227
+ created_at: string;
6228
+ general_email: string | null;
6229
+ general_phone: string | null;
6230
+ id: string;
6231
+ legacy_customer_id: string | null;
6232
+ name: string;
6233
+ segment: import("../integrations/supabase/types").Database["public"]["Enums"]["itk_customer_segment"];
6234
+ updated_at: string;
6235
+ };
6236
+ Insert: {
6237
+ billing_city?: string | null;
6238
+ billing_postcode?: string | null;
6239
+ billing_street?: string | null;
6240
+ created_at?: string;
6241
+ general_email?: string | null;
6242
+ general_phone?: string | null;
6243
+ id?: string;
6244
+ legacy_customer_id?: string | null;
6245
+ name: string;
6246
+ segment?: import("../integrations/supabase/types").Database["public"]["Enums"]["itk_customer_segment"];
6247
+ updated_at?: string;
6248
+ };
6249
+ Update: {
6250
+ billing_city?: string | null;
6251
+ billing_postcode?: string | null;
6252
+ billing_street?: string | null;
6253
+ created_at?: string;
6254
+ general_email?: string | null;
6255
+ general_phone?: string | null;
6256
+ id?: string;
6257
+ legacy_customer_id?: string | null;
6258
+ name?: string;
6259
+ segment?: import("../integrations/supabase/types").Database["public"]["Enums"]["itk_customer_segment"];
6260
+ updated_at?: string;
6261
+ };
6262
+ Relationships: [{
6263
+ foreignKeyName: "itk_customers_legacy_customer_id_fkey";
6264
+ columns: ["legacy_customer_id"];
6265
+ isOneToOne: false;
6266
+ referencedRelation: "customers";
6267
+ referencedColumns: ["id"];
6268
+ }];
6269
+ };
6270
+ itk_dynamic_fields: {
6271
+ Row: {
6272
+ created_at: string;
6273
+ field_name: string;
6274
+ field_type: import("../integrations/supabase/types").Database["public"]["Enums"]["itk_dynamic_field_type"];
6275
+ id: string;
6276
+ options: import("../integrations/supabase/types").Json;
6277
+ sort_order: number;
6278
+ updated_at: string;
6279
+ };
6280
+ Insert: {
6281
+ created_at?: string;
6282
+ field_name: string;
6283
+ field_type?: import("../integrations/supabase/types").Database["public"]["Enums"]["itk_dynamic_field_type"];
6284
+ id?: string;
6285
+ options?: import("../integrations/supabase/types").Json;
6286
+ sort_order?: number;
6287
+ updated_at?: string;
6288
+ };
6289
+ Update: {
6290
+ created_at?: string;
6291
+ field_name?: string;
6292
+ field_type?: import("../integrations/supabase/types").Database["public"]["Enums"]["itk_dynamic_field_type"];
6293
+ id?: string;
6294
+ options?: import("../integrations/supabase/types").Json;
6295
+ sort_order?: number;
6296
+ updated_at?: string;
6297
+ };
6298
+ Relationships: [];
6299
+ };
6300
+ itk_work_locations: {
6301
+ Row: {
6302
+ city: string | null;
6303
+ created_at: string;
6304
+ customer_id: string;
6305
+ id: string;
6306
+ instructions: string | null;
6307
+ label: string;
6308
+ latitude: number | null;
6309
+ longitude: number | null;
6310
+ postcode: string | null;
6311
+ street: string | null;
6312
+ updated_at: string;
6313
+ };
6314
+ Insert: {
6315
+ city?: string | null;
6316
+ created_at?: string;
6317
+ customer_id: string;
6318
+ id?: string;
6319
+ instructions?: string | null;
6320
+ label: string;
6321
+ latitude?: number | null;
6322
+ longitude?: number | null;
6323
+ postcode?: string | null;
6324
+ street?: string | null;
6325
+ updated_at?: string;
6326
+ };
6327
+ Update: {
6328
+ city?: string | null;
6329
+ created_at?: string;
6330
+ customer_id?: string;
6331
+ id?: string;
6332
+ instructions?: string | null;
6333
+ label?: string;
6334
+ latitude?: number | null;
6335
+ longitude?: number | null;
6336
+ postcode?: string | null;
6337
+ street?: string | null;
6338
+ updated_at?: string;
6339
+ };
6340
+ Relationships: [{
6341
+ foreignKeyName: "itk_work_locations_customer_id_fkey";
6342
+ columns: ["customer_id"];
6343
+ isOneToOne: false;
6344
+ referencedRelation: "itk_customers";
6345
+ referencedColumns: ["id"];
6346
+ }];
6347
+ };
6348
+ leave_requests: {
6349
+ Row: {
6350
+ created_at: string;
6351
+ end_date: string;
6352
+ id: string;
6353
+ reason: string | null;
6354
+ start_date: string;
6355
+ status: string;
6356
+ tenant_id: string;
6357
+ updated_at: string;
6358
+ user_id: string;
6359
+ };
6360
+ Insert: {
6361
+ created_at?: string;
6362
+ end_date: string;
6363
+ id?: string;
6364
+ reason?: string | null;
6365
+ start_date: string;
6366
+ status?: string;
6367
+ tenant_id?: string;
6368
+ updated_at?: string;
6369
+ user_id: string;
6370
+ };
6371
+ Update: {
6372
+ created_at?: string;
6373
+ end_date?: string;
6374
+ id?: string;
6375
+ reason?: string | null;
6376
+ start_date?: string;
6377
+ status?: string;
6378
+ tenant_id?: string;
6379
+ updated_at?: string;
6380
+ user_id?: string;
6381
+ };
6382
+ Relationships: [{
6383
+ foreignKeyName: "leave_requests_user_id_fkey";
6384
+ columns: ["user_id"];
6385
+ isOneToOne: false;
6386
+ referencedRelation: "monteurs";
6387
+ referencedColumns: ["id"];
6388
+ }];
6389
+ };
6390
+ local_customer_agreements: {
6391
+ Row: {
6392
+ base_price: number | null;
6393
+ created_at: string;
6394
+ currency: string;
6395
+ customer_id: string;
6396
+ id: string;
6397
+ min_quantity: number;
6398
+ net_price: number;
6399
+ notes: string | null;
6400
+ product_category_id: string | null;
6401
+ product_id: string | null;
6402
+ updated_at: string;
6403
+ valid_from: string | null;
6404
+ valid_until: string | null;
6405
+ };
6406
+ Insert: {
6407
+ base_price?: number | null;
6408
+ created_at?: string;
6409
+ currency?: string;
6410
+ customer_id: string;
6411
+ id?: string;
6412
+ min_quantity?: number;
6413
+ net_price: number;
6414
+ notes?: string | null;
6415
+ product_category_id?: string | null;
6416
+ product_id?: string | null;
6417
+ updated_at?: string;
6418
+ valid_from?: string | null;
6419
+ valid_until?: string | null;
6420
+ };
6421
+ Update: {
6422
+ base_price?: number | null;
6423
+ created_at?: string;
6424
+ currency?: string;
6425
+ customer_id?: string;
6426
+ id?: string;
6427
+ min_quantity?: number;
6428
+ net_price?: number;
6429
+ notes?: string | null;
6430
+ product_category_id?: string | null;
6431
+ product_id?: string | null;
6432
+ updated_at?: string;
6433
+ valid_from?: string | null;
6434
+ valid_until?: string | null;
6435
+ };
6436
+ Relationships: [{
6437
+ foreignKeyName: "local_customer_agreements_customer_id_fkey";
6438
+ columns: ["customer_id"];
6439
+ isOneToOne: false;
6440
+ referencedRelation: "customers";
6441
+ referencedColumns: ["id"];
6442
+ }, {
6443
+ foreignKeyName: "local_customer_agreements_product_category_id_fkey";
6444
+ columns: ["product_category_id"];
6445
+ isOneToOne: false;
6446
+ referencedRelation: "product_categories";
6447
+ referencedColumns: ["id"];
6448
+ }, {
6449
+ foreignKeyName: "local_customer_agreements_product_id_fkey";
6450
+ columns: ["product_id"];
6451
+ isOneToOne: false;
6452
+ referencedRelation: "products";
6453
+ referencedColumns: ["id"];
6454
+ }];
6455
+ };
6456
+ local_customer_price_groups: {
6457
+ Row: {
6458
+ created_at: string;
6459
+ currency: string;
6460
+ customer_id: string;
6461
+ discount_type: string;
6462
+ discount_value: number;
6463
+ id: string;
6464
+ min_quantity: number;
6465
+ notes: string | null;
6466
+ product_category_id: string | null;
6467
+ product_id: string | null;
6468
+ updated_at: string;
6469
+ valid_from: string | null;
6470
+ valid_until: string | null;
6471
+ };
6472
+ Insert: {
6473
+ created_at?: string;
6474
+ currency?: string;
6475
+ customer_id: string;
6476
+ discount_type: string;
6477
+ discount_value: number;
6478
+ id?: string;
6479
+ min_quantity?: number;
6480
+ notes?: string | null;
6481
+ product_category_id?: string | null;
6482
+ product_id?: string | null;
6483
+ updated_at?: string;
6484
+ valid_from?: string | null;
6485
+ valid_until?: string | null;
6486
+ };
6487
+ Update: {
6488
+ created_at?: string;
6489
+ currency?: string;
6490
+ customer_id?: string;
6491
+ discount_type?: string;
6492
+ discount_value?: number;
6493
+ id?: string;
6494
+ min_quantity?: number;
6495
+ notes?: string | null;
6496
+ product_category_id?: string | null;
6497
+ product_id?: string | null;
6498
+ updated_at?: string;
6499
+ valid_from?: string | null;
6500
+ valid_until?: string | null;
6501
+ };
6502
+ Relationships: [{
6503
+ foreignKeyName: "local_customer_price_groups_customer_id_fkey";
6504
+ columns: ["customer_id"];
6505
+ isOneToOne: false;
6506
+ referencedRelation: "customers";
6507
+ referencedColumns: ["id"];
6508
+ }, {
6509
+ foreignKeyName: "local_customer_price_groups_product_category_id_fkey";
6510
+ columns: ["product_category_id"];
6511
+ isOneToOne: false;
6512
+ referencedRelation: "product_categories";
6513
+ referencedColumns: ["id"];
6514
+ }, {
6515
+ foreignKeyName: "local_customer_price_groups_product_id_fkey";
6516
+ columns: ["product_id"];
6517
+ isOneToOne: false;
6518
+ referencedRelation: "products";
6519
+ referencedColumns: ["id"];
6520
+ }];
6521
+ };
6522
+ local_customer_sales_strategies: {
6523
+ Row: {
6524
+ created_at: string;
6525
+ currency: string;
6526
+ customer_id: string;
6527
+ discount_type: string;
6528
+ discount_value: number;
6529
+ id: string;
6530
+ min_quantity: number;
6531
+ notes: string | null;
6532
+ product_category_id: string | null;
6533
+ product_id: string | null;
6534
+ updated_at: string;
6535
+ valid_from: string | null;
6536
+ valid_until: string | null;
6537
+ };
6538
+ Insert: {
6539
+ created_at?: string;
6540
+ currency?: string;
6541
+ customer_id: string;
6542
+ discount_type: string;
6543
+ discount_value: number;
6544
+ id?: string;
6545
+ min_quantity?: number;
6546
+ notes?: string | null;
6547
+ product_category_id?: string | null;
6548
+ product_id?: string | null;
6549
+ updated_at?: string;
6550
+ valid_from?: string | null;
6551
+ valid_until?: string | null;
6552
+ };
6553
+ Update: {
6554
+ created_at?: string;
6555
+ currency?: string;
5674
6556
  customer_id?: string;
5675
6557
  discount_type?: string;
5676
6558
  discount_value?: number;
@@ -5699,31 +6581,310 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
5699
6581
  foreignKeyName: "local_customer_sales_strategies_product_id_fkey";
5700
6582
  columns: ["product_id"];
5701
6583
  isOneToOne: false;
5702
- referencedRelation: "products";
6584
+ referencedRelation: "products";
6585
+ referencedColumns: ["id"];
6586
+ }];
6587
+ };
6588
+ locations: {
6589
+ Row: {
6590
+ created_at: string;
6591
+ id: string;
6592
+ name: string;
6593
+ sort_order: number;
6594
+ updated_at: string;
6595
+ };
6596
+ Insert: {
6597
+ created_at?: string;
6598
+ id?: string;
6599
+ name: string;
6600
+ sort_order?: number;
6601
+ updated_at?: string;
6602
+ };
6603
+ Update: {
6604
+ created_at?: string;
6605
+ id?: string;
6606
+ name?: string;
6607
+ sort_order?: number;
6608
+ updated_at?: string;
6609
+ };
6610
+ Relationships: [];
6611
+ };
6612
+ logistics_capacity_events: {
6613
+ Row: {
6614
+ available_carts: number;
6615
+ created_at: string;
6616
+ id: string;
6617
+ measures: import("../integrations/supabase/types").Json;
6618
+ note: string | null;
6619
+ outcome: string;
6620
+ required_carts: number;
6621
+ reserve_minutes: number;
6622
+ shortage_carts: number;
6623
+ status: string;
6624
+ user_id: string;
6625
+ };
6626
+ Insert: {
6627
+ available_carts?: number;
6628
+ created_at?: string;
6629
+ id?: string;
6630
+ measures?: import("../integrations/supabase/types").Json;
6631
+ note?: string | null;
6632
+ outcome?: string;
6633
+ required_carts?: number;
6634
+ reserve_minutes?: number;
6635
+ shortage_carts?: number;
6636
+ status: string;
6637
+ user_id: string;
6638
+ };
6639
+ Update: {
6640
+ available_carts?: number;
6641
+ created_at?: string;
6642
+ id?: string;
6643
+ measures?: import("../integrations/supabase/types").Json;
6644
+ note?: string | null;
6645
+ outcome?: string;
6646
+ required_carts?: number;
6647
+ reserve_minutes?: number;
6648
+ shortage_carts?: number;
6649
+ status?: string;
6650
+ user_id?: string;
6651
+ };
6652
+ Relationships: [];
6653
+ };
6654
+ logistics_capacity_settings: {
6655
+ Row: {
6656
+ created_at: string;
6657
+ settings: import("../integrations/supabase/types").Json;
6658
+ updated_at: string;
6659
+ user_id: string;
6660
+ };
6661
+ Insert: {
6662
+ created_at?: string;
6663
+ settings?: import("../integrations/supabase/types").Json;
6664
+ updated_at?: string;
6665
+ user_id: string;
6666
+ };
6667
+ Update: {
6668
+ created_at?: string;
6669
+ settings?: import("../integrations/supabase/types").Json;
6670
+ updated_at?: string;
6671
+ user_id?: string;
6672
+ };
6673
+ Relationships: [];
6674
+ };
6675
+ logistics_decisions: {
6676
+ Row: {
6677
+ created_at: string;
6678
+ explanation: string | null;
6679
+ id: string;
6680
+ input_snapshot: import("../integrations/supabase/types").Json;
6681
+ result: import("../integrations/supabase/types").Json;
6682
+ slot: string;
6683
+ strategy_id: string | null;
6684
+ subject_id: string;
6685
+ subject_type: string;
6686
+ user_id: string;
6687
+ };
6688
+ Insert: {
6689
+ created_at?: string;
6690
+ explanation?: string | null;
6691
+ id?: string;
6692
+ input_snapshot?: import("../integrations/supabase/types").Json;
6693
+ result?: import("../integrations/supabase/types").Json;
6694
+ slot: string;
6695
+ strategy_id?: string | null;
6696
+ subject_id: string;
6697
+ subject_type: string;
6698
+ user_id: string;
6699
+ };
6700
+ Update: {
6701
+ created_at?: string;
6702
+ explanation?: string | null;
6703
+ id?: string;
6704
+ input_snapshot?: import("../integrations/supabase/types").Json;
6705
+ result?: import("../integrations/supabase/types").Json;
6706
+ slot?: string;
6707
+ strategy_id?: string | null;
6708
+ subject_id?: string;
6709
+ subject_type?: string;
6710
+ user_id?: string;
6711
+ };
6712
+ Relationships: [{
6713
+ foreignKeyName: "logistics_decisions_strategy_id_fkey";
6714
+ columns: ["strategy_id"];
6715
+ isOneToOne: false;
6716
+ referencedRelation: "logistics_strategies";
6717
+ referencedColumns: ["id"];
6718
+ }];
6719
+ };
6720
+ logistics_formulas: {
6721
+ Row: {
6722
+ created_at: string;
6723
+ expression: string;
6724
+ id: string;
6725
+ notes: string | null;
6726
+ slot: string;
6727
+ strategy_id: string;
6728
+ updated_at: string;
6729
+ user_id: string;
6730
+ version: number;
6731
+ };
6732
+ Insert: {
6733
+ created_at?: string;
6734
+ expression?: string;
6735
+ id?: string;
6736
+ notes?: string | null;
6737
+ slot: string;
6738
+ strategy_id: string;
6739
+ updated_at?: string;
6740
+ user_id: string;
6741
+ version?: number;
6742
+ };
6743
+ Update: {
6744
+ created_at?: string;
6745
+ expression?: string;
6746
+ id?: string;
6747
+ notes?: string | null;
6748
+ slot?: string;
6749
+ strategy_id?: string;
6750
+ updated_at?: string;
6751
+ user_id?: string;
6752
+ version?: number;
6753
+ };
6754
+ Relationships: [{
6755
+ foreignKeyName: "logistics_formulas_strategy_id_fkey";
6756
+ columns: ["strategy_id"];
6757
+ isOneToOne: false;
6758
+ referencedRelation: "logistics_strategies";
6759
+ referencedColumns: ["id"];
6760
+ }];
6761
+ };
6762
+ logistics_strategies: {
6763
+ Row: {
6764
+ color: string;
6765
+ created_at: string;
6766
+ description: string | null;
6767
+ id: string;
6768
+ is_active: boolean;
6769
+ name: string;
6770
+ priority: number;
6771
+ updated_at: string;
6772
+ updated_by: string | null;
6773
+ user_id: string;
6774
+ version: number;
6775
+ };
6776
+ Insert: {
6777
+ color?: string;
6778
+ created_at?: string;
6779
+ description?: string | null;
6780
+ id?: string;
6781
+ is_active?: boolean;
6782
+ name: string;
6783
+ priority?: number;
6784
+ updated_at?: string;
6785
+ updated_by?: string | null;
6786
+ user_id: string;
6787
+ version?: number;
6788
+ };
6789
+ Update: {
6790
+ color?: string;
6791
+ created_at?: string;
6792
+ description?: string | null;
6793
+ id?: string;
6794
+ is_active?: boolean;
6795
+ name?: string;
6796
+ priority?: number;
6797
+ updated_at?: string;
6798
+ updated_by?: string | null;
6799
+ user_id?: string;
6800
+ version?: number;
6801
+ };
6802
+ Relationships: [];
6803
+ };
6804
+ logistics_strategy_schedules: {
6805
+ Row: {
6806
+ condition_expression: string | null;
6807
+ created_at: string;
6808
+ end_date: string | null;
6809
+ id: string;
6810
+ is_enabled: boolean;
6811
+ priority: number;
6812
+ rule_type: string;
6813
+ start_date: string | null;
6814
+ strategy_id: string;
6815
+ updated_at: string;
6816
+ user_id: string;
6817
+ };
6818
+ Insert: {
6819
+ condition_expression?: string | null;
6820
+ created_at?: string;
6821
+ end_date?: string | null;
6822
+ id?: string;
6823
+ is_enabled?: boolean;
6824
+ priority?: number;
6825
+ rule_type: string;
6826
+ start_date?: string | null;
6827
+ strategy_id: string;
6828
+ updated_at?: string;
6829
+ user_id: string;
6830
+ };
6831
+ Update: {
6832
+ condition_expression?: string | null;
6833
+ created_at?: string;
6834
+ end_date?: string | null;
6835
+ id?: string;
6836
+ is_enabled?: boolean;
6837
+ priority?: number;
6838
+ rule_type?: string;
6839
+ start_date?: string | null;
6840
+ strategy_id?: string;
6841
+ updated_at?: string;
6842
+ user_id?: string;
6843
+ };
6844
+ Relationships: [{
6845
+ foreignKeyName: "logistics_strategy_schedules_strategy_id_fkey";
6846
+ columns: ["strategy_id"];
6847
+ isOneToOne: false;
6848
+ referencedRelation: "logistics_strategies";
5703
6849
  referencedColumns: ["id"];
5704
6850
  }];
5705
6851
  };
5706
- locations: {
6852
+ logistics_variables: {
5707
6853
  Row: {
5708
6854
  created_at: string;
6855
+ default_value: string | null;
6856
+ description: string | null;
5709
6857
  id: string;
5710
- name: string;
5711
- sort_order: number;
6858
+ is_builtin: boolean;
6859
+ key: string;
6860
+ label: string;
5712
6861
  updated_at: string;
6862
+ user_id: string;
6863
+ value_type: string;
5713
6864
  };
5714
6865
  Insert: {
5715
6866
  created_at?: string;
6867
+ default_value?: string | null;
6868
+ description?: string | null;
5716
6869
  id?: string;
5717
- name: string;
5718
- sort_order?: number;
6870
+ is_builtin?: boolean;
6871
+ key: string;
6872
+ label: string;
5719
6873
  updated_at?: string;
6874
+ user_id: string;
6875
+ value_type: string;
5720
6876
  };
5721
6877
  Update: {
5722
6878
  created_at?: string;
6879
+ default_value?: string | null;
6880
+ description?: string | null;
5723
6881
  id?: string;
5724
- name?: string;
5725
- sort_order?: number;
6882
+ is_builtin?: boolean;
6883
+ key?: string;
6884
+ label?: string;
5726
6885
  updated_at?: string;
6886
+ user_id?: string;
6887
+ value_type?: string;
5727
6888
  };
5728
6889
  Relationships: [];
5729
6890
  };
@@ -6122,60 +7283,66 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
6122
7283
  };
6123
7284
  manufacture_products: {
6124
7285
  Row: {
6125
- aantal_te_produceren: number;
6126
7286
  created_at: string;
6127
7287
  description: string | null;
6128
7288
  id: string;
6129
7289
  is_active: boolean;
6130
- location_id: string | null;
6131
7290
  name: string;
6132
- partij_nummer: string | null;
6133
- photos: import("../integrations/supabase/types").Json;
6134
7291
  produced_stock: number;
6135
7292
  product_code: string;
6136
7293
  tenant_id: string;
6137
- unit: string;
6138
7294
  updated_at: string;
6139
7295
  };
6140
7296
  Insert: {
6141
- aantal_te_produceren?: number;
6142
7297
  created_at?: string;
6143
7298
  description?: string | null;
6144
7299
  id?: string;
6145
7300
  is_active?: boolean;
6146
- location_id?: string | null;
6147
7301
  name: string;
6148
- partij_nummer?: string | null;
6149
- photos?: import("../integrations/supabase/types").Json;
6150
7302
  produced_stock?: number;
6151
7303
  product_code: string;
6152
7304
  tenant_id: string;
6153
- unit?: string;
6154
7305
  updated_at?: string;
6155
7306
  };
6156
7307
  Update: {
6157
- aantal_te_produceren?: number;
6158
7308
  created_at?: string;
6159
7309
  description?: string | null;
6160
7310
  id?: string;
6161
7311
  is_active?: boolean;
6162
- location_id?: string | null;
6163
7312
  name?: string;
6164
- partij_nummer?: string | null;
6165
- photos?: import("../integrations/supabase/types").Json;
6166
7313
  produced_stock?: number;
6167
7314
  product_code?: string;
6168
7315
  tenant_id?: string;
6169
- unit?: string;
6170
7316
  updated_at?: string;
6171
7317
  };
6172
- Relationships: [{
6173
- foreignKeyName: "manufacture_products_location_id_fkey";
6174
- columns: ["location_id"];
6175
- isOneToOne: false;
6176
- referencedRelation: "locations";
6177
- referencedColumns: ["id"];
6178
- }];
7318
+ Relationships: [];
7319
+ };
7320
+ module_permissions: {
7321
+ Row: {
7322
+ created_at: string;
7323
+ id: string;
7324
+ module_id: string;
7325
+ permission: string;
7326
+ role: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
7327
+ updated_at: string;
7328
+ };
7329
+ Insert: {
7330
+ created_at?: string;
7331
+ id?: string;
7332
+ module_id: string;
7333
+ permission: string;
7334
+ role: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
7335
+ updated_at?: string;
7336
+ };
7337
+ Update: {
7338
+ created_at?: string;
7339
+ id?: string;
7340
+ module_id?: string;
7341
+ permission?: string;
7342
+ role?: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
7343
+ updated_at?: string;
7344
+ };
7345
+ Relationships: [];
6179
7346
  };
6180
7347
  monteurs: {
6181
7348
  Row: {
@@ -6906,6 +8073,42 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
6906
8073
  };
6907
8074
  Relationships: [];
6908
8075
  };
8076
+ order_buffers: {
8077
+ Row: {
8078
+ buffer_key: string;
8079
+ created_at: string;
8080
+ customer_id: string | null;
8081
+ grouping_mode: string;
8082
+ id: string;
8083
+ pickup_date: string | null;
8084
+ pickup_location: string | null;
8085
+ plan_locked_at: string | null;
8086
+ updated_at: string;
8087
+ };
8088
+ Insert: {
8089
+ buffer_key: string;
8090
+ created_at?: string;
8091
+ customer_id?: string | null;
8092
+ grouping_mode: string;
8093
+ id?: string;
8094
+ pickup_date?: string | null;
8095
+ pickup_location?: string | null;
8096
+ plan_locked_at?: string | null;
8097
+ updated_at?: string;
8098
+ };
8099
+ Update: {
8100
+ buffer_key?: string;
8101
+ created_at?: string;
8102
+ customer_id?: string | null;
8103
+ grouping_mode?: string;
8104
+ id?: string;
8105
+ pickup_date?: string | null;
8106
+ pickup_location?: string | null;
8107
+ plan_locked_at?: string | null;
8108
+ updated_at?: string;
8109
+ };
8110
+ Relationships: [];
8111
+ };
6909
8112
  order_cart_items: {
6910
8113
  Row: {
6911
8114
  cart_id: string;
@@ -6972,6 +8175,7 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
6972
8175
  order_carts: {
6973
8176
  Row: {
6974
8177
  algorithm_version: number;
8178
+ buffer_id: string | null;
6975
8179
  cart_number: number;
6976
8180
  created_at: string;
6977
8181
  id: string;
@@ -6979,13 +8183,14 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
6979
8183
  is_complete: boolean;
6980
8184
  notes: string | null;
6981
8185
  occupancy_pct: number;
6982
- order_id: string;
8186
+ order_id: string | null;
6983
8187
  source: string;
6984
8188
  total_layers_used: number;
6985
8189
  updated_at: string;
6986
8190
  };
6987
8191
  Insert: {
6988
8192
  algorithm_version?: number;
8193
+ buffer_id?: string | null;
6989
8194
  cart_number: number;
6990
8195
  created_at?: string;
6991
8196
  id?: string;
@@ -6993,13 +8198,14 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
6993
8198
  is_complete?: boolean;
6994
8199
  notes?: string | null;
6995
8200
  occupancy_pct?: number;
6996
- order_id: string;
8201
+ order_id?: string | null;
6997
8202
  source?: string;
6998
8203
  total_layers_used?: number;
6999
8204
  updated_at?: string;
7000
8205
  };
7001
8206
  Update: {
7002
8207
  algorithm_version?: number;
8208
+ buffer_id?: string | null;
7003
8209
  cart_number?: number;
7004
8210
  created_at?: string;
7005
8211
  id?: string;
@@ -7007,12 +8213,18 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
7007
8213
  is_complete?: boolean;
7008
8214
  notes?: string | null;
7009
8215
  occupancy_pct?: number;
7010
- order_id?: string;
8216
+ order_id?: string | null;
7011
8217
  source?: string;
7012
8218
  total_layers_used?: number;
7013
8219
  updated_at?: string;
7014
8220
  };
7015
8221
  Relationships: [{
8222
+ foreignKeyName: "order_carts_buffer_id_fkey";
8223
+ columns: ["buffer_id"];
8224
+ isOneToOne: false;
8225
+ referencedRelation: "order_buffers";
8226
+ referencedColumns: ["id"];
8227
+ }, {
7016
8228
  foreignKeyName: "order_carts_order_id_fkey";
7017
8229
  columns: ["order_id"];
7018
8230
  isOneToOne: false;
@@ -7250,12 +8462,14 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
7250
8462
  };
7251
8463
  orders: {
7252
8464
  Row: {
8465
+ buffer_id: string | null;
7253
8466
  created_at: string;
7254
8467
  custom_fields: import("../integrations/supabase/types").Json;
7255
8468
  customer_id: string | null;
7256
8469
  customer_name: string;
7257
8470
  deleted_at: string | null;
7258
8471
  delivery_date: string | null;
8472
+ floriday_sales_order_id: string | null;
7259
8473
  id: string;
7260
8474
  is_reservation: boolean;
7261
8475
  notes: string | null;
@@ -7269,12 +8483,14 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
7269
8483
  updated_at: string;
7270
8484
  };
7271
8485
  Insert: {
8486
+ buffer_id?: string | null;
7272
8487
  created_at?: string;
7273
8488
  custom_fields?: import("../integrations/supabase/types").Json;
7274
8489
  customer_id?: string | null;
7275
8490
  customer_name?: string;
7276
8491
  deleted_at?: string | null;
7277
8492
  delivery_date?: string | null;
8493
+ floriday_sales_order_id?: string | null;
7278
8494
  id?: string;
7279
8495
  is_reservation?: boolean;
7280
8496
  notes?: string | null;
@@ -7288,12 +8504,14 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
7288
8504
  updated_at?: string;
7289
8505
  };
7290
8506
  Update: {
8507
+ buffer_id?: string | null;
7291
8508
  created_at?: string;
7292
8509
  custom_fields?: import("../integrations/supabase/types").Json;
7293
8510
  customer_id?: string | null;
7294
8511
  customer_name?: string;
7295
8512
  deleted_at?: string | null;
7296
8513
  delivery_date?: string | null;
8514
+ floriday_sales_order_id?: string | null;
7297
8515
  id?: string;
7298
8516
  is_reservation?: boolean;
7299
8517
  notes?: string | null;
@@ -7307,6 +8525,12 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
7307
8525
  updated_at?: string;
7308
8526
  };
7309
8527
  Relationships: [{
8528
+ foreignKeyName: "orders_buffer_id_fkey";
8529
+ columns: ["buffer_id"];
8530
+ isOneToOne: false;
8531
+ referencedRelation: "order_buffers";
8532
+ referencedColumns: ["id"];
8533
+ }, {
7310
8534
  foreignKeyName: "orders_customer_id_fkey";
7311
8535
  columns: ["customer_id"];
7312
8536
  isOneToOne: false;
@@ -7437,6 +8661,78 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
7437
8661
  };
7438
8662
  Relationships: [];
7439
8663
  };
8664
+ planning_item_assistants: {
8665
+ Row: {
8666
+ created_at: string;
8667
+ created_by: string | null;
8668
+ monteur_id: string;
8669
+ planning_item_id: string;
8670
+ };
8671
+ Insert: {
8672
+ created_at?: string;
8673
+ created_by?: string | null;
8674
+ monteur_id: string;
8675
+ planning_item_id: string;
8676
+ };
8677
+ Update: {
8678
+ created_at?: string;
8679
+ created_by?: string | null;
8680
+ monteur_id?: string;
8681
+ planning_item_id?: string;
8682
+ };
8683
+ Relationships: [{
8684
+ foreignKeyName: "planning_item_assistants_planning_item_id_fkey";
8685
+ columns: ["planning_item_id"];
8686
+ isOneToOne: false;
8687
+ referencedRelation: "planning_items";
8688
+ referencedColumns: ["id"];
8689
+ }];
8690
+ };
8691
+ planning_items: {
8692
+ Row: {
8693
+ assigned_monteur_id: string;
8694
+ created_at: string;
8695
+ created_by: string | null;
8696
+ end_at: string;
8697
+ id: string;
8698
+ notes: string | null;
8699
+ start_at: string;
8700
+ status: import("../integrations/supabase/types").Database["public"]["Enums"]["planning_item_status"];
8701
+ updated_at: string;
8702
+ werkbon_id: string;
8703
+ };
8704
+ Insert: {
8705
+ assigned_monteur_id: string;
8706
+ created_at?: string;
8707
+ created_by?: string | null;
8708
+ end_at: string;
8709
+ id?: string;
8710
+ notes?: string | null;
8711
+ start_at: string;
8712
+ status?: import("../integrations/supabase/types").Database["public"]["Enums"]["planning_item_status"];
8713
+ updated_at?: string;
8714
+ werkbon_id: string;
8715
+ };
8716
+ Update: {
8717
+ assigned_monteur_id?: string;
8718
+ created_at?: string;
8719
+ created_by?: string | null;
8720
+ end_at?: string;
8721
+ id?: string;
8722
+ notes?: string | null;
8723
+ start_at?: string;
8724
+ status?: import("../integrations/supabase/types").Database["public"]["Enums"]["planning_item_status"];
8725
+ updated_at?: string;
8726
+ werkbon_id?: string;
8727
+ };
8728
+ Relationships: [{
8729
+ foreignKeyName: "planning_items_werkbon_id_fkey";
8730
+ columns: ["werkbon_id"];
8731
+ isOneToOne: false;
8732
+ referencedRelation: "werkbonnen";
8733
+ referencedColumns: ["id"];
8734
+ }];
8735
+ };
7440
8736
  product_bom_items: {
7441
8737
  Row: {
7442
8738
  component_product_id: string | null;
@@ -7444,6 +8740,7 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
7444
8740
  created_at: string;
7445
8741
  id: string;
7446
8742
  notes: string | null;
8743
+ packing_configuration_id: string | null;
7447
8744
  parent_product_id: string | null;
7448
8745
  parent_trade_item_floriday_id: string | null;
7449
8746
  quantity: number;
@@ -7458,6 +8755,7 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
7458
8755
  created_at?: string;
7459
8756
  id?: string;
7460
8757
  notes?: string | null;
8758
+ packing_configuration_id?: string | null;
7461
8759
  parent_product_id?: string | null;
7462
8760
  parent_trade_item_floriday_id?: string | null;
7463
8761
  quantity?: number;
@@ -7472,6 +8770,7 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
7472
8770
  created_at?: string;
7473
8771
  id?: string;
7474
8772
  notes?: string | null;
8773
+ packing_configuration_id?: string | null;
7475
8774
  parent_product_id?: string | null;
7476
8775
  parent_trade_item_floriday_id?: string | null;
7477
8776
  quantity?: number;
@@ -7673,11 +8972,13 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
7673
8972
  created_at: string;
7674
8973
  id: string;
7675
8974
  is_package: boolean;
8975
+ label: string | null;
7676
8976
  layers_per_load_carrier: number | null;
7677
8977
  load_carrier: string | null;
7678
8978
  package_id: string | null;
7679
8979
  package_label: string | null;
7680
8980
  packages_per_layer: number | null;
8981
+ packing_configuration_id: string;
7681
8982
  product_id: string | null;
7682
8983
  tenant_id: string;
7683
8984
  trade_item_floriday_id: string | null;
@@ -7688,11 +8989,13 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
7688
8989
  created_at?: string;
7689
8990
  id?: string;
7690
8991
  is_package?: boolean;
8992
+ label?: string | null;
7691
8993
  layers_per_load_carrier?: number | null;
7692
8994
  load_carrier?: string | null;
7693
8995
  package_id?: string | null;
7694
8996
  package_label?: string | null;
7695
8997
  packages_per_layer?: number | null;
8998
+ packing_configuration_id?: string;
7696
8999
  product_id?: string | null;
7697
9000
  tenant_id: string;
7698
9001
  trade_item_floriday_id?: string | null;
@@ -7703,11 +9006,13 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
7703
9006
  created_at?: string;
7704
9007
  id?: string;
7705
9008
  is_package?: boolean;
9009
+ label?: string | null;
7706
9010
  layers_per_load_carrier?: number | null;
7707
9011
  load_carrier?: string | null;
7708
9012
  package_id?: string | null;
7709
9013
  package_label?: string | null;
7710
9014
  packages_per_layer?: number | null;
9015
+ packing_configuration_id?: string;
7711
9016
  product_id?: string | null;
7712
9017
  tenant_id?: string;
7713
9018
  trade_item_floriday_id?: string | null;
@@ -7769,8 +9074,6 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
7769
9074
  crates_per_layer: number;
7770
9075
  created_at: string;
7771
9076
  custom_fields: import("../integrations/supabase/types").Json;
7772
- floriday_active: boolean;
7773
- floriday_payload: import("../integrations/supabase/types").Json;
7774
9077
  floriday_trade_item_id: string | null;
7775
9078
  id: string;
7776
9079
  image_url: string | null;
@@ -7797,8 +9100,6 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
7797
9100
  crates_per_layer?: number;
7798
9101
  created_at?: string;
7799
9102
  custom_fields?: import("../integrations/supabase/types").Json;
7800
- floriday_active?: boolean;
7801
- floriday_payload?: import("../integrations/supabase/types").Json;
7802
9103
  floriday_trade_item_id?: string | null;
7803
9104
  id?: string;
7804
9105
  image_url?: string | null;
@@ -7825,8 +9126,6 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
7825
9126
  crates_per_layer?: number;
7826
9127
  created_at?: string;
7827
9128
  custom_fields?: import("../integrations/supabase/types").Json;
7828
- floriday_active?: boolean;
7829
- floriday_payload?: import("../integrations/supabase/types").Json;
7830
9129
  floriday_trade_item_id?: string | null;
7831
9130
  id?: string;
7832
9131
  image_url?: string | null;
@@ -7851,6 +9150,7 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
7851
9150
  profiles: {
7852
9151
  Row: {
7853
9152
  address: string | null;
9153
+ avatar_url: string | null;
7854
9154
  created_at: string;
7855
9155
  display_name: string | null;
7856
9156
  email: string | null;
@@ -7862,6 +9162,7 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
7862
9162
  };
7863
9163
  Insert: {
7864
9164
  address?: string | null;
9165
+ avatar_url?: string | null;
7865
9166
  created_at?: string;
7866
9167
  display_name?: string | null;
7867
9168
  email?: string | null;
@@ -7873,6 +9174,7 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
7873
9174
  };
7874
9175
  Update: {
7875
9176
  address?: string | null;
9177
+ avatar_url?: string | null;
7876
9178
  created_at?: string;
7877
9179
  display_name?: string | null;
7878
9180
  email?: string | null;
@@ -8737,7 +10039,6 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
8737
10039
  order_id: string | null;
8738
10040
  order_item_id: string | null;
8739
10041
  order_source: string | null;
8740
- parent_trade_item_key: string | null;
8741
10042
  physical_after: number | null;
8742
10043
  physical_before: number | null;
8743
10044
  production_batch_id: string | null;
@@ -8756,7 +10057,6 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
8756
10057
  order_id?: string | null;
8757
10058
  order_item_id?: string | null;
8758
10059
  order_source?: string | null;
8759
- parent_trade_item_key?: string | null;
8760
10060
  physical_after?: number | null;
8761
10061
  physical_before?: number | null;
8762
10062
  production_batch_id?: string | null;
@@ -8775,7 +10075,6 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
8775
10075
  order_id?: string | null;
8776
10076
  order_item_id?: string | null;
8777
10077
  order_source?: string | null;
8778
- parent_trade_item_key?: string | null;
8779
10078
  physical_after?: number | null;
8780
10079
  physical_before?: number | null;
8781
10080
  production_batch_id?: string | null;
@@ -8880,6 +10179,27 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
8880
10179
  };
8881
10180
  Relationships: [];
8882
10181
  };
10182
+ technician_rates: {
10183
+ Row: {
10184
+ created_at: string;
10185
+ hourly_rate_cents: number;
10186
+ updated_at: string;
10187
+ user_id: string;
10188
+ };
10189
+ Insert: {
10190
+ created_at?: string;
10191
+ hourly_rate_cents?: number;
10192
+ updated_at?: string;
10193
+ user_id: string;
10194
+ };
10195
+ Update: {
10196
+ created_at?: string;
10197
+ hourly_rate_cents?: number;
10198
+ updated_at?: string;
10199
+ user_id?: string;
10200
+ };
10201
+ Relationships: [];
10202
+ };
8883
10203
  tenants: {
8884
10204
  Row: {
8885
10205
  created_at: string;
@@ -9084,6 +10404,48 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
9084
10404
  };
9085
10405
  Relationships: [];
9086
10406
  };
10407
+ trade_item_prices: {
10408
+ Row: {
10409
+ created_at: string;
10410
+ currency: string;
10411
+ id: string;
10412
+ last_push_error: string | null;
10413
+ last_pushed_at: string | null;
10414
+ price_group_id: string | null;
10415
+ price_per_piece: number;
10416
+ supply_line_id: string | null;
10417
+ trade_item_key: string;
10418
+ updated_at: string;
10419
+ user_id: string;
10420
+ };
10421
+ Insert: {
10422
+ created_at?: string;
10423
+ currency?: string;
10424
+ id?: string;
10425
+ last_push_error?: string | null;
10426
+ last_pushed_at?: string | null;
10427
+ price_group_id?: string | null;
10428
+ price_per_piece: number;
10429
+ supply_line_id?: string | null;
10430
+ trade_item_key: string;
10431
+ updated_at?: string;
10432
+ user_id: string;
10433
+ };
10434
+ Update: {
10435
+ created_at?: string;
10436
+ currency?: string;
10437
+ id?: string;
10438
+ last_push_error?: string | null;
10439
+ last_pushed_at?: string | null;
10440
+ price_group_id?: string | null;
10441
+ price_per_piece?: number;
10442
+ supply_line_id?: string | null;
10443
+ trade_item_key?: string;
10444
+ updated_at?: string;
10445
+ user_id?: string;
10446
+ };
10447
+ Relationships: [];
10448
+ };
9087
10449
  trade_item_stock: {
9088
10450
  Row: {
9089
10451
  connection_id: string;
@@ -9237,7 +10599,7 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
9237
10599
  twinfield_connections: {
9238
10600
  Row: {
9239
10601
  access_token: string | null;
9240
- client_id: string | null;
10602
+ client_id: string;
9241
10603
  client_secret: string | null;
9242
10604
  cluster_uri: string | null;
9243
10605
  company_code: string | null;
@@ -9249,7 +10611,7 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
9249
10611
  is_active: boolean;
9250
10612
  label: string | null;
9251
10613
  office_code: string | null;
9252
- redirect_uri: string | null;
10614
+ redirect_uri: string;
9253
10615
  refresh_token: string | null;
9254
10616
  token_expires_at: string | null;
9255
10617
  updated_at: string;
@@ -9257,7 +10619,7 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
9257
10619
  };
9258
10620
  Insert: {
9259
10621
  access_token?: string | null;
9260
- client_id?: string | null;
10622
+ client_id: string;
9261
10623
  client_secret?: string | null;
9262
10624
  cluster_uri?: string | null;
9263
10625
  company_code?: string | null;
@@ -9269,7 +10631,7 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
9269
10631
  is_active?: boolean;
9270
10632
  label?: string | null;
9271
10633
  office_code?: string | null;
9272
- redirect_uri?: string | null;
10634
+ redirect_uri: string;
9273
10635
  refresh_token?: string | null;
9274
10636
  token_expires_at?: string | null;
9275
10637
  updated_at?: string;
@@ -9277,7 +10639,7 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
9277
10639
  };
9278
10640
  Update: {
9279
10641
  access_token?: string | null;
9280
- client_id?: string | null;
10642
+ client_id?: string;
9281
10643
  client_secret?: string | null;
9282
10644
  cluster_uri?: string | null;
9283
10645
  company_code?: string | null;
@@ -9289,7 +10651,7 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
9289
10651
  is_active?: boolean;
9290
10652
  label?: string | null;
9291
10653
  office_code?: string | null;
9292
- redirect_uri?: string | null;
10654
+ redirect_uri?: string;
9293
10655
  refresh_token?: string | null;
9294
10656
  token_expires_at?: string | null;
9295
10657
  updated_at?: string;
@@ -9349,6 +10711,7 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
9349
10711
  country: string | null;
9350
10712
  created_at: string;
9351
10713
  email: string | null;
10714
+ external_group_key: string | null;
9352
10715
  id: string;
9353
10716
  last_synced_at: string | null;
9354
10717
  name: string;
@@ -9367,6 +10730,7 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
9367
10730
  country?: string | null;
9368
10731
  created_at?: string;
9369
10732
  email?: string | null;
10733
+ external_group_key?: string | null;
9370
10734
  id?: string;
9371
10735
  last_synced_at?: string | null;
9372
10736
  name: string;
@@ -9385,6 +10749,7 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
9385
10749
  country?: string | null;
9386
10750
  created_at?: string;
9387
10751
  email?: string | null;
10752
+ external_group_key?: string | null;
9388
10753
  id?: string;
9389
10754
  last_synced_at?: string | null;
9390
10755
  name?: string;
@@ -9511,35 +10876,80 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
9511
10876
  vat_rate: number | null;
9512
10877
  };
9513
10878
  Insert: {
9514
- article_code?: string | null;
10879
+ article_code?: string | null;
10880
+ connection_id: string;
10881
+ data?: import("../integrations/supabase/types").Json;
10882
+ description?: string | null;
10883
+ fetched_at?: string;
10884
+ invoice_number: string;
10885
+ line_number: number;
10886
+ line_total?: number | null;
10887
+ quantity?: number | null;
10888
+ unit_price?: number | null;
10889
+ vat_code?: string | null;
10890
+ vat_rate?: number | null;
10891
+ };
10892
+ Update: {
10893
+ article_code?: string | null;
10894
+ connection_id?: string;
10895
+ data?: import("../integrations/supabase/types").Json;
10896
+ description?: string | null;
10897
+ fetched_at?: string;
10898
+ invoice_number?: string;
10899
+ line_number?: number;
10900
+ line_total?: number | null;
10901
+ quantity?: number | null;
10902
+ unit_price?: number | null;
10903
+ vat_code?: string | null;
10904
+ vat_rate?: number | null;
10905
+ };
10906
+ Relationships: [{
10907
+ foreignKeyName: "twinfield_invoice_lines_cache_v2_connection_id_fkey";
10908
+ columns: ["connection_id"];
10909
+ isOneToOne: false;
10910
+ referencedRelation: "twinfield_connections";
10911
+ referencedColumns: ["id"];
10912
+ }];
10913
+ };
10914
+ twinfield_invoice_pdf_cache: {
10915
+ Row: {
10916
+ connection_id: string;
10917
+ created_at: string;
10918
+ fetched_at: string;
10919
+ id: string;
10920
+ invoice_number: string;
10921
+ last_accessed_at: string;
10922
+ object_path: string;
10923
+ office_code: string;
10924
+ size_bytes: number;
10925
+ updated_at: string;
10926
+ };
10927
+ Insert: {
9515
10928
  connection_id: string;
9516
- data?: import("../integrations/supabase/types").Json;
9517
- description?: string | null;
10929
+ created_at?: string;
9518
10930
  fetched_at?: string;
10931
+ id?: string;
9519
10932
  invoice_number: string;
9520
- line_number: number;
9521
- line_total?: number | null;
9522
- quantity?: number | null;
9523
- unit_price?: number | null;
9524
- vat_code?: string | null;
9525
- vat_rate?: number | null;
10933
+ last_accessed_at?: string;
10934
+ object_path: string;
10935
+ office_code: string;
10936
+ size_bytes?: number;
10937
+ updated_at?: string;
9526
10938
  };
9527
10939
  Update: {
9528
- article_code?: string | null;
9529
10940
  connection_id?: string;
9530
- data?: import("../integrations/supabase/types").Json;
9531
- description?: string | null;
10941
+ created_at?: string;
9532
10942
  fetched_at?: string;
10943
+ id?: string;
9533
10944
  invoice_number?: string;
9534
- line_number?: number;
9535
- line_total?: number | null;
9536
- quantity?: number | null;
9537
- unit_price?: number | null;
9538
- vat_code?: string | null;
9539
- vat_rate?: number | null;
10945
+ last_accessed_at?: string;
10946
+ object_path?: string;
10947
+ office_code?: string;
10948
+ size_bytes?: number;
10949
+ updated_at?: string;
9540
10950
  };
9541
10951
  Relationships: [{
9542
- foreignKeyName: "twinfield_invoice_lines_cache_v2_connection_id_fkey";
10952
+ foreignKeyName: "twinfield_invoice_pdf_cache_connection_id_fkey";
9543
10953
  columns: ["connection_id"];
9544
10954
  isOneToOne: false;
9545
10955
  referencedRelation: "twinfield_connections";
@@ -9549,6 +10959,8 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
9549
10959
  twinfield_invoice_settings: {
9550
10960
  Row: {
9551
10961
  created_at: string;
10962
+ debtor_gl_account: string;
10963
+ default_credit_invoice_type: string | null;
9552
10964
  default_gl_account: string;
9553
10965
  default_invoice_type: string;
9554
10966
  default_payment_term_days: number;
@@ -9557,11 +10969,15 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
9557
10969
  invoice_enabled_fo: boolean;
9558
10970
  invoice_enabled_ho: boolean;
9559
10971
  invoice_enabled_mo: boolean;
10972
+ payment_gl_account: string;
10973
+ payment_journal_code: string;
9560
10974
  updated_at: string;
9561
10975
  user_id: string;
9562
10976
  };
9563
10977
  Insert: {
9564
10978
  created_at?: string;
10979
+ debtor_gl_account?: string;
10980
+ default_credit_invoice_type?: string | null;
9565
10981
  default_gl_account?: string;
9566
10982
  default_invoice_type?: string;
9567
10983
  default_payment_term_days?: number;
@@ -9570,11 +10986,15 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
9570
10986
  invoice_enabled_fo?: boolean;
9571
10987
  invoice_enabled_ho?: boolean;
9572
10988
  invoice_enabled_mo?: boolean;
10989
+ payment_gl_account?: string;
10990
+ payment_journal_code?: string;
9573
10991
  updated_at?: string;
9574
10992
  user_id: string;
9575
10993
  };
9576
10994
  Update: {
9577
10995
  created_at?: string;
10996
+ debtor_gl_account?: string;
10997
+ default_credit_invoice_type?: string | null;
9578
10998
  default_gl_account?: string;
9579
10999
  default_invoice_type?: string;
9580
11000
  default_payment_term_days?: number;
@@ -9583,6 +11003,8 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
9583
11003
  invoice_enabled_fo?: boolean;
9584
11004
  invoice_enabled_ho?: boolean;
9585
11005
  invoice_enabled_mo?: boolean;
11006
+ payment_gl_account?: string;
11007
+ payment_journal_code?: string;
9586
11008
  updated_at?: string;
9587
11009
  user_id?: string;
9588
11010
  };
@@ -9803,43 +11225,49 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
9803
11225
  };
9804
11226
  twinfield_push_queue: {
9805
11227
  Row: {
11228
+ action: string;
9806
11229
  attempts: number;
9807
11230
  connection_id: string;
9808
11231
  created_at: string;
11232
+ customer_id: string | null;
9809
11233
  external_id: string | null;
9810
11234
  id: string;
9811
11235
  idempotency_key: string;
9812
11236
  last_error: string | null;
9813
11237
  next_attempt_at: string;
9814
- office_code: string;
11238
+ office_code: string | null;
9815
11239
  payload: import("../integrations/supabase/types").Json;
9816
11240
  status: string;
9817
11241
  updated_at: string;
9818
11242
  };
9819
11243
  Insert: {
11244
+ action?: string;
9820
11245
  attempts?: number;
9821
11246
  connection_id: string;
9822
11247
  created_at?: string;
11248
+ customer_id?: string | null;
9823
11249
  external_id?: string | null;
9824
11250
  id?: string;
9825
11251
  idempotency_key: string;
9826
11252
  last_error?: string | null;
9827
11253
  next_attempt_at?: string;
9828
- office_code: string;
11254
+ office_code?: string | null;
9829
11255
  payload: import("../integrations/supabase/types").Json;
9830
11256
  status?: string;
9831
11257
  updated_at?: string;
9832
11258
  };
9833
11259
  Update: {
11260
+ action?: string;
9834
11261
  attempts?: number;
9835
11262
  connection_id?: string;
9836
11263
  created_at?: string;
11264
+ customer_id?: string | null;
9837
11265
  external_id?: string | null;
9838
11266
  id?: string;
9839
11267
  idempotency_key?: string;
9840
11268
  last_error?: string | null;
9841
11269
  next_attempt_at?: string;
9842
- office_code?: string;
11270
+ office_code?: string | null;
9843
11271
  payload?: import("../integrations/supabase/types").Json;
9844
11272
  status?: string;
9845
11273
  updated_at?: string;
@@ -9850,6 +11278,12 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
9850
11278
  isOneToOne: false;
9851
11279
  referencedRelation: "twinfield_connections";
9852
11280
  referencedColumns: ["id"];
11281
+ }, {
11282
+ foreignKeyName: "twinfield_push_queue_customer_id_fkey";
11283
+ columns: ["customer_id"];
11284
+ isOneToOne: false;
11285
+ referencedRelation: "customers";
11286
+ referencedColumns: ["id"];
9853
11287
  }];
9854
11288
  };
9855
11289
  twinfield_request_metrics: {
@@ -10058,72 +11492,420 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
10058
11492
  size_bytes?: number | null;
10059
11493
  };
10060
11494
  Update: {
10061
- action?: string;
10062
- attempt_number?: number;
10063
- caller?: string;
10064
- client_user_id?: string | null;
10065
- content_type?: string | null;
11495
+ action?: string;
11496
+ attempt_number?: number;
11497
+ caller?: string;
11498
+ client_user_id?: string | null;
11499
+ content_type?: string | null;
11500
+ created_at?: string;
11501
+ environment?: string;
11502
+ error_message?: string | null;
11503
+ filename?: string | null;
11504
+ id?: string;
11505
+ idempotency_key?: string | null;
11506
+ module?: string;
11507
+ path?: string;
11508
+ reference_id?: string | null;
11509
+ request_body_hash?: string | null;
11510
+ request_timestamp?: number | null;
11511
+ response_content_type?: string | null;
11512
+ response_status?: number | null;
11513
+ size_bytes?: number | null;
11514
+ };
11515
+ Relationships: [];
11516
+ };
11517
+ voorraad_publish_attempts: {
11518
+ Row: {
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("../integrations/supabase/types").Json | null;
11529
+ trade_item_id: string | null;
11530
+ user_id: string;
11531
+ };
11532
+ Insert: {
11533
+ action: string;
11534
+ connection_id?: string | null;
11535
+ created_at?: string;
11536
+ error?: string | null;
11537
+ gateway_attempt_id?: string | null;
11538
+ gateway_status?: number | null;
11539
+ id?: string;
11540
+ intent: string;
11541
+ ok: boolean;
11542
+ request_summary?: import("../integrations/supabase/types").Json | null;
11543
+ trade_item_id?: string | null;
11544
+ user_id: string;
11545
+ };
11546
+ Update: {
11547
+ action?: string;
11548
+ connection_id?: string | null;
11549
+ created_at?: string;
11550
+ error?: string | null;
11551
+ gateway_attempt_id?: string | null;
11552
+ gateway_status?: number | null;
11553
+ id?: string;
11554
+ intent?: string;
11555
+ ok?: boolean;
11556
+ request_summary?: import("../integrations/supabase/types").Json | null;
11557
+ trade_item_id?: string | null;
11558
+ user_id?: string;
11559
+ };
11560
+ Relationships: [];
11561
+ };
11562
+ werkbon_package_ai_rules: {
11563
+ Row: {
11564
+ active: boolean;
11565
+ case_sensitive: boolean;
11566
+ created_at: string;
11567
+ id: string;
11568
+ package_id: string;
11569
+ priority: number;
11570
+ rule_type: string;
11571
+ updated_at: string;
11572
+ value: string;
11573
+ };
11574
+ Insert: {
11575
+ active?: boolean;
11576
+ case_sensitive?: boolean;
11577
+ created_at?: string;
11578
+ id?: string;
11579
+ package_id: string;
11580
+ priority?: number;
11581
+ rule_type: string;
11582
+ updated_at?: string;
11583
+ value: string;
11584
+ };
11585
+ Update: {
11586
+ active?: boolean;
11587
+ case_sensitive?: boolean;
11588
+ created_at?: string;
11589
+ id?: string;
11590
+ package_id?: string;
11591
+ priority?: number;
11592
+ rule_type?: string;
11593
+ updated_at?: string;
11594
+ value?: string;
11595
+ };
11596
+ Relationships: [{
11597
+ foreignKeyName: "werkbon_package_ai_rules_package_id_fkey";
11598
+ columns: ["package_id"];
11599
+ isOneToOne: false;
11600
+ referencedRelation: "werkbon_packages";
11601
+ referencedColumns: ["id"];
11602
+ }];
11603
+ };
11604
+ werkbon_package_categories: {
11605
+ Row: {
11606
+ active: boolean;
11607
+ created_at: string;
11608
+ id: string;
11609
+ kleur: string | null;
11610
+ naam: string;
11611
+ sort_order: number;
11612
+ updated_at: string;
11613
+ };
11614
+ Insert: {
11615
+ active?: boolean;
11616
+ created_at?: string;
11617
+ id?: string;
11618
+ kleur?: string | null;
11619
+ naam: string;
11620
+ sort_order?: number;
11621
+ updated_at?: string;
11622
+ };
11623
+ Update: {
11624
+ active?: boolean;
11625
+ created_at?: string;
11626
+ id?: string;
11627
+ kleur?: string | null;
11628
+ naam?: string;
11629
+ sort_order?: number;
11630
+ updated_at?: string;
11631
+ };
11632
+ Relationships: [];
11633
+ };
11634
+ werkbon_package_lines: {
11635
+ Row: {
11636
+ created_at: string;
11637
+ created_by: string | null;
11638
+ id: string;
11639
+ package_id: string;
11640
+ quantity: number;
11641
+ unit_price_cents_snapshot: number;
11642
+ werkbon_id: string;
11643
+ };
11644
+ Insert: {
11645
+ created_at?: string;
11646
+ created_by?: string | null;
11647
+ id?: string;
11648
+ package_id: string;
11649
+ quantity?: number;
11650
+ unit_price_cents_snapshot?: number;
11651
+ werkbon_id: string;
11652
+ };
11653
+ Update: {
11654
+ created_at?: string;
11655
+ created_by?: string | null;
11656
+ id?: string;
11657
+ package_id?: string;
11658
+ quantity?: number;
11659
+ unit_price_cents_snapshot?: number;
11660
+ werkbon_id?: string;
11661
+ };
11662
+ Relationships: [{
11663
+ foreignKeyName: "werkbon_package_lines_package_id_fkey";
11664
+ columns: ["package_id"];
11665
+ isOneToOne: false;
11666
+ referencedRelation: "werkbon_packages";
11667
+ referencedColumns: ["id"];
11668
+ }, {
11669
+ foreignKeyName: "werkbon_package_lines_werkbon_id_fkey";
11670
+ columns: ["werkbon_id"];
11671
+ isOneToOne: false;
11672
+ referencedRelation: "werkbonnen";
11673
+ referencedColumns: ["id"];
11674
+ }];
11675
+ };
11676
+ werkbon_packages: {
11677
+ Row: {
11678
+ active: boolean;
11679
+ ai_tags: string[];
11680
+ category_id: string | null;
11681
+ code: string;
11682
+ created_at: string;
11683
+ default_quantity: number;
11684
+ description: string | null;
11685
+ duration_minutes: number | null;
11686
+ id: string;
11687
+ mandaat_type: string | null;
11688
+ name: string;
11689
+ sort_order: number;
11690
+ unit_price_cents: number;
11691
+ updated_at: string;
11692
+ };
11693
+ Insert: {
11694
+ active?: boolean;
11695
+ ai_tags?: string[];
11696
+ category_id?: string | null;
11697
+ code: string;
11698
+ created_at?: string;
11699
+ default_quantity?: number;
11700
+ description?: string | null;
11701
+ duration_minutes?: number | null;
11702
+ id?: string;
11703
+ mandaat_type?: string | null;
11704
+ name: string;
11705
+ sort_order?: number;
11706
+ unit_price_cents?: number;
11707
+ updated_at?: string;
11708
+ };
11709
+ Update: {
11710
+ active?: boolean;
11711
+ ai_tags?: string[];
11712
+ category_id?: string | null;
11713
+ code?: string;
11714
+ created_at?: string;
11715
+ default_quantity?: number;
11716
+ description?: string | null;
11717
+ duration_minutes?: number | null;
11718
+ id?: string;
11719
+ mandaat_type?: string | null;
11720
+ name?: string;
11721
+ sort_order?: number;
11722
+ unit_price_cents?: number;
11723
+ updated_at?: string;
11724
+ };
11725
+ Relationships: [{
11726
+ foreignKeyName: "werkbon_packages_category_id_fkey";
11727
+ columns: ["category_id"];
11728
+ isOneToOne: false;
11729
+ referencedRelation: "werkbon_package_categories";
11730
+ referencedColumns: ["id"];
11731
+ }];
11732
+ };
11733
+ werkbon_photos: {
11734
+ Row: {
11735
+ created_at: string;
11736
+ id: string;
11737
+ storage_path: string;
11738
+ user_id: string;
11739
+ werkbon_id: string;
11740
+ };
11741
+ Insert: {
11742
+ created_at?: string;
11743
+ id?: string;
11744
+ storage_path: string;
11745
+ user_id: string;
11746
+ werkbon_id: string;
11747
+ };
11748
+ Update: {
11749
+ created_at?: string;
11750
+ id?: string;
11751
+ storage_path?: string;
11752
+ user_id?: string;
11753
+ werkbon_id?: string;
11754
+ };
11755
+ Relationships: [{
11756
+ foreignKeyName: "werkbon_photos_werkbon_id_fkey";
11757
+ columns: ["werkbon_id"];
11758
+ isOneToOne: false;
11759
+ referencedRelation: "werkbonnen";
11760
+ referencedColumns: ["id"];
11761
+ }];
11762
+ };
11763
+ werkbon_time_logs: {
11764
+ Row: {
11765
+ activity: string;
11766
+ created_at: string;
11767
+ ended_at: string | null;
11768
+ id: string;
11769
+ started_at: string;
11770
+ user_id: string;
11771
+ werkbon_id: string;
11772
+ };
11773
+ Insert: {
11774
+ activity: string;
11775
+ created_at?: string;
11776
+ ended_at?: string | null;
11777
+ id?: string;
11778
+ started_at?: string;
11779
+ user_id: string;
11780
+ werkbon_id: string;
11781
+ };
11782
+ Update: {
11783
+ activity?: string;
10066
11784
  created_at?: string;
10067
- environment?: string;
10068
- error_message?: string | null;
10069
- filename?: string | null;
11785
+ ended_at?: string | null;
10070
11786
  id?: string;
10071
- idempotency_key?: string | null;
10072
- module?: string;
10073
- path?: string;
10074
- reference_id?: string | null;
10075
- request_body_hash?: string | null;
10076
- request_timestamp?: number | null;
10077
- response_content_type?: string | null;
10078
- response_status?: number | null;
10079
- size_bytes?: number | null;
11787
+ started_at?: string;
11788
+ user_id?: string;
11789
+ werkbon_id?: string;
10080
11790
  };
10081
- Relationships: [];
11791
+ Relationships: [{
11792
+ foreignKeyName: "werkbon_time_logs_werkbon_id_fkey";
11793
+ columns: ["werkbon_id"];
11794
+ isOneToOne: false;
11795
+ referencedRelation: "werkbonnen";
11796
+ referencedColumns: ["id"];
11797
+ }];
10082
11798
  };
10083
- voorraad_publish_attempts: {
11799
+ werkbonnen: {
10084
11800
  Row: {
10085
- action: string;
10086
- connection_id: string | null;
11801
+ assigned_user_id: string | null;
11802
+ budget_mandate_cents: number;
11803
+ complaint_description: string | null;
10087
11804
  created_at: string;
10088
- error: string | null;
10089
- gateway_attempt_id: string | null;
10090
- gateway_status: number | null;
11805
+ created_by: string | null;
11806
+ customer_id: string | null;
11807
+ externe_referentie: string | null;
11808
+ first_time_fix: boolean | null;
10091
11809
  id: string;
10092
- intent: string;
10093
- ok: boolean;
10094
- request_summary: import("../integrations/supabase/types").Json | null;
10095
- trade_item_id: string | null;
10096
- user_id: string;
11810
+ internal_notes: string | null;
11811
+ parent_werkbon_id: string | null;
11812
+ parsed_payload: import("../integrations/supabase/types").Json | null;
11813
+ planning_status: string;
11814
+ project_number: string | null;
11815
+ room_number: string | null;
11816
+ scheduled_end_time: string | null;
11817
+ scheduled_start_time: string | null;
11818
+ sequence_number: number;
11819
+ source_email_meta: import("../integrations/supabase/types").Json | null;
11820
+ source_mailbox_message_id: string | null;
11821
+ source_pdf_path: string | null;
11822
+ source_type: string;
11823
+ status: string;
11824
+ technician_id: string | null;
11825
+ technician_notes: string | null;
11826
+ technician_notes_raw: string | null;
11827
+ technician_task_description: string | null;
11828
+ updated_at: string;
11829
+ version: number;
11830
+ work_address: string | null;
10097
11831
  };
10098
11832
  Insert: {
10099
- action: string;
10100
- connection_id?: string | null;
11833
+ assigned_user_id?: string | null;
11834
+ budget_mandate_cents?: number;
11835
+ complaint_description?: string | null;
10101
11836
  created_at?: string;
10102
- error?: string | null;
10103
- gateway_attempt_id?: string | null;
10104
- gateway_status?: number | null;
11837
+ created_by?: string | null;
11838
+ customer_id?: string | null;
11839
+ externe_referentie?: string | null;
11840
+ first_time_fix?: boolean | null;
10105
11841
  id?: string;
10106
- intent: string;
10107
- ok: boolean;
10108
- request_summary?: import("../integrations/supabase/types").Json | null;
10109
- trade_item_id?: string | null;
10110
- user_id: string;
11842
+ internal_notes?: string | null;
11843
+ parent_werkbon_id?: string | null;
11844
+ parsed_payload?: import("../integrations/supabase/types").Json | null;
11845
+ planning_status?: string;
11846
+ project_number?: string | null;
11847
+ room_number?: string | null;
11848
+ scheduled_end_time?: string | null;
11849
+ scheduled_start_time?: string | null;
11850
+ sequence_number: number;
11851
+ source_email_meta?: import("../integrations/supabase/types").Json | null;
11852
+ source_mailbox_message_id?: string | null;
11853
+ source_pdf_path?: string | null;
11854
+ source_type?: string;
11855
+ status?: string;
11856
+ technician_id?: string | null;
11857
+ technician_notes?: string | null;
11858
+ technician_notes_raw?: string | null;
11859
+ technician_task_description?: string | null;
11860
+ updated_at?: string;
11861
+ version?: number;
11862
+ work_address?: string | null;
10111
11863
  };
10112
11864
  Update: {
10113
- action?: string;
10114
- connection_id?: string | null;
11865
+ assigned_user_id?: string | null;
11866
+ budget_mandate_cents?: number;
11867
+ complaint_description?: string | null;
10115
11868
  created_at?: string;
10116
- error?: string | null;
10117
- gateway_attempt_id?: string | null;
10118
- gateway_status?: number | null;
11869
+ created_by?: string | null;
11870
+ customer_id?: string | null;
11871
+ externe_referentie?: string | null;
11872
+ first_time_fix?: boolean | null;
10119
11873
  id?: string;
10120
- intent?: string;
10121
- ok?: boolean;
10122
- request_summary?: import("../integrations/supabase/types").Json | null;
10123
- trade_item_id?: string | null;
10124
- user_id?: string;
11874
+ internal_notes?: string | null;
11875
+ parent_werkbon_id?: string | null;
11876
+ parsed_payload?: import("../integrations/supabase/types").Json | null;
11877
+ planning_status?: string;
11878
+ project_number?: string | null;
11879
+ room_number?: string | null;
11880
+ scheduled_end_time?: string | null;
11881
+ scheduled_start_time?: string | null;
11882
+ sequence_number?: number;
11883
+ source_email_meta?: import("../integrations/supabase/types").Json | null;
11884
+ source_mailbox_message_id?: string | null;
11885
+ source_pdf_path?: string | null;
11886
+ source_type?: string;
11887
+ status?: string;
11888
+ technician_id?: string | null;
11889
+ technician_notes?: string | null;
11890
+ technician_notes_raw?: string | null;
11891
+ technician_task_description?: string | null;
11892
+ updated_at?: string;
11893
+ version?: number;
11894
+ work_address?: string | null;
10125
11895
  };
10126
- Relationships: [];
11896
+ Relationships: [{
11897
+ foreignKeyName: "werkbonnen_parent_werkbon_id_fkey";
11898
+ columns: ["parent_werkbon_id"];
11899
+ isOneToOne: false;
11900
+ referencedRelation: "werkbonnen";
11901
+ referencedColumns: ["id"];
11902
+ }, {
11903
+ foreignKeyName: "werkbonnen_source_mailbox_message_id_fkey";
11904
+ columns: ["source_mailbox_message_id"];
11905
+ isOneToOne: false;
11906
+ referencedRelation: "mailbox_messages";
11907
+ referencedColumns: ["id"];
11908
+ }];
10127
11909
  };
10128
11910
  work_order_monteurs: {
10129
11911
  Row: {
@@ -10295,6 +12077,8 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
10295
12077
  created_at: string | null;
10296
12078
  created_by: string | null;
10297
12079
  display_name: string | null;
12080
+ graph_subscription_expires_at: string | null;
12081
+ graph_subscription_id: string | null;
10298
12082
  has_access_token: boolean | null;
10299
12083
  has_client_id: boolean | null;
10300
12084
  has_client_secret: boolean | null;
@@ -10312,6 +12096,7 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
10312
12096
  oauth_mode: string | null;
10313
12097
  provider: string | null;
10314
12098
  purpose_assignments: import("../integrations/supabase/types").Json | null;
12099
+ realtime_mode: string | null;
10315
12100
  scopes: string[] | null;
10316
12101
  smtp_host: string | null;
10317
12102
  smtp_port: number | null;
@@ -10326,6 +12111,8 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
10326
12111
  created_at?: string | null;
10327
12112
  created_by?: string | null;
10328
12113
  display_name?: string | null;
12114
+ graph_subscription_expires_at?: string | null;
12115
+ graph_subscription_id?: string | null;
10329
12116
  has_access_token?: never;
10330
12117
  has_client_id?: never;
10331
12118
  has_client_secret?: never;
@@ -10343,6 +12130,7 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
10343
12130
  oauth_mode?: string | null;
10344
12131
  provider?: string | null;
10345
12132
  purpose_assignments?: import("../integrations/supabase/types").Json | null;
12133
+ realtime_mode?: string | null;
10346
12134
  scopes?: string[] | null;
10347
12135
  smtp_host?: string | null;
10348
12136
  smtp_port?: number | null;
@@ -10357,6 +12145,8 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
10357
12145
  created_at?: string | null;
10358
12146
  created_by?: string | null;
10359
12147
  display_name?: string | null;
12148
+ graph_subscription_expires_at?: string | null;
12149
+ graph_subscription_id?: string | null;
10360
12150
  has_access_token?: never;
10361
12151
  has_client_id?: never;
10362
12152
  has_client_secret?: never;
@@ -10374,6 +12164,7 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
10374
12164
  oauth_mode?: string | null;
10375
12165
  provider?: string | null;
10376
12166
  purpose_assignments?: import("../integrations/supabase/types").Json | null;
12167
+ realtime_mode?: string | null;
10377
12168
  scopes?: string[] | null;
10378
12169
  smtp_host?: string | null;
10379
12170
  smtp_port?: number | null;
@@ -10484,6 +12275,25 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
10484
12275
  };
10485
12276
  Relationships: [];
10486
12277
  };
12278
+ floriday_customer_discounts: {
12279
+ Row: {
12280
+ base_price: number | null;
12281
+ buyer_organization_id: string | null;
12282
+ currency: string | null;
12283
+ discount_type: string | null;
12284
+ discount_value: number | null;
12285
+ min_quantity: number | null;
12286
+ net_price: number | null;
12287
+ product_group_id: string | null;
12288
+ raw: import("../integrations/supabase/types").Json | null;
12289
+ source: string | null;
12290
+ source_id: string | null;
12291
+ trade_item_id: string | null;
12292
+ valid_from: string | null;
12293
+ valid_until: string | null;
12294
+ };
12295
+ Relationships: [];
12296
+ };
10487
12297
  local_customer_discounts: {
10488
12298
  Row: {
10489
12299
  base_price: number | null;
@@ -10820,6 +12630,21 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
10820
12630
  };
10821
12631
  Returns: string;
10822
12632
  };
12633
+ ai_usage_by_module: {
12634
+ Args: {
12635
+ _from: string;
12636
+ _to: string;
12637
+ };
12638
+ Returns: {
12639
+ calls: number;
12640
+ consumer_module_id: string;
12641
+ cost_usd: number;
12642
+ errors: number;
12643
+ input_tokens: number;
12644
+ output_tokens: number;
12645
+ total_tokens: number;
12646
+ }[];
12647
+ };
10823
12648
  apply_stock_consumption: {
10824
12649
  Args: {
10825
12650
  p_order_id: string;
@@ -10877,6 +12702,12 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
10877
12702
  processed_items: number;
10878
12703
  }[];
10879
12704
  };
12705
+ calculate_layer_stock: {
12706
+ Args: {
12707
+ p_product_id: string;
12708
+ };
12709
+ Returns: number;
12710
+ };
10880
12711
  call_exact_route: {
10881
12712
  Args: {
10882
12713
  path: string;
@@ -10905,6 +12736,33 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
10905
12736
  };
10906
12737
  Returns: import("../integrations/supabase/types").Json;
10907
12738
  };
12739
+ claim_twinfield_push_batch: {
12740
+ Args: {
12741
+ _limit?: number;
12742
+ };
12743
+ Returns: {
12744
+ action: string;
12745
+ attempts: number;
12746
+ connection_id: string;
12747
+ created_at: string;
12748
+ customer_id: string | null;
12749
+ external_id: string | null;
12750
+ id: string;
12751
+ idempotency_key: string;
12752
+ last_error: string | null;
12753
+ next_attempt_at: string;
12754
+ office_code: string | null;
12755
+ payload: import("../integrations/supabase/types").Json;
12756
+ status: string;
12757
+ updated_at: string;
12758
+ }[];
12759
+ SetofOptions: {
12760
+ from: "*";
12761
+ to: "twinfield_push_queue";
12762
+ isOneToOne: false;
12763
+ isSetofReturn: true;
12764
+ };
12765
+ };
10908
12766
  cleanup_old_bookings: {
10909
12767
  Args: never;
10910
12768
  Returns: undefined;
@@ -10963,6 +12821,12 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
10963
12821
  Args: never;
10964
12822
  Returns: string;
10965
12823
  };
12824
+ custom_access_token_hook: {
12825
+ Args: {
12826
+ event: import("../integrations/supabase/types").Json;
12827
+ };
12828
+ Returns: import("../integrations/supabase/types").Json;
12829
+ };
10966
12830
  dashboard_alert_counts: {
10967
12831
  Args: never;
10968
12832
  Returns: import("../integrations/supabase/types").Json;
@@ -11030,6 +12894,16 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
11030
12894
  status: string;
11031
12895
  }[];
11032
12896
  };
12897
+ email_auth_upsert_connection: {
12898
+ Args: {
12899
+ _account_email: string;
12900
+ _created_by: string;
12901
+ _is_active: boolean;
12902
+ _provider: string;
12903
+ _status: string;
12904
+ };
12905
+ Returns: string;
12906
+ };
11033
12907
  enqueue_cart_replan_if_unlocked: {
11034
12908
  Args: {
11035
12909
  p_order_id: string;
@@ -11149,6 +13023,19 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
11149
13023
  resource: string;
11150
13024
  }[];
11151
13025
  };
13026
+ get_floriday_agreements_active: {
13027
+ Args: {
13028
+ p_on_date?: string;
13029
+ };
13030
+ Returns: {
13031
+ buyer_organization_id: string;
13032
+ data: import("../integrations/supabase/types").Json;
13033
+ floriday_id: string;
13034
+ status: string;
13035
+ valid_from: string;
13036
+ valid_until: string;
13037
+ }[];
13038
+ };
11152
13039
  get_floriday_clock_supplies_window: {
11153
13040
  Args: {
11154
13041
  p_from: string;
@@ -11236,6 +13123,12 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
11236
13123
  };
11237
13124
  Returns: string;
11238
13125
  };
13126
+ get_inventory_stock_for_key: {
13127
+ Args: {
13128
+ p_key: string;
13129
+ };
13130
+ Returns: number;
13131
+ };
11239
13132
  get_offer_by_link_code: {
11240
13133
  Args: {
11241
13134
  p_code: string;
@@ -11266,6 +13159,12 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
11266
13159
  };
11267
13160
  Returns: string;
11268
13161
  };
13162
+ get_product_group_available_stock: {
13163
+ Args: {
13164
+ p_group_id: string;
13165
+ };
13166
+ Returns: number;
13167
+ };
11269
13168
  get_room_busy_windows: {
11270
13169
  Args: {
11271
13170
  p_from: string;
@@ -11297,6 +13196,14 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
11297
13196
  };
11298
13197
  Returns: string;
11299
13198
  };
13199
+ has_module_permission: {
13200
+ Args: {
13201
+ _min: string;
13202
+ _module_id: string;
13203
+ _user_id: string;
13204
+ };
13205
+ Returns: boolean;
13206
+ };
11300
13207
  has_role: {
11301
13208
  Args: {
11302
13209
  _role: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
@@ -11304,6 +13211,10 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
11304
13211
  };
11305
13212
  Returns: boolean;
11306
13213
  };
13214
+ has_twinfield_link: {
13215
+ Args: never;
13216
+ Returns: boolean;
13217
+ };
11307
13218
  is_authenticated: {
11308
13219
  Args: never;
11309
13220
  Returns: boolean;
@@ -11318,6 +13229,37 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
11318
13229
  };
11319
13230
  Returns: boolean;
11320
13231
  };
13232
+ jwt_has_role: {
13233
+ Args: {
13234
+ _role: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
13235
+ };
13236
+ Returns: boolean;
13237
+ };
13238
+ list_monteurs: {
13239
+ Args: never;
13240
+ Returns: {
13241
+ avatar_url: string;
13242
+ display_name: string;
13243
+ email: string;
13244
+ id: string;
13245
+ }[];
13246
+ };
13247
+ list_my_planning_items: {
13248
+ Args: {
13249
+ _from: string;
13250
+ _to: string;
13251
+ };
13252
+ Returns: {
13253
+ assigned_monteur_id: string;
13254
+ end_at: string;
13255
+ id: string;
13256
+ notes: string;
13257
+ role: string;
13258
+ start_at: string;
13259
+ status: import("../integrations/supabase/types").Database["public"]["Enums"]["planning_item_status"];
13260
+ werkbon_id: string;
13261
+ }[];
13262
+ };
11321
13263
  local_effective_price: {
11322
13264
  Args: {
11323
13265
  _customer_id: string;
@@ -11334,6 +13276,22 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
11334
13276
  source_id: string;
11335
13277
  }[];
11336
13278
  };
13279
+ log_ai_call: {
13280
+ Args: {
13281
+ _consumer_module_id: string;
13282
+ _cost_usd: number;
13283
+ _duration_ms: number;
13284
+ _error_code: string;
13285
+ _error_message: string;
13286
+ _input_tokens: number;
13287
+ _model_slug: string;
13288
+ _output_tokens: number;
13289
+ _provider_slug: string;
13290
+ _status: string;
13291
+ _total_tokens: number;
13292
+ };
13293
+ Returns: string;
13294
+ };
11337
13295
  mark_offer_clicked: {
11338
13296
  Args: {
11339
13297
  p_code: string;
@@ -11385,6 +13343,10 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
11385
13343
  };
11386
13344
  Returns: string;
11387
13345
  };
13346
+ next_twinfield_code: {
13347
+ Args: never;
13348
+ Returns: string;
13349
+ };
11388
13350
  next_work_order_number: {
11389
13351
  Args: {
11390
13352
  p_parent_work_order_id?: string;
@@ -11441,6 +13403,15 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
11441
13403
  };
11442
13404
  Returns: undefined;
11443
13405
  };
13406
+ pickstation_resolve_delivery_orders: {
13407
+ Args: {
13408
+ p_sales_order_ids: string[];
13409
+ };
13410
+ Returns: {
13411
+ delivery_order_id: string;
13412
+ sales_order_id: string;
13413
+ }[];
13414
+ };
11444
13415
  pickstation_set_cart_status: {
11445
13416
  Args: {
11446
13417
  p_cart_index: number;
@@ -11511,6 +13482,12 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
11511
13482
  };
11512
13483
  Returns: number;
11513
13484
  };
13485
+ reorder_customer_price_groups: {
13486
+ Args: {
13487
+ _ids: string[];
13488
+ };
13489
+ Returns: undefined;
13490
+ };
11514
13491
  reset_floriday_sync_cursor: {
11515
13492
  Args: {
11516
13493
  p_connection_id: string;
@@ -11546,6 +13523,12 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
11546
13523
  };
11547
13524
  Returns: string;
11548
13525
  };
13526
+ retry_twinfield_push: {
13527
+ Args: {
13528
+ _customer_id: string;
13529
+ };
13530
+ Returns: number;
13531
+ };
11549
13532
  reverse_production: {
11550
13533
  Args: {
11551
13534
  p_connection_id?: string;
@@ -11563,6 +13546,20 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
11563
13546
  };
11564
13547
  Returns: number;
11565
13548
  };
13549
+ schedule_floriday_agreement_calloffs_sync: {
13550
+ Args: {
13551
+ p_apikey: string;
13552
+ p_url: string;
13553
+ };
13554
+ Returns: number;
13555
+ };
13556
+ schedule_floriday_agreements_sync: {
13557
+ Args: {
13558
+ p_apikey: string;
13559
+ p_url: string;
13560
+ };
13561
+ Returns: number;
13562
+ };
11566
13563
  schedule_floriday_base_items_sync: {
11567
13564
  Args: {
11568
13565
  p_apikey: string;
@@ -11813,6 +13810,13 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
11813
13810
  Args: never;
11814
13811
  Returns: number;
11815
13812
  };
13813
+ set_planning_status: {
13814
+ Args: {
13815
+ _id: string;
13816
+ _status: import("../integrations/supabase/types").Database["public"]["Enums"]["planning_item_status"];
13817
+ };
13818
+ Returns: undefined;
13819
+ };
11816
13820
  show_limit: {
11817
13821
  Args: never;
11818
13822
  Returns: number;
@@ -11823,12 +13827,22 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
11823
13827
  };
11824
13828
  Returns: string[];
11825
13829
  };
13830
+ sync_all_layer_stocks: {
13831
+ Args: never;
13832
+ Returns: undefined;
13833
+ };
11826
13834
  sync_cached_packing_from_product: {
11827
13835
  Args: {
11828
13836
  p_product_id: string;
11829
13837
  };
11830
13838
  Returns: undefined;
11831
13839
  };
13840
+ sync_layer_stock: {
13841
+ Args: {
13842
+ p_product_id: string;
13843
+ };
13844
+ Returns: undefined;
13845
+ };
11832
13846
  sync_order_cart_item_packing_from_product: {
11833
13847
  Args: {
11834
13848
  p_product_id: string;
@@ -11872,9 +13886,12 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
11872
13886
  };
11873
13887
  };
11874
13888
  Enums: {
11875
- app_role: "admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie" | "monteur";
13889
+ app_role: "admin" | "planner" | "monteur" | "administratie" | "ai_admin";
11876
13890
  exact_env: "staging" | "live";
11877
13891
  exact_push_status: "pending" | "sent" | "error";
13892
+ itk_customer_segment: "Business" | "Private";
13893
+ itk_dynamic_field_type: "text" | "select" | "date" | "checkbox";
13894
+ planning_item_status: "gepland" | "bezig" | "afgerond" | "geannuleerd" | "concept" | "vrijgegeven";
11878
13895
  quote_status: "concept" | "verzonden" | "bekeken" | "in_behandeling" | "geaccepteerd" | "afgewezen" | "verlopen" | "gearchiveerd";
11879
13896
  };
11880
13897
  CompositeTypes: { [_ in never]: never; };