@flowselections/floriday-voorraad 1.0.22 → 1.0.26

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