@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
@@ -242,12 +242,98 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
242
242
  };
243
243
  Relationships: [];
244
244
  };
245
+ ai_admin_credentials: {
246
+ Row: {
247
+ active: boolean;
248
+ admin_key: string;
249
+ created_at: string;
250
+ id: string;
251
+ label: string;
252
+ provider_id: string;
253
+ updated_at: string;
254
+ };
255
+ Insert: {
256
+ active?: boolean;
257
+ admin_key: string;
258
+ created_at?: string;
259
+ id?: string;
260
+ label: string;
261
+ provider_id: string;
262
+ updated_at?: string;
263
+ };
264
+ Update: {
265
+ active?: boolean;
266
+ admin_key?: string;
267
+ created_at?: string;
268
+ id?: string;
269
+ label?: string;
270
+ provider_id?: string;
271
+ updated_at?: string;
272
+ };
273
+ Relationships: [{
274
+ foreignKeyName: "ai_admin_credentials_provider_id_fkey";
275
+ columns: ["provider_id"];
276
+ isOneToOne: true;
277
+ referencedRelation: "ai_providers";
278
+ referencedColumns: ["id"];
279
+ }];
280
+ };
281
+ ai_call_log: {
282
+ Row: {
283
+ consumer_module_id: string;
284
+ cost_usd: number | null;
285
+ created_at: string;
286
+ created_by: string | null;
287
+ duration_ms: number | null;
288
+ error_code: string | null;
289
+ error_message: string | null;
290
+ id: string;
291
+ input_tokens: number;
292
+ model_slug: string | null;
293
+ output_tokens: number;
294
+ provider_slug: string | null;
295
+ status: string;
296
+ total_tokens: number;
297
+ };
298
+ Insert: {
299
+ consumer_module_id: string;
300
+ cost_usd?: number | null;
301
+ created_at?: string;
302
+ created_by?: string | null;
303
+ duration_ms?: number | null;
304
+ error_code?: string | null;
305
+ error_message?: string | null;
306
+ id?: string;
307
+ input_tokens?: number;
308
+ model_slug?: string | null;
309
+ output_tokens?: number;
310
+ provider_slug?: string | null;
311
+ status: string;
312
+ total_tokens?: number;
313
+ };
314
+ Update: {
315
+ consumer_module_id?: string;
316
+ cost_usd?: number | null;
317
+ created_at?: string;
318
+ created_by?: string | null;
319
+ duration_ms?: number | null;
320
+ error_code?: string | null;
321
+ error_message?: string | null;
322
+ id?: string;
323
+ input_tokens?: number;
324
+ model_slug?: string | null;
325
+ output_tokens?: number;
326
+ provider_slug?: string | null;
327
+ status?: string;
328
+ total_tokens?: number;
329
+ };
330
+ Relationships: [];
331
+ };
245
332
  ai_credentials: {
246
333
  Row: {
247
334
  active: boolean;
248
335
  api_key: string;
249
336
  created_at: string;
250
- created_by: string | null;
251
337
  id: string;
252
338
  label: string;
253
339
  provider_id: string;
@@ -257,7 +343,6 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
257
343
  active?: boolean;
258
344
  api_key: string;
259
345
  created_at?: string;
260
- created_by?: string | null;
261
346
  id?: string;
262
347
  label: string;
263
348
  provider_id: string;
@@ -267,7 +352,6 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
267
352
  active?: boolean;
268
353
  api_key?: string;
269
354
  created_at?: string;
270
- created_by?: string | null;
271
355
  id?: string;
272
356
  label?: string;
273
357
  provider_id?: string;
@@ -281,6 +365,75 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
281
365
  referencedColumns: ["id"];
282
366
  }];
283
367
  };
368
+ ai_goals: {
369
+ Row: {
370
+ active: boolean;
371
+ created_at: string;
372
+ description: string | null;
373
+ key: string;
374
+ label: string;
375
+ sort_order: number;
376
+ updated_at: string;
377
+ };
378
+ Insert: {
379
+ active?: boolean;
380
+ created_at?: string;
381
+ description?: string | null;
382
+ key: string;
383
+ label: string;
384
+ sort_order?: number;
385
+ updated_at?: string;
386
+ };
387
+ Update: {
388
+ active?: boolean;
389
+ created_at?: string;
390
+ description?: string | null;
391
+ key?: string;
392
+ label?: string;
393
+ sort_order?: number;
394
+ updated_at?: string;
395
+ };
396
+ Relationships: [];
397
+ };
398
+ ai_model_pricing: {
399
+ Row: {
400
+ created_at: string;
401
+ currency: string;
402
+ fetched_at: string;
403
+ id: string;
404
+ input_per_mtok: number | null;
405
+ model_slug: string;
406
+ output_per_mtok: number | null;
407
+ provider_slug: string;
408
+ source: string;
409
+ updated_at: string;
410
+ };
411
+ Insert: {
412
+ created_at?: string;
413
+ currency?: string;
414
+ fetched_at?: string;
415
+ id?: string;
416
+ input_per_mtok?: number | null;
417
+ model_slug: string;
418
+ output_per_mtok?: number | null;
419
+ provider_slug: string;
420
+ source?: string;
421
+ updated_at?: string;
422
+ };
423
+ Update: {
424
+ created_at?: string;
425
+ currency?: string;
426
+ fetched_at?: string;
427
+ id?: string;
428
+ input_per_mtok?: number | null;
429
+ model_slug?: string;
430
+ output_per_mtok?: number | null;
431
+ provider_slug?: string;
432
+ source?: string;
433
+ updated_at?: string;
434
+ };
435
+ Relationships: [];
436
+ };
284
437
  ai_models: {
285
438
  Row: {
286
439
  active: boolean;
@@ -1028,6 +1181,141 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
1028
1181
  };
1029
1182
  Relationships: [];
1030
1183
  };
1184
+ cart_planning_pick_times: {
1185
+ Row: {
1186
+ created_at: string;
1187
+ id: string;
1188
+ pot_size: string;
1189
+ seconds_per_cart: number;
1190
+ updated_at: string;
1191
+ };
1192
+ Insert: {
1193
+ created_at?: string;
1194
+ id?: string;
1195
+ pot_size: string;
1196
+ seconds_per_cart: number;
1197
+ updated_at?: string;
1198
+ };
1199
+ Update: {
1200
+ created_at?: string;
1201
+ id?: string;
1202
+ pot_size?: string;
1203
+ seconds_per_cart?: number;
1204
+ updated_at?: string;
1205
+ };
1206
+ Relationships: [];
1207
+ };
1208
+ cart_planning_product_overrides: {
1209
+ Row: {
1210
+ created_at: string;
1211
+ id: string;
1212
+ max_party_share_per_layer_pct_override: number | null;
1213
+ never_mix: boolean;
1214
+ notes: string | null;
1215
+ product_id: string;
1216
+ updated_at: string;
1217
+ };
1218
+ Insert: {
1219
+ created_at?: string;
1220
+ id?: string;
1221
+ max_party_share_per_layer_pct_override?: number | null;
1222
+ never_mix?: boolean;
1223
+ notes?: string | null;
1224
+ product_id: string;
1225
+ updated_at?: string;
1226
+ };
1227
+ Update: {
1228
+ created_at?: string;
1229
+ id?: string;
1230
+ max_party_share_per_layer_pct_override?: number | null;
1231
+ never_mix?: boolean;
1232
+ notes?: string | null;
1233
+ product_id?: string;
1234
+ updated_at?: string;
1235
+ };
1236
+ Relationships: [{
1237
+ foreignKeyName: "cart_planning_product_overrides_product_id_fkey";
1238
+ columns: ["product_id"];
1239
+ isOneToOne: true;
1240
+ referencedRelation: "products";
1241
+ referencedColumns: ["id"];
1242
+ }];
1243
+ };
1244
+ cart_planning_settings: {
1245
+ Row: {
1246
+ allow_editing_after_pickstation_send: boolean;
1247
+ buffer_grouping_mode: string;
1248
+ combine_floriday_orders: boolean;
1249
+ combine_floriday_orders_window: string;
1250
+ combine_orders_scope: string;
1251
+ default_workers: number;
1252
+ id: number;
1253
+ max_beladingen_per_layer: number;
1254
+ max_customers_per_cart: number;
1255
+ max_one_customer_per_layer: boolean;
1256
+ max_party_share_per_layer_pct: number;
1257
+ optimization_strategy: string;
1258
+ own_cart_from_layers: number;
1259
+ pick_time_mode: string;
1260
+ plants_per_day: number;
1261
+ plants_per_hour: number;
1262
+ require_same_carrier: boolean;
1263
+ require_same_crate_type: boolean;
1264
+ require_same_delivery_date: boolean;
1265
+ require_same_delivery_location: boolean;
1266
+ updated_at: string;
1267
+ updated_by: string | null;
1268
+ };
1269
+ Insert: {
1270
+ allow_editing_after_pickstation_send?: boolean;
1271
+ buffer_grouping_mode?: string;
1272
+ combine_floriday_orders?: boolean;
1273
+ combine_floriday_orders_window?: string;
1274
+ combine_orders_scope?: string;
1275
+ default_workers?: number;
1276
+ id?: number;
1277
+ max_beladingen_per_layer?: number;
1278
+ max_customers_per_cart?: number;
1279
+ max_one_customer_per_layer?: boolean;
1280
+ max_party_share_per_layer_pct?: number;
1281
+ optimization_strategy?: string;
1282
+ own_cart_from_layers?: number;
1283
+ pick_time_mode?: string;
1284
+ plants_per_day?: number;
1285
+ plants_per_hour?: number;
1286
+ require_same_carrier?: boolean;
1287
+ require_same_crate_type?: boolean;
1288
+ require_same_delivery_date?: boolean;
1289
+ require_same_delivery_location?: boolean;
1290
+ updated_at?: string;
1291
+ updated_by?: string | null;
1292
+ };
1293
+ Update: {
1294
+ allow_editing_after_pickstation_send?: boolean;
1295
+ buffer_grouping_mode?: string;
1296
+ combine_floriday_orders?: boolean;
1297
+ combine_floriday_orders_window?: string;
1298
+ combine_orders_scope?: string;
1299
+ default_workers?: number;
1300
+ id?: number;
1301
+ max_beladingen_per_layer?: number;
1302
+ max_customers_per_cart?: number;
1303
+ max_one_customer_per_layer?: boolean;
1304
+ max_party_share_per_layer_pct?: number;
1305
+ optimization_strategy?: string;
1306
+ own_cart_from_layers?: number;
1307
+ pick_time_mode?: string;
1308
+ plants_per_day?: number;
1309
+ plants_per_hour?: number;
1310
+ require_same_carrier?: boolean;
1311
+ require_same_crate_type?: boolean;
1312
+ require_same_delivery_date?: boolean;
1313
+ require_same_delivery_location?: boolean;
1314
+ updated_at?: string;
1315
+ updated_by?: string | null;
1316
+ };
1317
+ Relationships: [];
1318
+ };
1031
1319
  cart_replan_queue: {
1032
1320
  Row: {
1033
1321
  attempts: number;
@@ -1058,111 +1346,237 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
1058
1346
  referencedColumns: ["id"];
1059
1347
  }];
1060
1348
  };
