@flowselections/floriday-verkoop-module 1.0.21 → 1.0.25

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 (95) hide show
  1. package/dist-lib/components/karindeling/AfmetingenTab.d.ts +6 -0
  2. package/dist-lib/components/karindeling/AfmetingenTab.d.ts.map +1 -0
  3. package/dist-lib/components/karindeling/AfmetingenTab.js +128 -0
  4. package/dist-lib/components/karindeling/KarindelingPage.d.ts +2 -0
  5. package/dist-lib/components/karindeling/KarindelingPage.d.ts.map +1 -0
  6. package/dist-lib/components/karindeling/KarindelingPage.js +102 -0
  7. package/dist-lib/components/verkoop/OrderKarindelingCard.d.ts.map +1 -1
  8. package/dist-lib/components/verkoop/OrderKarindelingCard.js +83 -37
  9. package/dist-lib/components/verkoop/SalesOrderDetailPage.d.ts.map +1 -1
  10. package/dist-lib/components/verkoop/SalesOrderDetailPage.js +59 -8
  11. package/dist-lib/components/verkoop/SalesOrderDetailView.d.ts +2 -1
  12. package/dist-lib/components/verkoop/SalesOrderDetailView.d.ts.map +1 -1
  13. package/dist-lib/components/verkoop/SalesOrderDetailView.js +2 -2
  14. package/dist-lib/components/verkoop/SalesOrdersTable.d.ts.map +1 -1
  15. package/dist-lib/components/verkoop/SalesOrdersTable.js +36 -4
  16. package/dist-lib/components/verkoop/VerkoopOrdersPage.d.ts.map +1 -1
  17. package/dist-lib/components/verkoop/VerkoopOrdersPage.js +18 -2
  18. package/dist-lib/index.d.ts +1 -0
  19. package/dist-lib/index.d.ts.map +1 -1
  20. package/dist-lib/index.js +12 -1
  21. package/dist-lib/integrations/supabase/auth-middleware.d.ts +2353 -374
  22. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
  23. package/dist-lib/integrations/supabase/client.d.ts +2353 -374
  24. package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
  25. package/dist-lib/integrations/supabase/client.js +24 -9
  26. package/dist-lib/integrations/supabase/client.server.d.ts +2353 -374
  27. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
  28. package/dist-lib/integrations/supabase/types.d.ts +2406 -376
  29. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  30. package/dist-lib/integrations/supabase/types.js +11 -9
  31. package/dist-lib/lib/cart-lock.functions.d.ts +2353 -374
  32. package/dist-lib/lib/cart-lock.functions.d.ts.map +1 -1
  33. package/dist-lib/lib/cart-planner.d.ts +9 -1
  34. package/dist-lib/lib/cart-planner.d.ts.map +1 -1
  35. package/dist-lib/lib/cart-planner.js +21 -4
  36. package/dist-lib/lib/cart-planning-settings.functions.d.ts +152282 -0
  37. package/dist-lib/lib/cart-planning-settings.functions.d.ts.map +1 -0
  38. package/dist-lib/lib/cart-planning-settings.functions.js +375 -0
  39. package/dist-lib/lib/cart-replan.functions.d.ts +18468 -651
  40. package/dist-lib/lib/cart-replan.functions.d.ts.map +1 -1
  41. package/dist-lib/lib/cart-replan.functions.js +85 -27
  42. package/dist-lib/lib/create-order.functions.d.ts +25367 -1619
  43. package/dist-lib/lib/create-order.functions.d.ts.map +1 -1
  44. package/dist-lib/lib/cron/index.d.ts +5 -0
  45. package/dist-lib/lib/cron/index.d.ts.map +1 -0
  46. package/dist-lib/lib/cron/index.js +4 -0
  47. package/dist-lib/lib/cron/mirror-floriday-orders.d.ts +4 -0
  48. package/dist-lib/lib/cron/mirror-floriday-orders.d.ts.map +1 -0
  49. package/dist-lib/lib/cron/mirror-floriday-orders.js +23 -0
  50. package/dist-lib/lib/cron/replan-carts.d.ts +4 -0
  51. package/dist-lib/lib/cron/replan-carts.d.ts.map +1 -0
  52. package/dist-lib/lib/cron/replan-carts.js +18 -0
  53. package/dist-lib/lib/cron/sync-salesorders.d.ts +4 -0
  54. package/dist-lib/lib/cron/sync-salesorders.d.ts.map +1 -0
  55. package/dist-lib/lib/cron/sync-salesorders.js +18 -0
  56. package/dist-lib/lib/cron/sync-tradeitems.d.ts +4 -0
  57. package/dist-lib/lib/cron/sync-tradeitems.d.ts.map +1 -0
  58. package/dist-lib/lib/cron/sync-tradeitems.js +18 -0
  59. package/dist-lib/lib/floriday-auto-fulfillment.functions.d.ts +6539 -602
  60. package/dist-lib/lib/floriday-auto-fulfillment.functions.d.ts.map +1 -1
  61. package/dist-lib/lib/floriday-auto-fulfillment.server.js +1 -1
  62. package/dist-lib/lib/floriday-central-token.server.d.ts +12 -0
  63. package/dist-lib/lib/floriday-central-token.server.d.ts.map +1 -0
  64. package/dist-lib/lib/floriday-central-token.server.js +58 -0
  65. package/dist-lib/lib/floriday-gateway.server.d.ts +2 -2
  66. package/dist-lib/lib/floriday-gateway.server.d.ts.map +1 -1
  67. package/dist-lib/lib/floriday-gateway.server.js +10 -37
  68. package/dist-lib/lib/floriday-logistic-labels.functions.d.ts +2353 -374
  69. package/dist-lib/lib/floriday-logistic-labels.functions.d.ts.map +1 -1
  70. package/dist-lib/lib/floriday-logistic-labels.functions.js +14 -4
  71. package/dist-lib/lib/floriday-mirror.functions.d.ts +13846 -0
  72. package/dist-lib/lib/floriday-mirror.functions.d.ts.map +1 -0
  73. package/dist-lib/lib/floriday-mirror.functions.js +278 -0
  74. package/dist-lib/lib/floriday-public.functions.d.ts +14907 -1054
  75. package/dist-lib/lib/floriday-public.functions.d.ts.map +1 -1
  76. package/dist-lib/lib/floriday-sync.d.ts +0 -1
  77. package/dist-lib/lib/floriday-sync.d.ts.map +1 -1
  78. package/dist-lib/lib/floriday-sync.js +1 -1
  79. package/dist-lib/lib/floriday-writes.functions.d.ts +10723 -828
  80. package/dist-lib/lib/floriday-writes.functions.d.ts.map +1 -1
  81. package/dist-lib/lib/order-buffers.functions.d.ts +41540 -0
  82. package/dist-lib/lib/order-buffers.functions.d.ts.map +1 -0
  83. package/dist-lib/lib/order-buffers.functions.js +244 -0
  84. package/dist-lib/lib/order-shipments.functions.d.ts +8631 -715
  85. package/dist-lib/lib/order-shipments.functions.d.ts.map +1 -1
  86. package/dist-lib/lib/salesorders-mapping.d.ts +3 -0
  87. package/dist-lib/lib/salesorders-mapping.d.ts.map +1 -1
  88. package/dist-lib/lib/salesorders.functions.d.ts +10725 -828
  89. package/dist-lib/lib/salesorders.functions.d.ts.map +1 -1
  90. package/dist-lib/lib/salesorders.functions.js +129 -3
  91. package/dist-lib/lib/tradeitems.functions.d.ts +2353 -374
  92. package/dist-lib/lib/tradeitems.functions.d.ts.map +1 -1
  93. package/dist-lib/lib/useSalesOrdersQuery.d.ts.map +1 -1
  94. package/dist-lib/lib/useSalesOrdersQuery.js +37 -2
  95. package/package.json +27 -5
@@ -246,12 +246,98 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
246
246
  };
247
247
  Relationships: [];
248
248
  };
249
+ ai_admin_credentials: {
250
+ Row: {
251
+ active: boolean;
252
+ admin_key: string;
253
+ created_at: string;
254
+ id: string;
255
+ label: string;
256
+ provider_id: string;
257
+ updated_at: string;
258
+ };
259
+ Insert: {
260
+ active?: boolean;
261
+ admin_key: string;
262
+ created_at?: string;
263
+ id?: string;
264
+ label: string;
265
+ provider_id: string;
266
+ updated_at?: string;
267
+ };
268
+ Update: {
269
+ active?: boolean;
270
+ admin_key?: string;
271
+ created_at?: string;
272
+ id?: string;
273
+ label?: string;
274
+ provider_id?: string;
275
+ updated_at?: string;
276
+ };
277
+ Relationships: [{
278
+ foreignKeyName: "ai_admin_credentials_provider_id_fkey";
279
+ columns: ["provider_id"];
280
+ isOneToOne: true;
281
+ referencedRelation: "ai_providers";
282
+ referencedColumns: ["id"];
283
+ }];
284
+ };
285
+ ai_call_log: {
286
+ Row: {
287
+ consumer_module_id: string;
288
+ cost_usd: number | null;
289
+ created_at: string;
290
+ created_by: string | null;
291
+ duration_ms: number | null;
292
+ error_code: string | null;
293
+ error_message: string | null;
294
+ id: string;
295
+ input_tokens: number;
296
+ model_slug: string | null;
297
+ output_tokens: number;
298
+ provider_slug: string | null;
299
+ status: string;
300
+ total_tokens: number;
301
+ };
302
+ Insert: {
303
+ consumer_module_id: string;
304
+ cost_usd?: number | null;
305
+ created_at?: string;
306
+ created_by?: string | null;
307
+ duration_ms?: number | null;
308
+ error_code?: string | null;
309
+ error_message?: string | null;
310
+ id?: string;
311
+ input_tokens?: number;
312
+ model_slug?: string | null;
313
+ output_tokens?: number;
314
+ provider_slug?: string | null;
315
+ status: string;
316
+ total_tokens?: number;
317
+ };
318
+ Update: {
319
+ consumer_module_id?: string;
320
+ cost_usd?: number | null;
321
+ created_at?: string;
322
+ created_by?: string | null;
323
+ duration_ms?: number | null;
324
+ error_code?: string | null;
325
+ error_message?: string | null;
326
+ id?: string;
327
+ input_tokens?: number;
328
+ model_slug?: string | null;
329
+ output_tokens?: number;
330
+ provider_slug?: string | null;
331
+ status?: string;
332
+ total_tokens?: number;
333
+ };
334
+ Relationships: [];
335
+ };
249
336
  ai_credentials: {
250
337
  Row: {
251
338
  active: boolean;
252
339
  api_key: string;
253
340
  created_at: string;
254
- created_by: string | null;
255
341
  id: string;
256
342
  label: string;
257
343
  provider_id: string;
@@ -261,7 +347,6 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
261
347
  active?: boolean;
262
348
  api_key: string;
263
349
  created_at?: string;
264
- created_by?: string | null;
265
350
  id?: string;
266
351
  label: string;
267
352
  provider_id: string;
@@ -271,7 +356,6 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
271
356
  active?: boolean;
272
357
  api_key?: string;
273
358
  created_at?: string;
274
- created_by?: string | null;
275
359
  id?: string;
276
360
  label?: string;
277
361
  provider_id?: string;
@@ -285,6 +369,75 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
285
369
  referencedColumns: ["id"];
286
370
  }];
287
371
  };
372
+ ai_goals: {
373
+ Row: {
374
+ active: boolean;
375
+ created_at: string;
376
+ description: string | null;
377
+ key: string;
378
+ label: string;
379
+ sort_order: number;
380
+ updated_at: string;
381
+ };
382
+ Insert: {
383
+ active?: boolean;
384
+ created_at?: string;
385
+ description?: string | null;
386
+ key: string;
387
+ label: string;
388
+ sort_order?: number;
389
+ updated_at?: string;
390
+ };
391
+ Update: {
392
+ active?: boolean;
393
+ created_at?: string;
394
+ description?: string | null;
395
+ key?: string;
396
+ label?: string;
397
+ sort_order?: number;
398
+ updated_at?: string;
399
+ };
400
+ Relationships: [];
401
+ };
402
+ ai_model_pricing: {
403
+ Row: {
404
+ created_at: string;
405
+ currency: string;
406
+ fetched_at: string;
407
+ id: string;
408
+ input_per_mtok: number | null;
409
+ model_slug: string;
410
+ output_per_mtok: number | null;
411
+ provider_slug: string;
412
+ source: string;
413
+ updated_at: string;
414
+ };
415
+ Insert: {
416
+ created_at?: string;
417
+ currency?: string;
418
+ fetched_at?: string;
419
+ id?: string;
420
+ input_per_mtok?: number | null;
421
+ model_slug: string;
422
+ output_per_mtok?: number | null;
423
+ provider_slug: string;
424
+ source?: string;
425
+ updated_at?: string;
426
+ };
427
+ Update: {
428
+ created_at?: string;
429
+ currency?: string;
430
+ fetched_at?: string;
431
+ id?: string;
432
+ input_per_mtok?: number | null;
433
+ model_slug?: string;
434
+ output_per_mtok?: number | null;
435
+ provider_slug?: string;
436
+ source?: string;
437
+ updated_at?: string;
438
+ };
439
+ Relationships: [];
440
+ };
288
441
  ai_models: {
289
442
  Row: {
290
443
  active: boolean;
@@ -1032,6 +1185,141 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
1032
1185
  };
1033
1186
  Relationships: [];
1034
1187
  };
1188
+ cart_planning_pick_times: {
1189
+ Row: {
1190
+ created_at: string;
1191
+ id: string;
1192
+ pot_size: string;
1193
+ seconds_per_cart: number;
1194
+ updated_at: string;
1195
+ };
1196
+ Insert: {
1197
+ created_at?: string;
1198
+ id?: string;
1199
+ pot_size: string;
1200
+ seconds_per_cart: number;
1201
+ updated_at?: string;
1202
+ };
1203
+ Update: {
1204
+ created_at?: string;
1205
+ id?: string;
1206
+ pot_size?: string;
1207
+ seconds_per_cart?: number;
1208
+ updated_at?: string;
1209
+ };
1210
+ Relationships: [];
1211
+ };
1212
+ cart_planning_product_overrides: {
1213
+ Row: {
1214
+ created_at: string;
1215
+ id: string;
1216
+ max_party_share_per_layer_pct_override: number | null;
1217
+ never_mix: boolean;
1218
+ notes: string | null;
1219
+ product_id: string;
1220
+ updated_at: string;
1221
+ };
1222
+ Insert: {
1223
+ created_at?: string;
1224
+ id?: string;
1225
+ max_party_share_per_layer_pct_override?: number | null;
1226
+ never_mix?: boolean;
1227
+ notes?: string | null;
1228
+ product_id: string;
1229
+ updated_at?: string;
1230
+ };
1231
+ Update: {
1232
+ created_at?: string;
1233
+ id?: string;
1234
+ max_party_share_per_layer_pct_override?: number | null;
1235
+ never_mix?: boolean;
1236
+ notes?: string | null;
1237
+ product_id?: string;
1238
+ updated_at?: string;
1239
+ };
1240
+ Relationships: [{
1241
+ foreignKeyName: "cart_planning_product_overrides_product_id_fkey";
1242
+ columns: ["product_id"];
1243
+ isOneToOne: true;
1244
+ referencedRelation: "products";
1245
+ referencedColumns: ["id"];
1246
+ }];
1247
+ };
1248
+ cart_planning_settings: {
1249
+ Row: {
1250
+ allow_editing_after_pickstation_send: boolean;
1251
+ buffer_grouping_mode: string;
1252
+ combine_floriday_orders: boolean;
1253
+ combine_floriday_orders_window: string;
1254
+ combine_orders_scope: string;
1255
+ default_workers: number;
1256
+ id: number;
1257
+ max_beladingen_per_layer: number;
1258
+ max_customers_per_cart: number;
1259
+ max_one_customer_per_layer: boolean;
1260
+ max_party_share_per_layer_pct: number;
1261
+ optimization_strategy: string;
1262
+ own_cart_from_layers: number;
1263
+ pick_time_mode: string;
1264
+ plants_per_day: number;
1265
+ plants_per_hour: number;
1266
+ require_same_carrier: boolean;
1267
+ require_same_crate_type: boolean;
1268
+ require_same_delivery_date: boolean;
1269
+ require_same_delivery_location: boolean;
1270
+ updated_at: string;
1271
+ updated_by: string | null;
1272
+ };
1273
+ Insert: {
1274
+ allow_editing_after_pickstation_send?: boolean;
1275
+ buffer_grouping_mode?: string;
1276
+ combine_floriday_orders?: boolean;
1277
+ combine_floriday_orders_window?: string;
1278
+ combine_orders_scope?: string;
1279
+ default_workers?: number;
1280
+ id?: number;
1281
+ max_beladingen_per_layer?: number;
1282
+ max_customers_per_cart?: number;
1283
+ max_one_customer_per_layer?: boolean;
1284
+ max_party_share_per_layer_pct?: number;
1285
+ optimization_strategy?: string;
1286
+ own_cart_from_layers?: number;
1287
+ pick_time_mode?: string;
1288
+ plants_per_day?: number;
1289
+ plants_per_hour?: number;
1290
+ require_same_carrier?: boolean;
1291
+ require_same_crate_type?: boolean;
1292
+ require_same_delivery_date?: boolean;
1293
+ require_same_delivery_location?: boolean;
1294
+ updated_at?: string;
1295
+ updated_by?: string | null;
1296
+ };
1297
+ Update: {
1298
+ allow_editing_after_pickstation_send?: boolean;
1299
+ buffer_grouping_mode?: string;
1300
+ combine_floriday_orders?: boolean;
1301
+ combine_floriday_orders_window?: string;
1302
+ combine_orders_scope?: string;
1303
+ default_workers?: number;
1304
+ id?: number;
1305
+ max_beladingen_per_layer?: number;
1306
+ max_customers_per_cart?: number;
1307
+ max_one_customer_per_layer?: boolean;
1308
+ max_party_share_per_layer_pct?: number;
1309
+ optimization_strategy?: string;
1310
+ own_cart_from_layers?: number;
1311
+ pick_time_mode?: string;
1312
+ plants_per_day?: number;
1313
+ plants_per_hour?: number;
1314
+ require_same_carrier?: boolean;
1315
+ require_same_crate_type?: boolean;
1316
+ require_same_delivery_date?: boolean;
1317
+ require_same_delivery_location?: boolean;
1318
+ updated_at?: string;
1319
+ updated_by?: string | null;
1320
+ };
1321
+ Relationships: [];
1322
+ };
1035
1323
  cart_replan_queue: {
1036
1324
  Row: {
1037
1325
  attempts: number;
@@ -1062,111 +1350,237 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
1062
1350
  referencedColumns: ["id"];
1063
1351
  }];
