@flowselections/floriday-voorraad 1.0.23 → 1.0.27

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