1061
- collections: {
1349
+ cart_types: {
1062
1350
  Row: {
1063
1351
  created_at: string;
1064
- created_by: string | null;
1065
1352
  id: string;
1353
+ is_default: boolean;
1354
+ layer_length_cm: number;
1355
+ layer_width_cm: number;
1356
+ layers_per_cart: number;
1066
1357
  name: string;
1067
1358
  updated_at: string;
1068
1359
  };
1069
1360
  Insert: {
1070
1361
  created_at?: string;
1071
- created_by?: string | null;
1072
1362
  id?: string;
1363
+ is_default?: boolean;
1364
+ layer_length_cm: number;
1365
+ layer_width_cm: number;
1366
+ layers_per_cart?: number;
1073
1367
  name: string;
1074
1368
  updated_at?: string;
1075
1369
  };
1076
1370
  Update: {
1077
1371
  created_at?: string;
1078
- created_by?: string | null;
1079
1372
  id?: string;
1373
+ is_default?: boolean;
1374
+ layer_length_cm?: number;
1375
+ layer_width_cm?: number;
1376
+ layers_per_cart?: number;
1080
1377
  name?: string;
1081
1378
  updated_at?: string;
1082
1379
  };
1083
1380
  Relationships: [];
1084
1381
  };
1085
- customer_audit_log: {
1382
+ catalog_articles_cache: {
1086
1383
  Row: {
1087
- action: string;
1088
- changes: import("./types").Json;
1089
1384
  created_at: string;
1090
- customer_id: string;
1385
+ default_price: number;
1386
+ default_vat_rate_ref: string | null;
1387
+ external_ref: string;
1091
1388
  id: string;
1092
- user_id: string | null;
1389
+ name: string;
1390
+ updated_at: string;
1391
+ user_id: string;
1093
1392
  };
1094
1393
  Insert: {
1095
- action: string;
1096
- changes?: import("./types").Json;
1097
1394
  created_at?: string;
1098
- customer_id: string;
1395
+ default_price?: number;
1396
+ default_vat_rate_ref?: string | null;
1397
+ external_ref: string;
1099
1398
  id?: string;
1100
- user_id?: string | null;
1399
+ name: string;
1400
+ updated_at?: string;
1401
+ user_id: string;
1101
1402
  };
1102
1403
  Update: {
1103
- action?: string;
1104
- changes?: import("./types").Json;
1105
1404
  created_at?: string;
1106
- customer_id?: string;
1405
+ default_price?: number;
1406
+ default_vat_rate_ref?: string | null;
1407
+ external_ref?: string;
1107
1408
  id?: string;
1108
- user_id?: string | null;
1409
+ name?: string;
1410
+ updated_at?: string;
1411
+ user_id?: string;
1109
1412
  };
1110
- Relationships: [{
1111
- foreignKeyName: "customer_audit_log_customer_id_fkey";
1112
- columns: ["customer_id"];
1113
- isOneToOne: false;
1114
- referencedRelation: "customers";
1115
- referencedColumns: ["id"];
1116
- }];
1413
+ Relationships: [];
1117
1414
  };
1118
- customer_contacts: {
1415
+ catalog_vat_rates_cache: {
1119
1416
  Row: {
1120
1417
  created_at: string;
1121
- customer_id: string;
1122
- email: string | null;
1123
- floriday_contact_id: string | null;
1124
- full_name: string;
1418
+ external_ref: string;
1125
1419
  id: string;
1126
- is_active: boolean;
1127
- job_title: string | null;
1128
- phone: string | null;
1129
- photo_url: string | null;
1130
- raw: import("./types").Json | null;
1420
+ label: string;
1421
+ percentage: number;
1131
1422
  updated_at: string;
1423
+ user_id: string;
1132
1424
  };
1133
1425
  Insert: {
1134
1426
  created_at?: string;
1135
- customer_id: string;
1136
- email?: string | null;
1137
- floriday_contact_id?: string | null;
1138
- full_name: string;
1427
+ external_ref: string;
1139
1428
  id?: string;
1140
- is_active?: boolean;
1141
- job_title?: string | null;
1142
- phone?: string | null;
1143
- photo_url?: string | null;
1144
- raw?: import("./types").Json | null;
1429
+ label: string;
1430
+ percentage?: number;
1145
1431
  updated_at?: string;
1432
+ user_id: string;
1146
1433
  };
1147
1434
  Update: {
1148
1435
  created_at?: string;
1149
- customer_id?: string;
1150
- email?: string | null;
1151
- floriday_contact_id?: string | null;
1152
- full_name?: string;
1436
+ external_ref?: string;
1153
1437
  id?: string;
1154
- is_active?: boolean;
1155
- job_title?: string | null;
1156
- phone?: string | null;
1157
- photo_url?: string | null;
1158
- raw?: import("./types").Json | null;
1438
+ label?: string;
1439
+ percentage?: number;
1159
1440
  updated_at?: string;
1441
+ user_id?: string;
1160
1442
  };
1161
- Relationships: [{
1162
- foreignKeyName: "customer_contacts_customer_id_fkey";
1163
- columns: ["customer_id"];
1164
- isOneToOne: false;
1165
- referencedRelation: "customers";
1443
+ Relationships: [];
1444
+ };
1445
+ collections: {
1446
+ Row: {
1447
+ created_at: string;
1448
+ created_by: string | null;
1449
+ id: string;
1450
+ name: string;
1451
+ updated_at: string;
1452
+ };
1453
+ Insert: {
1454
+ created_at?: string;
1455
+ created_by?: string | null;
1456
+ id?: string;
1457
+ name: string;
1458
+ updated_at?: string;
1459
+ };
1460
+ Update: {
1461
+ created_at?: string;
1462
+ created_by?: string | null;
1463
+ id?: string;
1464
+ name?: string;
1465
+ updated_at?: string;
1466
+ };
1467
+ Relationships: [];
1468
+ };
1469
+ crate_types: {
1470
+ Row: {
1471
+ created_at: string;
1472
+ id: string;
1473
+ length_cm: number;
1474
+ name: string;
1475
+ plants_per_crate: number;
1476
+ updated_at: string;
1477
+ width_cm: number;
1478
+ };
1479
+ Insert: {
1480
+ created_at?: string;
1481
+ id?: string;
1482
+ length_cm: number;
1483
+ name: string;
1484
+ plants_per_crate?: number;
1485
+ updated_at?: string;
1486
+ width_cm: number;
1487
+ };
1488
+ Update: {
1489
+ created_at?: string;
1490
+ id?: string;
1491
+ length_cm?: number;
1492
+ name?: string;
1493
+ plants_per_crate?: number;
1494
+ updated_at?: string;
1495
+ width_cm?: number;
1496
+ };
1497
+ Relationships: [];
1498
+ };
1499
+ customer_audit_log: {
1500
+ Row: {
1501
+ action: string;
1502
+ changes: import("./types").Json;
1503
+ created_at: string;
1504
+ customer_id: string;
1505
+ id: string;
1506
+ user_id: string | null;
1507
+ };
1508
+ Insert: {
1509
+ action: string;
1510
+ changes?: import("./types").Json;
1511
+ created_at?: string;
1512
+ customer_id: string;
1513
+ id?: string;
1514
+ user_id?: string | null;
1515
+ };
1516
+ Update: {
1517
+ action?: string;
1518
+ changes?: import("./types").Json;
1519
+ created_at?: string;
1520
+ customer_id?: string;
1521
+ id?: string;
1522
+ user_id?: string | null;
1523
+ };
1524
+ Relationships: [{
1525
+ foreignKeyName: "customer_audit_log_customer_id_fkey";
1526
+ columns: ["customer_id"];
1527
+ isOneToOne: false;
1528
+ referencedRelation: "customers";
1529
+ referencedColumns: ["id"];
1530
+ }];
1531
+ };
1532
+ customer_contacts: {
1533
+ Row: {
1534
+ created_at: string;
1535
+ customer_id: string;
1536
+ email: string | null;
1537
+ floriday_contact_id: string | null;
1538
+ full_name: string;
1539
+ id: string;
1540
+ is_active: boolean;
1541
+ job_title: string | null;
1542
+ phone: string | null;
1543
+ photo_url: string | null;
1544
+ raw: import("./types").Json | null;
1545
+ updated_at: string;
1546
+ };
1547
+ Insert: {
1548
+ created_at?: string;
1549
+ customer_id: string;
1550
+ email?: string | null;
1551
+ floriday_contact_id?: string | null;
1552
+ full_name: string;
1553
+ id?: string;
1554
+ is_active?: boolean;
1555
+ job_title?: string | null;
1556
+ phone?: string | null;
1557
+ photo_url?: string | null;
1558
+ raw?: import("./types").Json | null;
1559
+ updated_at?: string;
1560
+ };
1561
+ Update: {
1562
+ created_at?: string;
1563
+ customer_id?: string;
1564
+ email?: string | null;
1565
+ floriday_contact_id?: string | null;
1566
+ full_name?: string;
1567
+ id?: string;
1568
+ is_active?: boolean;
1569
+ job_title?: string | null;
1570
+ phone?: string | null;
1571
+ photo_url?: string | null;
1572
+ raw?: import("./types").Json | null;
1573
+ updated_at?: string;
1574
+ };
1575
+ Relationships: [{
1576
+ foreignKeyName: "customer_contacts_customer_id_fkey";
1577
+ columns: ["customer_id"];
1578
+ isOneToOne: false;
1579
+ referencedRelation: "customers";
1166
1580
  referencedColumns: ["id"];
1167
1581
  }];
1168
1582
  };
@@ -1307,6 +1721,105 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
1307
1721
  };
1308
1722
  Relationships: [];
1309
1723
  };
1724
+ customer_price_group_members: {
1725
+ Row: {
1726
+ created_at: string;
1727
+ customer_key: string;
1728
+ id: string;
1729
+ owner_id: string;
1730
+ price_group_id: string;
1731
+ };
1732
+ Insert: {
1733
+ created_at?: string;
1734
+ customer_key: string;
1735
+ id?: string;
1736
+ owner_id?: string;
1737
+ price_group_id: string;
1738
+ };
1739
+ Update: {
1740
+ created_at?: string;
1741
+ customer_key?: string;
1742
+ id?: string;
1743
+ owner_id?: string;
1744
+ price_group_id?: string;
1745
+ };
1746
+ Relationships: [{
1747
+ foreignKeyName: "customer_price_group_members_price_group_id_fkey";
1748
+ columns: ["price_group_id"];
1749
+ isOneToOne: false;
1750
+ referencedRelation: "customer_price_groups";
1751
+ referencedColumns: ["id"];
1752
+ }];
1753
+ };
1754
+ customer_price_groups: {
1755
+ Row: {
1756
+ calc_type: string | null;
1757
+ calc_value: number | null;
1758
+ calc_value_type: string | null;
1759
+ created_at: string;
1760
+ currency: string;
1761
+ distribute_over: string | null;
1762
+ group_type: string;
1763
+ handling_fee: number | null;
1764
+ id: string;
1765
+ include_stickers: boolean;
1766
+ is_active: boolean;
1767
+ name: string;
1768
+ owner_id: string;
1769
+ price_scope: string;
1770
+ pricing_mode: string;
1771
+ rounding: string;
1772
+ rounding_step: number;
1773
+ sort_order: number;
1774
+ unit: string;
1775
+ updated_at: string;
1776
+ };
1777
+ Insert: {
1778
+ calc_type?: string | null;
1779
+ calc_value?: number | null;
1780
+ calc_value_type?: string | null;
1781
+ created_at?: string;
1782
+ currency?: string;
1783
+ distribute_over?: string | null;
1784
+ group_type?: string;
1785
+ handling_fee?: number | null;
1786
+ id?: string;
1787
+ include_stickers?: boolean;
1788
+ is_active?: boolean;
1789
+ name: string;
1790
+ owner_id?: string;
1791
+ price_scope?: string;
1792
+ pricing_mode?: string;
1793
+ rounding?: string;
1794
+ rounding_step?: number;
1795
+ sort_order?: number;
1796
+ unit?: string;
1797
+ updated_at?: string;
1798
+ };
1799
+ Update: {
1800
+ calc_type?: string | null;
1801
+ calc_value?: number | null;
1802
+ calc_value_type?: string | null;
1803
+ created_at?: string;
1804
+ currency?: string;
1805
+ distribute_over?: string | null;
1806
+ group_type?: string;
1807
+ handling_fee?: number | null;
1808
+ id?: string;
1809
+ include_stickers?: boolean;
1810
+ is_active?: boolean;
1811
+ name?: string;
1812
+ owner_id?: string;
1813
+ price_scope?: string;
1814
+ pricing_mode?: string;
1815
+ rounding?: string;
1816
+ rounding_step?: number;
1817
+ sort_order?: number;
1818
+ unit?: string;
1819
+ updated_at?: string;
1820
+ };
1821
+ Relationships: [];
1822
+ };
1310
1823
  customer_selected_assortment: {
1311
1824
  Row: {
1312
1825
  article_number: string | null;
@@ -1460,6 +1973,10 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
1460
1973
  sync_error: string | null;
1461
1974
  sync_status: string;
1462
1975
  trade_forms: string[];
1976
+ twinfield_code: string | null;
1977
+ twinfield_last_hash: string | null;
1978
+ twinfield_sync_error: string | null;
1979
+ twinfield_synced_at: string | null;
1463
1980
  updated_at: string;
1464
1981
  vat_display: string | null;
1465
1982
  vat_number: string | null;
@@ -1527,6 +2044,10 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
1527
2044
  sync_error?: string | null;
1528
2045
  sync_status?: string;
1529
2046
  trade_forms?: string[];
2047
+ twinfield_code?: string | null;
2048
+ twinfield_last_hash?: string | null;
2049
+ twinfield_sync_error?: string | null;
2050
+ twinfield_synced_at?: string | null;
1530
2051
  updated_at?: string;
1531
2052
  vat_display?: string | null;
1532
2053
  vat_number?: string | null;
@@ -1594,6 +2115,10 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
1594
2115
  sync_error?: string | null;
1595
2116
  sync_status?: string;
1596
2117
  trade_forms?: string[];
2118
+ twinfield_code?: string | null;
2119
+ twinfield_last_hash?: string | null;
2120
+ twinfield_sync_error?: string | null;
2121
+ twinfield_synced_at?: string | null;
1597
2122
  updated_at?: string;
1598
2123
  vat_display?: string | null;
1599
2124
  vat_number?: string | null;
@@ -3407,74 +3932,173 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
3407
3932
  referencedColumns: ["id"];
3408
3933
  }];
3409
3934
  };
3410
- floriday_auction_letters_cache: {
3935
+ floriday_agreement_calloffs_cache: {
3411
3936
  Row: {
3412
- auction_letter_code: string;
3413
- clock_supply_id: string;
3937
+ agreement_id: string | null;
3414
3938
  connection_id: string;
3415
- content_type: string;
3939
+ data: import("./types").Json;
3940
+ delivery_date: string | null;
3416
3941
  fetched_at: string;
3942
+ floriday_id: string;
3417
3943
  id: string;
3418
- storage_path: string;
3944
+ is_deleted: boolean;
3945
+ sequence_number: number;
3946
+ status: string | null;
3947
+ updated_at: string;
3419
3948
  };
3420
3949
  Insert: {
3421
- auction_letter_code: string;
3422
- clock_supply_id: string;
3950
+ agreement_id?: string | null;
3423
3951
  connection_id: string;
3424
- content_type?: string;
3952
+ data?: import("./types").Json;
3953
+ delivery_date?: string | null;
3425
3954
  fetched_at?: string;
3955
+ floriday_id: string;
3426
3956
  id?: string;
3427
- storage_path: string;
3957
+ is_deleted?: boolean;
3958
+ sequence_number?: number;
3959
+ status?: string | null;
3960
+ updated_at?: string;
3428
3961
  };
3429
3962
  Update: {
3430
- auction_letter_code?: string;
3431
- clock_supply_id?: string;
3963
+ agreement_id?: string | null;
3432
3964
  connection_id?: string;
3433
- content_type?: string;
3965
+ data?: import("./types").Json;
3966
+ delivery_date?: string | null;
3434
3967
  fetched_at?: string;
3968
+ floriday_id?: string;
3435
3969
  id?: string;
3436
- storage_path?: string;
3970
+ is_deleted?: boolean;
3971
+ sequence_number?: number;
3972
+ status?: string | null;
3973
+ updated_at?: string;
3437
3974
  };
3438
3975
  Relationships: [{
3439
- foreignKeyName: "floriday_auction_letters_cache_connection_id_fkey";
3976
+ foreignKeyName: "floriday_agreement_calloffs_cache_connection_id_fkey";
3440
3977
  columns: ["connection_id"];
3441
3978
  isOneToOne: false;
3442
3979
  referencedRelation: "floriday_connections";
3443
3980
  referencedColumns: ["id"];
3444
3981
  }];
3445
3982
  };
3446
- floriday_auto_fulfillment_log: {
3983
+ floriday_agreements_cache: {
3447
3984
  Row: {
3448
- attempts: number;
3985
+ buyer_organization_id: string | null;
3449
3986
  connection_id: string;
3450
- created_at: string;
3451
- error: string | null;
3452
- fulfillment_order_id: string | null;
3987
+ data: import("./types").Json;
3988
+ fetched_at: string;
3989
+ floriday_id: string;
3453
3990
  id: string;
3454
- last_attempt_at: string | null;
3455
- reason: string | null;
3456
- sales_order_id: string;
3457
- status: string;
3991
+ is_deleted: boolean;
3992
+ sequence_number: number;
3993
+ status: string | null;
3458
3994
  updated_at: string;
3995
+ valid_from: string | null;
3996
+ valid_until: string | null;
3459
3997
  };
3460
3998
  Insert: {
3461
- attempts?: number;
3999
+ buyer_organization_id?: string | null;
3462
4000
  connection_id: string;
3463
- created_at?: string;
3464
- error?: string | null;
3465
- fulfillment_order_id?: string | null;
4001
+ data?: import("./types").Json;
4002
+ fetched_at?: string;
4003
+ floriday_id: string;
3466
4004
  id?: string;
3467
- last_attempt_at?: string | null;
3468
- reason?: string | null;
3469
- sales_order_id: string;
3470
- status?: string;
4005
+ is_deleted?: boolean;
4006
+ sequence_number?: number;
4007
+ status?: string | null;
3471
4008
  updated_at?: string;
4009
+ valid_from?: string | null;
4010
+ valid_until?: string | null;
3472
4011
  };
3473
4012
  Update: {
3474
- attempts?: number;
4013
+ buyer_organization_id?: string | null;
3475
4014
  connection_id?: string;
3476
- created_at?: string;
3477
- error?: string | null;
4015
+ data?: import("./types").Json;
4016
+ fetched_at?: string;
4017
+ floriday_id?: string;
4018
+ id?: string;
4019
+ is_deleted?: boolean;
4020
+ sequence_number?: number;
4021
+ status?: string | null;
4022
+ updated_at?: string;
4023
+ valid_from?: string | null;
4024
+ valid_until?: string | null;
4025
+ };
4026
+ Relationships: [{
4027
+ foreignKeyName: "floriday_agreements_cache_connection_id_fkey";
4028
+ columns: ["connection_id"];
4029
+ isOneToOne: false;
4030
+ referencedRelation: "floriday_connections";
4031
+ referencedColumns: ["id"];
4032
+ }];
4033
+ };
4034
+ floriday_auction_letters_cache: {
4035
+ Row: {
4036
+ auction_letter_code: string;
4037
+ clock_supply_id: string;
4038
+ connection_id: string;
4039
+ content_type: string;
4040
+ fetched_at: string;
4041
+ id: string;
4042
+ storage_path: string;
4043
+ };
4044
+ Insert: {
4045
+ auction_letter_code: string;
4046
+ clock_supply_id: string;
4047
+ connection_id: string;
4048
+ content_type?: string;
4049
+ fetched_at?: string;
4050
+ id?: string;
4051
+ storage_path: string;
4052
+ };
4053
+ Update: {
4054
+ auction_letter_code?: string;
4055
+ clock_supply_id?: string;
4056
+ connection_id?: string;
4057
+ content_type?: string;
4058
+ fetched_at?: string;
4059
+ id?: string;
4060
+ storage_path?: string;
4061
+ };
4062
+ Relationships: [{
4063
+ foreignKeyName: "floriday_auction_letters_cache_connection_id_fkey";
4064
+ columns: ["connection_id"];
4065
+ isOneToOne: false;
4066
+ referencedRelation: "floriday_connections";
4067
+ referencedColumns: ["id"];
4068
+ }];
4069
+ };
4070
+ floriday_auto_fulfillment_log: {
4071
+ Row: {
4072
+ attempts: number;
4073
+ connection_id: string;
4074
+ created_at: string;
4075
+ error: string | null;
4076
+ fulfillment_order_id: string | null;
4077
+ id: string;
4078
+ last_attempt_at: string | null;
4079
+ reason: string | null;
4080
+ sales_order_id: string;
4081
+ status: string;
4082
+ updated_at: string;
4083
+ };
4084
+ Insert: {
4085
+ attempts?: number;
4086
+ connection_id: string;
4087
+ created_at?: string;
4088
+ error?: string | null;
4089
+ fulfillment_order_id?: string | null;
4090
+ id?: string;
4091
+ last_attempt_at?: string | null;
4092
+ reason?: string | null;
4093
+ sales_order_id: string;
4094
+ status?: string;
4095
+ updated_at?: string;
4096
+ };
4097
+ Update: {
4098
+ attempts?: number;
4099
+ connection_id?: string;
4100
+ created_at?: string;
4101
+ error?: string | null;
3478
4102
  fulfillment_order_id?: string | null;
3479
4103
  id?: string;
3480
4104
  last_attempt_at?: string | null;
@@ -3905,27 +4529,6 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
3905
4529
  referencedColumns: ["id"];
3906
4530
  }];
3907
4531
  };
3908
- floriday_continuous_stock_cache: {
3909
- Row: {
3910
- connection_id: string;
3911
- fetched_at: string;
3912
- number_of_pieces: number;
3913
- trade_item_id: string;
3914
- };
3915
- Insert: {
3916
- connection_id: string;
3917
- fetched_at?: string;
3918
- number_of_pieces?: number;
3919
- trade_item_id: string;
3920
- };
3921
- Update: {
3922
- connection_id?: string;
3923
- fetched_at?: string;
3924
- number_of_pieces?: number;
3925
- trade_item_id?: string;
3926
- };
3927
- Relationships: [];
3928
- };
3929
4532
  floriday_continuous_stock_queue: {
3930
4533
  Row: {
3931
4534
  attempts: number;
@@ -4701,8 +5304,6 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
4701
5304
  Row: {
4702
5305
  buyer_organization_id: string | null;
4703
5306
  connection_id: string;
4704
- controlled_at: string | null;
4705
- controlled_by: string | null;
4706
5307
  created_at: string;
4707
5308
  data: import("./types").Json;
4708
5309
  floriday_id: string;
@@ -4714,8 +5315,6 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
4714
5315
  Insert: {
4715
5316
  buyer_organization_id?: string | null;
4716
5317
  connection_id: string;
4717
- controlled_at?: string | null;
4718
- controlled_by?: string | null;
4719
5318
  created_at?: string;
4720
5319
  data: import("./types").Json;
4721
5320
  floriday_id: string;
@@ -4727,8 +5326,6 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
4727
5326
  Update: {
4728
5327
  buyer_organization_id?: string | null;
4729
5328
  connection_id?: string;
4730
- controlled_at?: string | null;
4731
- controlled_by?: string | null;
4732
5329
  created_at?: string;
4733
5330
  data?: import("./types").Json;
4734
5331
  floriday_id?: string;
@@ -4910,45 +5507,6 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
4910
5507
  referencedColumns: ["id"];
4911
5508
  }];
4912
5509
  };
4913
- floriday_trade_settings_customers_cache: {
4914
- Row: {
4915
- connection_id: string;
4916
- data: import("./types").Json;
4917
- fetched_at: string;
4918
- floriday_id: string;
4919
- id: string;
4920
- is_deleted: boolean;
4921
- sequence_number: number;
4922
- updated_at: string;
4923
- };
4924
- Insert: {
4925
- connection_id: string;
4926
- data: import("./types").Json;
4927
- fetched_at?: string;
4928
- floriday_id: string;
4929
- id?: string;
4930
- is_deleted?: boolean;
4931
- sequence_number?: number;
4932
- updated_at?: string;
4933
- };
4934
- Update: {
4935
- connection_id?: string;
4936
- data?: import("./types").Json;
4937
- fetched_at?: string;
4938
- floriday_id?: string;
4939
- id?: string;
4940
- is_deleted?: boolean;
4941
- sequence_number?: number;
4942
- updated_at?: string;
4943
- };
4944
- Relationships: [{
4945
- foreignKeyName: "floriday_trade_settings_customers_cache_connection_id_fkey";
4946
- columns: ["connection_id"];
4947
- isOneToOne: false;
4948
- referencedRelation: "floriday_connections";
4949
- referencedColumns: ["id"];
4950
- }];
4951
- };
4952
5510
  floriday_trips_cache: {
4953
5511
  Row: {
4954
5512
  carrier_organization_id: string | null;
@@ -5477,162 +6035,444 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
5477
6035
  };
5478
6036
  Relationships: [];
5479
6037
  };
5480
- local_customer_agreements: {
6038
+ itk_contact_persons: {
5481
6039
  Row: {
5482
- base_price: number | null;
5483
6040
  created_at: string;
5484
- currency: string;
5485
6041
  customer_id: string;
6042
+ email: string | null;
5486
6043
  id: string;
5487
- min_quantity: number;
5488
- net_price: number;
5489
- notes: string | null;
5490
- product_category_id: string | null;
5491
- product_id: string | null;
6044
+ name: string;
6045
+ phone: string | null;
6046
+ role: string | null;
5492
6047
  updated_at: string;
5493
- valid_from: string | null;
5494
- valid_until: string | null;
5495
6048
  };
5496
6049
  Insert: {
5497
- base_price?: number | null;
5498
6050
  created_at?: string;
5499
- currency?: string;
5500
6051
  customer_id: string;
6052
+ email?: string | null;
5501
6053
  id?: string;
5502
- min_quantity?: number;
5503
- net_price: number;
5504
- notes?: string | null;
5505
- product_category_id?: string | null;
5506
- product_id?: string | null;
6054
+ name: string;
6055
+ phone?: string | null;
6056
+ role?: string | null;
5507
6057
  updated_at?: string;
5508
- valid_from?: string | null;
5509
- valid_until?: string | null;
5510
6058
  };
5511
6059
  Update: {
5512
- base_price?: number | null;
5513
6060
  created_at?: string;
5514
- currency?: string;
5515
6061
  customer_id?: string;
6062
+ email?: string | null;
5516
6063
  id?: string;
5517
- min_quantity?: number;
5518
- net_price?: number;
5519
- notes?: string | null;
5520
- product_category_id?: string | null;
5521
- product_id?: string | null;
6064
+ name?: string;
6065
+ phone?: string | null;
6066
+ role?: string | null;
5522
6067
  updated_at?: string;
5523
- valid_from?: string | null;
5524
- valid_until?: string | null;
5525
6068
  };
5526
6069
  Relationships: [{
5527
- foreignKeyName: "local_customer_agreements_customer_id_fkey";
6070
+ foreignKeyName: "itk_contact_persons_customer_id_fkey";
5528
6071
  columns: ["customer_id"];
5529
6072
  isOneToOne: false;
5530
- referencedRelation: "customers";
5531
- referencedColumns: ["id"];
5532
- }, {
5533
- foreignKeyName: "local_customer_agreements_product_category_id_fkey";
5534
- columns: ["product_category_id"];
5535
- isOneToOne: false;
5536
- referencedRelation: "product_categories";
5537
- referencedColumns: ["id"];
5538
- }, {
5539
- foreignKeyName: "local_customer_agreements_product_id_fkey";
5540
- columns: ["product_id"];
5541
- isOneToOne: false;
5542
- referencedRelation: "products";
6073
+ referencedRelation: "itk_customers";
5543
6074
  referencedColumns: ["id"];
5544
6075
  }];
5545
6076
  };
5546
- local_customer_price_groups: {
6077
+ itk_customer_dynamic_values: {
5547
6078
  Row: {
5548
6079
  created_at: string;
5549
- currency: string;
5550
6080
  customer_id: string;
5551
- discount_type: string;
5552
- discount_value: number;
6081
+ field_id: string;
5553
6082
  id: string;
5554
- min_quantity: number;
5555
- notes: string | null;
5556
- product_category_id: string | null;
5557
- product_id: string | null;
5558
6083
  updated_at: string;
5559
- valid_from: string | null;
5560
- valid_until: string | null;
6084
+ value: string | null;
5561
6085
  };
5562
6086
  Insert: {
5563
6087
  created_at?: string;
5564
- currency?: string;
5565
6088
  customer_id: string;
5566
- discount_type: string;
5567
- discount_value: number;
6089
+ field_id: string;
5568
6090
  id?: string;
5569
- min_quantity?: number;
5570
- notes?: string | null;
5571
- product_category_id?: string | null;
5572
- product_id?: string | null;
5573
6091
  updated_at?: string;
5574
- valid_from?: string | null;
5575
- valid_until?: string | null;
6092
+ value?: string | null;
5576
6093
  };
5577
6094
  Update: {
5578
6095
  created_at?: string;
5579
- currency?: string;
5580
6096
  customer_id?: string;
5581
- discount_type?: string;
5582
- discount_value?: number;
6097
+ field_id?: string;
5583
6098
  id?: string;
5584
- min_quantity?: number;
5585
- notes?: string | null;
5586
- product_category_id?: string | null;
5587
- product_id?: string | null;
5588
6099
  updated_at?: string;
5589
- valid_from?: string | null;
5590
- valid_until?: string | null;
6100
+ value?: string | null;
5591
6101
  };
5592
6102
  Relationships: [{
5593
- foreignKeyName: "local_customer_price_groups_customer_id_fkey";
6103
+ foreignKeyName: "itk_customer_dynamic_values_customer_id_fkey";
5594
6104
  columns: ["customer_id"];
5595
6105
  isOneToOne: false;
5596
- referencedRelation: "customers";
5597
- referencedColumns: ["id"];
5598
- }, {
5599
- foreignKeyName: "local_customer_price_groups_product_category_id_fkey";
5600
- columns: ["product_category_id"];
5601
- isOneToOne: false;
5602
- referencedRelation: "product_categories";
6106
+ referencedRelation: "itk_customers";
5603
6107
  referencedColumns: ["id"];
5604
6108
  }, {
5605
- foreignKeyName: "local_customer_price_groups_product_id_fkey";
5606
- columns: ["product_id"];
6109
+ foreignKeyName: "itk_customer_dynamic_values_field_id_fkey";
6110
+ columns: ["field_id"];
5607
6111
  isOneToOne: false;
5608
- referencedRelation: "products";
6112
+ referencedRelation: "itk_dynamic_fields";
5609
6113
  referencedColumns: ["id"];
5610
6114
  }];
5611
6115
  };
5612
- local_customer_sales_strategies: {
6116
+ itk_customer_notes: {
5613
6117
  Row: {
6118
+ body: string;
5614
6119
  created_at: string;
5615
- currency: string;
6120
+ created_by: string | null;
5616
6121
  customer_id: string;
5617
- discount_type: string;
5618
- discount_value: number;
5619
6122
  id: string;
5620
- min_quantity: number;
5621
- notes: string | null;
5622
- product_category_id: string | null;
5623
- product_id: string | null;
6123
+ note_type: string;
5624
6124
  updated_at: string;
5625
- valid_from: string | null;
5626
- valid_until: string | null;
5627
6125
  };
5628
6126
  Insert: {
6127
+ body: string;
5629
6128
  created_at?: string;
5630
- currency?: string;
6129
+ created_by?: string | null;
5631
6130
  customer_id: string;
5632
- discount_type: string;
5633
- discount_value: number;
5634
6131
  id?: string;
5635
- min_quantity?: number;
6132
+ note_type?: string;
6133
+ updated_at?: string;
6134
+ };
6135
+ Update: {
6136
+ body?: string;
6137
+ created_at?: string;
6138
+ created_by?: string | null;
6139
+ customer_id?: string;
6140
+ id?: string;
6141
+ note_type?: string;
6142
+ updated_at?: string;
6143
+ };
6144
+ Relationships: [{
6145
+ foreignKeyName: "itk_customer_notes_customer_id_fkey";
6146
+ columns: ["customer_id"];
6147
+ isOneToOne: false;
6148
+ referencedRelation: "itk_customers";
6149
+ referencedColumns: ["id"];
6150
+ }];
6151
+ };
6152
+ itk_customers: {
6153
+ Row: {
6154
+ billing_city: string | null;
6155
+ billing_postcode: string | null;
6156
+ billing_street: string | null;
6157
+ created_at: string;
6158
+ general_email: string | null;
6159
+ general_phone: string | null;
6160
+ id: string;
6161
+ legacy_customer_id: string | null;
6162
+ name: string;
6163
+ segment: Database["public"]["Enums"]["itk_customer_segment"];
6164
+ updated_at: string;
6165
+ };
6166
+ Insert: {
6167
+ billing_city?: string | null;
6168
+ billing_postcode?: string | null;
6169
+ billing_street?: string | null;
6170
+ created_at?: string;
6171
+ general_email?: string | null;
6172
+ general_phone?: string | null;
6173
+ id?: string;
6174
+ legacy_customer_id?: string | null;
6175
+ name: string;
6176
+ segment?: Database["public"]["Enums"]["itk_customer_segment"];
6177
+ updated_at?: string;
6178
+ };
6179
+ Update: {
6180
+ billing_city?: string | null;
6181
+ billing_postcode?: string | null;
6182
+ billing_street?: string | null;
6183
+ created_at?: string;
6184
+ general_email?: string | null;
6185
+ general_phone?: string | null;
6186
+ id?: string;
6187
+ legacy_customer_id?: string | null;
6188
+ name?: string;
6189
+ segment?: Database["public"]["Enums"]["itk_customer_segment"];
6190
+ updated_at?: string;
6191
+ };
6192
+ Relationships: [{
6193
+ foreignKeyName: "itk_customers_legacy_customer_id_fkey";
6194
+ columns: ["legacy_customer_id"];
6195
+ isOneToOne: false;
6196
+ referencedRelation: "customers";
6197
+ referencedColumns: ["id"];
6198
+ }];
6199
+ };
6200
+ itk_dynamic_fields: {
6201
+ Row: {
6202
+ created_at: string;
6203
+ field_name: string;
6204
+ field_type: Database["public"]["Enums"]["itk_dynamic_field_type"];
6205
+ id: string;
6206
+ options: import("./types").Json;
6207
+ sort_order: number;
6208
+ updated_at: string;
6209
+ };
6210
+ Insert: {
6211
+ created_at?: string;
6212
+ field_name: string;
6213
+ field_type?: Database["public"]["Enums"]["itk_dynamic_field_type"];
6214
+ id?: string;
6215
+ options?: import("./types").Json;
6216
+ sort_order?: number;
6217
+ updated_at?: string;
6218
+ };
6219
+ Update: {
6220
+ created_at?: string;
6221
+ field_name?: string;
6222
+ field_type?: Database["public"]["Enums"]["itk_dynamic_field_type"];
6223
+ id?: string;
6224
+ options?: import("./types").Json;
6225
+ sort_order?: number;
6226
+ updated_at?: string;
6227
+ };
6228
+ Relationships: [];
6229
+ };
6230
+ itk_work_locations: {
6231
+ Row: {
6232
+ city: string | null;
6233
+ created_at: string;
6234
+ customer_id: string;
6235
+ id: string;
6236
+ instructions: string | null;
6237
+ label: string;
6238
+ latitude: number | null;
6239
+ longitude: number | null;
6240
+ postcode: string | null;
6241
+ street: string | null;
6242
+ updated_at: string;
6243
+ };
6244
+ Insert: {
6245
+ city?: string | null;
6246
+ created_at?: string;
6247
+ customer_id: string;
6248
+ id?: string;
6249
+ instructions?: string | null;
6250
+ label: string;
6251
+ latitude?: number | null;
6252
+ longitude?: number | null;
6253
+ postcode?: string | null;
6254
+ street?: string | null;
6255
+ updated_at?: string;
6256
+ };
6257
+ Update: {
6258
+ city?: string | null;
6259
+ created_at?: string;
6260
+ customer_id?: string;
6261
+ id?: string;
6262
+ instructions?: string | null;
6263
+ label?: string;
6264
+ latitude?: number | null;
6265
+ longitude?: number | null;
6266
+ postcode?: string | null;
6267
+ street?: string | null;
6268
+ updated_at?: string;
6269
+ };
6270
+ Relationships: [{
6271
+ foreignKeyName: "itk_work_locations_customer_id_fkey";
6272
+ columns: ["customer_id"];
6273
+ isOneToOne: false;
6274
+ referencedRelation: "itk_customers";
6275
+ referencedColumns: ["id"];
6276
+ }];
6277
+ };
6278
+ leave_requests: {
6279
+ Row: {
6280
+ created_at: string;
6281
+ end_date: string;
6282
+ id: string;
6283
+ reason: string | null;
6284
+ start_date: string;
6285
+ status: string;
6286
+ tenant_id: string;
6287
+ updated_at: string;
6288
+ user_id: string;
6289
+ };
6290
+ Insert: {
6291
+ created_at?: string;
6292
+ end_date: string;
6293
+ id?: string;
6294
+ reason?: string | null;
6295
+ start_date: string;
6296
+ status?: string;
6297
+ tenant_id?: string;
6298
+ updated_at?: string;
6299
+ user_id: string;
6300
+ };
6301
+ Update: {
6302
+ created_at?: string;
6303
+ end_date?: string;
6304
+ id?: string;
6305
+ reason?: string | null;
6306
+ start_date?: string;
6307
+ status?: string;
6308
+ tenant_id?: string;
6309
+ updated_at?: string;
6310
+ user_id?: string;
6311
+ };
6312
+ Relationships: [{
6313
+ foreignKeyName: "leave_requests_user_id_fkey";
6314
+ columns: ["user_id"];
6315
+ isOneToOne: false;
6316
+ referencedRelation: "monteurs";
6317
+ referencedColumns: ["id"];
6318
+ }];
6319
+ };
6320
+ local_customer_agreements: {
6321
+ Row: {
6322
+ base_price: number | null;
6323
+ created_at: string;
6324
+ currency: string;
6325
+ customer_id: string;
6326
+ id: string;
6327
+ min_quantity: number;
6328
+ net_price: number;
6329
+ notes: string | null;
6330
+ product_category_id: string | null;
6331
+ product_id: string | null;
6332
+ updated_at: string;
6333
+ valid_from: string | null;
6334
+ valid_until: string | null;
6335
+ };
6336
+ Insert: {
6337
+ base_price?: number | null;
6338
+ created_at?: string;
6339
+ currency?: string;
6340
+ customer_id: string;
6341
+ id?: string;
6342
+ min_quantity?: number;
6343
+ net_price: number;
6344
+ notes?: string | null;
6345
+ product_category_id?: string | null;
6346
+ product_id?: string | null;
6347
+ updated_at?: string;
6348
+ valid_from?: string | null;
6349
+ valid_until?: string | null;
6350
+ };
6351
+ Update: {
6352
+ base_price?: number | null;
6353
+ created_at?: string;
6354
+ currency?: string;
6355
+ customer_id?: string;
6356
+ id?: string;
6357
+ min_quantity?: number;
6358
+ net_price?: number;
6359
+ notes?: string | null;
6360
+ product_category_id?: string | null;
6361
+ product_id?: string | null;
6362
+ updated_at?: string;
6363
+ valid_from?: string | null;
6364
+ valid_until?: string | null;
6365
+ };
6366
+ Relationships: [{
6367
+ foreignKeyName: "local_customer_agreements_customer_id_fkey";
6368
+ columns: ["customer_id"];
6369
+ isOneToOne: false;
6370
+ referencedRelation: "customers";
6371
+ referencedColumns: ["id"];
6372
+ }, {
6373
+ foreignKeyName: "local_customer_agreements_product_category_id_fkey";
6374
+ columns: ["product_category_id"];
6375
+ isOneToOne: false;
6376
+ referencedRelation: "product_categories";
6377
+ referencedColumns: ["id"];
6378
+ }, {
6379
+ foreignKeyName: "local_customer_agreements_product_id_fkey";
6380
+ columns: ["product_id"];
6381
+ isOneToOne: false;
6382
+ referencedRelation: "products";
6383
+ referencedColumns: ["id"];
6384
+ }];
6385
+ };
6386
+ local_customer_price_groups: {
6387
+ Row: {
6388
+ created_at: string;
6389
+ currency: string;
6390
+ customer_id: string;
6391
+ discount_type: string;
6392
+ discount_value: number;
6393
+ id: string;
6394
+ min_quantity: number;
6395
+ notes: string | null;
6396
+ product_category_id: string | null;
6397
+ product_id: string | null;
6398
+ updated_at: string;
6399
+ valid_from: string | null;
6400
+ valid_until: string | null;
6401
+ };
6402
+ Insert: {
6403
+ created_at?: string;
6404
+ currency?: string;
6405
+ customer_id: string;
6406
+ discount_type: string;
6407
+ discount_value: number;
6408
+ id?: string;
6409
+ min_quantity?: number;
6410
+ notes?: string | null;
6411
+ product_category_id?: string | null;
6412
+ product_id?: string | null;
6413
+ updated_at?: string;
6414
+ valid_from?: string | null;
6415
+ valid_until?: string | null;
6416
+ };
6417
+ Update: {
6418
+ created_at?: string;
6419
+ currency?: string;
6420
+ customer_id?: string;
6421
+ discount_type?: string;
6422
+ discount_value?: number;
6423
+ id?: string;
6424
+ min_quantity?: number;
6425
+ notes?: string | null;
6426
+ product_category_id?: string | null;
6427
+ product_id?: string | null;
6428
+ updated_at?: string;
6429
+ valid_from?: string | null;
6430
+ valid_until?: string | null;
6431
+ };
6432
+ Relationships: [{
6433
+ foreignKeyName: "local_customer_price_groups_customer_id_fkey";
6434
+ columns: ["customer_id"];
6435
+ isOneToOne: false;
6436
+ referencedRelation: "customers";
6437
+ referencedColumns: ["id"];
6438
+ }, {
6439
+ foreignKeyName: "local_customer_price_groups_product_category_id_fkey";
6440
+ columns: ["product_category_id"];
6441
+ isOneToOne: false;
6442
+ referencedRelation: "product_categories";
6443
+ referencedColumns: ["id"];
6444
+ }, {
6445
+ foreignKeyName: "local_customer_price_groups_product_id_fkey";
6446
+ columns: ["product_id"];
6447
+ isOneToOne: false;
6448
+ referencedRelation: "products";
6449
+ referencedColumns: ["id"];
6450
+ }];
6451
+ };
6452
+ local_customer_sales_strategies: {
6453
+ Row: {
6454
+ created_at: string;
6455
+ currency: string;
6456
+ customer_id: string;
6457
+ discount_type: string;
6458
+ discount_value: number;
6459
+ id: string;
6460
+ min_quantity: number;
6461
+ notes: string | null;
6462
+ product_category_id: string | null;
6463
+ product_id: string | null;
6464
+ updated_at: string;
6465
+ valid_from: string | null;
6466
+ valid_until: string | null;
6467
+ };
6468
+ Insert: {
6469
+ created_at?: string;
6470
+ currency?: string;
6471
+ customer_id: string;
6472
+ discount_type: string;
6473
+ discount_value: number;
6474
+ id?: string;
6475
+ min_quantity?: number;
5636
6476
  notes?: string | null;
5637
6477
  product_category_id?: string | null;
5638
6478
  product_id?: string | null;
@@ -5679,23 +6519,302 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
5679
6519
  Row: {
5680
6520
  created_at: string;
5681
6521
  id: string;
5682
- name: string;
5683
- sort_order: number;
6522
+ name: string;
6523
+ sort_order: number;
6524
+ updated_at: string;
6525
+ };
6526
+ Insert: {
6527
+ created_at?: string;
6528
+ id?: string;
6529
+ name: string;
6530
+ sort_order?: number;
6531
+ updated_at?: string;
6532
+ };
6533
+ Update: {
6534
+ created_at?: string;
6535
+ id?: string;
6536
+ name?: string;
6537
+ sort_order?: number;
6538
+ updated_at?: string;
6539
+ };
6540
+ Relationships: [];
6541
+ };
6542
+ logistics_capacity_events: {
6543
+ Row: {
6544
+ available_carts: number;
6545
+ created_at: string;
6546
+ id: string;
6547
+ measures: import("./types").Json;
6548
+ note: string | null;
6549
+ outcome: string;
6550
+ required_carts: number;
6551
+ reserve_minutes: number;
6552
+ shortage_carts: number;
6553
+ status: string;
6554
+ user_id: string;
6555
+ };
6556
+ Insert: {
6557
+ available_carts?: number;
6558
+ created_at?: string;
6559
+ id?: string;
6560
+ measures?: import("./types").Json;
6561
+ note?: string | null;
6562
+ outcome?: string;
6563
+ required_carts?: number;
6564
+ reserve_minutes?: number;
6565
+ shortage_carts?: number;
6566
+ status: string;
6567
+ user_id: string;
6568
+ };
6569
+ Update: {
6570
+ available_carts?: number;
6571
+ created_at?: string;
6572
+ id?: string;
6573
+ measures?: import("./types").Json;
6574
+ note?: string | null;
6575
+ outcome?: string;
6576
+ required_carts?: number;
6577
+ reserve_minutes?: number;
6578
+ shortage_carts?: number;
6579
+ status?: string;
6580
+ user_id?: string;
6581
+ };
6582
+ Relationships: [];
6583
+ };
6584
+ logistics_capacity_settings: {
6585
+ Row: {
6586
+ created_at: string;
6587
+ settings: import("./types").Json;
6588
+ updated_at: string;
6589
+ user_id: string;
6590
+ };
6591
+ Insert: {
6592
+ created_at?: string;
6593
+ settings?: import("./types").Json;
6594
+ updated_at?: string;
6595
+ user_id: string;
6596
+ };
6597
+ Update: {
6598
+ created_at?: string;
6599
+ settings?: import("./types").Json;
6600
+ updated_at?: string;
6601
+ user_id?: string;
6602
+ };
6603
+ Relationships: [];
6604
+ };
6605
+ logistics_decisions: {
6606
+ Row: {
6607
+ created_at: string;
6608
+ explanation: string | null;
6609
+ id: string;
6610
+ input_snapshot: import("./types").Json;
6611
+ result: import("./types").Json;
6612
+ slot: string;
6613
+ strategy_id: string | null;
6614
+ subject_id: string;
6615
+ subject_type: string;
6616
+ user_id: string;
6617
+ };
6618
+ Insert: {
6619
+ created_at?: string;
6620
+ explanation?: string | null;
6621
+ id?: string;
6622
+ input_snapshot?: import("./types").Json;
6623
+ result?: import("./types").Json;
6624
+ slot: string;
6625
+ strategy_id?: string | null;
6626
+ subject_id: string;
6627
+ subject_type: string;
6628
+ user_id: string;
6629
+ };
6630
+ Update: {
6631
+ created_at?: string;
6632
+ explanation?: string | null;
6633
+ id?: string;
6634
+ input_snapshot?: import("./types").Json;
6635
+ result?: import("./types").Json;
6636
+ slot?: string;
6637
+ strategy_id?: string | null;
6638
+ subject_id?: string;
6639
+ subject_type?: string;
6640
+ user_id?: string;
6641
+ };
6642
+ Relationships: [{
6643
+ foreignKeyName: "logistics_decisions_strategy_id_fkey";
6644
+ columns: ["strategy_id"];
6645
+ isOneToOne: false;
6646
+ referencedRelation: "logistics_strategies";
6647
+ referencedColumns: ["id"];
6648
+ }];
6649
+ };
6650
+ logistics_formulas: {
6651
+ Row: {
6652
+ created_at: string;
6653
+ expression: string;
6654
+ id: string;
6655
+ notes: string | null;
6656
+ slot: string;
6657
+ strategy_id: string;
6658
+ updated_at: string;
6659
+ user_id: string;
6660
+ version: number;
6661
+ };
6662
+ Insert: {
6663
+ created_at?: string;
6664
+ expression?: string;
6665
+ id?: string;
6666
+ notes?: string | null;
6667
+ slot: string;
6668
+ strategy_id: string;
6669
+ updated_at?: string;
6670
+ user_id: string;
6671
+ version?: number;
6672
+ };
6673
+ Update: {
6674
+ created_at?: string;
6675
+ expression?: string;
6676
+ id?: string;
6677
+ notes?: string | null;
6678
+ slot?: string;
6679
+ strategy_id?: string;
6680
+ updated_at?: string;
6681
+ user_id?: string;
6682
+ version?: number;
6683
+ };
6684
+ Relationships: [{
6685
+ foreignKeyName: "logistics_formulas_strategy_id_fkey";
6686
+ columns: ["strategy_id"];
6687
+ isOneToOne: false;
6688
+ referencedRelation: "logistics_strategies";
6689
+ referencedColumns: ["id"];
6690
+ }];
6691
+ };
6692
+ logistics_strategies: {
6693
+ Row: {
6694
+ color: string;
6695
+ created_at: string;
6696
+ description: string | null;
6697
+ id: string;
6698
+ is_active: boolean;
6699
+ name: string;
6700
+ priority: number;
6701
+ updated_at: string;
6702
+ updated_by: string | null;
6703
+ user_id: string;
6704
+ version: number;
6705
+ };
6706
+ Insert: {
6707
+ color?: string;
6708
+ created_at?: string;
6709
+ description?: string | null;
6710
+ id?: string;
6711
+ is_active?: boolean;
6712
+ name: string;
6713
+ priority?: number;
6714
+ updated_at?: string;
6715
+ updated_by?: string | null;
6716
+ user_id: string;
6717
+ version?: number;
6718
+ };
6719
+ Update: {
6720
+ color?: string;
6721
+ created_at?: string;
6722
+ description?: string | null;
6723
+ id?: string;
6724
+ is_active?: boolean;
6725
+ name?: string;
6726
+ priority?: number;
6727
+ updated_at?: string;
6728
+ updated_by?: string | null;
6729
+ user_id?: string;
6730
+ version?: number;
6731
+ };
6732
+ Relationships: [];
6733
+ };
6734
+ logistics_strategy_schedules: {
6735
+ Row: {
6736
+ condition_expression: string | null;
6737
+ created_at: string;
6738
+ end_date: string | null;
6739
+ id: string;
6740
+ is_enabled: boolean;
6741
+ priority: number;
6742
+ rule_type: string;
6743
+ start_date: string | null;
6744
+ strategy_id: string;
6745
+ updated_at: string;
6746
+ user_id: string;
6747
+ };
6748
+ Insert: {
6749
+ condition_expression?: string | null;
6750
+ created_at?: string;
6751
+ end_date?: string | null;
6752
+ id?: string;
6753
+ is_enabled?: boolean;
6754
+ priority?: number;
6755
+ rule_type: string;
6756
+ start_date?: string | null;
6757
+ strategy_id: string;
6758
+ updated_at?: string;
6759
+ user_id: string;
6760
+ };
6761
+ Update: {
6762
+ condition_expression?: string | null;
6763
+ created_at?: string;
6764
+ end_date?: string | null;
6765
+ id?: string;
6766
+ is_enabled?: boolean;
6767
+ priority?: number;
6768
+ rule_type?: string;
6769
+ start_date?: string | null;
6770
+ strategy_id?: string;
6771
+ updated_at?: string;
6772
+ user_id?: string;
6773
+ };
6774
+ Relationships: [{
6775
+ foreignKeyName: "logistics_strategy_schedules_strategy_id_fkey";
6776
+ columns: ["strategy_id"];
6777
+ isOneToOne: false;
6778
+ referencedRelation: "logistics_strategies";
6779
+ referencedColumns: ["id"];
6780
+ }];
6781
+ };
6782
+ logistics_variables: {
6783
+ Row: {
6784
+ created_at: string;
6785
+ default_value: string | null;
6786
+ description: string | null;
6787
+ id: string;
6788
+ is_builtin: boolean;
6789
+ key: string;
6790
+ label: string;
5684
6791
  updated_at: string;
6792
+ user_id: string;
6793
+ value_type: string;
5685
6794
  };
5686
6795
  Insert: {
5687
6796
  created_at?: string;
6797
+ default_value?: string | null;
6798
+ description?: string | null;
5688
6799
  id?: string;
5689
- name: string;
5690
- sort_order?: number;
6800
+ is_builtin?: boolean;
6801
+ key: string;
6802
+ label: string;
5691
6803
  updated_at?: string;
6804
+ user_id: string;
6805
+ value_type: string;
5692
6806
  };
5693
6807
  Update: {
5694
6808
  created_at?: string;
6809
+ default_value?: string | null;
6810
+ description?: string | null;
5695
6811
  id?: string;
5696
- name?: string;
5697
- sort_order?: number;
6812
+ is_builtin?: boolean;
6813
+ key?: string;
6814
+ label?: string;
5698
6815
  updated_at?: string;
6816
+ user_id?: string;
6817
+ value_type?: string;
5699
6818
  };
5700
6819
  Relationships: [];
5701
6820
  };
@@ -6094,60 +7213,66 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
6094
7213
  };
6095
7214
  manufacture_products: {
6096
7215
  Row: {
6097
- aantal_te_produceren: number;
6098
7216
  created_at: string;
6099
7217
  description: string | null;
6100
7218
  id: string;
6101
7219
  is_active: boolean;
6102
- location_id: string | null;
6103
7220
  name: string;
6104
- partij_nummer: string | null;
6105
- photos: import("./types").Json;
6106
7221
  produced_stock: number;
6107
7222
  product_code: string;
6108
7223
  tenant_id: string;
6109
- unit: string;
6110
7224
  updated_at: string;
6111
7225
  };
6112
7226
  Insert: {
6113
- aantal_te_produceren?: number;
6114
7227
  created_at?: string;
6115
7228
  description?: string | null;
6116
7229
  id?: string;
6117
7230
  is_active?: boolean;
6118
- location_id?: string | null;
6119
7231
  name: string;
6120
- partij_nummer?: string | null;
6121
- photos?: import("./types").Json;
6122
7232
  produced_stock?: number;
6123
7233
  product_code: string;
6124
7234
  tenant_id: string;
6125
- unit?: string;
6126
7235
  updated_at?: string;
6127
7236
  };
6128
7237
  Update: {
6129
- aantal_te_produceren?: number;
6130
7238
  created_at?: string;
6131
7239
  description?: string | null;
6132
7240
  id?: string;
6133
7241
  is_active?: boolean;
6134
- location_id?: string | null;
6135
7242
  name?: string;
6136
- partij_nummer?: string | null;
6137
- photos?: import("./types").Json;
6138
7243
  produced_stock?: number;
6139
7244
  product_code?: string;
6140
7245
  tenant_id?: string;
6141
- unit?: string;
6142
7246
  updated_at?: string;
6143
7247
  };
6144
- Relationships: [{
6145
- foreignKeyName: "manufacture_products_location_id_fkey";
6146
- columns: ["location_id"];
6147
- isOneToOne: false;
6148
- referencedRelation: "locations";
6149
- referencedColumns: ["id"];
6150
- }];
7248
+ Relationships: [];
7249
+ };
7250
+ module_permissions: {
7251
+ Row: {
7252
+ created_at: string;
7253
+ id: string;
7254
+ module_id: string;
7255
+ permission: string;
7256
+ role: Database["public"]["Enums"]["app_role"];
7257
+ updated_at: string;
7258
+ };
7259
+ Insert: {
7260
+ created_at?: string;
7261
+ id?: string;
7262
+ module_id: string;
7263
+ permission: string;
7264
+ role: Database["public"]["Enums"]["app_role"];
7265
+ updated_at?: string;
7266
+ };
7267
+ Update: {
7268
+ created_at?: string;
7269
+ id?: string;
7270
+ module_id?: string;
7271
+ permission?: string;
7272
+ role?: Database["public"]["Enums"]["app_role"];
7273
+ updated_at?: string;
7274
+ };
7275
+ Relationships: [];
6151
7276
  };
6152
7277
  monteurs: {
6153
7278
  Row: {
@@ -6878,6 +8003,42 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
6878
8003
  };
6879
8004
  Relationships: [];
6880
8005
  };
8006
+ order_buffers: {
8007
+ Row: {
8008
+ buffer_key: string;
8009
+ created_at: string;
8010
+ customer_id: string | null;
8011
+ grouping_mode: string;
8012
+ id: string;
8013
+ pickup_date: string | null;
8014
+ pickup_location: string | null;
8015
+ plan_locked_at: string | null;
8016
+ updated_at: string;
8017
+ };
8018
+ Insert: {
8019
+ buffer_key: string;
8020
+ created_at?: string;
8021
+ customer_id?: string | null;
8022
+ grouping_mode: string;
8023
+ id?: string;
8024
+ pickup_date?: string | null;
8025
+ pickup_location?: string | null;
8026
+ plan_locked_at?: string | null;
8027
+ updated_at?: string;
8028
+ };
8029
+ Update: {
8030
+ buffer_key?: string;
8031
+ created_at?: string;
8032
+ customer_id?: string | null;
8033
+ grouping_mode?: string;
8034
+ id?: string;
8035
+ pickup_date?: string | null;
8036
+ pickup_location?: string | null;
8037
+ plan_locked_at?: string | null;
8038
+ updated_at?: string;
8039
+ };
8040
+ Relationships: [];
8041
+ };
6881
8042
  order_cart_items: {
6882
8043
  Row: {
6883
8044
  cart_id: string;
@@ -6944,6 +8105,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
6944
8105
  order_carts: {
6945
8106
  Row: {
6946
8107
  algorithm_version: number;
8108
+ buffer_id: string | null;
6947
8109
  cart_number: number;
6948
8110
  created_at: string;
6949
8111
  id: string;
@@ -6951,13 +8113,14 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
6951
8113
  is_complete: boolean;
6952
8114
  notes: string | null;
6953
8115
  occupancy_pct: number;
6954
- order_id: string;
8116
+ order_id: string | null;
6955
8117
  source: string;
6956
8118
  total_layers_used: number;
6957
8119
  updated_at: string;
6958
8120
  };
6959
8121
  Insert: {
6960
8122
  algorithm_version?: number;
8123
+ buffer_id?: string | null;
6961
8124
  cart_number: number;
6962
8125
  created_at?: string;
6963
8126
  id?: string;
@@ -6965,13 +8128,14 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
6965
8128
  is_complete?: boolean;
6966
8129
  notes?: string | null;
6967
8130
  occupancy_pct?: number;
6968
- order_id: string;
8131
+ order_id?: string | null;
6969
8132
  source?: string;
6970
8133
  total_layers_used?: number;
6971
8134
  updated_at?: string;
6972
8135
  };
6973
8136
  Update: {
6974
8137
  algorithm_version?: number;
8138
+ buffer_id?: string | null;
6975
8139
  cart_number?: number;
6976
8140
  created_at?: string;
6977
8141
  id?: string;
@@ -6979,12 +8143,18 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
6979
8143
  is_complete?: boolean;
6980
8144
  notes?: string | null;
6981
8145
  occupancy_pct?: number;
6982
- order_id?: string;
8146
+ order_id?: string | null;
6983
8147
  source?: string;
6984
8148
  total_layers_used?: number;
6985
8149
  updated_at?: string;
6986
8150
  };
6987
8151
  Relationships: [{
8152
+ foreignKeyName: "order_carts_buffer_id_fkey";
8153
+ columns: ["buffer_id"];
8154
+ isOneToOne: false;
8155
+ referencedRelation: "order_buffers";
8156
+ referencedColumns: ["id"];
8157
+ }, {
6988
8158
  foreignKeyName: "order_carts_order_id_fkey";
6989
8159
  columns: ["order_id"];
6990
8160
  isOneToOne: false;
@@ -7222,12 +8392,14 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7222
8392
  };
7223
8393
  orders: {
7224
8394
  Row: {
8395
+ buffer_id: string | null;
7225
8396
  created_at: string;
7226
8397
  custom_fields: import("./types").Json;
7227
8398
  customer_id: string | null;
7228
8399
  customer_name: string;
7229
8400
  deleted_at: string | null;
7230
8401
  delivery_date: string | null;
8402
+ floriday_sales_order_id: string | null;
7231
8403
  id: string;
7232
8404
  is_reservation: boolean;
7233
8405
  notes: string | null;
@@ -7241,12 +8413,14 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7241
8413
  updated_at: string;
7242
8414
  };
7243
8415
  Insert: {
8416
+ buffer_id?: string | null;
7244
8417
  created_at?: string;
7245
8418
  custom_fields?: import("./types").Json;
7246
8419
  customer_id?: string | null;
7247
8420
  customer_name?: string;
7248
8421
  deleted_at?: string | null;
7249
8422
  delivery_date?: string | null;
8423
+ floriday_sales_order_id?: string | null;
7250
8424
  id?: string;
7251
8425
  is_reservation?: boolean;
7252
8426
  notes?: string | null;
@@ -7260,12 +8434,14 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7260
8434
  updated_at?: string;
7261
8435
  };
7262
8436
  Update: {
8437
+ buffer_id?: string | null;
7263
8438
  created_at?: string;
7264
8439
  custom_fields?: import("./types").Json;
7265
8440
  customer_id?: string | null;
7266
8441
  customer_name?: string;
7267
8442
  deleted_at?: string | null;
7268
8443
  delivery_date?: string | null;
8444
+ floriday_sales_order_id?: string | null;
7269
8445
  id?: string;
7270
8446
  is_reservation?: boolean;
7271
8447
  notes?: string | null;
@@ -7279,6 +8455,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7279
8455
  updated_at?: string;
7280
8456
  };
7281
8457
  Relationships: [{
8458
+ foreignKeyName: "orders_buffer_id_fkey";
8459
+ columns: ["buffer_id"];
8460
+ isOneToOne: false;
8461
+ referencedRelation: "order_buffers";
8462
+ referencedColumns: ["id"];
8463
+ }, {
7282
8464
  foreignKeyName: "orders_customer_id_fkey";
7283
8465
  columns: ["customer_id"];
7284
8466
  isOneToOne: false;
@@ -7409,6 +8591,78 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7409
8591
  };
7410
8592
  Relationships: [];
7411
8593
  };
8594
+ planning_item_assistants: {
8595
+ Row: {
8596
+ created_at: string;
8597
+ created_by: string | null;
8598
+ monteur_id: string;
8599
+ planning_item_id: string;
8600
+ };
8601
+ Insert: {
8602
+ created_at?: string;
8603
+ created_by?: string | null;
8604
+ monteur_id: string;
8605
+ planning_item_id: string;
8606
+ };
8607
+ Update: {
8608
+ created_at?: string;
8609
+ created_by?: string | null;
8610
+ monteur_id?: string;
8611
+ planning_item_id?: string;
8612
+ };
8613
+ Relationships: [{
8614
+ foreignKeyName: "planning_item_assistants_planning_item_id_fkey";
8615
+ columns: ["planning_item_id"];
8616
+ isOneToOne: false;
8617
+ referencedRelation: "planning_items";
8618
+ referencedColumns: ["id"];
8619
+ }];
8620
+ };
8621
+ planning_items: {
8622
+ Row: {
8623
+ assigned_monteur_id: string;
8624
+ created_at: string;
8625
+ created_by: string | null;
8626
+ end_at: string;
8627
+ id: string;
8628
+ notes: string | null;
8629
+ start_at: string;
8630
+ status: Database["public"]["Enums"]["planning_item_status"];
8631
+ updated_at: string;
8632
+ werkbon_id: string;
8633
+ };
8634
+ Insert: {
8635
+ assigned_monteur_id: string;
8636
+ created_at?: string;
8637
+ created_by?: string | null;
8638
+ end_at: string;
8639
+ id?: string;
8640
+ notes?: string | null;
8641
+ start_at: string;
8642
+ status?: Database["public"]["Enums"]["planning_item_status"];
8643
+ updated_at?: string;
8644
+ werkbon_id: string;
8645
+ };
8646
+ Update: {
8647
+ assigned_monteur_id?: string;
8648
+ created_at?: string;
8649
+ created_by?: string | null;
8650
+ end_at?: string;
8651
+ id?: string;
8652
+ notes?: string | null;
8653
+ start_at?: string;
8654
+ status?: Database["public"]["Enums"]["planning_item_status"];
8655
+ updated_at?: string;
8656
+ werkbon_id?: string;
8657
+ };
8658
+ Relationships: [{
8659
+ foreignKeyName: "planning_items_werkbon_id_fkey";
8660
+ columns: ["werkbon_id"];
8661
+ isOneToOne: false;
8662
+ referencedRelation: "werkbonnen";
8663
+ referencedColumns: ["id"];
8664
+ }];
8665
+ };
7412
8666
  product_bom_items: {
7413
8667
  Row: {
7414
8668
  component_product_id: string | null;
@@ -7416,6 +8670,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7416
8670
  created_at: string;
7417
8671
  id: string;
7418
8672
  notes: string | null;
8673
+ packing_configuration_id: string | null;
7419
8674
  parent_product_id: string | null;
7420
8675
  parent_trade_item_floriday_id: string | null;
7421
8676
  quantity: number;
@@ -7430,6 +8685,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7430
8685
  created_at?: string;
7431
8686
  id?: string;
7432
8687
  notes?: string | null;
8688
+ packing_configuration_id?: string | null;
7433
8689
  parent_product_id?: string | null;
7434
8690
  parent_trade_item_floriday_id?: string | null;
7435
8691
  quantity?: number;
@@ -7444,6 +8700,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7444
8700
  created_at?: string;
7445
8701
  id?: string;
7446
8702
  notes?: string | null;
8703
+ packing_configuration_id?: string | null;
7447
8704
  parent_product_id?: string | null;
7448
8705
  parent_trade_item_floriday_id?: string | null;
7449
8706
  quantity?: number;
@@ -7645,11 +8902,13 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7645
8902
  created_at: string;
7646
8903
  id: string;
7647
8904
  is_package: boolean;
8905
+ label: string | null;
7648
8906
  layers_per_load_carrier: number | null;
7649
8907
  load_carrier: string | null;
7650
8908
  package_id: string | null;
7651
8909
  package_label: string | null;
7652
8910
  packages_per_layer: number | null;
8911
+ packing_configuration_id: string;
7653
8912
  product_id: string | null;
7654
8913
  tenant_id: string;
7655
8914
  trade_item_floriday_id: string | null;
@@ -7660,11 +8919,13 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7660
8919
  created_at?: string;
7661
8920
  id?: string;
7662
8921
  is_package?: boolean;
8922
+ label?: string | null;
7663
8923
  layers_per_load_carrier?: number | null;
7664
8924
  load_carrier?: string | null;
7665
8925
  package_id?: string | null;
7666
8926
  package_label?: string | null;
7667
8927
  packages_per_layer?: number | null;
8928
+ packing_configuration_id?: string;
7668
8929
  product_id?: string | null;
7669
8930
  tenant_id: string;
7670
8931
  trade_item_floriday_id?: string | null;
@@ -7675,11 +8936,13 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7675
8936
  created_at?: string;
7676
8937
  id?: string;
7677
8938
  is_package?: boolean;
8939
+ label?: string | null;
7678
8940
  layers_per_load_carrier?: number | null;
7679
8941
  load_carrier?: string | null;
7680
8942
  package_id?: string | null;
7681
8943
  package_label?: string | null;
7682
8944
  packages_per_layer?: number | null;
8945
+ packing_configuration_id?: string;
7683
8946
  product_id?: string | null;
7684
8947
  tenant_id?: string;
7685
8948
  trade_item_floriday_id?: string | null;
@@ -7741,8 +9004,6 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7741
9004
  crates_per_layer: number;
7742
9005
  created_at: string;
7743
9006
  custom_fields: import("./types").Json;
7744
- floriday_active: boolean;
7745
- floriday_payload: import("./types").Json;
7746
9007
  floriday_trade_item_id: string | null;
7747
9008
  id: string;
7748
9009
  image_url: string | null;
@@ -7769,8 +9030,6 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7769
9030
  crates_per_layer?: number;
7770
9031
  created_at?: string;
7771
9032
  custom_fields?: import("./types").Json;
7772
- floriday_active?: boolean;
7773
- floriday_payload?: import("./types").Json;
7774
9033
  floriday_trade_item_id?: string | null;
7775
9034
  id?: string;
7776
9035
  image_url?: string | null;
@@ -7797,8 +9056,6 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7797
9056
  crates_per_layer?: number;
7798
9057
  created_at?: string;
7799
9058
  custom_fields?: import("./types").Json;
7800
- floriday_active?: boolean;
7801
- floriday_payload?: import("./types").Json;
7802
9059
  floriday_trade_item_id?: string | null;
7803
9060
  id?: string;
7804
9061
  image_url?: string | null;
@@ -7823,6 +9080,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7823
9080
  profiles: {
7824
9081
  Row: {
7825
9082
  address: string | null;
9083
+ avatar_url: string | null;
7826
9084
  created_at: string;
7827
9085
  display_name: string | null;
7828
9086
  email: string | null;
@@ -7834,6 +9092,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7834
9092
  };
7835
9093
  Insert: {
7836
9094
  address?: string | null;
9095
+ avatar_url?: string | null;
7837
9096
  created_at?: string;
7838
9097
  display_name?: string | null;
7839
9098
  email?: string | null;
@@ -7845,6 +9104,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7845
9104
  };
7846
9105
  Update: {
7847
9106
  address?: string | null;
9107
+ avatar_url?: string | null;
7848
9108
  created_at?: string;
7849
9109
  display_name?: string | null;
7850
9110
  email?: string | null;
@@ -8709,7 +9969,6 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
8709
9969
  order_id: string | null;
8710
9970
  order_item_id: string | null;
8711
9971
  order_source: string | null;
8712
- parent_trade_item_key: string | null;
8713
9972
  physical_after: number | null;
8714
9973
  physical_before: number | null;
8715
9974
  production_batch_id: string | null;
@@ -8728,7 +9987,6 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
8728
9987
  order_id?: string | null;
8729
9988
  order_item_id?: string | null;
8730
9989
  order_source?: string | null;
8731
- parent_trade_item_key?: string | null;
8732
9990
  physical_after?: number | null;
8733
9991
  physical_before?: number | null;
8734
9992
  production_batch_id?: string | null;
@@ -8747,7 +10005,6 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
8747
10005
  order_id?: string | null;
8748
10006
  order_item_id?: string | null;
8749
10007
  order_source?: string | null;
8750
- parent_trade_item_key?: string | null;
8751
10008
  physical_after?: number | null;
8752
10009
  physical_before?: number | null;
8753
10010
  production_batch_id?: string | null;
@@ -8852,6 +10109,27 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
8852
10109
  };
8853
10110
  Relationships: [];
8854
10111
  };
10112
+ technician_rates: {
10113
+ Row: {
10114
+ created_at: string;
10115
+ hourly_rate_cents: number;
10116
+ updated_at: string;
10117
+ user_id: string;
10118
+ };
10119
+ Insert: {
10120
+ created_at?: string;
10121
+ hourly_rate_cents?: number;
10122
+ updated_at?: string;
10123
+ user_id: string;
10124
+ };
10125
+ Update: {
10126
+ created_at?: string;
10127
+ hourly_rate_cents?: number;
10128
+ updated_at?: string;
10129
+ user_id?: string;
10130
+ };
10131
+ Relationships: [];
10132
+ };
8855
10133
  tenants: {
8856
10134
  Row: {
8857
10135
  created_at: string;
@@ -9056,6 +10334,48 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9056
10334
  };
9057
10335
  Relationships: [];
9058
10336
  };
10337
+ trade_item_prices: {
10338
+ Row: {
10339
+ created_at: string;
10340
+ currency: string;
10341
+ id: string;
10342
+ last_push_error: string | null;
10343
+ last_pushed_at: string | null;
10344
+ price_group_id: string | null;
10345
+ price_per_piece: number;
10346
+ supply_line_id: string | null;
10347
+ trade_item_key: string;
10348
+ updated_at: string;
10349
+ user_id: string;
10350
+ };
10351
+ Insert: {
10352
+ created_at?: string;
10353
+ currency?: string;
10354
+ id?: string;
10355
+ last_push_error?: string | null;
10356
+ last_pushed_at?: string | null;
10357
+ price_group_id?: string | null;
10358
+ price_per_piece: number;
10359
+ supply_line_id?: string | null;
10360
+ trade_item_key: string;
10361
+ updated_at?: string;
10362
+ user_id: string;
10363
+ };
10364
+ Update: {
10365
+ created_at?: string;
10366
+ currency?: string;
10367
+ id?: string;
10368
+ last_push_error?: string | null;
10369
+ last_pushed_at?: string | null;
10370
+ price_group_id?: string | null;
10371
+ price_per_piece?: number;
10372
+ supply_line_id?: string | null;
10373
+ trade_item_key?: string;
10374
+ updated_at?: string;
10375
+ user_id?: string;
10376
+ };
10377
+ Relationships: [];
10378
+ };
9059
10379
  trade_item_stock: {
9060
10380
  Row: {
9061
10381
  connection_id: string;
@@ -9209,7 +10529,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9209
10529
  twinfield_connections: {
9210
10530
  Row: {
9211
10531
  access_token: string | null;
9212
- client_id: string | null;
10532
+ client_id: string;
9213
10533
  client_secret: string | null;
9214
10534
  cluster_uri: string | null;
9215
10535
  company_code: string | null;
@@ -9221,7 +10541,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9221
10541
  is_active: boolean;
9222
10542
  label: string | null;
9223
10543
  office_code: string | null;
9224
- redirect_uri: string | null;
10544
+ redirect_uri: string;
9225
10545
  refresh_token: string | null;
9226
10546
  token_expires_at: string | null;
9227
10547
  updated_at: string;
@@ -9229,7 +10549,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9229
10549
  };
9230
10550
  Insert: {
9231
10551
  access_token?: string | null;
9232
- client_id?: string | null;
10552
+ client_id: string;
9233
10553
  client_secret?: string | null;
9234
10554
  cluster_uri?: string | null;
9235
10555
  company_code?: string | null;
@@ -9241,7 +10561,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9241
10561
  is_active?: boolean;
9242
10562
  label?: string | null;
9243
10563
  office_code?: string | null;
9244
- redirect_uri?: string | null;
10564
+ redirect_uri: string;
9245
10565
  refresh_token?: string | null;
9246
10566
  token_expires_at?: string | null;
9247
10567
  updated_at?: string;
@@ -9249,7 +10569,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9249
10569
  };
9250
10570
  Update: {
9251
10571
  access_token?: string | null;
9252
- client_id?: string | null;
10572
+ client_id?: string;
9253
10573
  client_secret?: string | null;
9254
10574
  cluster_uri?: string | null;
9255
10575
  company_code?: string | null;
@@ -9261,7 +10581,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9261
10581
  is_active?: boolean;
9262
10582
  label?: string | null;
9263
10583
  office_code?: string | null;
9264
- redirect_uri?: string | null;
10584
+ redirect_uri?: string;
9265
10585
  refresh_token?: string | null;
9266
10586
  token_expires_at?: string | null;
9267
10587
  updated_at?: string;
@@ -9321,6 +10641,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9321
10641
  country: string | null;
9322
10642
  created_at: string;
9323
10643
  email: string | null;
10644
+ external_group_key: string | null;
9324
10645
  id: string;
9325
10646
  last_synced_at: string | null;
9326
10647
  name: string;
@@ -9339,6 +10660,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9339
10660
  country?: string | null;
9340
10661
  created_at?: string;
9341
10662
  email?: string | null;
10663
+ external_group_key?: string | null;
9342
10664
  id?: string;
9343
10665
  last_synced_at?: string | null;
9344
10666
  name: string;
@@ -9357,6 +10679,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9357
10679
  country?: string | null;
9358
10680
  created_at?: string;
9359
10681
  email?: string | null;
10682
+ external_group_key?: string | null;
9360
10683
  id?: string;
9361
10684
  last_synced_at?: string | null;
9362
10685
  name?: string;
@@ -9483,35 +10806,80 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9483
10806
  vat_rate: number | null;
9484
10807
  };
9485
10808
  Insert: {
9486
- article_code?: string | null;
10809
+ article_code?: string | null;
10810
+ connection_id: string;
10811
+ data?: import("./types").Json;
10812
+ description?: string | null;
10813
+ fetched_at?: string;
10814
+ invoice_number: string;
10815
+ line_number: number;
10816
+ line_total?: number | null;
10817
+ quantity?: number | null;
10818
+ unit_price?: number | null;
10819
+ vat_code?: string | null;
10820
+ vat_rate?: number | null;
10821
+ };
10822
+ Update: {
10823
+ article_code?: string | null;
10824
+ connection_id?: string;
10825
+ data?: import("./types").Json;
10826
+ description?: string | null;
10827
+ fetched_at?: string;
10828
+ invoice_number?: string;
10829
+ line_number?: number;
10830
+ line_total?: number | null;
10831
+ quantity?: number | null;
10832
+ unit_price?: number | null;
10833
+ vat_code?: string | null;
10834
+ vat_rate?: number | null;
10835
+ };
10836
+ Relationships: [{
10837
+ foreignKeyName: "twinfield_invoice_lines_cache_v2_connection_id_fkey";
10838
+ columns: ["connection_id"];
10839
+ isOneToOne: false;
10840
+ referencedRelation: "twinfield_connections";
10841
+ referencedColumns: ["id"];
10842
+ }];
10843
+ };
10844
+ twinfield_invoice_pdf_cache: {
10845
+ Row: {
10846
+ connection_id: string;
10847
+ created_at: string;
10848
+ fetched_at: string;
10849
+ id: string;
10850
+ invoice_number: string;
10851
+ last_accessed_at: string;
10852
+ object_path: string;
10853
+ office_code: string;
10854
+ size_bytes: number;
10855
+ updated_at: string;
10856
+ };
10857
+ Insert: {
9487
10858
  connection_id: string;
9488
- data?: import("./types").Json;
9489
- description?: string | null;
10859
+ created_at?: string;
9490
10860
  fetched_at?: string;
10861
+ id?: string;
9491
10862
  invoice_number: string;
9492
- line_number: number;
9493
- line_total?: number | null;
9494
- quantity?: number | null;
9495
- unit_price?: number | null;
9496
- vat_code?: string | null;
9497
- vat_rate?: number | null;
10863
+ last_accessed_at?: string;
10864
+ object_path: string;
10865
+ office_code: string;
10866
+ size_bytes?: number;
10867
+ updated_at?: string;
9498
10868
  };
9499
10869
  Update: {
9500
- article_code?: string | null;
9501
10870
  connection_id?: string;
9502
- data?: import("./types").Json;
9503
- description?: string | null;
10871
+ created_at?: string;
9504
10872
  fetched_at?: string;
10873
+ id?: string;
9505
10874
  invoice_number?: string;
9506
- line_number?: number;
9507
- line_total?: number | null;
9508
- quantity?: number | null;
9509
- unit_price?: number | null;
9510
- vat_code?: string | null;
9511
- vat_rate?: number | null;
10875
+ last_accessed_at?: string;
10876
+ object_path?: string;
10877
+ office_code?: string;
10878
+ size_bytes?: number;
10879
+ updated_at?: string;
9512
10880
  };
9513
10881
  Relationships: [{
9514
- foreignKeyName: "twinfield_invoice_lines_cache_v2_connection_id_fkey";
10882
+ foreignKeyName: "twinfield_invoice_pdf_cache_connection_id_fkey";
9515
10883
  columns: ["connection_id"];
9516
10884
  isOneToOne: false;
9517
10885
  referencedRelation: "twinfield_connections";
@@ -9521,6 +10889,8 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9521
10889
  twinfield_invoice_settings: {
9522
10890
  Row: {
9523
10891
  created_at: string;
10892
+ debtor_gl_account: string;
10893
+ default_credit_invoice_type: string | null;
9524
10894
  default_gl_account: string;
9525
10895
  default_invoice_type: string;
9526
10896
  default_payment_term_days: number;
@@ -9529,11 +10899,15 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9529
10899
  invoice_enabled_fo: boolean;
9530
10900
  invoice_enabled_ho: boolean;
9531
10901
  invoice_enabled_mo: boolean;
10902
+ payment_gl_account: string;
10903
+ payment_journal_code: string;
9532
10904
  updated_at: string;
9533
10905
  user_id: string;
9534
10906
  };
9535
10907
  Insert: {
9536
10908
  created_at?: string;
10909
+ debtor_gl_account?: string;
10910
+ default_credit_invoice_type?: string | null;
9537
10911
  default_gl_account?: string;
9538
10912
  default_invoice_type?: string;
9539
10913
  default_payment_term_days?: number;
@@ -9542,11 +10916,15 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9542
10916
  invoice_enabled_fo?: boolean;
9543
10917
  invoice_enabled_ho?: boolean;
9544
10918
  invoice_enabled_mo?: boolean;
10919
+ payment_gl_account?: string;
10920
+ payment_journal_code?: string;
9545
10921
  updated_at?: string;
9546
10922
  user_id: string;
9547
10923
  };
9548
10924
  Update: {
9549
10925
  created_at?: string;
10926
+ debtor_gl_account?: string;
10927
+ default_credit_invoice_type?: string | null;
9550
10928
  default_gl_account?: string;
9551
10929
  default_invoice_type?: string;
9552
10930
  default_payment_term_days?: number;
@@ -9555,6 +10933,8 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9555
10933
  invoice_enabled_fo?: boolean;
9556
10934
  invoice_enabled_ho?: boolean;
9557
10935
  invoice_enabled_mo?: boolean;
10936
+ payment_gl_account?: string;
10937
+ payment_journal_code?: string;
9558
10938
  updated_at?: string;
9559
10939
  user_id?: string;
9560
10940
  };
@@ -9775,43 +11155,49 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9775
11155
  };
9776
11156
  twinfield_push_queue: {
9777
11157
  Row: {
11158
+ action: string;
9778
11159
  attempts: number;
9779
11160
  connection_id: string;
9780
11161
  created_at: string;
11162
+ customer_id: string | null;
9781
11163
  external_id: string | null;
9782
11164
  id: string;
9783
11165
  idempotency_key: string;
9784
11166
  last_error: string | null;
9785
11167
  next_attempt_at: string;
9786
- office_code: string;
11168
+ office_code: string | null;
9787
11169
  payload: import("./types").Json;
9788
11170
  status: string;
9789
11171
  updated_at: string;
9790
11172
  };
9791
11173
  Insert: {
11174
+ action?: string;
9792
11175
  attempts?: number;
9793
11176
  connection_id: string;
9794
11177
  created_at?: string;
11178
+ customer_id?: string | null;
9795
11179
  external_id?: string | null;
9796
11180
  id?: string;
9797
11181
  idempotency_key: string;
9798
11182
  last_error?: string | null;
9799
11183
  next_attempt_at?: string;
9800
- office_code: string;
11184
+ office_code?: string | null;
9801
11185
  payload: import("./types").Json;
9802
11186
  status?: string;
9803
11187
  updated_at?: string;
9804
11188
  };
9805
11189
  Update: {
11190
+ action?: string;
9806
11191
  attempts?: number;
9807
11192
  connection_id?: string;
9808
11193
  created_at?: string;
11194
+ customer_id?: string | null;
9809
11195
  external_id?: string | null;
9810
11196
  id?: string;
9811
11197
  idempotency_key?: string;
9812
11198
  last_error?: string | null;
9813
11199
  next_attempt_at?: string;
9814
- office_code?: string;
11200
+ office_code?: string | null;
9815
11201
  payload?: import("./types").Json;
9816
11202
  status?: string;
9817
11203
  updated_at?: string;
@@ -9822,6 +11208,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9822
11208
  isOneToOne: false;
9823
11209
  referencedRelation: "twinfield_connections";
9824
11210
  referencedColumns: ["id"];
11211
+ }, {
11212
+ foreignKeyName: "twinfield_push_queue_customer_id_fkey";
11213
+ columns: ["customer_id"];
11214
+ isOneToOne: false;
11215
+ referencedRelation: "customers";
11216
+ referencedColumns: ["id"];
9825
11217
  }];
9826
11218
  };
9827
11219
  twinfield_request_metrics: {
@@ -10030,72 +11422,420 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10030
11422
  size_bytes?: number | null;
10031
11423
  };
10032
11424
  Update: {
10033
- action?: string;
10034
- attempt_number?: number;
10035
- caller?: string;
10036
- client_user_id?: string | null;
10037
- content_type?: string | null;
11425
+ action?: string;
11426
+ attempt_number?: number;
11427
+ caller?: string;
11428
+ client_user_id?: string | null;
11429
+ content_type?: string | null;
11430
+ created_at?: string;
11431
+ environment?: string;
11432
+ error_message?: string | null;
11433
+ filename?: string | null;
11434
+ id?: string;
11435
+ idempotency_key?: string | null;
11436
+ module?: string;
11437
+ path?: string;
11438
+ reference_id?: string | null;
11439
+ request_body_hash?: string | null;
11440
+ request_timestamp?: number | null;
11441
+ response_content_type?: string | null;
11442
+ response_status?: number | null;
11443
+ size_bytes?: number | null;
11444
+ };
11445
+ Relationships: [];
11446
+ };
11447
+ voorraad_publish_attempts: {
11448
+ Row: {
11449
+ action: string;
11450
+ connection_id: string | null;
11451
+ created_at: string;
11452
+ error: string | null;
11453
+ gateway_attempt_id: string | null;
11454
+ gateway_status: number | null;
11455
+ id: string;
11456
+ intent: string;
11457
+ ok: boolean;
11458
+ request_summary: import("./types").Json | null;
11459
+ trade_item_id: string | null;
11460
+ user_id: string;
11461
+ };
11462
+ Insert: {
11463
+ action: string;
11464
+ connection_id?: string | null;
11465
+ created_at?: string;
11466
+ error?: string | null;
11467
+ gateway_attempt_id?: string | null;
11468
+ gateway_status?: number | null;
11469
+ id?: string;
11470
+ intent: string;
11471
+ ok: boolean;
11472
+ request_summary?: import("./types").Json | null;
11473
+ trade_item_id?: string | null;
11474
+ user_id: string;
11475
+ };
11476
+ Update: {
11477
+ action?: string;
11478
+ connection_id?: string | null;
11479
+ created_at?: string;
11480
+ error?: string | null;
11481
+ gateway_attempt_id?: string | null;
11482
+ gateway_status?: number | null;
11483
+ id?: string;
11484
+ intent?: string;
11485
+ ok?: boolean;
11486
+ request_summary?: import("./types").Json | null;
11487
+ trade_item_id?: string | null;
11488
+ user_id?: string;
11489
+ };
11490
+ Relationships: [];
11491
+ };
11492
+ werkbon_package_ai_rules: {
11493
+ Row: {
11494
+ active: boolean;
11495
+ case_sensitive: boolean;
11496
+ created_at: string;
11497
+ id: string;
11498
+ package_id: string;
11499
+ priority: number;
11500
+ rule_type: string;
11501
+ updated_at: string;
11502
+ value: string;
11503
+ };
11504
+ Insert: {
11505
+ active?: boolean;
11506
+ case_sensitive?: boolean;
11507
+ created_at?: string;
11508
+ id?: string;
11509
+ package_id: string;
11510
+ priority?: number;
11511
+ rule_type: string;
11512
+ updated_at?: string;
11513
+ value: string;
11514
+ };
11515
+ Update: {
11516
+ active?: boolean;
11517
+ case_sensitive?: boolean;
11518
+ created_at?: string;
11519
+ id?: string;
11520
+ package_id?: string;
11521
+ priority?: number;
11522
+ rule_type?: string;
11523
+ updated_at?: string;
11524
+ value?: string;
11525
+ };
11526
+ Relationships: [{
11527
+ foreignKeyName: "werkbon_package_ai_rules_package_id_fkey";
11528
+ columns: ["package_id"];
11529
+ isOneToOne: false;
11530
+ referencedRelation: "werkbon_packages";
11531
+ referencedColumns: ["id"];
11532
+ }];
11533
+ };
11534
+ werkbon_package_categories: {
11535
+ Row: {
11536
+ active: boolean;
11537
+ created_at: string;
11538
+ id: string;
11539
+ kleur: string | null;
11540
+ naam: string;
11541
+ sort_order: number;
11542
+ updated_at: string;
11543
+ };
11544
+ Insert: {
11545
+ active?: boolean;
11546
+ created_at?: string;
11547
+ id?: string;
11548
+ kleur?: string | null;
11549
+ naam: string;
11550
+ sort_order?: number;
11551
+ updated_at?: string;
11552
+ };
11553
+ Update: {
11554
+ active?: boolean;
11555
+ created_at?: string;
11556
+ id?: string;
11557
+ kleur?: string | null;
11558
+ naam?: string;
11559
+ sort_order?: number;
11560
+ updated_at?: string;
11561
+ };
11562
+ Relationships: [];
11563
+ };
11564
+ werkbon_package_lines: {
11565
+ Row: {
11566
+ created_at: string;
11567
+ created_by: string | null;
11568
+ id: string;
11569
+ package_id: string;
11570
+ quantity: number;
11571
+ unit_price_cents_snapshot: number;
11572
+ werkbon_id: string;
11573
+ };
11574
+ Insert: {
11575
+ created_at?: string;
11576
+ created_by?: string | null;
11577
+ id?: string;
11578
+ package_id: string;
11579
+ quantity?: number;
11580
+ unit_price_cents_snapshot?: number;
11581
+ werkbon_id: string;
11582
+ };
11583
+ Update: {
11584
+ created_at?: string;
11585
+ created_by?: string | null;
11586
+ id?: string;
11587
+ package_id?: string;
11588
+ quantity?: number;
11589
+ unit_price_cents_snapshot?: number;
11590
+ werkbon_id?: string;
11591
+ };
11592
+ Relationships: [{
11593
+ foreignKeyName: "werkbon_package_lines_package_id_fkey";
11594
+ columns: ["package_id"];
11595
+ isOneToOne: false;
11596
+ referencedRelation: "werkbon_packages";
11597
+ referencedColumns: ["id"];
11598
+ }, {
11599
+ foreignKeyName: "werkbon_package_lines_werkbon_id_fkey";
11600
+ columns: ["werkbon_id"];
11601
+ isOneToOne: false;
11602
+ referencedRelation: "werkbonnen";
11603
+ referencedColumns: ["id"];
11604
+ }];
11605
+ };
11606
+ werkbon_packages: {
11607
+ Row: {
11608
+ active: boolean;
11609
+ ai_tags: string[];
11610
+ category_id: string | null;
11611
+ code: string;
11612
+ created_at: string;
11613
+ default_quantity: number;
11614
+ description: string | null;
11615
+ duration_minutes: number | null;
11616
+ id: string;
11617
+ mandaat_type: string | null;
11618
+ name: string;
11619
+ sort_order: number;
11620
+ unit_price_cents: number;
11621
+ updated_at: string;
11622
+ };
11623
+ Insert: {
11624
+ active?: boolean;
11625
+ ai_tags?: string[];
11626
+ category_id?: string | null;
11627
+ code: string;
11628
+ created_at?: string;
11629
+ default_quantity?: number;
11630
+ description?: string | null;
11631
+ duration_minutes?: number | null;
11632
+ id?: string;
11633
+ mandaat_type?: string | null;
11634
+ name: string;
11635
+ sort_order?: number;
11636
+ unit_price_cents?: number;
11637
+ updated_at?: string;
11638
+ };
11639
+ Update: {
11640
+ active?: boolean;
11641
+ ai_tags?: string[];
11642
+ category_id?: string | null;
11643
+ code?: string;
11644
+ created_at?: string;
11645
+ default_quantity?: number;
11646
+ description?: string | null;
11647
+ duration_minutes?: number | null;
11648
+ id?: string;
11649
+ mandaat_type?: string | null;
11650
+ name?: string;
11651
+ sort_order?: number;
11652
+ unit_price_cents?: number;
11653
+ updated_at?: string;
11654
+ };
11655
+ Relationships: [{
11656
+ foreignKeyName: "werkbon_packages_category_id_fkey";
11657
+ columns: ["category_id"];
11658
+ isOneToOne: false;
11659
+ referencedRelation: "werkbon_package_categories";
11660
+ referencedColumns: ["id"];
11661
+ }];
11662
+ };
11663
+ werkbon_photos: {
11664
+ Row: {
11665
+ created_at: string;
11666
+ id: string;
11667
+ storage_path: string;
11668
+ user_id: string;
11669
+ werkbon_id: string;
11670
+ };
11671
+ Insert: {
11672
+ created_at?: string;
11673
+ id?: string;
11674
+ storage_path: string;
11675
+ user_id: string;
11676
+ werkbon_id: string;
11677
+ };
11678
+ Update: {
11679
+ created_at?: string;
11680
+ id?: string;
11681
+ storage_path?: string;
11682
+ user_id?: string;
11683
+ werkbon_id?: string;
11684
+ };
11685
+ Relationships: [{
11686
+ foreignKeyName: "werkbon_photos_werkbon_id_fkey";
11687
+ columns: ["werkbon_id"];
11688
+ isOneToOne: false;
11689
+ referencedRelation: "werkbonnen";
11690
+ referencedColumns: ["id"];
11691
+ }];
11692
+ };
11693
+ werkbon_time_logs: {
11694
+ Row: {
11695
+ activity: string;
11696
+ created_at: string;
11697
+ ended_at: string | null;
11698
+ id: string;
11699
+ started_at: string;
11700
+ user_id: string;
11701
+ werkbon_id: string;
11702
+ };
11703
+ Insert: {
11704
+ activity: string;
11705
+ created_at?: string;
11706
+ ended_at?: string | null;
11707
+ id?: string;
11708
+ started_at?: string;
11709
+ user_id: string;
11710
+ werkbon_id: string;
11711
+ };
11712
+ Update: {
11713
+ activity?: string;
10038
11714
  created_at?: string;
10039
- environment?: string;
10040
- error_message?: string | null;
10041
- filename?: string | null;
11715
+ ended_at?: string | null;
10042
11716
  id?: string;
10043
- idempotency_key?: string | null;
10044
- module?: string;
10045
- path?: string;
10046
- reference_id?: string | null;
10047
- request_body_hash?: string | null;
10048
- request_timestamp?: number | null;
10049
- response_content_type?: string | null;
10050
- response_status?: number | null;
10051
- size_bytes?: number | null;
11717
+ started_at?: string;
11718
+ user_id?: string;
11719
+ werkbon_id?: string;
10052
11720
  };
10053
- Relationships: [];
11721
+ Relationships: [{
11722
+ foreignKeyName: "werkbon_time_logs_werkbon_id_fkey";
11723
+ columns: ["werkbon_id"];
11724
+ isOneToOne: false;
11725
+ referencedRelation: "werkbonnen";
11726
+ referencedColumns: ["id"];
11727
+ }];
10054
11728
  };
10055
- voorraad_publish_attempts: {
11729
+ werkbonnen: {
10056
11730
  Row: {
10057
- action: string;
10058
- connection_id: string | null;
11731
+ assigned_user_id: string | null;
11732
+ budget_mandate_cents: number;
11733
+ complaint_description: string | null;
10059
11734
  created_at: string;
10060
- error: string | null;
10061
- gateway_attempt_id: string | null;
10062
- gateway_status: number | null;
11735
+ created_by: string | null;
11736
+ customer_id: string | null;
11737
+ externe_referentie: string | null;
11738
+ first_time_fix: boolean | null;
10063
11739
  id: string;
10064
- intent: string;
10065
- ok: boolean;
10066
- request_summary: import("./types").Json | null;
10067
- trade_item_id: string | null;
10068
- user_id: string;
11740
+ internal_notes: string | null;
11741
+ parent_werkbon_id: string | null;
11742
+ parsed_payload: import("./types").Json | null;
11743
+ planning_status: string;
11744
+ project_number: string | null;
11745
+ room_number: string | null;
11746
+ scheduled_end_time: string | null;
11747
+ scheduled_start_time: string | null;
11748
+ sequence_number: number;
11749
+ source_email_meta: import("./types").Json | null;
11750
+ source_mailbox_message_id: string | null;
11751
+ source_pdf_path: string | null;
11752
+ source_type: string;
11753
+ status: string;
11754
+ technician_id: string | null;
11755
+ technician_notes: string | null;
11756
+ technician_notes_raw: string | null;
11757
+ technician_task_description: string | null;
11758
+ updated_at: string;
11759
+ version: number;
11760
+ work_address: string | null;
10069
11761
  };
10070
11762
  Insert: {
10071
- action: string;
10072
- connection_id?: string | null;
11763
+ assigned_user_id?: string | null;
11764
+ budget_mandate_cents?: number;
11765
+ complaint_description?: string | null;
10073
11766
  created_at?: string;
10074
- error?: string | null;
10075
- gateway_attempt_id?: string | null;
10076
- gateway_status?: number | null;
11767
+ created_by?: string | null;
11768
+ customer_id?: string | null;
11769
+ externe_referentie?: string | null;
11770
+ first_time_fix?: boolean | null;
10077
11771
  id?: string;
10078
- intent: string;
10079
- ok: boolean;
10080
- request_summary?: import("./types").Json | null;
10081
- trade_item_id?: string | null;
10082
- user_id: string;
11772
+ internal_notes?: string | null;
11773
+ parent_werkbon_id?: string | null;
11774
+ parsed_payload?: import("./types").Json | null;
11775
+ planning_status?: string;
11776
+ project_number?: string | null;
11777
+ room_number?: string | null;
11778
+ scheduled_end_time?: string | null;
11779
+ scheduled_start_time?: string | null;
11780
+ sequence_number: number;
11781
+ source_email_meta?: import("./types").Json | null;
11782
+ source_mailbox_message_id?: string | null;
11783
+ source_pdf_path?: string | null;
11784
+ source_type?: string;
11785
+ status?: string;
11786
+ technician_id?: string | null;
11787
+ technician_notes?: string | null;
11788
+ technician_notes_raw?: string | null;
11789
+ technician_task_description?: string | null;
11790
+ updated_at?: string;
11791
+ version?: number;
11792
+ work_address?: string | null;
10083
11793
  };
10084
11794
  Update: {
10085
- action?: string;
10086
- connection_id?: string | null;
11795
+ assigned_user_id?: string | null;
11796
+ budget_mandate_cents?: number;
11797
+ complaint_description?: string | null;
10087
11798
  created_at?: string;
10088
- error?: string | null;
10089
- gateway_attempt_id?: string | null;
10090
- gateway_status?: number | null;
11799
+ created_by?: string | null;
11800
+ customer_id?: string | null;
11801
+ externe_referentie?: string | null;
11802
+ first_time_fix?: boolean | null;
10091
11803
  id?: string;
10092
- intent?: string;
10093
- ok?: boolean;
10094
- request_summary?: import("./types").Json | null;
10095
- trade_item_id?: string | null;
10096
- user_id?: string;
11804
+ internal_notes?: string | null;
11805
+ parent_werkbon_id?: string | null;
11806
+ parsed_payload?: import("./types").Json | null;
11807
+ planning_status?: string;
11808
+ project_number?: string | null;
11809
+ room_number?: string | null;
11810
+ scheduled_end_time?: string | null;
11811
+ scheduled_start_time?: string | null;
11812
+ sequence_number?: number;
11813
+ source_email_meta?: import("./types").Json | null;
11814
+ source_mailbox_message_id?: string | null;
11815
+ source_pdf_path?: string | null;
11816
+ source_type?: string;
11817
+ status?: string;
11818
+ technician_id?: string | null;
11819
+ technician_notes?: string | null;
11820
+ technician_notes_raw?: string | null;
11821
+ technician_task_description?: string | null;
11822
+ updated_at?: string;
11823
+ version?: number;
11824
+ work_address?: string | null;
10097
11825
  };
10098
- Relationships: [];
11826
+ Relationships: [{
11827
+ foreignKeyName: "werkbonnen_parent_werkbon_id_fkey";
11828
+ columns: ["parent_werkbon_id"];
11829
+ isOneToOne: false;
11830
+ referencedRelation: "werkbonnen";
11831
+ referencedColumns: ["id"];
11832
+ }, {
11833
+ foreignKeyName: "werkbonnen_source_mailbox_message_id_fkey";
11834
+ columns: ["source_mailbox_message_id"];
11835
+ isOneToOne: false;
11836
+ referencedRelation: "mailbox_messages";
11837
+ referencedColumns: ["id"];
11838
+ }];
10099
11839
  };
10100
11840
  work_order_monteurs: {
10101
11841
  Row: {
@@ -10267,6 +12007,8 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10267
12007
  created_at: string | null;
10268
12008
  created_by: string | null;
10269
12009
  display_name: string | null;
12010
+ graph_subscription_expires_at: string | null;
12011
+ graph_subscription_id: string | null;
10270
12012
  has_access_token: boolean | null;
10271
12013
  has_client_id: boolean | null;
10272
12014
  has_client_secret: boolean | null;
@@ -10284,6 +12026,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10284
12026
  oauth_mode: string | null;
10285
12027
  provider: string | null;
10286
12028
  purpose_assignments: import("./types").Json | null;
12029
+ realtime_mode: string | null;
10287
12030
  scopes: string[] | null;
10288
12031
  smtp_host: string | null;
10289
12032
  smtp_port: number | null;
@@ -10298,6 +12041,8 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10298
12041
  created_at?: string | null;
10299
12042
  created_by?: string | null;
10300
12043
  display_name?: string | null;
12044
+ graph_subscription_expires_at?: string | null;
12045
+ graph_subscription_id?: string | null;
10301
12046
  has_access_token?: never;
10302
12047
  has_client_id?: never;
10303
12048
  has_client_secret?: never;
@@ -10315,6 +12060,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10315
12060
  oauth_mode?: string | null;
10316
12061
  provider?: string | null;
10317
12062
  purpose_assignments?: import("./types").Json | null;
12063
+ realtime_mode?: string | null;
10318
12064
  scopes?: string[] | null;
10319
12065
  smtp_host?: string | null;
10320
12066
  smtp_port?: number | null;
@@ -10329,6 +12075,8 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10329
12075
  created_at?: string | null;
10330
12076
  created_by?: string | null;
10331
12077
  display_name?: string | null;
12078
+ graph_subscription_expires_at?: string | null;
12079
+ graph_subscription_id?: string | null;
10332
12080
  has_access_token?: never;
10333
12081
  has_client_id?: never;
10334
12082
  has_client_secret?: never;
@@ -10346,6 +12094,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10346
12094
  oauth_mode?: string | null;
10347
12095
  provider?: string | null;
10348
12096
  purpose_assignments?: import("./types").Json | null;
12097
+ realtime_mode?: string | null;
10349
12098
  scopes?: string[] | null;
10350
12099
  smtp_host?: string | null;
10351
12100
  smtp_port?: number | null;
@@ -10456,6 +12205,25 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10456
12205
  };
10457
12206
  Relationships: [];
10458
12207
  };
12208
+ floriday_customer_discounts: {
12209
+ Row: {
12210
+ base_price: number | null;
12211
+ buyer_organization_id: string | null;
12212
+ currency: string | null;
12213
+ discount_type: string | null;
12214
+ discount_value: number | null;
12215
+ min_quantity: number | null;
12216
+ net_price: number | null;
12217
+ product_group_id: string | null;
12218
+ raw: import("./types").Json | null;
12219
+ source: string | null;
12220
+ source_id: string | null;
12221
+ trade_item_id: string | null;
12222
+ valid_from: string | null;
12223
+ valid_until: string | null;
12224
+ };
12225
+ Relationships: [];
12226
+ };
10459
12227
  local_customer_discounts: {
10460
12228
  Row: {
10461
12229
  base_price: number | null;
@@ -10792,6 +12560,21 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10792
12560
  };
10793
12561
  Returns: string;
10794
12562
  };
12563
+ ai_usage_by_module: {
12564
+ Args: {
12565
+ _from: string;
12566
+ _to: string;
12567
+ };
12568
+ Returns: {
12569
+ calls: number;
12570
+ consumer_module_id: string;
12571
+ cost_usd: number;
12572
+ errors: number;
12573
+ input_tokens: number;
12574
+ output_tokens: number;
12575
+ total_tokens: number;
12576
+ }[];
12577
+ };
10795
12578
  apply_stock_consumption: {
10796
12579
  Args: {
10797
12580
  p_order_id: string;
@@ -10849,6 +12632,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10849
12632
  processed_items: number;
10850
12633
  }[];
10851
12634
  };
12635
+ calculate_layer_stock: {
12636
+ Args: {
12637
+ p_product_id: string;
12638
+ };
12639
+ Returns: number;
12640
+ };
10852
12641
  call_exact_route: {
10853
12642
  Args: {
10854
12643
  path: string;
@@ -10877,6 +12666,33 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10877
12666
  };
10878
12667
  Returns: import("./types").Json;
10879
12668
  };
12669
+ claim_twinfield_push_batch: {
12670
+ Args: {
12671
+ _limit?: number;
12672
+ };
12673
+ Returns: {
12674
+ action: string;
12675
+ attempts: number;
12676
+ connection_id: string;
12677
+ created_at: string;
12678
+ customer_id: string | null;
12679
+ external_id: string | null;
12680
+ id: string;
12681
+ idempotency_key: string;
12682
+ last_error: string | null;
12683
+ next_attempt_at: string;
12684
+ office_code: string | null;
12685
+ payload: import("./types").Json;
12686
+ status: string;
12687
+ updated_at: string;
12688
+ }[];
12689
+ SetofOptions: {
12690
+ from: "*";
12691
+ to: "twinfield_push_queue";
12692
+ isOneToOne: false;
12693
+ isSetofReturn: true;
12694
+ };
12695
+ };
10880
12696
  cleanup_old_bookings: {
10881
12697
  Args: never;
10882
12698
  Returns: undefined;
@@ -10935,6 +12751,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10935
12751
  Args: never;
10936
12752
  Returns: string;
10937
12753
  };
12754
+ custom_access_token_hook: {
12755
+ Args: {
12756
+ event: import("./types").Json;
12757
+ };
12758
+ Returns: import("./types").Json;
12759
+ };
10938
12760
  dashboard_alert_counts: {
10939
12761
  Args: never;
10940
12762
  Returns: import("./types").Json;
@@ -11002,6 +12824,16 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
11002
12824
  status: string;
11003
12825
  }[];
11004
12826
  };
12827
+ email_auth_upsert_connection: {
12828
+ Args: {
12829
+ _account_email: string;
12830
+ _created_by: string;
12831
+ _is_active: boolean;
12832
+ _provider: string;
12833
+ _status: string;
12834
+ };
12835
+ Returns: string;
12836
+ };
11005
12837
  enqueue_cart_replan_if_unlocked: {
11006
12838
  Args: {
11007
12839
  p_order_id: string;
@@ -11121,6 +12953,19 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
11121
12953
  resource: string;
11122
12954
  }[];
11123
12955
  };
12956
+ get_floriday_agreements_active: {
12957
+ Args: {
12958
+ p_on_date?: string;
12959
+ };
12960
+ Returns: {
12961
+ buyer_organization_id: string;
12962
+ data: import("./types").Json;
12963
+ floriday_id: string;
12964
+ status: string;
12965
+ valid_from: string;
12966
+ valid_until: string;
12967
+ }[];
12968
+ };
11124
12969
  get_floriday_clock_supplies_window: {
11125
12970
  Args: {
11126
12971
  p_from: string;
@@ -11208,6 +13053,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
11208
13053
  };
11209
13054
  Returns: string;
11210
13055
  };
13056
+ get_inventory_stock_for_key: {
13057
+ Args: {
13058
+ p_key: string;
13059
+ };
13060
+ Returns: number;
13061
+ };
11211
13062
  get_offer_by_link_code: {
11212
13063
  Args: {
11213
13064
  p_code: string;
@@ -11238,6 +13089,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
11238
13089
  };
11239
13090
  Returns: string;
11240
13091
  };
13092
+ get_product_group_available_stock: {
13093
+ Args: {
13094
+ p_group_id: string;
13095
+ };
13096
+ Returns: number;
13097
+ };
11241
13098
  get_room_busy_windows: {
11242
13099
  Args: {
11243
13100
  p_from: string;
@@ -11269,6 +13126,14 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
11269
13126
  };
11270
13127
  Returns: string;
11271
13128
  };
13129
+ has_module_permission: {
13130
+ Args: {
13131
+ _min: string;
13132
+ _module_id: string;
13133
+ _user_id: string;
13134
+ };
13135
+ Returns: boolean;
13136
+ };
11272
13137
  has_role: {
11273
13138
  Args: {
11274
13139
  _role: Database["public"]["Enums"]["app_role"];
@@ -11276,6 +13141,10 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
11276
13141
  };
11277
13142
  Returns: boolean;
11278
13143
  };
13144
+ has_twinfield_link: {
13145
+ Args: never;
13146
+ Returns: boolean;
13147
+ };
11279
13148
  is_authenticated: {
11280
13149
  Args: never;
11281
13150
  Returns: boolean;
@@ -11290,6 +13159,37 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
11290
13159
  };
11291
13160
  Returns: boolean;
11292
13161
  };
13162
+ jwt_has_role: {
13163
+ Args: {
13164
+ _role: Database["public"]["Enums"]["app_role"];
13165
+ };
13166
+ Returns: boolean;
13167
+ };
13168
+ list_monteurs: {
13169
+ Args: never;
13170
+ Returns: {
13171
+ avatar_url: string;
13172
+ display_name: string;
13173
+ email: string;
13174
+ id: string;
13175
+ }[];
13176
+ };
13177
+ list_my_planning_items: {
13178
+ Args: {
13179
+ _from: string;
13180
+ _to: string;
13181
+ };
13182
+ Returns: {
13183
+ assigned_monteur_id: string;
13184
+ end_at: string;
13185
+ id: string;
13186
+ notes: string;
13187
+ role: string;
13188
+ start_at: string;
13189
+ status: Database["public"]["Enums"]["planning_item_status"];
13190
+ werkbon_id: string;
13191
+ }[];
13192
+ };
11293
13193
  local_effective_price: {
11294
13194
  Args: {
11295
13195
  _customer_id: string;
@@ -11306,6 +13206,22 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
11306
13206
  source_id: string;
11307
13207
  }[];
11308
13208
  };
13209
+ log_ai_call: {
13210
+ Args: {
13211
+ _consumer_module_id: string;
13212
+ _cost_usd: number;
13213
+ _duration_ms: number;
13214
+ _error_code: string;
13215
+ _error_message: string;
13216
+ _input_tokens: number;
13217
+ _model_slug: string;
13218
+ _output_tokens: number;
13219
+ _provider_slug: string;
13220
+ _status: string;
13221
+ _total_tokens: number;
13222
+ };
13223
+ Returns: string;
13224
+ };
11309
13225
  mark_offer_clicked: {
11310
13226
  Args: {
11311
13227
  p_code: string;
@@ -11357,6 +13273,10 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
11357
13273
  };
11358
13274
  Returns: string;
11359
13275
  };
13276
+ next_twinfield_code: {
13277
+ Args: never;
13278
+ Returns: string;
13279
+ };
11360
13280
  next_work_order_number: {
11361
13281
  Args: {
11362
13282
  p_parent_work_order_id?: string;
@@ -11413,6 +13333,15 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
11413
13333
  };
11414
13334
  Returns: undefined;
11415
13335
  };
13336
+ pickstation_resolve_delivery_orders: {
13337
+ Args: {
13338
+ p_sales_order_ids: string[];
13339
+ };
13340
+ Returns: {
13341
+ delivery_order_id: string;
13342
+ sales_order_id: string;
13343
+ }[];
13344
+ };
11416
13345
  pickstation_set_cart_status: {
11417
13346
  Args: {
11418
13347
  p_cart_index: number;
@@ -11483,6 +13412,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
11483
13412
  };
11484
13413
  Returns: number;
11485
13414
  };
13415
+ reorder_customer_price_groups: {
13416
+ Args: {
13417
+ _ids: string[];
13418
+ };
13419
+ Returns: undefined;
13420
+ };
11486
13421
  reset_floriday_sync_cursor: {
11487
13422
  Args: {
11488
13423
  p_connection_id: string;
@@ -11518,6 +13453,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
11518
13453
  };
11519
13454
  Returns: string;
11520
13455
  };
13456
+ retry_twinfield_push: {
13457
+ Args: {
13458
+ _customer_id: string;
13459
+ };
13460
+ Returns: number;
13461
+ };
11521
13462
  reverse_production: {
11522
13463
  Args: {
11523
13464
  p_connection_id?: string;
@@ -11535,6 +13476,20 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
11535
13476
  };
11536
13477
  Returns: number;
11537
13478
  };
13479
+ schedule_floriday_agreement_calloffs_sync: {
13480
+ Args: {
13481
+ p_apikey: string;
13482
+ p_url: string;
13483
+ };
13484
+ Returns: number;
13485
+ };
13486
+ schedule_floriday_agreements_sync: {
13487
+ Args: {
13488
+ p_apikey: string;
13489
+ p_url: string;
13490
+ };
13491
+ Returns: number;
13492
+ };
11538
13493
  schedule_floriday_base_items_sync: {
11539
13494
  Args: {
11540
13495
  p_apikey: string;
@@ -11781,6 +13736,17 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
11781
13736
  };
11782
13737
  Returns: number;
11783
13738
  };
13739
+ self_heal_floriday_links: {
13740
+ Args: never;
13741
+ Returns: number;
13742
+ };
13743
+ set_planning_status: {
13744
+ Args: {
13745
+ _id: string;
13746
+ _status: Database["public"]["Enums"]["planning_item_status"];
13747
+ };
13748
+ Returns: undefined;
13749
+ };
11784
13750
  show_limit: {
11785
13751
  Args: never;
11786
13752
  Returns: number;
@@ -11791,12 +13757,22 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
11791
13757
  };
11792
13758
  Returns: string[];
11793
13759
  };
13760
+ sync_all_layer_stocks: {
13761
+ Args: never;
13762
+ Returns: undefined;
13763
+ };
11794
13764
  sync_cached_packing_from_product: {
11795
13765
  Args: {
11796
13766
  p_product_id: string;
11797
13767
  };
11798
13768
  Returns: undefined;
11799
13769
  };
13770
+ sync_layer_stock: {
13771
+ Args: {
13772
+ p_product_id: string;
13773
+ };
13774
+ Returns: undefined;
13775
+ };
11800
13776
  sync_order_cart_item_packing_from_product: {
11801
13777
  Args: {
11802
13778
  p_product_id: string;
@@ -11840,9 +13816,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
11840
13816
  };
11841
13817
  };
11842
13818
  Enums: {
11843
- app_role: "admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie" | "monteur";
13819
+ app_role: "admin" | "planner" | "monteur" | "administratie" | "ai_admin";
11844
13820
  exact_env: "staging" | "live";
11845
13821
  exact_push_status: "pending" | "sent" | "error";
13822
+ itk_customer_segment: "Business" | "Private";
13823
+ itk_dynamic_field_type: "text" | "select" | "date" | "checkbox";
13824
+ planning_item_status: "gepland" | "bezig" | "afgerond" | "geannuleerd" | "concept" | "vrijgegeven";
11846
13825
  quote_status: "concept" | "verzonden" | "bekeken" | "in_behandeling" | "geaccepteerd" | "afgewezen" | "verlopen" | "gearchiveerd";
11847
13826
  };
11848
13827
  CompositeTypes: { [_ in never]: never; };