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