@flowselections/floriday-voorraad 1.0.22 → 1.0.26

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