1064
1352
  };
1065
- collections: {
1353
+ cart_types: {
1066
1354
  Row: {
1067
1355
  created_at: string;
1068
- created_by: string | null;
1069
1356
  id: string;
1357
+ is_default: boolean;
1358
+ layer_length_cm: number;
1359
+ layer_width_cm: number;
1360
+ layers_per_cart: number;
1070
1361
  name: string;
1071
1362
  updated_at: string;
1072
1363
  };
1073
1364
  Insert: {
1074
1365
  created_at?: string;
1075
- created_by?: string | null;
1076
1366
  id?: string;
1367
+ is_default?: boolean;
1368
+ layer_length_cm: number;
1369
+ layer_width_cm: number;
1370
+ layers_per_cart?: number;
1077
1371
  name: string;
1078
1372
  updated_at?: string;
1079
1373
  };
1080
1374
  Update: {
1081
1375
  created_at?: string;
1082
- created_by?: string | null;
1083
1376
  id?: string;
1377
+ is_default?: boolean;
1378
+ layer_length_cm?: number;
1379
+ layer_width_cm?: number;
1380
+ layers_per_cart?: number;
1084
1381
  name?: string;
1085
1382
  updated_at?: string;
1086
1383
  };
1087
1384
  Relationships: [];
1088
1385
  };
1089
- customer_audit_log: {
1386
+ catalog_articles_cache: {
1090
1387
  Row: {
1091
- action: string;
1092
- changes: import("../integrations/supabase/types").Json;
1093
1388
  created_at: string;
1094
- customer_id: string;
1389
+ default_price: number;
1390
+ default_vat_rate_ref: string | null;
1391
+ external_ref: string;
1095
1392
  id: string;
1096
- user_id: string | null;
1393
+ name: string;
1394
+ updated_at: string;
1395
+ user_id: string;
1097
1396
  };
1098
1397
  Insert: {
1099
- action: string;
1100
- changes?: import("../integrations/supabase/types").Json;
1101
1398
  created_at?: string;
1102
- customer_id: string;
1399
+ default_price?: number;
1400
+ default_vat_rate_ref?: string | null;
1401
+ external_ref: string;
1103
1402
  id?: string;
1104
- user_id?: string | null;
1403
+ name: string;
1404
+ updated_at?: string;
1405
+ user_id: string;
1105
1406
  };
1106
1407
  Update: {
1107
- action?: string;
1108
- changes?: import("../integrations/supabase/types").Json;
1109
1408
  created_at?: string;
1110
- customer_id?: string;
1409
+ default_price?: number;
1410
+ default_vat_rate_ref?: string | null;
1411
+ external_ref?: string;
1111
1412
  id?: string;
1112
- user_id?: string | null;
1413
+ name?: string;
1414
+ updated_at?: string;
1415
+ user_id?: string;
1113
1416
  };
1114
- Relationships: [{
1115
- foreignKeyName: "customer_audit_log_customer_id_fkey";
1116
- columns: ["customer_id"];
1117
- isOneToOne: false;
1118
- referencedRelation: "customers";
1119
- referencedColumns: ["id"];
1120
- }];
1417
+ Relationships: [];
1121
1418
  };
1122
- customer_contacts: {
1419
+ catalog_vat_rates_cache: {
1123
1420
  Row: {
1124
1421
  created_at: string;
1125
- customer_id: string;
1126
- email: string | null;
1127
- floriday_contact_id: string | null;
1128
- full_name: string;
1422
+ external_ref: string;
1129
1423
  id: string;
1130
- is_active: boolean;
1131
- job_title: string | null;
1132
- phone: string | null;
1133
- photo_url: string | null;
1134
- raw: import("../integrations/supabase/types").Json | null;
1424
+ label: string;
1425
+ percentage: number;
1135
1426
  updated_at: string;
1427
+ user_id: string;
1136
1428
  };
1137
1429
  Insert: {
1138
1430
  created_at?: string;
1139
- customer_id: string;
1140
- email?: string | null;
1141
- floriday_contact_id?: string | null;
1142
- full_name: string;
1431
+ external_ref: string;
1143
1432
  id?: string;
1144
- is_active?: boolean;
1145
- job_title?: string | null;
1146
- phone?: string | null;
1147
- photo_url?: string | null;
1148
- raw?: import("../integrations/supabase/types").Json | null;
1433
+ label: string;
1434
+ percentage?: number;
1149
1435
  updated_at?: string;
1436
+ user_id: string;
1150
1437
  };
1151
1438
  Update: {
1152
1439
  created_at?: string;
1153
- customer_id?: string;
1154
- email?: string | null;
1155
- floriday_contact_id?: string | null;
1156
- full_name?: string;
1440
+ external_ref?: string;
1157
1441
  id?: string;
1158
- is_active?: boolean;
1159
- job_title?: string | null;
1160
- phone?: string | null;
1161
- photo_url?: string | null;
1162
- raw?: import("../integrations/supabase/types").Json | null;
1442
+ label?: string;
1443
+ percentage?: number;
1163
1444
  updated_at?: string;
1445
+ user_id?: string;
1164
1446
  };
1165
- Relationships: [{
1166
- foreignKeyName: "customer_contacts_customer_id_fkey";
1167
- columns: ["customer_id"];
1168
- isOneToOne: false;
1169
- referencedRelation: "customers";
1447
+ Relationships: [];
1448
+ };
1449
+ collections: {
1450
+ Row: {
1451
+ created_at: string;
1452
+ created_by: string | null;
1453
+ id: string;
1454
+ name: string;
1455
+ updated_at: string;
1456
+ };
1457
+ Insert: {
1458
+ created_at?: string;
1459
+ created_by?: string | null;
1460
+ id?: string;
1461
+ name: string;
1462
+ updated_at?: string;
1463
+ };
1464
+ Update: {
1465
+ created_at?: string;
1466
+ created_by?: string | null;
1467
+ id?: string;
1468
+ name?: string;
1469
+ updated_at?: string;
1470
+ };
1471
+ Relationships: [];
1472
+ };
1473
+ crate_types: {
1474
+ Row: {
1475
+ created_at: string;
1476
+ id: string;
1477
+ length_cm: number;
1478
+ name: string;
1479
+ plants_per_crate: number;
1480
+ updated_at: string;
1481
+ width_cm: number;
1482
+ };
1483
+ Insert: {
1484
+ created_at?: string;
1485
+ id?: string;
1486
+ length_cm: number;
1487
+ name: string;
1488
+ plants_per_crate?: number;
1489
+ updated_at?: string;
1490
+ width_cm: number;
1491
+ };
1492
+ Update: {
1493
+ created_at?: string;
1494
+ id?: string;
1495
+ length_cm?: number;
1496
+ name?: string;
1497
+ plants_per_crate?: number;
1498
+ updated_at?: string;
1499
+ width_cm?: number;
1500
+ };
1501
+ Relationships: [];
1502
+ };
1503
+ customer_audit_log: {
1504
+ Row: {
1505
+ action: string;
1506
+ changes: import("../integrations/supabase/types").Json;
1507
+ created_at: string;
1508
+ customer_id: string;
1509
+ id: string;
1510
+ user_id: string | null;
1511
+ };
1512
+ Insert: {
1513
+ action: string;
1514
+ changes?: import("../integrations/supabase/types").Json;
1515
+ created_at?: string;
1516
+ customer_id: string;
1517
+ id?: string;
1518
+ user_id?: string | null;
1519
+ };
1520
+ Update: {
1521
+ action?: string;
1522
+ changes?: import("../integrations/supabase/types").Json;
1523
+ created_at?: string;
1524
+ customer_id?: string;
1525
+ id?: string;
1526
+ user_id?: string | null;
1527
+ };
1528
+ Relationships: [{
1529
+ foreignKeyName: "customer_audit_log_customer_id_fkey";
1530
+ columns: ["customer_id"];
1531
+ isOneToOne: false;
1532
+ referencedRelation: "customers";
1533
+ referencedColumns: ["id"];
1534
+ }];
1535
+ };
1536
+ customer_contacts: {
1537
+ Row: {
1538
+ created_at: string;
1539
+ customer_id: string;
1540
+ email: string | null;
1541
+ floriday_contact_id: string | null;
1542
+ full_name: string;
1543
+ id: string;
1544
+ is_active: boolean;
1545
+ job_title: string | null;
1546
+ phone: string | null;
1547
+ photo_url: string | null;
1548
+ raw: import("../integrations/supabase/types").Json | null;
1549
+ updated_at: string;
1550
+ };
1551
+ Insert: {
1552
+ created_at?: string;
1553
+ customer_id: string;
1554
+ email?: string | null;
1555
+ floriday_contact_id?: string | null;
1556
+ full_name: string;
1557
+ id?: string;
1558
+ is_active?: boolean;
1559
+ job_title?: string | null;
1560
+ phone?: string | null;
1561
+ photo_url?: string | null;
1562
+ raw?: import("../integrations/supabase/types").Json | null;
1563
+ updated_at?: string;
1564
+ };
1565
+ Update: {
1566
+ created_at?: string;
1567
+ customer_id?: string;
1568
+ email?: string | null;
1569
+ floriday_contact_id?: string | null;
1570
+ full_name?: string;
1571
+ id?: string;
1572
+ is_active?: boolean;
1573
+ job_title?: string | null;
1574
+ phone?: string | null;
1575
+ photo_url?: string | null;
1576
+ raw?: import("../integrations/supabase/types").Json | null;
1577
+ updated_at?: string;
1578
+ };
1579
+ Relationships: [{
1580
+ foreignKeyName: "customer_contacts_customer_id_fkey";
1581
+ columns: ["customer_id"];
1582
+ isOneToOne: false;
1583
+ referencedRelation: "customers";
1170
1584
  referencedColumns: ["id"];
1171
1585
  }];
1172
1586
  };
@@ -1311,6 +1725,105 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
1311
1725
  };
1312
1726
  Relationships: [];
1313
1727
  };
1728
+ customer_price_group_members: {
1729
+ Row: {
1730
+ created_at: string;
1731
+ customer_key: string;
1732
+ id: string;
1733
+ owner_id: string;
1734
+ price_group_id: string;
1735
+ };
1736
+ Insert: {
1737
+ created_at?: string;
1738
+ customer_key: string;
1739
+ id?: string;
1740
+ owner_id?: string;
1741
+ price_group_id: string;
1742
+ };
1743
+ Update: {
1744
+ created_at?: string;
1745
+ customer_key?: string;
1746
+ id?: string;
1747
+ owner_id?: string;
1748
+ price_group_id?: string;
1749
+ };
1750
+ Relationships: [{
1751
+ foreignKeyName: "customer_price_group_members_price_group_id_fkey";
1752
+ columns: ["price_group_id"];
1753
+ isOneToOne: false;
1754
+ referencedRelation: "customer_price_groups";
1755
+ referencedColumns: ["id"];
1756
+ }];
1757
+ };
1758
+ customer_price_groups: {
1759
+ Row: {
1760
+ calc_type: string | null;
1761
+ calc_value: number | null;
1762
+ calc_value_type: string | null;
1763
+ created_at: string;
1764
+ currency: string;
1765
+ distribute_over: string | null;
1766
+ group_type: string;
1767
+ handling_fee: number | null;
1768
+ id: string;
1769
+ include_stickers: boolean;
1770
+ is_active: boolean;
1771
+ name: string;
1772
+ owner_id: string;
1773
+ price_scope: string;
1774
+ pricing_mode: string;
1775
+ rounding: string;
1776
+ rounding_step: number;
1777
+ sort_order: number;
1778
+ unit: string;
1779
+ updated_at: string;
1780
+ };
1781
+ Insert: {
1782
+ calc_type?: string | null;
1783
+ calc_value?: number | null;
1784
+ calc_value_type?: string | null;
1785
+ created_at?: string;
1786
+ currency?: string;
1787
+ distribute_over?: string | null;
1788
+ group_type?: string;
1789
+ handling_fee?: number | null;
1790
+ id?: string;
1791
+ include_stickers?: boolean;
1792
+ is_active?: boolean;
1793
+ name: string;
1794
+ owner_id?: string;
1795
+ price_scope?: string;
1796
+ pricing_mode?: string;
1797
+ rounding?: string;
1798
+ rounding_step?: number;
1799
+ sort_order?: number;
1800
+ unit?: string;
1801
+ updated_at?: string;
1802
+ };
1803
+ Update: {
1804
+ calc_type?: string | null;
1805
+ calc_value?: number | null;
1806
+ calc_value_type?: string | null;
1807
+ created_at?: string;
1808
+ currency?: string;
1809
+ distribute_over?: string | null;
1810
+ group_type?: string;
1811
+ handling_fee?: number | null;
1812
+ id?: string;
1813
+ include_stickers?: boolean;
1814
+ is_active?: boolean;
1815
+ name?: string;
1816
+ owner_id?: string;
1817
+ price_scope?: string;
1818
+ pricing_mode?: string;
1819
+ rounding?: string;
1820
+ rounding_step?: number;
1821
+ sort_order?: number;
1822
+ unit?: string;
1823
+ updated_at?: string;
1824
+ };
1825
+ Relationships: [];
1826
+ };
1314
1827
  customer_selected_assortment: {
1315
1828
  Row: {
1316
1829
  article_number: string | null;
@@ -1464,6 +1977,10 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
1464
1977
  sync_error: string | null;
1465
1978
  sync_status: string;
1466
1979
  trade_forms: string[];
1980
+ twinfield_code: string | null;
1981
+ twinfield_last_hash: string | null;
1982
+ twinfield_sync_error: string | null;
1983
+ twinfield_synced_at: string | null;
1467
1984
  updated_at: string;
1468
1985
  vat_display: string | null;
1469
1986
  vat_number: string | null;
@@ -1531,6 +2048,10 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
1531
2048
  sync_error?: string | null;
1532
2049
  sync_status?: string;
1533
2050
  trade_forms?: string[];
2051
+ twinfield_code?: string | null;
2052
+ twinfield_last_hash?: string | null;
2053
+ twinfield_sync_error?: string | null;
2054
+ twinfield_synced_at?: string | null;
1534
2055
  updated_at?: string;
1535
2056
  vat_display?: string | null;
1536
2057
  vat_number?: string | null;
@@ -1598,6 +2119,10 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
1598
2119
  sync_error?: string | null;
1599
2120
  sync_status?: string;
1600
2121
  trade_forms?: string[];
2122
+ twinfield_code?: string | null;
2123
+ twinfield_last_hash?: string | null;
2124
+ twinfield_sync_error?: string | null;
2125
+ twinfield_synced_at?: string | null;
1601
2126
  updated_at?: string;
1602
2127
  vat_display?: string | null;
1603
2128
  vat_number?: string | null;
@@ -3411,74 +3936,173 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
3411
3936
  referencedColumns: ["id"];
3412
3937
  }];
3413
3938
  };
3414
- floriday_auction_letters_cache: {
3939
+ floriday_agreement_calloffs_cache: {
3415
3940
  Row: {
3416
- auction_letter_code: string;
3417
- clock_supply_id: string;
3941
+ agreement_id: string | null;
3418
3942
  connection_id: string;
3419
- content_type: string;
3943
+ data: import("../integrations/supabase/types").Json;
3944
+ delivery_date: string | null;
3420
3945
  fetched_at: string;
3946
+ floriday_id: string;
3421
3947
  id: string;
3422
- storage_path: string;
3948
+ is_deleted: boolean;
3949
+ sequence_number: number;
3950
+ status: string | null;
3951
+ updated_at: string;
3423
3952
  };
3424
3953
  Insert: {
3425
- auction_letter_code: string;
3426
- clock_supply_id: string;
3954
+ agreement_id?: string | null;
3427
3955
  connection_id: string;
3428
- content_type?: string;
3956
+ data?: import("../integrations/supabase/types").Json;
3957
+ delivery_date?: string | null;
3429
3958
  fetched_at?: string;
3959
+ floriday_id: string;
3430
3960
  id?: string;
3431
- storage_path: string;
3961
+ is_deleted?: boolean;
3962
+ sequence_number?: number;
3963
+ status?: string | null;
3964
+ updated_at?: string;
3432
3965
  };
3433
3966
  Update: {
3434
- auction_letter_code?: string;
3435
- clock_supply_id?: string;
3967
+ agreement_id?: string | null;
3436
3968
  connection_id?: string;
3437
- content_type?: string;
3969
+ data?: import("../integrations/supabase/types").Json;
3970
+ delivery_date?: string | null;
3438
3971
  fetched_at?: string;
3972
+ floriday_id?: string;
3439
3973
  id?: string;
3440
- storage_path?: string;
3974
+ is_deleted?: boolean;
3975
+ sequence_number?: number;
3976
+ status?: string | null;
3977
+ updated_at?: string;
3441
3978
  };
3442
3979
  Relationships: [{
3443
- foreignKeyName: "floriday_auction_letters_cache_connection_id_fkey";
3980
+ foreignKeyName: "floriday_agreement_calloffs_cache_connection_id_fkey";
3444
3981
  columns: ["connection_id"];
3445
3982
  isOneToOne: false;
3446
3983
  referencedRelation: "floriday_connections";
3447
3984
  referencedColumns: ["id"];
3448
3985
  }];
3449
3986
  };
3450
- floriday_auto_fulfillment_log: {
3987
+ floriday_agreements_cache: {
3451
3988
  Row: {
3452
- attempts: number;
3989
+ buyer_organization_id: string | null;
3453
3990
  connection_id: string;
3454
- created_at: string;
3455
- error: string | null;
3456
- fulfillment_order_id: string | null;
3991
+ data: import("../integrations/supabase/types").Json;
3992
+ fetched_at: string;
3993
+ floriday_id: string;
3457
3994
  id: string;
3458
- last_attempt_at: string | null;
3459
- reason: string | null;
3460
- sales_order_id: string;
3461
- status: string;
3995
+ is_deleted: boolean;
3996
+ sequence_number: number;
3997
+ status: string | null;
3462
3998
  updated_at: string;
3999
+ valid_from: string | null;
4000
+ valid_until: string | null;
3463
4001
  };
3464
4002
  Insert: {
3465
- attempts?: number;
4003
+ buyer_organization_id?: string | null;
3466
4004
  connection_id: string;
3467
- created_at?: string;
3468
- error?: string | null;
3469
- fulfillment_order_id?: string | null;
4005
+ data?: import("../integrations/supabase/types").Json;
4006
+ fetched_at?: string;
4007
+ floriday_id: string;
3470
4008
  id?: string;
3471
- last_attempt_at?: string | null;
3472
- reason?: string | null;
3473
- sales_order_id: string;
3474
- status?: string;
4009
+ is_deleted?: boolean;
4010
+ sequence_number?: number;
4011
+ status?: string | null;
3475
4012
  updated_at?: string;
4013
+ valid_from?: string | null;
4014
+ valid_until?: string | null;
3476
4015
  };
3477
4016
  Update: {
3478
- attempts?: number;
4017
+ buyer_organization_id?: string | null;
3479
4018
  connection_id?: string;
3480
- created_at?: string;
3481
- error?: string | null;
4019
+ data?: import("../integrations/supabase/types").Json;
4020
+ fetched_at?: string;
4021
+ floriday_id?: string;
4022
+ id?: string;
4023
+ is_deleted?: boolean;
4024
+ sequence_number?: number;
4025
+ status?: string | null;
4026
+ updated_at?: string;
4027
+ valid_from?: string | null;
4028
+ valid_until?: string | null;
4029
+ };
4030
+ Relationships: [{
4031
+ foreignKeyName: "floriday_agreements_cache_connection_id_fkey";
4032
+ columns: ["connection_id"];
4033
+ isOneToOne: false;
4034
+ referencedRelation: "floriday_connections";
4035
+ referencedColumns: ["id"];
4036
+ }];
4037
+ };
4038
+ floriday_auction_letters_cache: {
4039
+ Row: {
4040
+ auction_letter_code: string;
4041
+ clock_supply_id: string;
4042
+ connection_id: string;
4043
+ content_type: string;
4044
+ fetched_at: string;
4045
+ id: string;
4046
+ storage_path: string;
4047
+ };
4048
+ Insert: {
4049
+ auction_letter_code: string;
4050
+ clock_supply_id: string;
4051
+ connection_id: string;
4052
+ content_type?: string;
4053
+ fetched_at?: string;
4054
+ id?: string;
4055
+ storage_path: string;
4056
+ };
4057
+ Update: {
4058
+ auction_letter_code?: string;
4059
+ clock_supply_id?: string;
4060
+ connection_id?: string;
4061
+ content_type?: string;
4062
+ fetched_at?: string;
4063
+ id?: string;
4064
+ storage_path?: string;
4065
+ };
4066
+ Relationships: [{
4067
+ foreignKeyName: "floriday_auction_letters_cache_connection_id_fkey";
4068
+ columns: ["connection_id"];
4069
+ isOneToOne: false;
4070
+ referencedRelation: "floriday_connections";
4071
+ referencedColumns: ["id"];
4072
+ }];
4073
+ };
4074
+ floriday_auto_fulfillment_log: {
4075
+ Row: {
4076
+ attempts: number;
4077
+ connection_id: string;
4078
+ created_at: string;
4079
+ error: string | null;
4080
+ fulfillment_order_id: string | null;
4081
+ id: string;
4082
+ last_attempt_at: string | null;
4083
+ reason: string | null;
4084
+ sales_order_id: string;
4085
+ status: string;
4086
+ updated_at: string;
4087
+ };
4088
+ Insert: {
4089
+ attempts?: number;
4090
+ connection_id: string;
4091
+ created_at?: string;
4092
+ error?: string | null;
4093
+ fulfillment_order_id?: string | null;
4094
+ id?: string;
4095
+ last_attempt_at?: string | null;
4096
+ reason?: string | null;
4097
+ sales_order_id: string;
4098
+ status?: string;
4099
+ updated_at?: string;
4100
+ };
4101
+ Update: {
4102
+ attempts?: number;
4103
+ connection_id?: string;
4104
+ created_at?: string;
4105
+ error?: string | null;
3482
4106
  fulfillment_order_id?: string | null;
3483
4107
  id?: string;
3484
4108
  last_attempt_at?: string | null;
@@ -3909,27 +4533,6 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
3909
4533
  referencedColumns: ["id"];
3910
4534
  }];
3911
4535
  };
3912
- floriday_continuous_stock_cache: {
3913
- Row: {
3914
- connection_id: string;
3915
- fetched_at: string;
3916
- number_of_pieces: number;
3917
- trade_item_id: string;
3918
- };
3919
- Insert: {
3920
- connection_id: string;
3921
- fetched_at?: string;
3922
- number_of_pieces?: number;
3923
- trade_item_id: string;
3924
- };
3925
- Update: {
3926
- connection_id?: string;
3927
- fetched_at?: string;
3928
- number_of_pieces?: number;
3929
- trade_item_id?: string;
3930
- };
3931
- Relationships: [];
3932
- };
3933
4536
  floriday_continuous_stock_queue: {
3934
4537
  Row: {
3935
4538
  attempts: number;
@@ -4705,8 +5308,6 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
4705
5308
  Row: {
4706
5309
  buyer_organization_id: string | null;
4707
5310
  connection_id: string;
4708
- controlled_at: string | null;
4709
- controlled_by: string | null;
4710
5311
  created_at: string;
4711
5312
  data: import("../integrations/supabase/types").Json;
4712
5313
  floriday_id: string;
@@ -4718,8 +5319,6 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
4718
5319
  Insert: {
4719
5320
  buyer_organization_id?: string | null;
4720
5321
  connection_id: string;
4721
- controlled_at?: string | null;
4722
- controlled_by?: string | null;
4723
5322
  created_at?: string;
4724
5323
  data: import("../integrations/supabase/types").Json;
4725
5324
  floriday_id: string;
@@ -4731,8 +5330,6 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
4731
5330
  Update: {
4732
5331
  buyer_organization_id?: string | null;
4733
5332
  connection_id?: string;
4734
- controlled_at?: string | null;
4735
- controlled_by?: string | null;
4736
5333
  created_at?: string;
4737
5334
  data?: import("../integrations/supabase/types").Json;
4738
5335
  floriday_id?: string;
@@ -4914,45 +5511,6 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
4914
5511
  referencedColumns: ["id"];
4915
5512
  }];
4916
5513
  };
4917
- floriday_trade_settings_customers_cache: {
4918
- Row: {
4919
- connection_id: string;
4920
- data: import("../integrations/supabase/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
- Insert: {
4929
- connection_id: string;
4930
- data: import("../integrations/supabase/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
- Update: {
4939
- connection_id?: string;
4940
- data?: import("../integrations/supabase/types").Json;
4941
- fetched_at?: string;
4942
- floriday_id?: string;
4943
- id?: string;
4944
- is_deleted?: boolean;
4945
- sequence_number?: number;
4946
- updated_at?: string;
4947
- };
4948
- Relationships: [{
4949
- foreignKeyName: "floriday_trade_settings_customers_cache_connection_id_fkey";
4950
- columns: ["connection_id"];
4951
- isOneToOne: false;
4952
- referencedRelation: "floriday_connections";
4953
- referencedColumns: ["id"];
4954
- }];
4955
- };
4956
5514
  floriday_trips_cache: {
4957
5515
  Row: {
4958
5516
  carrier_organization_id: string | null;
@@ -5481,162 +6039,444 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
5481
6039
  };
5482
6040
  Relationships: [];
5483
6041
  };
5484
- local_customer_agreements: {
6042
+ itk_contact_persons: {
5485
6043
  Row: {
5486
- base_price: number | null;
5487
6044
  created_at: string;
5488
- currency: string;
5489
6045
  customer_id: string;
6046
+ email: string | null;
5490
6047
  id: string;
5491
- min_quantity: number;
5492
- net_price: number;
5493
- notes: string | null;
5494
- product_category_id: string | null;
5495
- product_id: string | null;
6048
+ name: string;
6049
+ phone: string | null;
6050
+ role: string | null;
5496
6051
  updated_at: string;
5497
- valid_from: string | null;
5498
- valid_until: string | null;
5499
6052
  };
5500
6053
  Insert: {
5501
- base_price?: number | null;
5502
6054
  created_at?: string;
5503
- currency?: string;
5504
6055
  customer_id: string;
6056
+ email?: string | null;
5505
6057
  id?: string;
5506
- min_quantity?: number;
5507
- net_price: number;
5508
- notes?: string | null;
5509
- product_category_id?: string | null;
5510
- product_id?: string | null;
6058
+ name: string;
6059
+ phone?: string | null;
6060
+ role?: string | null;
5511
6061
  updated_at?: string;
5512
- valid_from?: string | null;
5513
- valid_until?: string | null;
5514
6062
  };
5515
6063
  Update: {
5516
- base_price?: number | null;
5517
6064
  created_at?: string;
5518
- currency?: string;
5519
6065
  customer_id?: string;
6066
+ email?: string | null;
5520
6067
  id?: string;
5521
- min_quantity?: number;
5522
- net_price?: number;
5523
- notes?: string | null;
5524
- product_category_id?: string | null;
5525
- product_id?: string | null;
6068
+ name?: string;
6069
+ phone?: string | null;
6070
+ role?: string | null;
5526
6071
  updated_at?: string;
5527
- valid_from?: string | null;
5528
- valid_until?: string | null;
5529
6072
  };
5530
6073
  Relationships: [{
5531
- foreignKeyName: "local_customer_agreements_customer_id_fkey";
6074
+ foreignKeyName: "itk_contact_persons_customer_id_fkey";
5532
6075
  columns: ["customer_id"];
5533
6076
  isOneToOne: false;
5534
- referencedRelation: "customers";
5535
- referencedColumns: ["id"];
5536
- }, {
5537
- foreignKeyName: "local_customer_agreements_product_category_id_fkey";
5538
- columns: ["product_category_id"];
5539
- isOneToOne: false;
5540
- referencedRelation: "product_categories";
5541
- referencedColumns: ["id"];
5542
- }, {
5543
- foreignKeyName: "local_customer_agreements_product_id_fkey";
5544
- columns: ["product_id"];
5545
- isOneToOne: false;
5546
- referencedRelation: "products";
6077
+ referencedRelation: "itk_customers";
5547
6078
  referencedColumns: ["id"];
5548
6079
  }];
5549
6080
  };
5550
- local_customer_price_groups: {
6081
+ itk_customer_dynamic_values: {
5551
6082
  Row: {
5552
6083
  created_at: string;
5553
- currency: string;
5554
6084
  customer_id: string;
5555
- discount_type: string;
5556
- discount_value: number;
6085
+ field_id: string;
5557
6086
  id: string;
5558
- min_quantity: number;
5559
- notes: string | null;
5560
- product_category_id: string | null;
5561
- product_id: string | null;
5562
6087
  updated_at: string;
5563
- valid_from: string | null;
5564
- valid_until: string | null;
6088
+ value: string | null;
5565
6089
  };
5566
6090
  Insert: {
5567
6091
  created_at?: string;
5568
- currency?: string;
5569
6092
  customer_id: string;
5570
- discount_type: string;
5571
- discount_value: number;
6093
+ field_id: string;
5572
6094
  id?: string;
5573
- min_quantity?: number;
5574
- notes?: string | null;
5575
- product_category_id?: string | null;
5576
- product_id?: string | null;
5577
6095
  updated_at?: string;
5578
- valid_from?: string | null;
5579
- valid_until?: string | null;
6096
+ value?: string | null;
5580
6097
  };
5581
6098
  Update: {
5582
6099
  created_at?: string;
5583
- currency?: string;
5584
6100
  customer_id?: string;
5585
- discount_type?: string;
5586
- discount_value?: number;
6101
+ field_id?: string;
5587
6102
  id?: string;
5588
- min_quantity?: number;
5589
- notes?: string | null;
5590
- product_category_id?: string | null;
5591
- product_id?: string | null;
5592
6103
  updated_at?: string;
5593
- valid_from?: string | null;
5594
- valid_until?: string | null;
6104
+ value?: string | null;
5595
6105
  };
5596
6106
  Relationships: [{
5597
- foreignKeyName: "local_customer_price_groups_customer_id_fkey";
6107
+ foreignKeyName: "itk_customer_dynamic_values_customer_id_fkey";
5598
6108
  columns: ["customer_id"];
5599
6109
  isOneToOne: false;
5600
- referencedRelation: "customers";
5601
- referencedColumns: ["id"];
5602
- }, {
5603
- foreignKeyName: "local_customer_price_groups_product_category_id_fkey";
5604
- columns: ["product_category_id"];
5605
- isOneToOne: false;
5606
- referencedRelation: "product_categories";
6110
+ referencedRelation: "itk_customers";
5607
6111
  referencedColumns: ["id"];
5608
6112
  }, {
5609
- foreignKeyName: "local_customer_price_groups_product_id_fkey";
5610
- columns: ["product_id"];
6113
+ foreignKeyName: "itk_customer_dynamic_values_field_id_fkey";
6114
+ columns: ["field_id"];
5611
6115
  isOneToOne: false;
5612
- referencedRelation: "products";
6116
+ referencedRelation: "itk_dynamic_fields";
5613
6117
  referencedColumns: ["id"];
5614
6118
  }];
5615
6119
  };
5616
- local_customer_sales_strategies: {
6120
+ itk_customer_notes: {
5617
6121
  Row: {
6122
+ body: string;
5618
6123
  created_at: string;
5619
- currency: string;
6124
+ created_by: string | null;
5620
6125
  customer_id: string;
5621
- discount_type: string;
5622
- discount_value: number;
5623
6126
  id: string;
5624
- min_quantity: number;
5625
- notes: string | null;
5626
- product_category_id: string | null;
5627
- product_id: string | null;
6127
+ note_type: string;
5628
6128
  updated_at: string;
5629
- valid_from: string | null;
5630
- valid_until: string | null;
5631
6129
  };
5632
6130
  Insert: {
6131
+ body: string;
5633
6132
  created_at?: string;
5634
- currency?: string;
6133
+ created_by?: string | null;
5635
6134
  customer_id: string;
5636
- discount_type: string;
5637
- discount_value: number;
5638
6135
  id?: string;
5639
- min_quantity?: number;
6136
+ note_type?: string;
6137
+ updated_at?: string;
6138
+ };
6139
+ Update: {
6140
+ body?: string;
6141
+ created_at?: string;
6142
+ created_by?: string | null;
6143
+ customer_id?: string;
6144
+ id?: string;
6145
+ note_type?: string;
6146
+ updated_at?: string;
6147
+ };
6148
+ Relationships: [{
6149
+ foreignKeyName: "itk_customer_notes_customer_id_fkey";
6150
+ columns: ["customer_id"];
6151
+ isOneToOne: false;
6152
+ referencedRelation: "itk_customers";
6153
+ referencedColumns: ["id"];
6154
+ }];
6155
+ };
6156
+ itk_customers: {
6157
+ Row: {
6158
+ billing_city: string | null;
6159
+ billing_postcode: string | null;
6160
+ billing_street: string | null;
6161
+ created_at: string;
6162
+ general_email: string | null;
6163
+ general_phone: string | null;
6164
+ id: string;
6165
+ legacy_customer_id: string | null;
6166
+ name: string;
6167
+ segment: import("../integrations/supabase/types").Database["public"]["Enums"]["itk_customer_segment"];
6168
+ updated_at: string;
6169
+ };
6170
+ Insert: {
6171
+ billing_city?: string | null;
6172
+ billing_postcode?: string | null;
6173
+ billing_street?: string | null;
6174
+ created_at?: string;
6175
+ general_email?: string | null;
6176
+ general_phone?: string | null;
6177
+ id?: string;
6178
+ legacy_customer_id?: string | null;
6179
+ name: string;
6180
+ segment?: import("../integrations/supabase/types").Database["public"]["Enums"]["itk_customer_segment"];
6181
+ updated_at?: string;
6182
+ };
6183
+ Update: {
6184
+ billing_city?: string | null;
6185
+ billing_postcode?: string | null;
6186
+ billing_street?: string | null;
6187
+ created_at?: string;
6188
+ general_email?: string | null;
6189
+ general_phone?: string | null;
6190
+ id?: string;
6191
+ legacy_customer_id?: string | null;
6192
+ name?: string;
6193
+ segment?: import("../integrations/supabase/types").Database["public"]["Enums"]["itk_customer_segment"];
6194
+ updated_at?: string;
6195
+ };
6196
+ Relationships: [{
6197
+ foreignKeyName: "itk_customers_legacy_customer_id_fkey";
6198
+ columns: ["legacy_customer_id"];
6199
+ isOneToOne: false;
6200
+ referencedRelation: "customers";
6201
+ referencedColumns: ["id"];
6202
+ }];
6203
+ };
6204
+ itk_dynamic_fields: {
6205
+ Row: {
6206
+ created_at: string;
6207
+ field_name: string;
6208
+ field_type: import("../integrations/supabase/types").Database["public"]["Enums"]["itk_dynamic_field_type"];
6209
+ id: string;
6210
+ options: import("../integrations/supabase/types").Json;
6211
+ sort_order: number;
6212
+ updated_at: string;
6213
+ };
6214
+ Insert: {
6215
+ created_at?: string;
6216
+ field_name: string;
6217
+ field_type?: import("../integrations/supabase/types").Database["public"]["Enums"]["itk_dynamic_field_type"];
6218
+ id?: string;
6219
+ options?: import("../integrations/supabase/types").Json;
6220
+ sort_order?: number;
6221
+ updated_at?: string;
6222
+ };
6223
+ Update: {
6224
+ created_at?: string;
6225
+ field_name?: string;
6226
+ field_type?: import("../integrations/supabase/types").Database["public"]["Enums"]["itk_dynamic_field_type"];
6227
+ id?: string;
6228
+ options?: import("../integrations/supabase/types").Json;
6229
+ sort_order?: number;
6230
+ updated_at?: string;
6231
+ };
6232
+ Relationships: [];
6233
+ };
6234
+ itk_work_locations: {
6235
+ Row: {
6236
+ city: string | null;
6237
+ created_at: string;
6238
+ customer_id: string;
6239
+ id: string;
6240
+ instructions: string | null;
6241
+ label: string;
6242
+ latitude: number | null;
6243
+ longitude: number | null;
6244
+ postcode: string | null;
6245
+ street: string | null;
6246
+ updated_at: string;
6247
+ };
6248
+ Insert: {
6249
+ city?: string | null;
6250
+ created_at?: string;
6251
+ customer_id: string;
6252
+ id?: string;
6253
+ instructions?: string | null;
6254
+ label: string;
6255
+ latitude?: number | null;
6256
+ longitude?: number | null;
6257
+ postcode?: string | null;
6258
+ street?: string | null;
6259
+ updated_at?: string;
6260
+ };
6261
+ Update: {
6262
+ city?: string | null;
6263
+ created_at?: string;
6264
+ customer_id?: string;
6265
+ id?: string;
6266
+ instructions?: string | null;
6267
+ label?: string;
6268
+ latitude?: number | null;
6269
+ longitude?: number | null;
6270
+ postcode?: string | null;
6271
+ street?: string | null;
6272
+ updated_at?: string;
6273
+ };
6274
+ Relationships: [{
6275
+ foreignKeyName: "itk_work_locations_customer_id_fkey";
6276
+ columns: ["customer_id"];
6277
+ isOneToOne: false;
6278
+ referencedRelation: "itk_customers";
6279
+ referencedColumns: ["id"];
6280
+ }];
6281
+ };
6282
+ leave_requests: {
6283
+ Row: {
6284
+ created_at: string;
6285
+ end_date: string;
6286
+ id: string;
6287
+ reason: string | null;
6288
+ start_date: string;
6289
+ status: string;
6290
+ tenant_id: string;
6291
+ updated_at: string;
6292
+ user_id: string;
6293
+ };
6294
+ Insert: {
6295
+ created_at?: string;
6296
+ end_date: string;
6297
+ id?: string;
6298
+ reason?: string | null;
6299
+ start_date: string;
6300
+ status?: string;
6301
+ tenant_id?: string;
6302
+ updated_at?: string;
6303
+ user_id: string;
6304
+ };
6305
+ Update: {
6306
+ created_at?: string;
6307
+ end_date?: string;
6308
+ id?: string;
6309
+ reason?: string | null;
6310
+ start_date?: string;
6311
+ status?: string;
6312
+ tenant_id?: string;
6313
+ updated_at?: string;
6314
+ user_id?: string;
6315
+ };
6316
+ Relationships: [{
6317
+ foreignKeyName: "leave_requests_user_id_fkey";
6318
+ columns: ["user_id"];
6319
+ isOneToOne: false;
6320
+ referencedRelation: "monteurs";
6321
+ referencedColumns: ["id"];
6322
+ }];
6323
+ };
6324
+ local_customer_agreements: {
6325
+ Row: {
6326
+ base_price: number | null;
6327
+ created_at: string;
6328
+ currency: string;
6329
+ customer_id: string;
6330
+ id: string;
6331
+ min_quantity: number;
6332
+ net_price: number;
6333
+ notes: string | null;
6334
+ product_category_id: string | null;
6335
+ product_id: string | null;
6336
+ updated_at: string;
6337
+ valid_from: string | null;
6338
+ valid_until: string | null;
6339
+ };
6340
+ Insert: {
6341
+ base_price?: number | null;
6342
+ created_at?: string;
6343
+ currency?: string;
6344
+ customer_id: string;
6345
+ id?: string;
6346
+ min_quantity?: number;
6347
+ net_price: number;
6348
+ notes?: string | null;
6349
+ product_category_id?: string | null;
6350
+ product_id?: string | null;
6351
+ updated_at?: string;
6352
+ valid_from?: string | null;
6353
+ valid_until?: string | null;
6354
+ };
6355
+ Update: {
6356
+ base_price?: number | null;
6357
+ created_at?: string;
6358
+ currency?: string;
6359
+ customer_id?: string;
6360
+ id?: string;
6361
+ min_quantity?: number;
6362
+ net_price?: number;
6363
+ notes?: string | null;
6364
+ product_category_id?: string | null;
6365
+ product_id?: string | null;
6366
+ updated_at?: string;
6367
+ valid_from?: string | null;
6368
+ valid_until?: string | null;
6369
+ };
6370
+ Relationships: [{
6371
+ foreignKeyName: "local_customer_agreements_customer_id_fkey";
6372
+ columns: ["customer_id"];
6373
+ isOneToOne: false;
6374
+ referencedRelation: "customers";
6375
+ referencedColumns: ["id"];
6376
+ }, {
6377
+ foreignKeyName: "local_customer_agreements_product_category_id_fkey";
6378
+ columns: ["product_category_id"];
6379
+ isOneToOne: false;
6380
+ referencedRelation: "product_categories";
6381
+ referencedColumns: ["id"];
6382
+ }, {
6383
+ foreignKeyName: "local_customer_agreements_product_id_fkey";
6384
+ columns: ["product_id"];
6385
+ isOneToOne: false;
6386
+ referencedRelation: "products";
6387
+ referencedColumns: ["id"];
6388
+ }];
6389
+ };
6390
+ local_customer_price_groups: {
6391
+ Row: {
6392
+ created_at: string;
6393
+ currency: string;
6394
+ customer_id: string;
6395
+ discount_type: string;
6396
+ discount_value: number;
6397
+ id: string;
6398
+ min_quantity: number;
6399
+ notes: string | null;
6400
+ product_category_id: string | null;
6401
+ product_id: string | null;
6402
+ updated_at: string;
6403
+ valid_from: string | null;
6404
+ valid_until: string | null;
6405
+ };
6406
+ Insert: {
6407
+ created_at?: string;
6408
+ currency?: string;
6409
+ customer_id: string;
6410
+ discount_type: string;
6411
+ discount_value: number;
6412
+ id?: string;
6413
+ min_quantity?: number;
6414
+ notes?: string | null;
6415
+ product_category_id?: string | null;
6416
+ product_id?: string | null;
6417
+ updated_at?: string;
6418
+ valid_from?: string | null;
6419
+ valid_until?: string | null;
6420
+ };
6421
+ Update: {
6422
+ created_at?: string;
6423
+ currency?: string;
6424
+ customer_id?: string;
6425
+ discount_type?: string;
6426
+ discount_value?: number;
6427
+ id?: string;
6428
+ min_quantity?: number;
6429
+ notes?: string | null;
6430
+ product_category_id?: string | null;
6431
+ product_id?: string | null;
6432
+ updated_at?: string;
6433
+ valid_from?: string | null;
6434
+ valid_until?: string | null;
6435
+ };
6436
+ Relationships: [{
6437
+ foreignKeyName: "local_customer_price_groups_customer_id_fkey";
6438
+ columns: ["customer_id"];
6439
+ isOneToOne: false;
6440
+ referencedRelation: "customers";
6441
+ referencedColumns: ["id"];
6442
+ }, {
6443
+ foreignKeyName: "local_customer_price_groups_product_category_id_fkey";
6444
+ columns: ["product_category_id"];
6445
+ isOneToOne: false;
6446
+ referencedRelation: "product_categories";
6447
+ referencedColumns: ["id"];
6448
+ }, {
6449
+ foreignKeyName: "local_customer_price_groups_product_id_fkey";
6450
+ columns: ["product_id"];
6451
+ isOneToOne: false;
6452
+ referencedRelation: "products";
6453
+ referencedColumns: ["id"];
6454
+ }];
6455
+ };
6456
+ local_customer_sales_strategies: {
6457
+ Row: {
6458
+ created_at: string;
6459
+ currency: string;
6460
+ customer_id: string;
6461
+ discount_type: string;
6462
+ discount_value: number;
6463
+ id: string;
6464
+ min_quantity: number;
6465
+ notes: string | null;
6466
+ product_category_id: string | null;
6467
+ product_id: string | null;
6468
+ updated_at: string;
6469
+ valid_from: string | null;
6470
+ valid_until: string | null;
6471
+ };
6472
+ Insert: {
6473
+ created_at?: string;
6474
+ currency?: string;
6475
+ customer_id: string;
6476
+ discount_type: string;
6477
+ discount_value: number;
6478
+ id?: string;
6479
+ min_quantity?: number;
5640
6480
  notes?: string | null;
5641
6481
  product_category_id?: string | null;
5642
6482
  product_id?: string | null;
@@ -5683,23 +6523,302 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
5683
6523
  Row: {
5684
6524
  created_at: string;
5685
6525
  id: string;
5686
- name: string;
5687
- sort_order: number;
6526
+ name: string;
6527
+ sort_order: number;
6528
+ updated_at: string;
6529
+ };
6530
+ Insert: {
6531
+ created_at?: string;
6532
+ id?: string;
6533
+ name: string;
6534
+ sort_order?: number;
6535
+ updated_at?: string;
6536
+ };
6537
+ Update: {
6538
+ created_at?: string;
6539
+ id?: string;
6540
+ name?: string;
6541
+ sort_order?: number;
6542
+ updated_at?: string;
6543
+ };
6544
+ Relationships: [];
6545
+ };
6546
+ logistics_capacity_events: {
6547
+ Row: {
6548
+ available_carts: number;
6549
+ created_at: string;
6550
+ id: string;
6551
+ measures: import("../integrations/supabase/types").Json;
6552
+ note: string | null;
6553
+ outcome: string;
6554
+ required_carts: number;
6555
+ reserve_minutes: number;
6556
+ shortage_carts: number;
6557
+ status: string;
6558
+ user_id: string;
6559
+ };
6560
+ Insert: {
6561
+ available_carts?: number;
6562
+ created_at?: string;
6563
+ id?: string;
6564
+ measures?: import("../integrations/supabase/types").Json;
6565
+ note?: string | null;
6566
+ outcome?: string;
6567
+ required_carts?: number;
6568
+ reserve_minutes?: number;
6569
+ shortage_carts?: number;
6570
+ status: string;
6571
+ user_id: string;
6572
+ };
6573
+ Update: {
6574
+ available_carts?: number;
6575
+ created_at?: string;
6576
+ id?: string;
6577
+ measures?: import("../integrations/supabase/types").Json;
6578
+ note?: string | null;
6579
+ outcome?: string;
6580
+ required_carts?: number;
6581
+ reserve_minutes?: number;
6582
+ shortage_carts?: number;
6583
+ status?: string;
6584
+ user_id?: string;
6585
+ };
6586
+ Relationships: [];
6587
+ };
6588
+ logistics_capacity_settings: {
6589
+ Row: {
6590
+ created_at: string;
6591
+ settings: import("../integrations/supabase/types").Json;
6592
+ updated_at: string;
6593
+ user_id: string;
6594
+ };
6595
+ Insert: {
6596
+ created_at?: string;
6597
+ settings?: import("../integrations/supabase/types").Json;
6598
+ updated_at?: string;
6599
+ user_id: string;
6600
+ };
6601
+ Update: {
6602
+ created_at?: string;
6603
+ settings?: import("../integrations/supabase/types").Json;
6604
+ updated_at?: string;
6605
+ user_id?: string;
6606
+ };
6607
+ Relationships: [];
6608
+ };
6609
+ logistics_decisions: {
6610
+ Row: {
6611
+ created_at: string;
6612
+ explanation: string | null;
6613
+ id: string;
6614
+ input_snapshot: import("../integrations/supabase/types").Json;
6615
+ result: import("../integrations/supabase/types").Json;
6616
+ slot: string;
6617
+ strategy_id: string | null;
6618
+ subject_id: string;
6619
+ subject_type: string;
6620
+ user_id: string;
6621
+ };
6622
+ Insert: {
6623
+ created_at?: string;
6624
+ explanation?: string | null;
6625
+ id?: string;
6626
+ input_snapshot?: import("../integrations/supabase/types").Json;
6627
+ result?: import("../integrations/supabase/types").Json;
6628
+ slot: string;
6629
+ strategy_id?: string | null;
6630
+ subject_id: string;
6631
+ subject_type: string;
6632
+ user_id: string;
6633
+ };
6634
+ Update: {
6635
+ created_at?: string;
6636
+ explanation?: string | null;
6637
+ id?: string;
6638
+ input_snapshot?: import("../integrations/supabase/types").Json;
6639
+ result?: import("../integrations/supabase/types").Json;
6640
+ slot?: string;
6641
+ strategy_id?: string | null;
6642
+ subject_id?: string;
6643
+ subject_type?: string;
6644
+ user_id?: string;
6645
+ };
6646
+ Relationships: [{
6647
+ foreignKeyName: "logistics_decisions_strategy_id_fkey";
6648
+ columns: ["strategy_id"];
6649
+ isOneToOne: false;
6650
+ referencedRelation: "logistics_strategies";
6651
+ referencedColumns: ["id"];
6652
+ }];
6653
+ };
6654
+ logistics_formulas: {
6655
+ Row: {
6656
+ created_at: string;
6657
+ expression: string;
6658
+ id: string;
6659
+ notes: string | null;
6660
+ slot: string;
6661
+ strategy_id: string;
6662
+ updated_at: string;
6663
+ user_id: string;
6664
+ version: number;
6665
+ };
6666
+ Insert: {
6667
+ created_at?: string;
6668
+ expression?: string;
6669
+ id?: string;
6670
+ notes?: string | null;
6671
+ slot: string;
6672
+ strategy_id: string;
6673
+ updated_at?: string;
6674
+ user_id: string;
6675
+ version?: number;
6676
+ };
6677
+ Update: {
6678
+ created_at?: string;
6679
+ expression?: string;
6680
+ id?: string;
6681
+ notes?: string | null;
6682
+ slot?: string;
6683
+ strategy_id?: string;
6684
+ updated_at?: string;
6685
+ user_id?: string;
6686
+ version?: number;
6687
+ };
6688
+ Relationships: [{
6689
+ foreignKeyName: "logistics_formulas_strategy_id_fkey";
6690
+ columns: ["strategy_id"];
6691
+ isOneToOne: false;
6692
+ referencedRelation: "logistics_strategies";
6693
+ referencedColumns: ["id"];
6694
+ }];
6695
+ };
6696
+ logistics_strategies: {
6697
+ Row: {
6698
+ color: string;
6699
+ created_at: string;
6700
+ description: string | null;
6701
+ id: string;
6702
+ is_active: boolean;
6703
+ name: string;
6704
+ priority: number;
6705
+ updated_at: string;
6706
+ updated_by: string | null;
6707
+ user_id: string;
6708
+ version: number;
6709
+ };
6710
+ Insert: {
6711
+ color?: string;
6712
+ created_at?: string;
6713
+ description?: string | null;
6714
+ id?: string;
6715
+ is_active?: boolean;
6716
+ name: string;
6717
+ priority?: number;
6718
+ updated_at?: string;
6719
+ updated_by?: string | null;
6720
+ user_id: string;
6721
+ version?: number;
6722
+ };
6723
+ Update: {
6724
+ color?: string;
6725
+ created_at?: string;
6726
+ description?: string | null;
6727
+ id?: string;
6728
+ is_active?: boolean;
6729
+ name?: string;
6730
+ priority?: number;
6731
+ updated_at?: string;
6732
+ updated_by?: string | null;
6733
+ user_id?: string;
6734
+ version?: number;
6735
+ };
6736
+ Relationships: [];
6737
+ };
6738
+ logistics_strategy_schedules: {
6739
+ Row: {
6740
+ condition_expression: string | null;
6741
+ created_at: string;
6742
+ end_date: string | null;
6743
+ id: string;
6744
+ is_enabled: boolean;
6745
+ priority: number;
6746
+ rule_type: string;
6747
+ start_date: string | null;
6748
+ strategy_id: string;
6749
+ updated_at: string;
6750
+ user_id: string;
6751
+ };
6752
+ Insert: {
6753
+ condition_expression?: string | null;
6754
+ created_at?: string;
6755
+ end_date?: string | null;
6756
+ id?: string;
6757
+ is_enabled?: boolean;
6758
+ priority?: number;
6759
+ rule_type: string;
6760
+ start_date?: string | null;
6761
+ strategy_id: string;
6762
+ updated_at?: string;
6763
+ user_id: string;
6764
+ };
6765
+ Update: {
6766
+ condition_expression?: string | null;
6767
+ created_at?: string;
6768
+ end_date?: string | null;
6769
+ id?: string;
6770
+ is_enabled?: boolean;
6771
+ priority?: number;
6772
+ rule_type?: string;
6773
+ start_date?: string | null;
6774
+ strategy_id?: string;
6775
+ updated_at?: string;
6776
+ user_id?: string;
6777
+ };
6778
+ Relationships: [{
6779
+ foreignKeyName: "logistics_strategy_schedules_strategy_id_fkey";
6780
+ columns: ["strategy_id"];
6781
+ isOneToOne: false;
6782
+ referencedRelation: "logistics_strategies";
6783
+ referencedColumns: ["id"];
6784
+ }];
6785
+ };
6786
+ logistics_variables: {
6787
+ Row: {
6788
+ created_at: string;
6789
+ default_value: string | null;
6790
+ description: string | null;
6791
+ id: string;
6792
+ is_builtin: boolean;
6793
+ key: string;
6794
+ label: string;
5688
6795
  updated_at: string;
6796
+ user_id: string;
6797
+ value_type: string;
5689
6798
  };
5690
6799
  Insert: {
5691
6800
  created_at?: string;
6801
+ default_value?: string | null;
6802
+ description?: string | null;
5692
6803
  id?: string;
5693
- name: string;
5694
- sort_order?: number;
6804
+ is_builtin?: boolean;
6805
+ key: string;
6806
+ label: string;
5695
6807
  updated_at?: string;
6808
+ user_id: string;
6809
+ value_type: string;
5696
6810
  };
5697
6811
  Update: {
5698
6812
  created_at?: string;
6813
+ default_value?: string | null;
6814
+ description?: string | null;
5699
6815
  id?: string;
5700
- name?: string;
5701
- sort_order?: number;
6816
+ is_builtin?: boolean;
6817
+ key?: string;
6818
+ label?: string;
5702
6819
  updated_at?: string;
6820
+ user_id?: string;
6821
+ value_type?: string;
5703
6822
  };
5704
6823
  Relationships: [];
5705
6824
  };
@@ -6098,60 +7217,66 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
6098
7217
  };
6099
7218
  manufacture_products: {
6100
7219
  Row: {
6101
- aantal_te_produceren: number;
6102
7220
  created_at: string;
6103
7221
  description: string | null;
6104
7222
  id: string;
6105
7223
  is_active: boolean;
6106
- location_id: string | null;
6107
7224
  name: string;
6108
- partij_nummer: string | null;
6109
- photos: import("../integrations/supabase/types").Json;
6110
7225
  produced_stock: number;
6111
7226
  product_code: string;
6112
7227
  tenant_id: string;
6113
- unit: string;
6114
7228
  updated_at: string;
6115
7229
  };
6116
7230
  Insert: {
6117
- aantal_te_produceren?: number;
6118
7231
  created_at?: string;
6119
7232
  description?: string | null;
6120
7233
  id?: string;
6121
7234
  is_active?: boolean;
6122
- location_id?: string | null;
6123
7235
  name: string;
6124
- partij_nummer?: string | null;
6125
- photos?: import("../integrations/supabase/types").Json;
6126
7236
  produced_stock?: number;
6127
7237
  product_code: string;
6128
7238
  tenant_id: string;
6129
- unit?: string;
6130
7239
  updated_at?: string;
6131
7240
  };
6132
7241
  Update: {
6133
- aantal_te_produceren?: number;
6134
7242
  created_at?: string;
6135
7243
  description?: string | null;
6136
7244
  id?: string;
6137
7245
  is_active?: boolean;
6138
- location_id?: string | null;
6139
7246
  name?: string;
6140
- partij_nummer?: string | null;
6141
- photos?: import("../integrations/supabase/types").Json;
6142
7247
  produced_stock?: number;
6143
7248
  product_code?: string;
6144
7249
  tenant_id?: string;
6145
- unit?: string;
6146
7250
  updated_at?: string;
6147
7251
  };
6148
- Relationships: [{
6149
- foreignKeyName: "manufacture_products_location_id_fkey";
6150
- columns: ["location_id"];
6151
- isOneToOne: false;
6152
- referencedRelation: "locations";
6153
- referencedColumns: ["id"];
6154
- }];
7252
+ Relationships: [];
7253
+ };
7254
+ module_permissions: {
7255
+ Row: {
7256
+ created_at: string;
7257
+ id: string;
7258
+ module_id: string;
7259
+ permission: string;
7260
+ role: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
7261
+ updated_at: string;
7262
+ };
7263
+ Insert: {
7264
+ created_at?: string;
7265
+ id?: string;
7266
+ module_id: string;
7267
+ permission: string;
7268
+ role: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
7269
+ updated_at?: string;
7270
+ };
7271
+ Update: {
7272
+ created_at?: string;
7273
+ id?: string;
7274
+ module_id?: string;
7275
+ permission?: string;
7276
+ role?: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
7277
+ updated_at?: string;
7278
+ };
7279
+ Relationships: [];
6155
7280
  };
6156
7281
  monteurs: {
6157
7282
  Row: {
@@ -6882,6 +8007,42 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
6882
8007
  };
6883
8008
  Relationships: [];
6884
8009
  };
8010
+ order_buffers: {
8011
+ Row: {
8012
+ buffer_key: string;
8013
+ created_at: string;
8014
+ customer_id: string | null;
8015
+ grouping_mode: string;
8016
+ id: string;
8017
+ pickup_date: string | null;
8018
+ pickup_location: string | null;
8019
+ plan_locked_at: string | null;
8020
+ updated_at: string;
8021
+ };
8022
+ Insert: {
8023
+ buffer_key: string;
8024
+ created_at?: string;
8025
+ customer_id?: string | null;
8026
+ grouping_mode: string;
8027
+ id?: string;
8028
+ pickup_date?: string | null;
8029
+ pickup_location?: string | null;
8030
+ plan_locked_at?: string | null;
8031
+ updated_at?: string;
8032
+ };
8033
+ Update: {
8034
+ buffer_key?: string;
8035
+ created_at?: string;
8036
+ customer_id?: string | null;
8037
+ grouping_mode?: string;
8038
+ id?: string;
8039
+ pickup_date?: string | null;
8040
+ pickup_location?: string | null;
8041
+ plan_locked_at?: string | null;
8042
+ updated_at?: string;
8043
+ };
8044
+ Relationships: [];
8045
+ };
6885
8046
  order_cart_items: {
6886
8047
  Row: {
6887
8048
  cart_id: string;
@@ -6948,6 +8109,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
6948
8109
  order_carts: {
6949
8110
  Row: {
6950
8111
  algorithm_version: number;
8112
+ buffer_id: string | null;
6951
8113
  cart_number: number;
6952
8114
  created_at: string;
6953
8115
  id: string;
@@ -6955,13 +8117,14 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
6955
8117
  is_complete: boolean;
6956
8118
  notes: string | null;
6957
8119
  occupancy_pct: number;
6958
- order_id: string;
8120
+ order_id: string | null;
6959
8121
  source: string;
6960
8122
  total_layers_used: number;
6961
8123
  updated_at: string;
6962
8124
  };
6963
8125
  Insert: {
6964
8126
  algorithm_version?: number;
8127
+ buffer_id?: string | null;
6965
8128
  cart_number: number;
6966
8129
  created_at?: string;
6967
8130
  id?: string;
@@ -6969,13 +8132,14 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
6969
8132
  is_complete?: boolean;
6970
8133
  notes?: string | null;
6971
8134
  occupancy_pct?: number;
6972
- order_id: string;
8135
+ order_id?: string | null;
6973
8136
  source?: string;
6974
8137
  total_layers_used?: number;
6975
8138
  updated_at?: string;
6976
8139
  };
6977
8140
  Update: {
6978
8141
  algorithm_version?: number;
8142
+ buffer_id?: string | null;
6979
8143
  cart_number?: number;
6980
8144
  created_at?: string;
6981
8145
  id?: string;
@@ -6983,12 +8147,18 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
6983
8147
  is_complete?: boolean;
6984
8148
  notes?: string | null;
6985
8149
  occupancy_pct?: number;
6986
- order_id?: string;
8150
+ order_id?: string | null;
6987
8151
  source?: string;
6988
8152
  total_layers_used?: number;
6989
8153
  updated_at?: string;
6990
8154
  };
6991
8155
  Relationships: [{
8156
+ foreignKeyName: "order_carts_buffer_id_fkey";
8157
+ columns: ["buffer_id"];
8158
+ isOneToOne: false;
8159
+ referencedRelation: "order_buffers";
8160
+ referencedColumns: ["id"];
8161
+ }, {
6992
8162
  foreignKeyName: "order_carts_order_id_fkey";
6993
8163
  columns: ["order_id"];
6994
8164
  isOneToOne: false;
@@ -7226,12 +8396,14 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
7226
8396
  };
7227
8397
  orders: {
7228
8398
  Row: {
8399
+ buffer_id: string | null;
7229
8400
  created_at: string;
7230
8401
  custom_fields: import("../integrations/supabase/types").Json;
7231
8402
  customer_id: string | null;
7232
8403
  customer_name: string;
7233
8404
  deleted_at: string | null;
7234
8405
  delivery_date: string | null;
8406
+ floriday_sales_order_id: string | null;
7235
8407
  id: string;
7236
8408
  is_reservation: boolean;
7237
8409
  notes: string | null;
@@ -7245,12 +8417,14 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
7245
8417
  updated_at: string;
7246
8418
  };
7247
8419
  Insert: {
8420
+ buffer_id?: string | null;
7248
8421
  created_at?: string;
7249
8422
  custom_fields?: import("../integrations/supabase/types").Json;
7250
8423
  customer_id?: string | null;
7251
8424
  customer_name?: string;
7252
8425
  deleted_at?: string | null;
7253
8426
  delivery_date?: string | null;
8427
+ floriday_sales_order_id?: string | null;
7254
8428
  id?: string;
7255
8429
  is_reservation?: boolean;
7256
8430
  notes?: string | null;
@@ -7264,12 +8438,14 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
7264
8438
  updated_at?: string;
7265
8439
  };
7266
8440
  Update: {
8441
+ buffer_id?: string | null;
7267
8442
  created_at?: string;
7268
8443
  custom_fields?: import("../integrations/supabase/types").Json;
7269
8444
  customer_id?: string | null;
7270
8445
  customer_name?: string;
7271
8446
  deleted_at?: string | null;
7272
8447
  delivery_date?: string | null;
8448
+ floriday_sales_order_id?: string | null;
7273
8449
  id?: string;
7274
8450
  is_reservation?: boolean;
7275
8451
  notes?: string | null;
@@ -7283,6 +8459,12 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
7283
8459
  updated_at?: string;
7284
8460
  };
7285
8461
  Relationships: [{
8462
+ foreignKeyName: "orders_buffer_id_fkey";
8463
+ columns: ["buffer_id"];
8464
+ isOneToOne: false;
8465
+ referencedRelation: "order_buffers";
8466
+ referencedColumns: ["id"];
8467
+ }, {
7286
8468
  foreignKeyName: "orders_customer_id_fkey";
7287
8469
  columns: ["customer_id"];
7288
8470
  isOneToOne: false;
@@ -7413,6 +8595,78 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
7413
8595
  };
7414
8596
  Relationships: [];
7415
8597
  };
8598
+ planning_item_assistants: {
8599
+ Row: {
8600
+ created_at: string;
8601
+ created_by: string | null;
8602
+ monteur_id: string;
8603
+ planning_item_id: string;
8604
+ };
8605
+ Insert: {
8606
+ created_at?: string;
8607
+ created_by?: string | null;
8608
+ monteur_id: string;
8609
+ planning_item_id: string;
8610
+ };
8611
+ Update: {
8612
+ created_at?: string;
8613
+ created_by?: string | null;
8614
+ monteur_id?: string;
8615
+ planning_item_id?: string;
8616
+ };
8617
+ Relationships: [{
8618
+ foreignKeyName: "planning_item_assistants_planning_item_id_fkey";
8619
+ columns: ["planning_item_id"];
8620
+ isOneToOne: false;
8621
+ referencedRelation: "planning_items";
8622
+ referencedColumns: ["id"];
8623
+ }];
8624
+ };
8625
+ planning_items: {
8626
+ Row: {
8627
+ assigned_monteur_id: string;
8628
+ created_at: string;
8629
+ created_by: string | null;
8630
+ end_at: string;
8631
+ id: string;
8632
+ notes: string | null;
8633
+ start_at: string;
8634
+ status: import("../integrations/supabase/types").Database["public"]["Enums"]["planning_item_status"];
8635
+ updated_at: string;
8636
+ werkbon_id: string;
8637
+ };
8638
+ Insert: {
8639
+ assigned_monteur_id: string;
8640
+ created_at?: string;
8641
+ created_by?: string | null;
8642
+ end_at: string;
8643
+ id?: string;
8644
+ notes?: string | null;
8645
+ start_at: string;
8646
+ status?: import("../integrations/supabase/types").Database["public"]["Enums"]["planning_item_status"];
8647
+ updated_at?: string;
8648
+ werkbon_id: string;
8649
+ };
8650
+ Update: {
8651
+ assigned_monteur_id?: string;
8652
+ created_at?: string;
8653
+ created_by?: string | null;
8654
+ end_at?: string;
8655
+ id?: string;
8656
+ notes?: string | null;
8657
+ start_at?: string;
8658
+ status?: import("../integrations/supabase/types").Database["public"]["Enums"]["planning_item_status"];
8659
+ updated_at?: string;
8660
+ werkbon_id?: string;
8661
+ };
8662
+ Relationships: [{
8663
+ foreignKeyName: "planning_items_werkbon_id_fkey";
8664
+ columns: ["werkbon_id"];
8665
+ isOneToOne: false;
8666
+ referencedRelation: "werkbonnen";
8667
+ referencedColumns: ["id"];
8668
+ }];
8669
+ };
7416
8670
  product_bom_items: {
7417
8671
  Row: {
7418
8672
  component_product_id: string | null;
@@ -7420,6 +8674,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
7420
8674
  created_at: string;
7421
8675
  id: string;
7422
8676
  notes: string | null;
8677
+ packing_configuration_id: string | null;
7423
8678
  parent_product_id: string | null;
7424
8679
  parent_trade_item_floriday_id: string | null;
7425
8680
  quantity: number;
@@ -7434,6 +8689,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
7434
8689
  created_at?: string;
7435
8690
  id?: string;
7436
8691
  notes?: string | null;
8692
+ packing_configuration_id?: string | null;
7437
8693
  parent_product_id?: string | null;
7438
8694
  parent_trade_item_floriday_id?: string | null;
7439
8695
  quantity?: number;
@@ -7448,6 +8704,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
7448
8704
  created_at?: string;
7449
8705
  id?: string;
7450
8706
  notes?: string | null;
8707
+ packing_configuration_id?: string | null;
7451
8708
  parent_product_id?: string | null;
7452
8709
  parent_trade_item_floriday_id?: string | null;
7453
8710
  quantity?: number;
@@ -7649,11 +8906,13 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
7649
8906
  created_at: string;
7650
8907
  id: string;
7651
8908
  is_package: boolean;
8909
+ label: string | null;
7652
8910
  layers_per_load_carrier: number | null;
7653
8911
  load_carrier: string | null;
7654
8912
  package_id: string | null;
7655
8913
  package_label: string | null;
7656
8914
  packages_per_layer: number | null;
8915
+ packing_configuration_id: string;
7657
8916
  product_id: string | null;
7658
8917
  tenant_id: string;
7659
8918
  trade_item_floriday_id: string | null;
@@ -7664,11 +8923,13 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
7664
8923
  created_at?: string;
7665
8924
  id?: string;
7666
8925
  is_package?: boolean;
8926
+ label?: string | null;
7667
8927
  layers_per_load_carrier?: number | null;
7668
8928
  load_carrier?: string | null;
7669
8929
  package_id?: string | null;
7670
8930
  package_label?: string | null;
7671
8931
  packages_per_layer?: number | null;
8932
+ packing_configuration_id?: string;
7672
8933
  product_id?: string | null;
7673
8934
  tenant_id: string;
7674
8935
  trade_item_floriday_id?: string | null;
@@ -7679,11 +8940,13 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
7679
8940
  created_at?: string;
7680
8941
  id?: string;
7681
8942
  is_package?: boolean;
8943
+ label?: string | null;
7682
8944
  layers_per_load_carrier?: number | null;
7683
8945
  load_carrier?: string | null;
7684
8946
  package_id?: string | null;
7685
8947
  package_label?: string | null;
7686
8948
  packages_per_layer?: number | null;
8949
+ packing_configuration_id?: string;
7687
8950
  product_id?: string | null;
7688
8951
  tenant_id?: string;
7689
8952
  trade_item_floriday_id?: string | null;
@@ -7745,8 +9008,6 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
7745
9008
  crates_per_layer: number;
7746
9009
  created_at: string;
7747
9010
  custom_fields: import("../integrations/supabase/types").Json;
7748
- floriday_active: boolean;
7749
- floriday_payload: import("../integrations/supabase/types").Json;
7750
9011
  floriday_trade_item_id: string | null;
7751
9012
  id: string;
7752
9013
  image_url: string | null;
@@ -7773,8 +9034,6 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
7773
9034
  crates_per_layer?: number;
7774
9035
  created_at?: string;
7775
9036
  custom_fields?: import("../integrations/supabase/types").Json;
7776
- floriday_active?: boolean;
7777
- floriday_payload?: import("../integrations/supabase/types").Json;
7778
9037
  floriday_trade_item_id?: string | null;
7779
9038
  id?: string;
7780
9039
  image_url?: string | null;
@@ -7801,8 +9060,6 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
7801
9060
  crates_per_layer?: number;
7802
9061
  created_at?: string;
7803
9062
  custom_fields?: import("../integrations/supabase/types").Json;
7804
- floriday_active?: boolean;
7805
- floriday_payload?: import("../integrations/supabase/types").Json;
7806
9063
  floriday_trade_item_id?: string | null;
7807
9064
  id?: string;
7808
9065
  image_url?: string | null;
@@ -7827,6 +9084,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
7827
9084
  profiles: {
7828
9085
  Row: {
7829
9086
  address: string | null;
9087
+ avatar_url: string | null;
7830
9088
  created_at: string;
7831
9089
  display_name: string | null;
7832
9090
  email: string | null;
@@ -7838,6 +9096,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
7838
9096
  };
7839
9097
  Insert: {
7840
9098
  address?: string | null;
9099
+ avatar_url?: string | null;
7841
9100
  created_at?: string;
7842
9101
  display_name?: string | null;
7843
9102
  email?: string | null;
@@ -7849,6 +9108,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
7849
9108
  };
7850
9109
  Update: {
7851
9110
  address?: string | null;
9111
+ avatar_url?: string | null;
7852
9112
  created_at?: string;
7853
9113
  display_name?: string | null;
7854
9114
  email?: string | null;
@@ -8713,7 +9973,6 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
8713
9973
  order_id: string | null;
8714
9974
  order_item_id: string | null;
8715
9975
  order_source: string | null;
8716
- parent_trade_item_key: string | null;
8717
9976
  physical_after: number | null;
8718
9977
  physical_before: number | null;
8719
9978
  production_batch_id: string | null;
@@ -8732,7 +9991,6 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
8732
9991
  order_id?: string | null;
8733
9992
  order_item_id?: string | null;
8734
9993
  order_source?: string | null;
8735
- parent_trade_item_key?: string | null;
8736
9994
  physical_after?: number | null;
8737
9995
  physical_before?: number | null;
8738
9996
  production_batch_id?: string | null;
@@ -8751,7 +10009,6 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
8751
10009
  order_id?: string | null;
8752
10010
  order_item_id?: string | null;
8753
10011
  order_source?: string | null;
8754
- parent_trade_item_key?: string | null;
8755
10012
  physical_after?: number | null;
8756
10013
  physical_before?: number | null;
8757
10014
  production_batch_id?: string | null;
@@ -8856,6 +10113,27 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
8856
10113
  };
8857
10114
  Relationships: [];
8858
10115
  };
10116
+ technician_rates: {
10117
+ Row: {
10118
+ created_at: string;
10119
+ hourly_rate_cents: number;
10120
+ updated_at: string;
10121
+ user_id: string;
10122
+ };
10123
+ Insert: {
10124
+ created_at?: string;
10125
+ hourly_rate_cents?: number;
10126
+ updated_at?: string;
10127
+ user_id: string;
10128
+ };
10129
+ Update: {
10130
+ created_at?: string;
10131
+ hourly_rate_cents?: number;
10132
+ updated_at?: string;
10133
+ user_id?: string;
10134
+ };
10135
+ Relationships: [];
10136
+ };
8859
10137
  tenants: {
8860
10138
  Row: {
8861
10139
  created_at: string;
@@ -9060,6 +10338,48 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
9060
10338
  };
9061
10339
  Relationships: [];
9062
10340
  };
10341
+ trade_item_prices: {
10342
+ Row: {
10343
+ created_at: string;
10344
+ currency: string;
10345
+ id: string;
10346
+ last_push_error: string | null;
10347
+ last_pushed_at: string | null;
10348
+ price_group_id: string | null;
10349
+ price_per_piece: number;
10350
+ supply_line_id: string | null;
10351
+ trade_item_key: string;
10352
+ updated_at: string;
10353
+ user_id: string;
10354
+ };
10355
+ Insert: {
10356
+ created_at?: string;
10357
+ currency?: string;
10358
+ id?: string;
10359
+ last_push_error?: string | null;
10360
+ last_pushed_at?: string | null;
10361
+ price_group_id?: string | null;
10362
+ price_per_piece: number;
10363
+ supply_line_id?: string | null;
10364
+ trade_item_key: string;
10365
+ updated_at?: string;
10366
+ user_id: string;
10367
+ };
10368
+ Update: {
10369
+ created_at?: string;
10370
+ currency?: string;
10371
+ id?: string;
10372
+ last_push_error?: string | null;
10373
+ last_pushed_at?: string | null;
10374
+ price_group_id?: string | null;
10375
+ price_per_piece?: number;
10376
+ supply_line_id?: string | null;
10377
+ trade_item_key?: string;
10378
+ updated_at?: string;
10379
+ user_id?: string;
10380
+ };
10381
+ Relationships: [];
10382
+ };
9063
10383
  trade_item_stock: {
9064
10384
  Row: {
9065
10385
  connection_id: string;
@@ -9213,7 +10533,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
9213
10533
  twinfield_connections: {
9214
10534
  Row: {
9215
10535
  access_token: string | null;
9216
- client_id: string | null;
10536
+ client_id: string;
9217
10537
  client_secret: string | null;
9218
10538
  cluster_uri: string | null;
9219
10539
  company_code: string | null;
@@ -9225,7 +10545,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
9225
10545
  is_active: boolean;
9226
10546
  label: string | null;
9227
10547
  office_code: string | null;
9228
- redirect_uri: string | null;
10548
+ redirect_uri: string;
9229
10549
  refresh_token: string | null;
9230
10550
  token_expires_at: string | null;
9231
10551
  updated_at: string;
@@ -9233,7 +10553,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
9233
10553
  };
9234
10554
  Insert: {
9235
10555
  access_token?: string | null;
9236
- client_id?: string | null;
10556
+ client_id: string;
9237
10557
  client_secret?: string | null;
9238
10558
  cluster_uri?: string | null;
9239
10559
  company_code?: string | null;
@@ -9245,7 +10565,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
9245
10565
  is_active?: boolean;
9246
10566
  label?: string | null;
9247
10567
  office_code?: string | null;
9248
- redirect_uri?: string | null;
10568
+ redirect_uri: string;
9249
10569
  refresh_token?: string | null;
9250
10570
  token_expires_at?: string | null;
9251
10571
  updated_at?: string;
@@ -9253,7 +10573,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
9253
10573
  };
9254
10574
  Update: {
9255
10575
  access_token?: string | null;
9256
- client_id?: string | null;
10576
+ client_id?: string;
9257
10577
  client_secret?: string | null;
9258
10578
  cluster_uri?: string | null;
9259
10579
  company_code?: string | null;
@@ -9265,7 +10585,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
9265
10585
  is_active?: boolean;
9266
10586
  label?: string | null;
9267
10587
  office_code?: string | null;
9268
- redirect_uri?: string | null;
10588
+ redirect_uri?: string;
9269
10589
  refresh_token?: string | null;
9270
10590
  token_expires_at?: string | null;
9271
10591
  updated_at?: string;
@@ -9325,6 +10645,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
9325
10645
  country: string | null;
9326
10646
  created_at: string;
9327
10647
  email: string | null;
10648
+ external_group_key: string | null;
9328
10649
  id: string;
9329
10650
  last_synced_at: string | null;
9330
10651
  name: string;
@@ -9343,6 +10664,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
9343
10664
  country?: string | null;
9344
10665
  created_at?: string;
9345
10666
  email?: string | null;
10667
+ external_group_key?: string | null;
9346
10668
  id?: string;
9347
10669
  last_synced_at?: string | null;
9348
10670
  name: string;
@@ -9361,6 +10683,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
9361
10683
  country?: string | null;
9362
10684
  created_at?: string;
9363
10685
  email?: string | null;
10686
+ external_group_key?: string | null;
9364
10687
  id?: string;
9365
10688
  last_synced_at?: string | null;
9366
10689
  name?: string;
@@ -9487,35 +10810,80 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
9487
10810
  vat_rate: number | null;
9488
10811
  };
9489
10812
  Insert: {
9490
- article_code?: string | null;
10813
+ article_code?: string | null;
10814
+ connection_id: string;
10815
+ data?: import("../integrations/supabase/types").Json;
10816
+ description?: string | null;
10817
+ fetched_at?: string;
10818
+ invoice_number: string;
10819
+ line_number: number;
10820
+ line_total?: number | null;
10821
+ quantity?: number | null;
10822
+ unit_price?: number | null;
10823
+ vat_code?: string | null;
10824
+ vat_rate?: number | null;
10825
+ };
10826
+ Update: {
10827
+ article_code?: string | null;
10828
+ connection_id?: string;
10829
+ data?: import("../integrations/supabase/types").Json;
10830
+ description?: string | null;
10831
+ fetched_at?: string;
10832
+ invoice_number?: string;
10833
+ line_number?: number;
10834
+ line_total?: number | null;
10835
+ quantity?: number | null;
10836
+ unit_price?: number | null;
10837
+ vat_code?: string | null;
10838
+ vat_rate?: number | null;
10839
+ };
10840
+ Relationships: [{
10841
+ foreignKeyName: "twinfield_invoice_lines_cache_v2_connection_id_fkey";
10842
+ columns: ["connection_id"];
10843
+ isOneToOne: false;
10844
+ referencedRelation: "twinfield_connections";
10845
+ referencedColumns: ["id"];
10846
+ }];
10847
+ };
10848
+ twinfield_invoice_pdf_cache: {
10849
+ Row: {
10850
+ connection_id: string;
10851
+ created_at: string;
10852
+ fetched_at: string;
10853
+ id: string;
10854
+ invoice_number: string;
10855
+ last_accessed_at: string;
10856
+ object_path: string;
10857
+ office_code: string;
10858
+ size_bytes: number;
10859
+ updated_at: string;
10860
+ };
10861
+ Insert: {
9491
10862
  connection_id: string;
9492
- data?: import("../integrations/supabase/types").Json;
9493
- description?: string | null;
10863
+ created_at?: string;
9494
10864
  fetched_at?: string;
10865
+ id?: string;
9495
10866
  invoice_number: string;
9496
- line_number: number;
9497
- line_total?: number | null;
9498
- quantity?: number | null;
9499
- unit_price?: number | null;
9500
- vat_code?: string | null;
9501
- vat_rate?: number | null;
10867
+ last_accessed_at?: string;
10868
+ object_path: string;
10869
+ office_code: string;
10870
+ size_bytes?: number;
10871
+ updated_at?: string;
9502
10872
  };
9503
10873
  Update: {
9504
- article_code?: string | null;
9505
10874
  connection_id?: string;
9506
- data?: import("../integrations/supabase/types").Json;
9507
- description?: string | null;
10875
+ created_at?: string;
9508
10876
  fetched_at?: string;
10877
+ id?: string;
9509
10878
  invoice_number?: string;
9510
- line_number?: number;
9511
- line_total?: number | null;
9512
- quantity?: number | null;
9513
- unit_price?: number | null;
9514
- vat_code?: string | null;
9515
- vat_rate?: number | null;
10879
+ last_accessed_at?: string;
10880
+ object_path?: string;
10881
+ office_code?: string;
10882
+ size_bytes?: number;
10883
+ updated_at?: string;
9516
10884
  };
9517
10885
  Relationships: [{
9518
- foreignKeyName: "twinfield_invoice_lines_cache_v2_connection_id_fkey";
10886
+ foreignKeyName: "twinfield_invoice_pdf_cache_connection_id_fkey";
9519
10887
  columns: ["connection_id"];
9520
10888
  isOneToOne: false;
9521
10889
  referencedRelation: "twinfield_connections";
@@ -9525,6 +10893,8 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
9525
10893
  twinfield_invoice_settings: {
9526
10894
  Row: {
9527
10895
  created_at: string;
10896
+ debtor_gl_account: string;
10897
+ default_credit_invoice_type: string | null;
9528
10898
  default_gl_account: string;
9529
10899
  default_invoice_type: string;
9530
10900
  default_payment_term_days: number;
@@ -9533,11 +10903,15 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
9533
10903
  invoice_enabled_fo: boolean;
9534
10904
  invoice_enabled_ho: boolean;
9535
10905
  invoice_enabled_mo: boolean;
10906
+ payment_gl_account: string;
10907
+ payment_journal_code: string;
9536
10908
  updated_at: string;
9537
10909
  user_id: string;
9538
10910
  };
9539
10911
  Insert: {
9540
10912
  created_at?: string;
10913
+ debtor_gl_account?: string;
10914
+ default_credit_invoice_type?: string | null;
9541
10915
  default_gl_account?: string;
9542
10916
  default_invoice_type?: string;
9543
10917
  default_payment_term_days?: number;
@@ -9546,11 +10920,15 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
9546
10920
  invoice_enabled_fo?: boolean;
9547
10921
  invoice_enabled_ho?: boolean;
9548
10922
  invoice_enabled_mo?: boolean;
10923
+ payment_gl_account?: string;
10924
+ payment_journal_code?: string;
9549
10925
  updated_at?: string;
9550
10926
  user_id: string;
9551
10927
  };
9552
10928
  Update: {
9553
10929
  created_at?: string;
10930
+ debtor_gl_account?: string;
10931
+ default_credit_invoice_type?: string | null;
9554
10932
  default_gl_account?: string;
9555
10933
  default_invoice_type?: string;
9556
10934
  default_payment_term_days?: number;
@@ -9559,6 +10937,8 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
9559
10937
  invoice_enabled_fo?: boolean;
9560
10938
  invoice_enabled_ho?: boolean;
9561
10939
  invoice_enabled_mo?: boolean;
10940
+ payment_gl_account?: string;
10941
+ payment_journal_code?: string;
9562
10942
  updated_at?: string;
9563
10943
  user_id?: string;
9564
10944
  };
@@ -9779,43 +11159,49 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
9779
11159
  };
9780
11160
  twinfield_push_queue: {
9781
11161
  Row: {
11162
+ action: string;
9782
11163
  attempts: number;
9783
11164
  connection_id: string;
9784
11165
  created_at: string;
11166
+ customer_id: string | null;
9785
11167
  external_id: string | null;
9786
11168
  id: string;
9787
11169
  idempotency_key: string;
9788
11170
  last_error: string | null;
9789
11171
  next_attempt_at: string;
9790
- office_code: string;
11172
+ office_code: string | null;
9791
11173
  payload: import("../integrations/supabase/types").Json;
9792
11174
  status: string;
9793
11175
  updated_at: string;
9794
11176
  };
9795
11177
  Insert: {
11178
+ action?: string;
9796
11179
  attempts?: number;
9797
11180
  connection_id: string;
9798
11181
  created_at?: string;
11182
+ customer_id?: string | null;
9799
11183
  external_id?: string | null;
9800
11184
  id?: string;
9801
11185
  idempotency_key: string;
9802
11186
  last_error?: string | null;
9803
11187
  next_attempt_at?: string;
9804
- office_code: string;
11188
+ office_code?: string | null;
9805
11189
  payload: import("../integrations/supabase/types").Json;
9806
11190
  status?: string;
9807
11191
  updated_at?: string;
9808
11192
  };
9809
11193
  Update: {
11194
+ action?: string;
9810
11195
  attempts?: number;
9811
11196
  connection_id?: string;
9812
11197
  created_at?: string;
11198
+ customer_id?: string | null;
9813
11199
  external_id?: string | null;
9814
11200
  id?: string;
9815
11201
  idempotency_key?: string;
9816
11202
  last_error?: string | null;
9817
11203
  next_attempt_at?: string;
9818
- office_code?: string;
11204
+ office_code?: string | null;
9819
11205
  payload?: import("../integrations/supabase/types").Json;
9820
11206
  status?: string;
9821
11207
  updated_at?: string;
@@ -9826,6 +11212,12 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
9826
11212
  isOneToOne: false;
9827
11213
  referencedRelation: "twinfield_connections";
9828
11214
  referencedColumns: ["id"];
11215
+ }, {
11216
+ foreignKeyName: "twinfield_push_queue_customer_id_fkey";
11217
+ columns: ["customer_id"];
11218
+ isOneToOne: false;
11219
+ referencedRelation: "customers";
11220
+ referencedColumns: ["id"];
9829
11221
  }];
9830
11222
  };
9831
11223
  twinfield_request_metrics: {
@@ -10034,72 +11426,420 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
10034
11426
  size_bytes?: number | null;
10035
11427
  };
10036
11428
  Update: {
10037
- action?: string;
10038
- attempt_number?: number;
10039
- caller?: string;
10040
- client_user_id?: string | null;
10041
- content_type?: string | null;
11429
+ action?: string;
11430
+ attempt_number?: number;
11431
+ caller?: string;
11432
+ client_user_id?: string | null;
11433
+ content_type?: string | null;
11434
+ created_at?: string;
11435
+ environment?: string;
11436
+ error_message?: string | null;
11437
+ filename?: string | null;
11438
+ id?: string;
11439
+ idempotency_key?: string | null;
11440
+ module?: string;
11441
+ path?: string;
11442
+ reference_id?: string | null;
11443
+ request_body_hash?: string | null;
11444
+ request_timestamp?: number | null;
11445
+ response_content_type?: string | null;
11446
+ response_status?: number | null;
11447
+ size_bytes?: number | null;
11448
+ };
11449
+ Relationships: [];
11450
+ };
11451
+ voorraad_publish_attempts: {
11452
+ Row: {
11453
+ action: string;
11454
+ connection_id: string | null;
11455
+ created_at: string;
11456
+ error: string | null;
11457
+ gateway_attempt_id: string | null;
11458
+ gateway_status: number | null;
11459
+ id: string;
11460
+ intent: string;
11461
+ ok: boolean;
11462
+ request_summary: import("../integrations/supabase/types").Json | null;
11463
+ trade_item_id: string | null;
11464
+ user_id: string;
11465
+ };
11466
+ Insert: {
11467
+ action: string;
11468
+ connection_id?: string | null;
11469
+ created_at?: string;
11470
+ error?: string | null;
11471
+ gateway_attempt_id?: string | null;
11472
+ gateway_status?: number | null;
11473
+ id?: string;
11474
+ intent: string;
11475
+ ok: boolean;
11476
+ request_summary?: import("../integrations/supabase/types").Json | null;
11477
+ trade_item_id?: string | null;
11478
+ user_id: string;
11479
+ };
11480
+ Update: {
11481
+ action?: string;
11482
+ connection_id?: string | null;
11483
+ created_at?: string;
11484
+ error?: string | null;
11485
+ gateway_attempt_id?: string | null;
11486
+ gateway_status?: number | null;
11487
+ id?: string;
11488
+ intent?: string;
11489
+ ok?: boolean;
11490
+ request_summary?: import("../integrations/supabase/types").Json | null;
11491
+ trade_item_id?: string | null;
11492
+ user_id?: string;
11493
+ };
11494
+ Relationships: [];
11495
+ };
11496
+ werkbon_package_ai_rules: {
11497
+ Row: {
11498
+ active: boolean;
11499
+ case_sensitive: boolean;
11500
+ created_at: string;
11501
+ id: string;
11502
+ package_id: string;
11503
+ priority: number;
11504
+ rule_type: string;
11505
+ updated_at: string;
11506
+ value: string;
11507
+ };
11508
+ Insert: {
11509
+ active?: boolean;
11510
+ case_sensitive?: boolean;
11511
+ created_at?: string;
11512
+ id?: string;
11513
+ package_id: string;
11514
+ priority?: number;
11515
+ rule_type: string;
11516
+ updated_at?: string;
11517
+ value: string;
11518
+ };
11519
+ Update: {
11520
+ active?: boolean;
11521
+ case_sensitive?: boolean;
11522
+ created_at?: string;
11523
+ id?: string;
11524
+ package_id?: string;
11525
+ priority?: number;
11526
+ rule_type?: string;
11527
+ updated_at?: string;
11528
+ value?: string;
11529
+ };
11530
+ Relationships: [{
11531
+ foreignKeyName: "werkbon_package_ai_rules_package_id_fkey";
11532
+ columns: ["package_id"];
11533
+ isOneToOne: false;
11534
+ referencedRelation: "werkbon_packages";
11535
+ referencedColumns: ["id"];
11536
+ }];
11537
+ };
11538
+ werkbon_package_categories: {
11539
+ Row: {
11540
+ active: boolean;
11541
+ created_at: string;
11542
+ id: string;
11543
+ kleur: string | null;
11544
+ naam: string;
11545
+ sort_order: number;
11546
+ updated_at: string;
11547
+ };
11548
+ Insert: {
11549
+ active?: boolean;
11550
+ created_at?: string;
11551
+ id?: string;
11552
+ kleur?: string | null;
11553
+ naam: string;
11554
+ sort_order?: number;
11555
+ updated_at?: string;
11556
+ };
11557
+ Update: {
11558
+ active?: boolean;
11559
+ created_at?: string;
11560
+ id?: string;
11561
+ kleur?: string | null;
11562
+ naam?: string;
11563
+ sort_order?: number;
11564
+ updated_at?: string;
11565
+ };
11566
+ Relationships: [];
11567
+ };
11568
+ werkbon_package_lines: {
11569
+ Row: {
11570
+ created_at: string;
11571
+ created_by: string | null;
11572
+ id: string;
11573
+ package_id: string;
11574
+ quantity: number;
11575
+ unit_price_cents_snapshot: number;
11576
+ werkbon_id: string;
11577
+ };
11578
+ Insert: {
11579
+ created_at?: string;
11580
+ created_by?: string | null;
11581
+ id?: string;
11582
+ package_id: string;
11583
+ quantity?: number;
11584
+ unit_price_cents_snapshot?: number;
11585
+ werkbon_id: string;
11586
+ };
11587
+ Update: {
11588
+ created_at?: string;
11589
+ created_by?: string | null;
11590
+ id?: string;
11591
+ package_id?: string;
11592
+ quantity?: number;
11593
+ unit_price_cents_snapshot?: number;
11594
+ werkbon_id?: string;
11595
+ };
11596
+ Relationships: [{
11597
+ foreignKeyName: "werkbon_package_lines_package_id_fkey";
11598
+ columns: ["package_id"];
11599
+ isOneToOne: false;
11600
+ referencedRelation: "werkbon_packages";
11601
+ referencedColumns: ["id"];
11602
+ }, {
11603
+ foreignKeyName: "werkbon_package_lines_werkbon_id_fkey";
11604
+ columns: ["werkbon_id"];
11605
+ isOneToOne: false;
11606
+ referencedRelation: "werkbonnen";
11607
+ referencedColumns: ["id"];
11608
+ }];
11609
+ };
11610
+ werkbon_packages: {
11611
+ Row: {
11612
+ active: boolean;
11613
+ ai_tags: string[];
11614
+ category_id: string | null;
11615
+ code: string;
11616
+ created_at: string;
11617
+ default_quantity: number;
11618
+ description: string | null;
11619
+ duration_minutes: number | null;
11620
+ id: string;
11621
+ mandaat_type: string | null;
11622
+ name: string;
11623
+ sort_order: number;
11624
+ unit_price_cents: number;
11625
+ updated_at: string;
11626
+ };
11627
+ Insert: {
11628
+ active?: boolean;
11629
+ ai_tags?: string[];
11630
+ category_id?: string | null;
11631
+ code: string;
11632
+ created_at?: string;
11633
+ default_quantity?: number;
11634
+ description?: string | null;
11635
+ duration_minutes?: number | null;
11636
+ id?: string;
11637
+ mandaat_type?: string | null;
11638
+ name: string;
11639
+ sort_order?: number;
11640
+ unit_price_cents?: number;
11641
+ updated_at?: string;
11642
+ };
11643
+ Update: {
11644
+ active?: boolean;
11645
+ ai_tags?: string[];
11646
+ category_id?: string | null;
11647
+ code?: string;
11648
+ created_at?: string;
11649
+ default_quantity?: number;
11650
+ description?: string | null;
11651
+ duration_minutes?: number | null;
11652
+ id?: string;
11653
+ mandaat_type?: string | null;
11654
+ name?: string;
11655
+ sort_order?: number;
11656
+ unit_price_cents?: number;
11657
+ updated_at?: string;
11658
+ };
11659
+ Relationships: [{
11660
+ foreignKeyName: "werkbon_packages_category_id_fkey";
11661
+ columns: ["category_id"];
11662
+ isOneToOne: false;
11663
+ referencedRelation: "werkbon_package_categories";
11664
+ referencedColumns: ["id"];
11665
+ }];
11666
+ };
11667
+ werkbon_photos: {
11668
+ Row: {
11669
+ created_at: string;
11670
+ id: string;
11671
+ storage_path: string;
11672
+ user_id: string;
11673
+ werkbon_id: string;
11674
+ };
11675
+ Insert: {
11676
+ created_at?: string;
11677
+ id?: string;
11678
+ storage_path: string;
11679
+ user_id: string;
11680
+ werkbon_id: string;
11681
+ };
11682
+ Update: {
11683
+ created_at?: string;
11684
+ id?: string;
11685
+ storage_path?: string;
11686
+ user_id?: string;
11687
+ werkbon_id?: string;
11688
+ };
11689
+ Relationships: [{
11690
+ foreignKeyName: "werkbon_photos_werkbon_id_fkey";
11691
+ columns: ["werkbon_id"];
11692
+ isOneToOne: false;
11693
+ referencedRelation: "werkbonnen";
11694
+ referencedColumns: ["id"];
11695
+ }];
11696
+ };
11697
+ werkbon_time_logs: {
11698
+ Row: {
11699
+ activity: string;
11700
+ created_at: string;
11701
+ ended_at: string | null;
11702
+ id: string;
11703
+ started_at: string;
11704
+ user_id: string;
11705
+ werkbon_id: string;
11706
+ };
11707
+ Insert: {
11708
+ activity: string;
11709
+ created_at?: string;
11710
+ ended_at?: string | null;
11711
+ id?: string;
11712
+ started_at?: string;
11713
+ user_id: string;
11714
+ werkbon_id: string;
11715
+ };
11716
+ Update: {
11717
+ activity?: string;
10042
11718
  created_at?: string;
10043
- environment?: string;
10044
- error_message?: string | null;
10045
- filename?: string | null;
11719
+ ended_at?: string | null;
10046
11720
  id?: string;
10047
- idempotency_key?: string | null;
10048
- module?: string;
10049
- path?: string;
10050
- reference_id?: string | null;
10051
- request_body_hash?: string | null;
10052
- request_timestamp?: number | null;
10053
- response_content_type?: string | null;
10054
- response_status?: number | null;
10055
- size_bytes?: number | null;
11721
+ started_at?: string;
11722
+ user_id?: string;
11723
+ werkbon_id?: string;
10056
11724
  };
10057
- Relationships: [];
11725
+ Relationships: [{
11726
+ foreignKeyName: "werkbon_time_logs_werkbon_id_fkey";
11727
+ columns: ["werkbon_id"];
11728
+ isOneToOne: false;
11729
+ referencedRelation: "werkbonnen";
11730
+ referencedColumns: ["id"];
11731
+ }];
10058
11732
  };
10059
- voorraad_publish_attempts: {
11733
+ werkbonnen: {
10060
11734
  Row: {
10061
- action: string;
10062
- connection_id: string | null;
11735
+ assigned_user_id: string | null;
11736
+ budget_mandate_cents: number;
11737
+ complaint_description: string | null;
10063
11738
  created_at: string;
10064
- error: string | null;
10065
- gateway_attempt_id: string | null;
10066
- gateway_status: number | null;
11739
+ created_by: string | null;
11740
+ customer_id: string | null;
11741
+ externe_referentie: string | null;
11742
+ first_time_fix: boolean | null;
10067
11743
  id: string;
10068
- intent: string;
10069
- ok: boolean;
10070
- request_summary: import("../integrations/supabase/types").Json | null;
10071
- trade_item_id: string | null;
10072
- user_id: string;
11744
+ internal_notes: string | null;
11745
+ parent_werkbon_id: string | null;
11746
+ parsed_payload: import("../integrations/supabase/types").Json | null;
11747
+ planning_status: string;
11748
+ project_number: string | null;
11749
+ room_number: string | null;
11750
+ scheduled_end_time: string | null;
11751
+ scheduled_start_time: string | null;
11752
+ sequence_number: number;
11753
+ source_email_meta: import("../integrations/supabase/types").Json | null;
11754
+ source_mailbox_message_id: string | null;
11755
+ source_pdf_path: string | null;
11756
+ source_type: string;
11757
+ status: string;
11758
+ technician_id: string | null;
11759
+ technician_notes: string | null;
11760
+ technician_notes_raw: string | null;
11761
+ technician_task_description: string | null;
11762
+ updated_at: string;
11763
+ version: number;
11764
+ work_address: string | null;
10073
11765
  };
10074
11766
  Insert: {
10075
- action: string;
10076
- connection_id?: string | null;
11767
+ assigned_user_id?: string | null;
11768
+ budget_mandate_cents?: number;
11769
+ complaint_description?: string | null;
10077
11770
  created_at?: string;
10078
- error?: string | null;
10079
- gateway_attempt_id?: string | null;
10080
- gateway_status?: number | null;
11771
+ created_by?: string | null;
11772
+ customer_id?: string | null;
11773
+ externe_referentie?: string | null;
11774
+ first_time_fix?: boolean | null;
10081
11775
  id?: string;
10082
- intent: string;
10083
- ok: boolean;
10084
- request_summary?: import("../integrations/supabase/types").Json | null;
10085
- trade_item_id?: string | null;
10086
- user_id: string;
11776
+ internal_notes?: string | null;
11777
+ parent_werkbon_id?: string | null;
11778
+ parsed_payload?: import("../integrations/supabase/types").Json | null;
11779
+ planning_status?: string;
11780
+ project_number?: string | null;
11781
+ room_number?: string | null;
11782
+ scheduled_end_time?: string | null;
11783
+ scheduled_start_time?: string | null;
11784
+ sequence_number: number;
11785
+ source_email_meta?: import("../integrations/supabase/types").Json | null;
11786
+ source_mailbox_message_id?: string | null;
11787
+ source_pdf_path?: string | null;
11788
+ source_type?: string;
11789
+ status?: string;
11790
+ technician_id?: string | null;
11791
+ technician_notes?: string | null;
11792
+ technician_notes_raw?: string | null;
11793
+ technician_task_description?: string | null;
11794
+ updated_at?: string;
11795
+ version?: number;
11796
+ work_address?: string | null;
10087
11797
  };
10088
11798
  Update: {
10089
- action?: string;
10090
- connection_id?: string | null;
11799
+ assigned_user_id?: string | null;
11800
+ budget_mandate_cents?: number;
11801
+ complaint_description?: string | null;
10091
11802
  created_at?: string;
10092
- error?: string | null;
10093
- gateway_attempt_id?: string | null;
10094
- gateway_status?: number | null;
11803
+ created_by?: string | null;
11804
+ customer_id?: string | null;
11805
+ externe_referentie?: string | null;
11806
+ first_time_fix?: boolean | null;
10095
11807
  id?: string;
10096
- intent?: string;
10097
- ok?: boolean;
10098
- request_summary?: import("../integrations/supabase/types").Json | null;
10099
- trade_item_id?: string | null;
10100
- user_id?: string;
11808
+ internal_notes?: string | null;
11809
+ parent_werkbon_id?: string | null;
11810
+ parsed_payload?: import("../integrations/supabase/types").Json | null;
11811
+ planning_status?: string;
11812
+ project_number?: string | null;
11813
+ room_number?: string | null;
11814
+ scheduled_end_time?: string | null;
11815
+ scheduled_start_time?: string | null;
11816
+ sequence_number?: number;
11817
+ source_email_meta?: import("../integrations/supabase/types").Json | null;
11818
+ source_mailbox_message_id?: string | null;
11819
+ source_pdf_path?: string | null;
11820
+ source_type?: string;
11821
+ status?: string;
11822
+ technician_id?: string | null;
11823
+ technician_notes?: string | null;
11824
+ technician_notes_raw?: string | null;
11825
+ technician_task_description?: string | null;
11826
+ updated_at?: string;
11827
+ version?: number;
11828
+ work_address?: string | null;
10101
11829
  };
10102
- Relationships: [];
11830
+ Relationships: [{
11831
+ foreignKeyName: "werkbonnen_parent_werkbon_id_fkey";
11832
+ columns: ["parent_werkbon_id"];
11833
+ isOneToOne: false;
11834
+ referencedRelation: "werkbonnen";
11835
+ referencedColumns: ["id"];
11836
+ }, {
11837
+ foreignKeyName: "werkbonnen_source_mailbox_message_id_fkey";
11838
+ columns: ["source_mailbox_message_id"];
11839
+ isOneToOne: false;
11840
+ referencedRelation: "mailbox_messages";
11841
+ referencedColumns: ["id"];
11842
+ }];
10103
11843
  };
10104
11844
  work_order_monteurs: {
10105
11845
  Row: {
@@ -10271,6 +12011,8 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
10271
12011
  created_at: string | null;
10272
12012
  created_by: string | null;
10273
12013
  display_name: string | null;
12014
+ graph_subscription_expires_at: string | null;
12015
+ graph_subscription_id: string | null;
10274
12016
  has_access_token: boolean | null;
10275
12017
  has_client_id: boolean | null;
10276
12018
  has_client_secret: boolean | null;
@@ -10288,6 +12030,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
10288
12030
  oauth_mode: string | null;
10289
12031
  provider: string | null;
10290
12032
  purpose_assignments: import("../integrations/supabase/types").Json | null;
12033
+ realtime_mode: string | null;
10291
12034
  scopes: string[] | null;
10292
12035
  smtp_host: string | null;
10293
12036
  smtp_port: number | null;
@@ -10302,6 +12045,8 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
10302
12045
  created_at?: string | null;
10303
12046
  created_by?: string | null;
10304
12047
  display_name?: string | null;
12048
+ graph_subscription_expires_at?: string | null;
12049
+ graph_subscription_id?: string | null;
10305
12050
  has_access_token?: never;
10306
12051
  has_client_id?: never;
10307
12052
  has_client_secret?: never;
@@ -10319,6 +12064,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
10319
12064
  oauth_mode?: string | null;
10320
12065
  provider?: string | null;
10321
12066
  purpose_assignments?: import("../integrations/supabase/types").Json | null;
12067
+ realtime_mode?: string | null;
10322
12068
  scopes?: string[] | null;
10323
12069
  smtp_host?: string | null;
10324
12070
  smtp_port?: number | null;
@@ -10333,6 +12079,8 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
10333
12079
  created_at?: string | null;
10334
12080
  created_by?: string | null;
10335
12081
  display_name?: string | null;
12082
+ graph_subscription_expires_at?: string | null;
12083
+ graph_subscription_id?: string | null;
10336
12084
  has_access_token?: never;
10337
12085
  has_client_id?: never;
10338
12086
  has_client_secret?: never;
@@ -10350,6 +12098,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
10350
12098
  oauth_mode?: string | null;
10351
12099
  provider?: string | null;
10352
12100
  purpose_assignments?: import("../integrations/supabase/types").Json | null;
12101
+ realtime_mode?: string | null;
10353
12102
  scopes?: string[] | null;
10354
12103
  smtp_host?: string | null;
10355
12104
  smtp_port?: number | null;
@@ -10460,6 +12209,25 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
10460
12209
  };
10461
12210
  Relationships: [];
10462
12211
  };
12212
+ floriday_customer_discounts: {
12213
+ Row: {
12214
+ base_price: number | null;
12215
+ buyer_organization_id: string | null;
12216
+ currency: string | null;
12217
+ discount_type: string | null;
12218
+ discount_value: number | null;
12219
+ min_quantity: number | null;
12220
+ net_price: number | null;
12221
+ product_group_id: string | null;
12222
+ raw: import("../integrations/supabase/types").Json | null;
12223
+ source: string | null;
12224
+ source_id: string | null;
12225
+ trade_item_id: string | null;
12226
+ valid_from: string | null;
12227
+ valid_until: string | null;
12228
+ };
12229
+ Relationships: [];
12230
+ };
10463
12231
  local_customer_discounts: {
10464
12232
  Row: {
10465
12233
  base_price: number | null;
@@ -10796,6 +12564,21 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
10796
12564
  };
10797
12565
  Returns: string;
10798
12566
  };
12567
+ ai_usage_by_module: {
12568
+ Args: {
12569
+ _from: string;
12570
+ _to: string;
12571
+ };
12572
+ Returns: {
12573
+ calls: number;
12574
+ consumer_module_id: string;
12575
+ cost_usd: number;
12576
+ errors: number;
12577
+ input_tokens: number;
12578
+ output_tokens: number;
12579
+ total_tokens: number;
12580
+ }[];
12581
+ };
10799
12582
  apply_stock_consumption: {
10800
12583
  Args: {
10801
12584
  p_order_id: string;
@@ -10853,6 +12636,12 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
10853
12636
  processed_items: number;
10854
12637
  }[];
10855
12638
  };
12639
+ calculate_layer_stock: {
12640
+ Args: {
12641
+ p_product_id: string;
12642
+ };
12643
+ Returns: number;
12644
+ };
10856
12645
  call_exact_route: {
10857
12646
  Args: {
10858
12647
  path: string;
@@ -10881,6 +12670,33 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
10881
12670
  };
10882
12671
  Returns: import("../integrations/supabase/types").Json;
10883
12672
  };
12673
+ claim_twinfield_push_batch: {
12674
+ Args: {
12675
+ _limit?: number;
12676
+ };
12677
+ Returns: {
12678
+ action: string;
12679
+ attempts: number;
12680
+ connection_id: string;
12681
+ created_at: string;
12682
+ customer_id: string | null;
12683
+ external_id: string | null;
12684
+ id: string;
12685
+ idempotency_key: string;
12686
+ last_error: string | null;
12687
+ next_attempt_at: string;
12688
+ office_code: string | null;
12689
+ payload: import("../integrations/supabase/types").Json;
12690
+ status: string;
12691
+ updated_at: string;
12692
+ }[];
12693
+ SetofOptions: {
12694
+ from: "*";
12695
+ to: "twinfield_push_queue";
12696
+ isOneToOne: false;
12697
+ isSetofReturn: true;
12698
+ };
12699
+ };
10884
12700
  cleanup_old_bookings: {
10885
12701
  Args: never;
10886
12702
  Returns: undefined;
@@ -10939,6 +12755,12 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
10939
12755
  Args: never;
10940
12756
  Returns: string;
10941
12757
  };
12758
+ custom_access_token_hook: {
12759
+ Args: {
12760
+ event: import("../integrations/supabase/types").Json;
12761
+ };
12762
+ Returns: import("../integrations/supabase/types").Json;
12763
+ };
10942
12764
  dashboard_alert_counts: {
10943
12765
  Args: never;
10944
12766
  Returns: import("../integrations/supabase/types").Json;
@@ -11006,6 +12828,16 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
11006
12828
  status: string;
11007
12829
  }[];
11008
12830
  };
12831
+ email_auth_upsert_connection: {
12832
+ Args: {
12833
+ _account_email: string;
12834
+ _created_by: string;
12835
+ _is_active: boolean;
12836
+ _provider: string;
12837
+ _status: string;
12838
+ };
12839
+ Returns: string;
12840
+ };
11009
12841
  enqueue_cart_replan_if_unlocked: {
11010
12842
  Args: {
11011
12843
  p_order_id: string;
@@ -11125,6 +12957,19 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
11125
12957
  resource: string;
11126
12958
  }[];
11127
12959
  };
12960
+ get_floriday_agreements_active: {
12961
+ Args: {
12962
+ p_on_date?: string;
12963
+ };
12964
+ Returns: {
12965
+ buyer_organization_id: string;
12966
+ data: import("../integrations/supabase/types").Json;
12967
+ floriday_id: string;
12968
+ status: string;
12969
+ valid_from: string;
12970
+ valid_until: string;
12971
+ }[];
12972
+ };
11128
12973
  get_floriday_clock_supplies_window: {
11129
12974
  Args: {
11130
12975
  p_from: string;
@@ -11212,6 +13057,12 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
11212
13057
  };
11213
13058
  Returns: string;
11214
13059
  };
13060
+ get_inventory_stock_for_key: {
13061
+ Args: {
13062
+ p_key: string;
13063
+ };
13064
+ Returns: number;
13065
+ };
11215
13066
  get_offer_by_link_code: {
11216
13067
  Args: {
11217
13068
  p_code: string;
@@ -11242,6 +13093,12 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
11242
13093
  };
11243
13094
  Returns: string;
11244
13095
  };
13096
+ get_product_group_available_stock: {
13097
+ Args: {
13098
+ p_group_id: string;
13099
+ };
13100
+ Returns: number;
13101
+ };
11245
13102
  get_room_busy_windows: {
11246
13103
  Args: {
11247
13104
  p_from: string;
@@ -11273,6 +13130,14 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
11273
13130
  };
11274
13131
  Returns: string;
11275
13132
  };
13133
+ has_module_permission: {
13134
+ Args: {
13135
+ _min: string;
13136
+ _module_id: string;
13137
+ _user_id: string;
13138
+ };
13139
+ Returns: boolean;
13140
+ };
11276
13141
  has_role: {
11277
13142
  Args: {
11278
13143
  _role: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
@@ -11280,6 +13145,10 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
11280
13145
  };
11281
13146
  Returns: boolean;
11282
13147
  };
13148
+ has_twinfield_link: {
13149
+ Args: never;
13150
+ Returns: boolean;
13151
+ };
11283
13152
  is_authenticated: {
11284
13153
  Args: never;
11285
13154
  Returns: boolean;
@@ -11294,6 +13163,37 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
11294
13163
  };
11295
13164
  Returns: boolean;
11296
13165
  };
13166
+ jwt_has_role: {
13167
+ Args: {
13168
+ _role: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
13169
+ };
13170
+ Returns: boolean;
13171
+ };
13172
+ list_monteurs: {
13173
+ Args: never;
13174
+ Returns: {
13175
+ avatar_url: string;
13176
+ display_name: string;
13177
+ email: string;
13178
+ id: string;
13179
+ }[];
13180
+ };
13181
+ list_my_planning_items: {
13182
+ Args: {
13183
+ _from: string;
13184
+ _to: string;
13185
+ };
13186
+ Returns: {
13187
+ assigned_monteur_id: string;
13188
+ end_at: string;
13189
+ id: string;
13190
+ notes: string;
13191
+ role: string;
13192
+ start_at: string;
13193
+ status: import("../integrations/supabase/types").Database["public"]["Enums"]["planning_item_status"];
13194
+ werkbon_id: string;
13195
+ }[];
13196
+ };
11297
13197
  local_effective_price: {
11298
13198
  Args: {
11299
13199
  _customer_id: string;
@@ -11310,6 +13210,22 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
11310
13210
  source_id: string;
11311
13211
  }[];
11312
13212
  };
13213
+ log_ai_call: {
13214
+ Args: {
13215
+ _consumer_module_id: string;
13216
+ _cost_usd: number;
13217
+ _duration_ms: number;
13218
+ _error_code: string;
13219
+ _error_message: string;
13220
+ _input_tokens: number;
13221
+ _model_slug: string;
13222
+ _output_tokens: number;
13223
+ _provider_slug: string;
13224
+ _status: string;
13225
+ _total_tokens: number;
13226
+ };
13227
+ Returns: string;
13228
+ };
11313
13229
  mark_offer_clicked: {
11314
13230
  Args: {
11315
13231
  p_code: string;
@@ -11361,6 +13277,10 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
11361
13277
  };
11362
13278
  Returns: string;
11363
13279
  };
13280
+ next_twinfield_code: {
13281
+ Args: never;
13282
+ Returns: string;
13283
+ };
11364
13284
  next_work_order_number: {
11365
13285
  Args: {
11366
13286
  p_parent_work_order_id?: string;
@@ -11417,6 +13337,15 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
11417
13337
  };
11418
13338
  Returns: undefined;
11419
13339
  };
13340
+ pickstation_resolve_delivery_orders: {
13341
+ Args: {
13342
+ p_sales_order_ids: string[];
13343
+ };
13344
+ Returns: {
13345
+ delivery_order_id: string;
13346
+ sales_order_id: string;
13347
+ }[];
13348
+ };
11420
13349
  pickstation_set_cart_status: {
11421
13350
  Args: {
11422
13351
  p_cart_index: number;
@@ -11487,6 +13416,12 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
11487
13416
  };
11488
13417
  Returns: number;
11489
13418
  };
13419
+ reorder_customer_price_groups: {
13420
+ Args: {
13421
+ _ids: string[];
13422
+ };
13423
+ Returns: undefined;
13424
+ };
11490
13425
  reset_floriday_sync_cursor: {
11491
13426
  Args: {
11492
13427
  p_connection_id: string;
@@ -11522,6 +13457,12 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
11522
13457
  };
11523
13458
  Returns: string;
11524
13459
  };
13460
+ retry_twinfield_push: {
13461
+ Args: {
13462
+ _customer_id: string;
13463
+ };
13464
+ Returns: number;
13465
+ };
11525
13466
  reverse_production: {
11526
13467
  Args: {
11527
13468
  p_connection_id?: string;
@@ -11539,6 +13480,20 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
11539
13480
  };
11540
13481
  Returns: number;
11541
13482
  };
13483
+ schedule_floriday_agreement_calloffs_sync: {
13484
+ Args: {
13485
+ p_apikey: string;
13486
+ p_url: string;
13487
+ };
13488
+ Returns: number;
13489
+ };
13490
+ schedule_floriday_agreements_sync: {
13491
+ Args: {
13492
+ p_apikey: string;
13493
+ p_url: string;
13494
+ };
13495
+ Returns: number;
13496
+ };
11542
13497
  schedule_floriday_base_items_sync: {
11543
13498
  Args: {
11544
13499
  p_apikey: string;
@@ -11785,6 +13740,17 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
11785
13740
  };
11786
13741
  Returns: number;
11787
13742
  };
13743
+ self_heal_floriday_links: {
13744
+ Args: never;
13745
+ Returns: number;
13746
+ };
13747
+ set_planning_status: {
13748
+ Args: {
13749
+ _id: string;
13750
+ _status: import("../integrations/supabase/types").Database["public"]["Enums"]["planning_item_status"];
13751
+ };
13752
+ Returns: undefined;
13753
+ };
11788
13754
  show_limit: {
11789
13755
  Args: never;
11790
13756
  Returns: number;
@@ -11795,12 +13761,22 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
11795
13761
  };
11796
13762
  Returns: string[];
11797
13763
  };
13764
+ sync_all_layer_stocks: {
13765
+ Args: never;
13766
+ Returns: undefined;
13767
+ };
11798
13768
  sync_cached_packing_from_product: {
11799
13769
  Args: {
11800
13770
  p_product_id: string;
11801
13771
  };
11802
13772
  Returns: undefined;
11803
13773
  };
13774
+ sync_layer_stock: {
13775
+ Args: {
13776
+ p_product_id: string;
13777
+ };
13778
+ Returns: undefined;
13779
+ };
11804
13780
  sync_order_cart_item_packing_from_product: {
11805
13781
  Args: {
11806
13782
  p_product_id: string;
@@ -11844,9 +13820,12 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
11844
13820
  };
11845
13821
  };
11846
13822
  Enums: {
11847
- app_role: "admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie" | "monteur";
13823
+ app_role: "admin" | "planner" | "monteur" | "administratie" | "ai_admin";
11848
13824
  exact_env: "staging" | "live";
11849
13825
  exact_push_status: "pending" | "sent" | "error";
13826
+ itk_customer_segment: "Business" | "Private";
13827
+ itk_dynamic_field_type: "text" | "select" | "date" | "checkbox";
13828
+ planning_item_status: "gepland" | "bezig" | "afgerond" | "geannuleerd" | "concept" | "vrijgegeven";
11850
13829
  quote_status: "concept" | "verzonden" | "bekeken" | "in_behandeling" | "geaccepteerd" | "afgewezen" | "verlopen" | "gearchiveerd";
11851
13830
  };
11852
13831
  CompositeTypes: { [_ in never]: never; };