@flowselections/floriday-voorraad 1.0.22 → 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 (65) 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 +655 -93
  4. package/dist-lib/components/voorraad/FloridayInfoCard.d.ts +12 -0
  5. package/dist-lib/components/voorraad/FloridayInfoCard.d.ts.map +1 -0
  6. package/dist-lib/components/voorraad/FloridayInfoCard.js +85 -0
  7. package/dist-lib/components/voorraad/StepSamenstelling.d.ts +10 -0
  8. package/dist-lib/components/voorraad/StepSamenstelling.d.ts.map +1 -0
  9. package/dist-lib/components/voorraad/StepSamenstelling.js +333 -0
  10. package/dist-lib/components/voorraad/VoorraadPage.d.ts.map +1 -1
  11. package/dist-lib/components/voorraad/VoorraadPage.js +14 -3
  12. package/dist-lib/components/voorraad/VoorraadTable.d.ts.map +1 -1
  13. package/dist-lib/components/voorraad/VoorraadTable.js +8 -1
  14. package/dist-lib/hooks/useFloridayPriceGroups.d.ts +20 -0
  15. package/dist-lib/hooks/useFloridayPriceGroups.d.ts.map +1 -0
  16. package/dist-lib/hooks/useFloridayPriceGroups.js +55 -0
  17. package/dist-lib/hooks/useFloridayVbnRequired.d.ts +5 -0
  18. package/dist-lib/hooks/useFloridayVbnRequired.d.ts.map +1 -0
  19. package/dist-lib/hooks/useFloridayVbnRequired.js +16 -0
  20. package/dist-lib/hooks/useLocalTradeItems.d.ts.map +1 -1
  21. package/dist-lib/hooks/useLocalTradeItems.js +14 -0
  22. package/dist-lib/hooks/useTradeItemSpec.d.ts.map +1 -1
  23. package/dist-lib/hooks/useTradeItemSpec.js +48 -1
  24. package/dist-lib/hooks/useVoorraadData.d.ts.map +1 -1
  25. package/dist-lib/hooks/useVoorraadData.js +36 -5
  26. package/dist-lib/integrations/supabase/auth-middleware.d.ts +2388 -345
  27. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
  28. package/dist-lib/integrations/supabase/client.d.ts +2388 -345
  29. package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
  30. package/dist-lib/integrations/supabase/client.server.d.ts +2388 -345
  31. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
  32. package/dist-lib/integrations/supabase/types.d.ts +2437 -343
  33. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  34. package/dist-lib/integrations/supabase/types.js +11 -9
  35. package/dist-lib/lib/centralSecrets.server.d.ts +21 -0
  36. package/dist-lib/lib/centralSecrets.server.d.ts.map +1 -0
  37. package/dist-lib/lib/centralSecrets.server.js +111 -0
  38. package/dist-lib/lib/floricode-required-features.functions.d.ts +2388 -345
  39. package/dist-lib/lib/floricode-required-features.functions.d.ts.map +1 -1
  40. package/dist-lib/lib/floriday-client.d.ts +4 -0
  41. package/dist-lib/lib/floriday-client.d.ts.map +1 -1
  42. package/dist-lib/lib/floriday-customer-offer.functions.d.ts +2388 -345
  43. package/dist-lib/lib/floriday-customer-offer.functions.d.ts.map +1 -1
  44. package/dist-lib/lib/floriday-gateway.functions.d.ts +10860 -645
  45. package/dist-lib/lib/floriday-gateway.functions.d.ts.map +1 -1
  46. package/dist-lib/lib/floriday-gateway.server.d.ts.map +1 -1
  47. package/dist-lib/lib/floriday-gateway.server.js +34 -9
  48. package/dist-lib/lib/floriday-info.d.ts +54 -0
  49. package/dist-lib/lib/floriday-info.d.ts.map +1 -0
  50. package/dist-lib/lib/floriday-info.js +114 -0
  51. package/dist-lib/lib/floriday-payload.d.ts +21 -3
  52. package/dist-lib/lib/floriday-payload.d.ts.map +1 -1
  53. package/dist-lib/lib/floriday-payload.js +167 -34
  54. package/dist-lib/lib/floriday-vbn-required.functions.d.ts +27769 -0
  55. package/dist-lib/lib/floriday-vbn-required.functions.d.ts.map +1 -0
  56. package/dist-lib/lib/floriday-vbn-required.functions.js +85 -0
  57. package/dist-lib/lib/floriday-warehouse.functions.d.ts +6602 -473
  58. package/dist-lib/lib/floriday-warehouse.functions.d.ts.map +1 -1
  59. package/dist-lib/lib/floriday-writes.functions.d.ts +4681 -594
  60. package/dist-lib/lib/floriday-writes.functions.d.ts.map +1 -1
  61. package/dist-lib/lib/floriday-writes.functions.js +36 -1
  62. package/dist-lib/lib/trade-item-prices.d.ts +43 -0
  63. package/dist-lib/lib/trade-item-prices.d.ts.map +1 -0
  64. package/dist-lib/lib/trade-item-prices.js +229 -0
  65. 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;
@@ -4932,45 +5556,6 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
4932
5556
  referencedColumns: ["id"];
4933
5557
  }];
4934
5558
  };
4935
- floriday_trade_settings_customers_cache: {
4936
- Row: {
4937
- connection_id: string;
4938
- data: import("../integrations/supabase/types").Json;
4939
- fetched_at: string;
4940
- floriday_id: string;
4941
- id: string;
4942
- is_deleted: boolean;
4943
- sequence_number: number;
4944
- updated_at: string;
4945
- };
4946
- Insert: {
4947
- connection_id: string;
4948
- data: import("../integrations/supabase/types").Json;
4949
- fetched_at?: string;
4950
- floriday_id: string;
4951
- id?: string;
4952
- is_deleted?: boolean;
4953
- sequence_number?: number;
4954
- updated_at?: string;
4955
- };
4956
- Update: {
4957
- connection_id?: string;
4958
- data?: import("../integrations/supabase/types").Json;
4959
- fetched_at?: string;
4960
- floriday_id?: string;
4961
- id?: string;
4962
- is_deleted?: boolean;
4963
- sequence_number?: number;
4964
- updated_at?: string;
4965
- };
4966
- Relationships: [{
4967
- foreignKeyName: "floriday_trade_settings_customers_cache_connection_id_fkey";
4968
- columns: ["connection_id"];
4969
- isOneToOne: false;
4970
- referencedRelation: "floriday_connections";
4971
- referencedColumns: ["id"];
4972
- }];
4973
- };
4974
5559
  floriday_trips_cache: {
4975
5560
  Row: {
4976
5561
  carrier_organization_id: string | null;
@@ -5019,6 +5604,27 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
5019
5604
  referencedColumns: ["id"];
5020
5605
  }];
5021
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
+ };
5022
5628
  floriday_warehouses_cache: {
5023
5629
  Row: {
5024
5630
  connection_id: string;
@@ -5499,225 +6105,786 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
5499
6105
  };
5500
6106
  Relationships: [];
5501
6107
  };
5502
- local_customer_agreements: {
6108
+ itk_contact_persons: {
5503
6109
  Row: {
5504
- base_price: number | null;
5505
6110
  created_at: string;
5506
- currency: string;
5507
6111
  customer_id: string;
6112
+ email: string | null;
5508
6113
  id: string;
5509
- min_quantity: number;
5510
- net_price: number;
5511
- notes: string | null;
5512
- product_category_id: string | null;
5513
- product_id: string | null;
6114
+ name: string;
6115
+ phone: string | null;
6116
+ role: string | null;
5514
6117
  updated_at: string;
5515
- valid_from: string | null;
5516
- valid_until: string | null;
5517
6118
  };
5518
6119
  Insert: {
5519
- base_price?: number | null;
5520
6120
  created_at?: string;
5521
- currency?: string;
5522
6121
  customer_id: string;
6122
+ email?: string | null;
5523
6123
  id?: string;
5524
- min_quantity?: number;
5525
- net_price: number;
5526
- notes?: string | null;
5527
- product_category_id?: string | null;
5528
- product_id?: string | null;
6124
+ name: string;
6125
+ phone?: string | null;
6126
+ role?: string | null;
5529
6127
  updated_at?: string;
5530
- valid_from?: string | null;
5531
- valid_until?: string | null;
5532
6128
  };
5533
6129
  Update: {
5534
- base_price?: number | null;
5535
6130
  created_at?: string;
5536
- currency?: string;
5537
6131
  customer_id?: string;
6132
+ email?: string | null;
5538
6133
  id?: string;
5539
- min_quantity?: number;
5540
- net_price?: number;
5541
- notes?: string | null;
5542
- product_category_id?: string | null;
5543
- product_id?: string | null;
6134
+ name?: string;
6135
+ phone?: string | null;
6136
+ role?: string | null;
5544
6137
  updated_at?: string;
5545
- valid_from?: string | null;
5546
- valid_until?: string | null;
5547
6138
  };
5548
6139
  Relationships: [{
5549
- foreignKeyName: "local_customer_agreements_customer_id_fkey";
6140
+ foreignKeyName: "itk_contact_persons_customer_id_fkey";
5550
6141
  columns: ["customer_id"];
5551
6142
  isOneToOne: false;
5552
- referencedRelation: "customers";
6143
+ referencedRelation: "itk_customers";
5553
6144
  referencedColumns: ["id"];
5554
- }, {
5555
- foreignKeyName: "local_customer_agreements_product_category_id_fkey";
5556
- columns: ["product_category_id"];
6145
+ }];
6146
+ };
6147
+ itk_customer_dynamic_values: {
6148
+ Row: {
6149
+ created_at: string;
6150
+ customer_id: string;
6151
+ field_id: string;
6152
+ id: string;
6153
+ updated_at: string;
6154
+ value: string | null;
6155
+ };
6156
+ Insert: {
6157
+ created_at?: string;
6158
+ customer_id: string;
6159
+ field_id: string;
6160
+ id?: string;
6161
+ updated_at?: string;
6162
+ value?: string | null;
6163
+ };
6164
+ Update: {
6165
+ created_at?: string;
6166
+ customer_id?: string;
6167
+ field_id?: string;
6168
+ id?: string;
6169
+ updated_at?: string;
6170
+ value?: string | null;
6171
+ };
6172
+ Relationships: [{
6173
+ foreignKeyName: "itk_customer_dynamic_values_customer_id_fkey";
6174
+ columns: ["customer_id"];
5557
6175
  isOneToOne: false;
5558
- referencedRelation: "product_categories";
6176
+ referencedRelation: "itk_customers";
5559
6177
  referencedColumns: ["id"];
5560
6178
  }, {
5561
- foreignKeyName: "local_customer_agreements_product_id_fkey";
5562
- columns: ["product_id"];
6179
+ foreignKeyName: "itk_customer_dynamic_values_field_id_fkey";
6180
+ columns: ["field_id"];
5563
6181
  isOneToOne: false;
5564
- referencedRelation: "products";
6182
+ referencedRelation: "itk_dynamic_fields";
5565
6183
  referencedColumns: ["id"];
5566
6184
  }];
5567
6185
  };
5568
- local_customer_price_groups: {
6186
+ itk_customer_notes: {
5569
6187
  Row: {
6188
+ body: string;
5570
6189
  created_at: string;
5571
- currency: string;
6190
+ created_by: string | null;
5572
6191
  customer_id: string;
5573
- discount_type: string;
5574
- discount_value: number;
5575
6192
  id: string;
5576
- min_quantity: number;
5577
- notes: string | null;
5578
- product_category_id: string | null;
5579
- product_id: string | null;
6193
+ note_type: string;
5580
6194
  updated_at: string;
5581
- valid_from: string | null;
5582
- valid_until: string | null;
5583
6195
  };
5584
6196
  Insert: {
6197
+ body: string;
5585
6198
  created_at?: string;
5586
- currency?: string;
6199
+ created_by?: string | null;
5587
6200
  customer_id: string;
5588
- discount_type: string;
5589
- discount_value: number;
5590
6201
  id?: string;
5591
- min_quantity?: number;
5592
- notes?: string | null;
5593
- product_category_id?: string | null;
5594
- product_id?: string | null;
6202
+ note_type?: string;
5595
6203
  updated_at?: string;
5596
- valid_from?: string | null;
5597
- valid_until?: string | null;
5598
6204
  };
5599
6205
  Update: {
6206
+ body?: string;
5600
6207
  created_at?: string;
5601
- currency?: string;
6208
+ created_by?: string | null;
5602
6209
  customer_id?: string;
5603
- discount_type?: string;
5604
- discount_value?: number;
5605
6210
  id?: string;
5606
- min_quantity?: number;
5607
- notes?: string | null;
5608
- product_category_id?: string | null;
5609
- product_id?: string | null;
6211
+ note_type?: string;
5610
6212
  updated_at?: string;
5611
- valid_from?: string | null;
5612
- valid_until?: string | null;
5613
6213
  };
5614
6214
  Relationships: [{
5615
- foreignKeyName: "local_customer_price_groups_customer_id_fkey";
6215
+ foreignKeyName: "itk_customer_notes_customer_id_fkey";
5616
6216
  columns: ["customer_id"];
5617
6217
  isOneToOne: false;
5618
- referencedRelation: "customers";
5619
- referencedColumns: ["id"];
5620
- }, {
5621
- foreignKeyName: "local_customer_price_groups_product_category_id_fkey";
5622
- columns: ["product_category_id"];
5623
- isOneToOne: false;
5624
- referencedRelation: "product_categories";
6218
+ referencedRelation: "itk_customers";
5625
6219
  referencedColumns: ["id"];
5626
- }, {
5627
- foreignKeyName: "local_customer_price_groups_product_id_fkey";
5628
- columns: ["product_id"];
5629
- isOneToOne: false;
5630
- referencedRelation: "products";
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";
5631
6453
  referencedColumns: ["id"];
5632
6454
  }];
5633
6455
  };
5634
- local_customer_sales_strategies: {
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;
6556
+ customer_id?: string;
6557
+ discount_type?: string;
6558
+ discount_value?: number;
6559
+ id?: string;
6560
+ min_quantity?: number;
6561
+ notes?: string | null;
6562
+ product_category_id?: string | null;
6563
+ product_id?: string | null;
6564
+ updated_at?: string;
6565
+ valid_from?: string | null;
6566
+ valid_until?: string | null;
6567
+ };
6568
+ Relationships: [{
6569
+ foreignKeyName: "local_customer_sales_strategies_customer_id_fkey";
6570
+ columns: ["customer_id"];
6571
+ isOneToOne: false;
6572
+ referencedRelation: "customers";
6573
+ referencedColumns: ["id"];
6574
+ }, {
6575
+ foreignKeyName: "local_customer_sales_strategies_product_category_id_fkey";
6576
+ columns: ["product_category_id"];
6577
+ isOneToOne: false;
6578
+ referencedRelation: "product_categories";
6579
+ referencedColumns: ["id"];
6580
+ }, {
6581
+ foreignKeyName: "local_customer_sales_strategies_product_id_fkey";
6582
+ columns: ["product_id"];
6583
+ isOneToOne: false;
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: {
5635
6805
  Row: {
6806
+ condition_expression: string | null;
5636
6807
  created_at: string;
5637
- currency: string;
5638
- customer_id: string;
5639
- discount_type: string;
5640
- discount_value: number;
6808
+ end_date: string | null;
5641
6809
  id: string;
5642
- min_quantity: number;
5643
- notes: string | null;
5644
- product_category_id: string | null;
5645
- product_id: string | null;
6810
+ is_enabled: boolean;
6811
+ priority: number;
6812
+ rule_type: string;
6813
+ start_date: string | null;
6814
+ strategy_id: string;
5646
6815
  updated_at: string;
5647
- valid_from: string | null;
5648
- valid_until: string | null;
6816
+ user_id: string;
5649
6817
  };
5650
6818
  Insert: {
6819
+ condition_expression?: string | null;
5651
6820
  created_at?: string;
5652
- currency?: string;
5653
- customer_id: string;
5654
- discount_type: string;
5655
- discount_value: number;
6821
+ end_date?: string | null;
5656
6822
  id?: string;
5657
- min_quantity?: number;
5658
- notes?: string | null;
5659
- product_category_id?: string | null;
5660
- product_id?: string | null;
6823
+ is_enabled?: boolean;
6824
+ priority?: number;
6825
+ rule_type: string;
6826
+ start_date?: string | null;
6827
+ strategy_id: string;
5661
6828
  updated_at?: string;
5662
- valid_from?: string | null;
5663
- valid_until?: string | null;
6829
+ user_id: string;
5664
6830
  };
5665
6831
  Update: {
6832
+ condition_expression?: string | null;
5666
6833
  created_at?: string;
5667
- currency?: string;
5668
- customer_id?: string;
5669
- discount_type?: string;
5670
- discount_value?: number;
6834
+ end_date?: string | null;
5671
6835
  id?: string;
5672
- min_quantity?: number;
5673
- notes?: string | null;
5674
- product_category_id?: string | null;
5675
- product_id?: string | null;
6836
+ is_enabled?: boolean;
6837
+ priority?: number;
6838
+ rule_type?: string;
6839
+ start_date?: string | null;
6840
+ strategy_id?: string;
5676
6841
  updated_at?: string;
5677
- valid_from?: string | null;
5678
- valid_until?: string | null;
6842
+ user_id?: string;
5679
6843
  };
5680
6844
  Relationships: [{
5681
- foreignKeyName: "local_customer_sales_strategies_customer_id_fkey";
5682
- columns: ["customer_id"];
5683
- isOneToOne: false;
5684
- referencedRelation: "customers";
5685
- referencedColumns: ["id"];
5686
- }, {
5687
- foreignKeyName: "local_customer_sales_strategies_product_category_id_fkey";
5688
- columns: ["product_category_id"];
5689
- isOneToOne: false;
5690
- referencedRelation: "product_categories";
5691
- referencedColumns: ["id"];
5692
- }, {
5693
- foreignKeyName: "local_customer_sales_strategies_product_id_fkey";
5694
- columns: ["product_id"];
6845
+ foreignKeyName: "logistics_strategy_schedules_strategy_id_fkey";
6846
+ columns: ["strategy_id"];
5695
6847
  isOneToOne: false;
5696
- referencedRelation: "products";
6848
+ referencedRelation: "logistics_strategies";
5697
6849
  referencedColumns: ["id"];
5698
6850
  }];
5699
6851
  };
5700
- locations: {
6852
+ logistics_variables: {
5701
6853
  Row: {
5702
6854
  created_at: string;
6855
+ default_value: string | null;
6856
+ description: string | null;
5703
6857
  id: string;
5704
- name: string;
5705
- sort_order: number;
6858
+ is_builtin: boolean;
6859
+ key: string;
6860
+ label: string;
5706
6861
  updated_at: string;
6862
+ user_id: string;
6863
+ value_type: string;
5707
6864
  };
5708
6865
  Insert: {
5709
6866
  created_at?: string;
6867
+ default_value?: string | null;
6868
+ description?: string | null;
5710
6869
  id?: string;
5711
- name: string;
5712
- sort_order?: number;
6870
+ is_builtin?: boolean;
6871
+ key: string;
6872
+ label: string;
5713
6873
  updated_at?: string;
6874
+ user_id: string;
6875
+ value_type: string;
5714
6876
  };
5715
6877
  Update: {
5716
6878
  created_at?: string;
6879
+ default_value?: string | null;
6880
+ description?: string | null;
5717
6881
  id?: string;
5718
- name?: string;
5719
- sort_order?: number;
6882
+ is_builtin?: boolean;
6883
+ key?: string;
6884
+ label?: string;
5720
6885
  updated_at?: string;
6886
+ user_id?: string;
6887
+ value_type?: string;
5721
6888
  };
5722
6889
  Relationships: [];
5723
6890
  };
@@ -6116,60 +7283,66 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
6116
7283
  };
6117
7284
  manufacture_products: {
6118
7285
  Row: {
6119
- aantal_te_produceren: number;
6120
7286
  created_at: string;
6121
7287
  description: string | null;
6122
7288
  id: string;
6123
7289
  is_active: boolean;
6124
- location_id: string | null;
6125
7290
  name: string;
6126
- partij_nummer: string | null;
6127
- photos: import("../integrations/supabase/types").Json;
6128
7291
  produced_stock: number;
6129
7292
  product_code: string;
6130
7293
  tenant_id: string;
6131
- unit: string;
6132
7294
  updated_at: string;
6133
7295
  };
6134
7296
  Insert: {
6135
- aantal_te_produceren?: number;
6136
7297
  created_at?: string;
6137
7298
  description?: string | null;
6138
7299
  id?: string;
6139
7300
  is_active?: boolean;
6140
- location_id?: string | null;
6141
7301
  name: string;
6142
- partij_nummer?: string | null;
6143
- photos?: import("../integrations/supabase/types").Json;
6144
7302
  produced_stock?: number;
6145
7303
  product_code: string;
6146
7304
  tenant_id: string;
6147
- unit?: string;
6148
7305
  updated_at?: string;
6149
7306
  };
6150
7307
  Update: {
6151
- aantal_te_produceren?: number;
6152
7308
  created_at?: string;
6153
7309
  description?: string | null;
6154
7310
  id?: string;
6155
7311
  is_active?: boolean;
6156
- location_id?: string | null;
6157
7312
  name?: string;
6158
- partij_nummer?: string | null;
6159
- photos?: import("../integrations/supabase/types").Json;
6160
7313
  produced_stock?: number;
6161
7314
  product_code?: string;
6162
7315
  tenant_id?: string;
6163
- unit?: string;
6164
7316
  updated_at?: string;
6165
7317
  };
6166
- Relationships: [{
6167
- foreignKeyName: "manufacture_products_location_id_fkey";
6168
- columns: ["location_id"];
6169
- isOneToOne: false;
6170
- referencedRelation: "locations";
6171
- referencedColumns: ["id"];
6172
- }];
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: [];
6173
7346
  };
6174
7347
  monteurs: {
6175
7348
  Row: {
@@ -6900,6 +8073,42 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
6900
8073
  };
6901
8074
  Relationships: [];
6902
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
+ };
6903
8112
  order_cart_items: {
6904
8113
  Row: {
6905
8114
  cart_id: string;
@@ -6966,6 +8175,7 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
6966
8175
  order_carts: {
6967
8176
  Row: {
6968
8177
  algorithm_version: number;
8178
+ buffer_id: string | null;
6969
8179
  cart_number: number;
6970
8180
  created_at: string;
6971
8181
  id: string;
@@ -6973,13 +8183,14 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
6973
8183
  is_complete: boolean;
6974
8184
  notes: string | null;
6975
8185
  occupancy_pct: number;
6976
- order_id: string;
8186
+ order_id: string | null;
6977
8187
  source: string;
6978
8188
  total_layers_used: number;
6979
8189
  updated_at: string;
6980
8190
  };
6981
8191
  Insert: {
6982
8192
  algorithm_version?: number;
8193
+ buffer_id?: string | null;
6983
8194
  cart_number: number;
6984
8195
  created_at?: string;
6985
8196
  id?: string;
@@ -6987,13 +8198,14 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
6987
8198
  is_complete?: boolean;
6988
8199
  notes?: string | null;
6989
8200
  occupancy_pct?: number;
6990
- order_id: string;
8201
+ order_id?: string | null;
6991
8202
  source?: string;
6992
8203
  total_layers_used?: number;
6993
8204
  updated_at?: string;
6994
8205
  };
6995
8206
  Update: {
6996
8207
  algorithm_version?: number;
8208
+ buffer_id?: string | null;
6997
8209
  cart_number?: number;
6998
8210
  created_at?: string;
6999
8211
  id?: string;
@@ -7001,12 +8213,18 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
7001
8213
  is_complete?: boolean;
7002
8214
  notes?: string | null;
7003
8215
  occupancy_pct?: number;
7004
- order_id?: string;
8216
+ order_id?: string | null;
7005
8217
  source?: string;
7006
8218
  total_layers_used?: number;
7007
8219
  updated_at?: string;
7008
8220
  };
7009
8221
  Relationships: [{
8222
+ foreignKeyName: "order_carts_buffer_id_fkey";
8223
+ columns: ["buffer_id"];
8224
+ isOneToOne: false;
8225
+ referencedRelation: "order_buffers";
8226
+ referencedColumns: ["id"];
8227
+ }, {
7010
8228
  foreignKeyName: "order_carts_order_id_fkey";
7011
8229
  columns: ["order_id"];
7012
8230
  isOneToOne: false;
@@ -7244,12 +8462,14 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
7244
8462
  };
7245
8463
  orders: {
7246
8464
  Row: {
8465
+ buffer_id: string | null;
7247
8466
  created_at: string;
7248
8467
  custom_fields: import("../integrations/supabase/types").Json;
7249
8468
  customer_id: string | null;
7250
8469
  customer_name: string;
7251
8470
  deleted_at: string | null;
7252
8471
  delivery_date: string | null;
8472
+ floriday_sales_order_id: string | null;
7253
8473
  id: string;
7254
8474
  is_reservation: boolean;
7255
8475
  notes: string | null;
@@ -7263,12 +8483,14 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
7263
8483
  updated_at: string;
7264
8484
  };
7265
8485
  Insert: {
8486
+ buffer_id?: string | null;
7266
8487
  created_at?: string;
7267
8488
  custom_fields?: import("../integrations/supabase/types").Json;
7268
8489
  customer_id?: string | null;
7269
8490
  customer_name?: string;
7270
8491
  deleted_at?: string | null;
7271
8492
  delivery_date?: string | null;
8493
+ floriday_sales_order_id?: string | null;
7272
8494
  id?: string;
7273
8495
  is_reservation?: boolean;
7274
8496
  notes?: string | null;
@@ -7282,12 +8504,14 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
7282
8504
  updated_at?: string;
7283
8505
  };
7284
8506
  Update: {
8507
+ buffer_id?: string | null;
7285
8508
  created_at?: string;
7286
8509
  custom_fields?: import("../integrations/supabase/types").Json;
7287
8510
  customer_id?: string | null;
7288
8511
  customer_name?: string;
7289
8512
  deleted_at?: string | null;
7290
8513
  delivery_date?: string | null;
8514
+ floriday_sales_order_id?: string | null;
7291
8515
  id?: string;
7292
8516
  is_reservation?: boolean;
7293
8517
  notes?: string | null;
@@ -7301,6 +8525,12 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
7301
8525
  updated_at?: string;
7302
8526
  };
7303
8527
  Relationships: [{
8528
+ foreignKeyName: "orders_buffer_id_fkey";
8529
+ columns: ["buffer_id"];
8530
+ isOneToOne: false;
8531
+ referencedRelation: "order_buffers";
8532
+ referencedColumns: ["id"];
8533
+ }, {
7304
8534
  foreignKeyName: "orders_customer_id_fkey";
7305
8535
  columns: ["customer_id"];
7306
8536
  isOneToOne: false;
@@ -7431,6 +8661,78 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
7431
8661
  };
7432
8662
  Relationships: [];
7433
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
+ };
7434
8736
  product_bom_items: {
7435
8737
  Row: {
7436
8738
  component_product_id: string | null;
@@ -7438,6 +8740,7 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
7438
8740
  created_at: string;
7439
8741
  id: string;
7440
8742
  notes: string | null;
8743
+ packing_configuration_id: string | null;
7441
8744
  parent_product_id: string | null;
7442
8745
  parent_trade_item_floriday_id: string | null;
7443
8746
  quantity: number;
@@ -7452,6 +8755,7 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
7452
8755
  created_at?: string;
7453
8756
  id?: string;
7454
8757
  notes?: string | null;
8758
+ packing_configuration_id?: string | null;
7455
8759
  parent_product_id?: string | null;
7456
8760
  parent_trade_item_floriday_id?: string | null;
7457
8761
  quantity?: number;
@@ -7466,6 +8770,7 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
7466
8770
  created_at?: string;
7467
8771
  id?: string;
7468
8772
  notes?: string | null;
8773
+ packing_configuration_id?: string | null;
7469
8774
  parent_product_id?: string | null;
7470
8775
  parent_trade_item_floriday_id?: string | null;
7471
8776
  quantity?: number;
@@ -7667,11 +8972,13 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
7667
8972
  created_at: string;
7668
8973
  id: string;
7669
8974
  is_package: boolean;
8975
+ label: string | null;
7670
8976
  layers_per_load_carrier: number | null;
7671
8977
  load_carrier: string | null;
7672
8978
  package_id: string | null;
7673
8979
  package_label: string | null;
7674
8980
  packages_per_layer: number | null;
8981
+ packing_configuration_id: string;
7675
8982
  product_id: string | null;
7676
8983
  tenant_id: string;
7677
8984
  trade_item_floriday_id: string | null;
@@ -7682,11 +8989,13 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
7682
8989
  created_at?: string;
7683
8990
  id?: string;
7684
8991
  is_package?: boolean;
8992
+ label?: string | null;
7685
8993
  layers_per_load_carrier?: number | null;
7686
8994
  load_carrier?: string | null;
7687
8995
  package_id?: string | null;
7688
8996
  package_label?: string | null;
7689
8997
  packages_per_layer?: number | null;
8998
+ packing_configuration_id?: string;
7690
8999
  product_id?: string | null;
7691
9000
  tenant_id: string;
7692
9001
  trade_item_floriday_id?: string | null;
@@ -7697,11 +9006,13 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
7697
9006
  created_at?: string;
7698
9007
  id?: string;
7699
9008
  is_package?: boolean;
9009
+ label?: string | null;
7700
9010
  layers_per_load_carrier?: number | null;
7701
9011
  load_carrier?: string | null;
7702
9012
  package_id?: string | null;
7703
9013
  package_label?: string | null;
7704
9014
  packages_per_layer?: number | null;
9015
+ packing_configuration_id?: string;
7705
9016
  product_id?: string | null;
7706
9017
  tenant_id?: string;
7707
9018
  trade_item_floriday_id?: string | null;
@@ -7763,12 +9074,11 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
7763
9074
  crates_per_layer: number;
7764
9075
  created_at: string;
7765
9076
  custom_fields: import("../integrations/supabase/types").Json;
7766
- floriday_active: boolean;
7767
- floriday_payload: import("../integrations/supabase/types").Json;
7768
9077
  floriday_trade_item_id: string | null;
7769
9078
  id: string;
7770
9079
  image_url: string | null;
7771
9080
  incoming_quantity: number;
9081
+ is_layer: boolean;
7772
9082
  layers_per_cart: number;
7773
9083
  location: string;
7774
9084
  min_quantity: number;
@@ -7790,12 +9100,11 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
7790
9100
  crates_per_layer?: number;
7791
9101
  created_at?: string;
7792
9102
  custom_fields?: import("../integrations/supabase/types").Json;
7793
- floriday_active?: boolean;
7794
- floriday_payload?: import("../integrations/supabase/types").Json;
7795
9103
  floriday_trade_item_id?: string | null;
7796
9104
  id?: string;
7797
9105
  image_url?: string | null;
7798
9106
  incoming_quantity?: number;
9107
+ is_layer?: boolean;
7799
9108
  layers_per_cart?: number;
7800
9109
  location: string;
7801
9110
  min_quantity?: number;
@@ -7817,12 +9126,11 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
7817
9126
  crates_per_layer?: number;
7818
9127
  created_at?: string;
7819
9128
  custom_fields?: import("../integrations/supabase/types").Json;
7820
- floriday_active?: boolean;
7821
- floriday_payload?: import("../integrations/supabase/types").Json;
7822
9129
  floriday_trade_item_id?: string | null;
7823
9130
  id?: string;
7824
9131
  image_url?: string | null;
7825
9132
  incoming_quantity?: number;
9133
+ is_layer?: boolean;
7826
9134
  layers_per_cart?: number;
7827
9135
  location?: string;
7828
9136
  min_quantity?: number;
@@ -7842,6 +9150,7 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
7842
9150
  profiles: {
7843
9151
  Row: {
7844
9152
  address: string | null;
9153
+ avatar_url: string | null;
7845
9154
  created_at: string;
7846
9155
  display_name: string | null;
7847
9156
  email: string | null;
@@ -7853,6 +9162,7 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
7853
9162
  };
7854
9163
  Insert: {
7855
9164
  address?: string | null;
9165
+ avatar_url?: string | null;
7856
9166
  created_at?: string;
7857
9167
  display_name?: string | null;
7858
9168
  email?: string | null;
@@ -7864,6 +9174,7 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
7864
9174
  };
7865
9175
  Update: {
7866
9176
  address?: string | null;
9177
+ avatar_url?: string | null;
7867
9178
  created_at?: string;
7868
9179
  display_name?: string | null;
7869
9180
  email?: string | null;
@@ -8728,7 +10039,6 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
8728
10039
  order_id: string | null;
8729
10040
  order_item_id: string | null;
8730
10041
  order_source: string | null;
8731
- parent_trade_item_key: string | null;
8732
10042
  physical_after: number | null;
8733
10043
  physical_before: number | null;
8734
10044
  production_batch_id: string | null;
@@ -8747,7 +10057,6 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
8747
10057
  order_id?: string | null;
8748
10058
  order_item_id?: string | null;
8749
10059
  order_source?: string | null;
8750
- parent_trade_item_key?: string | null;
8751
10060
  physical_after?: number | null;
8752
10061
  physical_before?: number | null;
8753
10062
  production_batch_id?: string | null;
@@ -8766,7 +10075,6 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
8766
10075
  order_id?: string | null;
8767
10076
  order_item_id?: string | null;
8768
10077
  order_source?: string | null;
8769
- parent_trade_item_key?: string | null;
8770
10078
  physical_after?: number | null;
8771
10079
  physical_before?: number | null;
8772
10080
  production_batch_id?: string | null;
@@ -8871,6 +10179,27 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
8871
10179
  };
8872
10180
  Relationships: [];
8873
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
+ };
8874
10203
  tenants: {
8875
10204
  Row: {
8876
10205
  created_at: string;
@@ -9060,16 +10389,58 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
9060
10389
  user_id: string;
9061
10390
  };
9062
10391
  Update: {
9063
- connection_id?: string | null;
10392
+ connection_id?: string | null;
10393
+ created_at?: string;
10394
+ data?: import("../integrations/supabase/types").Json;
10395
+ floriday_id?: string | null;
10396
+ floriday_link_error?: string | null;
10397
+ floriday_link_status?: string;
10398
+ id?: string;
10399
+ last_floriday_sync_at?: string | null;
10400
+ missing_required_fields?: string[];
10401
+ source?: string;
10402
+ updated_at?: string;
10403
+ user_id?: string;
10404
+ };
10405
+ Relationships: [];
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: {
9064
10435
  created_at?: string;
9065
- data?: import("../integrations/supabase/types").Json;
9066
- floriday_id?: string | null;
9067
- floriday_link_error?: string | null;
9068
- floriday_link_status?: string;
10436
+ currency?: string;
9069
10437
  id?: string;
9070
- last_floriday_sync_at?: string | null;
9071
- missing_required_fields?: string[];
9072
- source?: 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;
9073
10444
  updated_at?: string;
9074
10445
  user_id?: string;
9075
10446
  };
@@ -9228,7 +10599,7 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
9228
10599
  twinfield_connections: {
9229
10600
  Row: {
9230
10601
  access_token: string | null;
9231
- client_id: string | null;
10602
+ client_id: string;
9232
10603
  client_secret: string | null;
9233
10604
  cluster_uri: string | null;
9234
10605
  company_code: string | null;
@@ -9240,7 +10611,7 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
9240
10611
  is_active: boolean;
9241
10612
  label: string | null;
9242
10613
  office_code: string | null;
9243
- redirect_uri: string | null;
10614
+ redirect_uri: string;
9244
10615
  refresh_token: string | null;
9245
10616
  token_expires_at: string | null;
9246
10617
  updated_at: string;
@@ -9248,7 +10619,7 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
9248
10619
  };
9249
10620
  Insert: {
9250
10621
  access_token?: string | null;
9251
- client_id?: string | null;
10622
+ client_id: string;
9252
10623
  client_secret?: string | null;
9253
10624
  cluster_uri?: string | null;
9254
10625
  company_code?: string | null;
@@ -9260,7 +10631,7 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
9260
10631
  is_active?: boolean;
9261
10632
  label?: string | null;
9262
10633
  office_code?: string | null;
9263
- redirect_uri?: string | null;
10634
+ redirect_uri: string;
9264
10635
  refresh_token?: string | null;
9265
10636
  token_expires_at?: string | null;
9266
10637
  updated_at?: string;
@@ -9268,7 +10639,7 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
9268
10639
  };
9269
10640
  Update: {
9270
10641
  access_token?: string | null;
9271
- client_id?: string | null;
10642
+ client_id?: string;
9272
10643
  client_secret?: string | null;
9273
10644
  cluster_uri?: string | null;
9274
10645
  company_code?: string | null;
@@ -9280,7 +10651,7 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
9280
10651
  is_active?: boolean;
9281
10652
  label?: string | null;
9282
10653
  office_code?: string | null;
9283
- redirect_uri?: string | null;
10654
+ redirect_uri?: string;
9284
10655
  refresh_token?: string | null;
9285
10656
  token_expires_at?: string | null;
9286
10657
  updated_at?: string;
@@ -9340,6 +10711,7 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
9340
10711
  country: string | null;
9341
10712
  created_at: string;
9342
10713
  email: string | null;
10714
+ external_group_key: string | null;
9343
10715
  id: string;
9344
10716
  last_synced_at: string | null;
9345
10717
  name: string;
@@ -9358,6 +10730,7 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
9358
10730
  country?: string | null;
9359
10731
  created_at?: string;
9360
10732
  email?: string | null;
10733
+ external_group_key?: string | null;
9361
10734
  id?: string;
9362
10735
  last_synced_at?: string | null;
9363
10736
  name: string;
@@ -9376,6 +10749,7 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
9376
10749
  country?: string | null;
9377
10750
  created_at?: string;
9378
10751
  email?: string | null;
10752
+ external_group_key?: string | null;
9379
10753
  id?: string;
9380
10754
  last_synced_at?: string | null;
9381
10755
  name?: string;
@@ -9537,9 +10911,56 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
9537
10911
  referencedColumns: ["id"];
9538
10912
  }];
9539
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: {
10928
+ connection_id: string;
10929
+ created_at?: string;
10930
+ fetched_at?: string;
10931
+ id?: string;
10932
+ invoice_number: string;
10933
+ last_accessed_at?: string;
10934
+ object_path: string;
10935
+ office_code: string;
10936
+ size_bytes?: number;
10937
+ updated_at?: string;
10938
+ };
10939
+ Update: {
10940
+ connection_id?: string;
10941
+ created_at?: string;
10942
+ fetched_at?: string;
10943
+ id?: string;
10944
+ invoice_number?: string;
10945
+ last_accessed_at?: string;
10946
+ object_path?: string;
10947
+ office_code?: string;
10948
+ size_bytes?: number;
10949
+ updated_at?: string;
10950
+ };
10951
+ Relationships: [{
10952
+ foreignKeyName: "twinfield_invoice_pdf_cache_connection_id_fkey";
10953
+ columns: ["connection_id"];
10954
+ isOneToOne: false;
10955
+ referencedRelation: "twinfield_connections";
10956
+ referencedColumns: ["id"];
10957
+ }];
10958
+ };
9540
10959
  twinfield_invoice_settings: {
9541
10960
  Row: {
9542
10961
  created_at: string;
10962
+ debtor_gl_account: string;
10963
+ default_credit_invoice_type: string | null;
9543
10964
  default_gl_account: string;
9544
10965
  default_invoice_type: string;
9545
10966
  default_payment_term_days: number;
@@ -9548,11 +10969,15 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
9548
10969
  invoice_enabled_fo: boolean;
9549
10970
  invoice_enabled_ho: boolean;
9550
10971
  invoice_enabled_mo: boolean;
10972
+ payment_gl_account: string;
10973
+ payment_journal_code: string;
9551
10974
  updated_at: string;
9552
10975
  user_id: string;
9553
10976
  };
9554
10977
  Insert: {
9555
10978
  created_at?: string;
10979
+ debtor_gl_account?: string;
10980
+ default_credit_invoice_type?: string | null;
9556
10981
  default_gl_account?: string;
9557
10982
  default_invoice_type?: string;
9558
10983
  default_payment_term_days?: number;
@@ -9561,11 +10986,15 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
9561
10986
  invoice_enabled_fo?: boolean;
9562
10987
  invoice_enabled_ho?: boolean;
9563
10988
  invoice_enabled_mo?: boolean;
10989
+ payment_gl_account?: string;
10990
+ payment_journal_code?: string;
9564
10991
  updated_at?: string;
9565
10992
  user_id: string;
9566
10993
  };
9567
10994
  Update: {
9568
10995
  created_at?: string;
10996
+ debtor_gl_account?: string;
10997
+ default_credit_invoice_type?: string | null;
9569
10998
  default_gl_account?: string;
9570
10999
  default_invoice_type?: string;
9571
11000
  default_payment_term_days?: number;
@@ -9574,6 +11003,8 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
9574
11003
  invoice_enabled_fo?: boolean;
9575
11004
  invoice_enabled_ho?: boolean;
9576
11005
  invoice_enabled_mo?: boolean;
11006
+ payment_gl_account?: string;
11007
+ payment_journal_code?: string;
9577
11008
  updated_at?: string;
9578
11009
  user_id?: string;
9579
11010
  };
@@ -9794,43 +11225,49 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
9794
11225
  };
9795
11226
  twinfield_push_queue: {
9796
11227
  Row: {
11228
+ action: string;
9797
11229
  attempts: number;
9798
11230
  connection_id: string;
9799
11231
  created_at: string;
11232
+ customer_id: string | null;
9800
11233
  external_id: string | null;
9801
11234
  id: string;
9802
11235
  idempotency_key: string;
9803
11236
  last_error: string | null;
9804
11237
  next_attempt_at: string;
9805
- office_code: string;
11238
+ office_code: string | null;
9806
11239
  payload: import("../integrations/supabase/types").Json;
9807
11240
  status: string;
9808
11241
  updated_at: string;
9809
11242
  };
9810
11243
  Insert: {
11244
+ action?: string;
9811
11245
  attempts?: number;
9812
11246
  connection_id: string;
9813
11247
  created_at?: string;
11248
+ customer_id?: string | null;
9814
11249
  external_id?: string | null;
9815
11250
  id?: string;
9816
11251
  idempotency_key: string;
9817
11252
  last_error?: string | null;
9818
11253
  next_attempt_at?: string;
9819
- office_code: string;
11254
+ office_code?: string | null;
9820
11255
  payload: import("../integrations/supabase/types").Json;
9821
11256
  status?: string;
9822
11257
  updated_at?: string;
9823
11258
  };
9824
11259
  Update: {
11260
+ action?: string;
9825
11261
  attempts?: number;
9826
11262
  connection_id?: string;
9827
11263
  created_at?: string;
11264
+ customer_id?: string | null;
9828
11265
  external_id?: string | null;
9829
11266
  id?: string;
9830
11267
  idempotency_key?: string;
9831
11268
  last_error?: string | null;
9832
11269
  next_attempt_at?: string;
9833
- office_code?: string;
11270
+ office_code?: string | null;
9834
11271
  payload?: import("../integrations/supabase/types").Json;
9835
11272
  status?: string;
9836
11273
  updated_at?: string;
@@ -9841,6 +11278,12 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
9841
11278
  isOneToOne: false;
9842
11279
  referencedRelation: "twinfield_connections";
9843
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"];
9844
11287
  }];
9845
11288
  };
9846
11289
  twinfield_request_metrics: {
@@ -10071,50 +11514,398 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
10071
11514
  };
10072
11515
  Relationships: [];
10073
11516
  };
10074
- voorraad_publish_attempts: {
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: {
10075
11764
  Row: {
10076
- action: string;
10077
- connection_id: string | null;
11765
+ activity: string;
10078
11766
  created_at: string;
10079
- error: string | null;
10080
- gateway_attempt_id: string | null;
10081
- gateway_status: number | null;
11767
+ ended_at: string | null;
10082
11768
  id: string;
10083
- intent: string;
10084
- ok: boolean;
10085
- request_summary: import("../integrations/supabase/types").Json | null;
10086
- trade_item_id: string | null;
11769
+ started_at: string;
10087
11770
  user_id: string;
11771
+ werkbon_id: string;
10088
11772
  };
10089
11773
  Insert: {
10090
- action: string;
10091
- connection_id?: string | null;
11774
+ activity: string;
10092
11775
  created_at?: string;
10093
- error?: string | null;
10094
- gateway_attempt_id?: string | null;
10095
- gateway_status?: number | null;
11776
+ ended_at?: string | null;
10096
11777
  id?: string;
10097
- intent: string;
10098
- ok: boolean;
10099
- request_summary?: import("../integrations/supabase/types").Json | null;
10100
- trade_item_id?: string | null;
11778
+ started_at?: string;
10101
11779
  user_id: string;
11780
+ werkbon_id: string;
10102
11781
  };
10103
11782
  Update: {
10104
- action?: string;
10105
- connection_id?: string | null;
11783
+ activity?: string;
10106
11784
  created_at?: string;
10107
- error?: string | null;
10108
- gateway_attempt_id?: string | null;
10109
- gateway_status?: number | null;
11785
+ ended_at?: string | null;
10110
11786
  id?: string;
10111
- intent?: string;
10112
- ok?: boolean;
10113
- request_summary?: import("../integrations/supabase/types").Json | null;
10114
- trade_item_id?: string | null;
11787
+ started_at?: string;
10115
11788
  user_id?: string;
11789
+ werkbon_id?: string;
10116
11790
  };
10117
- 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
+ }];
11798
+ };
11799
+ werkbonnen: {
11800
+ Row: {
11801
+ assigned_user_id: string | null;
11802
+ budget_mandate_cents: number;
11803
+ complaint_description: string | null;
11804
+ created_at: string;
11805
+ created_by: string | null;
11806
+ customer_id: string | null;
11807
+ externe_referentie: string | null;
11808
+ first_time_fix: boolean | null;
11809
+ 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;
11831
+ };
11832
+ Insert: {
11833
+ assigned_user_id?: string | null;
11834
+ budget_mandate_cents?: number;
11835
+ complaint_description?: string | null;
11836
+ created_at?: string;
11837
+ created_by?: string | null;
11838
+ customer_id?: string | null;
11839
+ externe_referentie?: string | null;
11840
+ first_time_fix?: boolean | null;
11841
+ 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;
11863
+ };
11864
+ Update: {
11865
+ assigned_user_id?: string | null;
11866
+ budget_mandate_cents?: number;
11867
+ complaint_description?: string | null;
11868
+ created_at?: string;
11869
+ created_by?: string | null;
11870
+ customer_id?: string | null;
11871
+ externe_referentie?: string | null;
11872
+ first_time_fix?: boolean | null;
11873
+ 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;
11895
+ };
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
+ }];
10118
11909
  };
10119
11910
  work_order_monteurs: {
10120
11911
  Row: {
@@ -10286,6 +12077,8 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
10286
12077
  created_at: string | null;
10287
12078
  created_by: string | null;
10288
12079
  display_name: string | null;
12080
+ graph_subscription_expires_at: string | null;
12081
+ graph_subscription_id: string | null;
10289
12082
  has_access_token: boolean | null;
10290
12083
  has_client_id: boolean | null;
10291
12084
  has_client_secret: boolean | null;
@@ -10303,6 +12096,7 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
10303
12096
  oauth_mode: string | null;
10304
12097
  provider: string | null;
10305
12098
  purpose_assignments: import("../integrations/supabase/types").Json | null;
12099
+ realtime_mode: string | null;
10306
12100
  scopes: string[] | null;
10307
12101
  smtp_host: string | null;
10308
12102
  smtp_port: number | null;
@@ -10317,6 +12111,8 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
10317
12111
  created_at?: string | null;
10318
12112
  created_by?: string | null;
10319
12113
  display_name?: string | null;
12114
+ graph_subscription_expires_at?: string | null;
12115
+ graph_subscription_id?: string | null;
10320
12116
  has_access_token?: never;
10321
12117
  has_client_id?: never;
10322
12118
  has_client_secret?: never;
@@ -10334,6 +12130,7 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
10334
12130
  oauth_mode?: string | null;
10335
12131
  provider?: string | null;
10336
12132
  purpose_assignments?: import("../integrations/supabase/types").Json | null;
12133
+ realtime_mode?: string | null;
10337
12134
  scopes?: string[] | null;
10338
12135
  smtp_host?: string | null;
10339
12136
  smtp_port?: number | null;
@@ -10348,6 +12145,8 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
10348
12145
  created_at?: string | null;
10349
12146
  created_by?: string | null;
10350
12147
  display_name?: string | null;
12148
+ graph_subscription_expires_at?: string | null;
12149
+ graph_subscription_id?: string | null;
10351
12150
  has_access_token?: never;
10352
12151
  has_client_id?: never;
10353
12152
  has_client_secret?: never;
@@ -10365,6 +12164,7 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
10365
12164
  oauth_mode?: string | null;
10366
12165
  provider?: string | null;
10367
12166
  purpose_assignments?: import("../integrations/supabase/types").Json | null;
12167
+ realtime_mode?: string | null;
10368
12168
  scopes?: string[] | null;
10369
12169
  smtp_host?: string | null;
10370
12170
  smtp_port?: number | null;
@@ -10475,6 +12275,25 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
10475
12275
  };
10476
12276
  Relationships: [];
10477
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
+ };
10478
12297
  local_customer_discounts: {
10479
12298
  Row: {
10480
12299
  base_price: number | null;
@@ -10811,6 +12630,21 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
10811
12630
  };
10812
12631
  Returns: string;
10813
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
+ };
10814
12648
  apply_stock_consumption: {
10815
12649
  Args: {
10816
12650
  p_order_id: string;
@@ -10868,6 +12702,12 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
10868
12702
  processed_items: number;
10869
12703
  }[];
10870
12704
  };
12705
+ calculate_layer_stock: {
12706
+ Args: {
12707
+ p_product_id: string;
12708
+ };
12709
+ Returns: number;
12710
+ };
10871
12711
  call_exact_route: {
10872
12712
  Args: {
10873
12713
  path: string;
@@ -10896,6 +12736,33 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
10896
12736
  };
10897
12737
  Returns: import("../integrations/supabase/types").Json;
10898
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
+ };
10899
12766
  cleanup_old_bookings: {
10900
12767
  Args: never;
10901
12768
  Returns: undefined;
@@ -10954,6 +12821,12 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
10954
12821
  Args: never;
10955
12822
  Returns: string;
10956
12823
  };
12824
+ custom_access_token_hook: {
12825
+ Args: {
12826
+ event: import("../integrations/supabase/types").Json;
12827
+ };
12828
+ Returns: import("../integrations/supabase/types").Json;
12829
+ };
10957
12830
  dashboard_alert_counts: {
10958
12831
  Args: never;
10959
12832
  Returns: import("../integrations/supabase/types").Json;
@@ -11021,6 +12894,16 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
11021
12894
  status: string;
11022
12895
  }[];
11023
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
+ };
11024
12907
  enqueue_cart_replan_if_unlocked: {
11025
12908
  Args: {
11026
12909
  p_order_id: string;
@@ -11140,6 +13023,19 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
11140
13023
  resource: string;
11141
13024
  }[];
11142
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
+ };
11143
13039
  get_floriday_clock_supplies_window: {
11144
13040
  Args: {
11145
13041
  p_from: string;
@@ -11227,6 +13123,12 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
11227
13123
  };
11228
13124
  Returns: string;
11229
13125
  };
13126
+ get_inventory_stock_for_key: {
13127
+ Args: {
13128
+ p_key: string;
13129
+ };
13130
+ Returns: number;
13131
+ };
11230
13132
  get_offer_by_link_code: {
11231
13133
  Args: {
11232
13134
  p_code: string;
@@ -11257,6 +13159,12 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
11257
13159
  };
11258
13160
  Returns: string;
11259
13161
  };
13162
+ get_product_group_available_stock: {
13163
+ Args: {
13164
+ p_group_id: string;
13165
+ };
13166
+ Returns: number;
13167
+ };
11260
13168
  get_room_busy_windows: {
11261
13169
  Args: {
11262
13170
  p_from: string;
@@ -11288,6 +13196,14 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
11288
13196
  };
11289
13197
  Returns: string;
11290
13198
  };
13199
+ has_module_permission: {
13200
+ Args: {
13201
+ _min: string;
13202
+ _module_id: string;
13203
+ _user_id: string;
13204
+ };
13205
+ Returns: boolean;
13206
+ };
11291
13207
  has_role: {
11292
13208
  Args: {
11293
13209
  _role: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
@@ -11295,6 +13211,10 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
11295
13211
  };
11296
13212
  Returns: boolean;
11297
13213
  };
13214
+ has_twinfield_link: {
13215
+ Args: never;
13216
+ Returns: boolean;
13217
+ };
11298
13218
  is_authenticated: {
11299
13219
  Args: never;
11300
13220
  Returns: boolean;
@@ -11309,6 +13229,37 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
11309
13229
  };
11310
13230
  Returns: boolean;
11311
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
+ };
11312
13263
  local_effective_price: {
11313
13264
  Args: {
11314
13265
  _customer_id: string;
@@ -11325,6 +13276,22 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
11325
13276
  source_id: string;
11326
13277
  }[];
11327
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
+ };
11328
13295
  mark_offer_clicked: {
11329
13296
  Args: {
11330
13297
  p_code: string;
@@ -11337,6 +13304,13 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
11337
13304
  };
11338
13305
  Returns: undefined;
11339
13306
  };
13307
+ mark_salesorder_controlled: {
13308
+ Args: {
13309
+ p_controlled: boolean;
13310
+ p_floriday_id: string;
13311
+ };
13312
+ Returns: undefined;
13313
+ };
11340
13314
  mark_shipment_shipped: {
11341
13315
  Args: {
11342
13316
  p_shipment_id: string;
@@ -11369,6 +13343,10 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
11369
13343
  };
11370
13344
  Returns: string;
11371
13345
  };
13346
+ next_twinfield_code: {
13347
+ Args: never;
13348
+ Returns: string;
13349
+ };
11372
13350
  next_work_order_number: {
11373
13351
  Args: {
11374
13352
  p_parent_work_order_id?: string;
@@ -11425,6 +13403,15 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
11425
13403
  };
11426
13404
  Returns: undefined;
11427
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
+ };
11428
13415
  pickstation_set_cart_status: {
11429
13416
  Args: {
11430
13417
  p_cart_index: number;
@@ -11495,6 +13482,12 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
11495
13482
  };
11496
13483
  Returns: number;
11497
13484
  };
13485
+ reorder_customer_price_groups: {
13486
+ Args: {
13487
+ _ids: string[];
13488
+ };
13489
+ Returns: undefined;
13490
+ };
11498
13491
  reset_floriday_sync_cursor: {
11499
13492
  Args: {
11500
13493
  p_connection_id: string;
@@ -11530,6 +13523,12 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
11530
13523
  };
11531
13524
  Returns: string;
11532
13525
  };
13526
+ retry_twinfield_push: {
13527
+ Args: {
13528
+ _customer_id: string;
13529
+ };
13530
+ Returns: number;
13531
+ };
11533
13532
  reverse_production: {
11534
13533
  Args: {
11535
13534
  p_connection_id?: string;
@@ -11547,6 +13546,20 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
11547
13546
  };
11548
13547
  Returns: number;
11549
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
+ };
11550
13563
  schedule_floriday_base_items_sync: {
11551
13564
  Args: {
11552
13565
  p_apikey: string;
@@ -11793,6 +13806,17 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
11793
13806
  };
11794
13807
  Returns: number;
11795
13808
  };
13809
+ self_heal_floriday_links: {
13810
+ Args: never;
13811
+ Returns: number;
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
+ };
11796
13820
  show_limit: {
11797
13821
  Args: never;
11798
13822
  Returns: number;
@@ -11803,18 +13827,34 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
11803
13827
  };
11804
13828
  Returns: string[];
11805
13829
  };
13830
+ sync_all_layer_stocks: {
13831
+ Args: never;
13832
+ Returns: undefined;
13833
+ };
11806
13834
  sync_cached_packing_from_product: {
11807
13835
  Args: {
11808
13836
  p_product_id: string;
11809
13837
  };
11810
13838
  Returns: undefined;
11811
13839
  };
13840
+ sync_layer_stock: {
13841
+ Args: {
13842
+ p_product_id: string;
13843
+ };
13844
+ Returns: undefined;
13845
+ };
11812
13846
  sync_order_cart_item_packing_from_product: {
11813
13847
  Args: {
11814
13848
  p_product_id: string;
11815
13849
  };
11816
13850
  Returns: undefined;
11817
13851
  };
13852
+ sync_product_group_belading: {
13853
+ Args: {
13854
+ _group_id: string;
13855
+ };
13856
+ Returns: undefined;
13857
+ };
11818
13858
  sync_product_packing_from_floriday_cache: {
11819
13859
  Args: {
11820
13860
  p_floriday_id: string;
@@ -11846,9 +13886,12 @@ export declare const publishCustomerOfferFn: import("@tanstack/start-client-core
11846
13886
  };
11847
13887
  };
11848
13888
  Enums: {
11849
- app_role: "admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie" | "monteur";
13889
+ app_role: "admin" | "planner" | "monteur" | "administratie" | "ai_admin";
11850
13890
  exact_env: "staging" | "live";
11851
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";
11852
13895
  quote_status: "concept" | "verzonden" | "bekeken" | "in_behandeling" | "geaccepteerd" | "afgewezen" | "verlopen" | "gearchiveerd";
11853
13896
  };
11854
13897
  CompositeTypes: { [_ in never]: never; };