@flowselections/floriday-voorraad 1.0.23 → 1.0.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/dist-lib/assets/floriday-logo.png.asset.json +4 -4
  2. package/dist-lib/components/TemplatePage.d.ts +1 -1
  3. package/dist-lib/components/TemplatePage.d.ts.map +1 -1
  4. package/dist-lib/components/voorraad/AdditionalPackagingDialog.d.ts +1 -1
  5. package/dist-lib/components/voorraad/AdditionalPackagingDialog.d.ts.map +1 -1
  6. package/dist-lib/components/voorraad/ArtikelCompositionCard.d.ts +1 -1
  7. package/dist-lib/components/voorraad/ArtikelCompositionCard.d.ts.map +1 -1
  8. package/dist-lib/components/voorraad/ArtikelWizard.d.ts +1 -1
  9. package/dist-lib/components/voorraad/ArtikelWizard.d.ts.map +1 -1
  10. package/dist-lib/components/voorraad/ArtikelWizard.js +633 -101
  11. package/dist-lib/components/voorraad/ConnectionBadge.d.ts +1 -1
  12. package/dist-lib/components/voorraad/ConnectionBadge.d.ts.map +1 -1
  13. package/dist-lib/components/voorraad/EditArtikelPage.d.ts +1 -1
  14. package/dist-lib/components/voorraad/EditArtikelPage.d.ts.map +1 -1
  15. package/dist-lib/components/voorraad/ExcelExportButton.d.ts +1 -1
  16. package/dist-lib/components/voorraad/ExcelExportButton.d.ts.map +1 -1
  17. package/dist-lib/components/voorraad/FloridayInfoCard.d.ts +1 -1
  18. package/dist-lib/components/voorraad/FloridayInfoCard.d.ts.map +1 -1
  19. package/dist-lib/components/voorraad/FloridayStatusBadge.d.ts +1 -1
  20. package/dist-lib/components/voorraad/FloridayStatusBadge.d.ts.map +1 -1
  21. package/dist-lib/components/voorraad/NieuwArtikelPage.d.ts +1 -1
  22. package/dist-lib/components/voorraad/NieuwArtikelPage.d.ts.map +1 -1
  23. package/dist-lib/components/voorraad/OrderHistoryCard.d.ts +1 -1
  24. package/dist-lib/components/voorraad/OrderHistoryCard.d.ts.map +1 -1
  25. package/dist-lib/components/voorraad/PriceStatusBadge.d.ts +1 -1
  26. package/dist-lib/components/voorraad/PriceStatusBadge.d.ts.map +1 -1
  27. package/dist-lib/components/voorraad/ProductLinkCard.d.ts +1 -1
  28. package/dist-lib/components/voorraad/ProductLinkCard.d.ts.map +1 -1
  29. package/dist-lib/components/voorraad/StepSamenstelling.d.ts +10 -0
  30. package/dist-lib/components/voorraad/StepSamenstelling.d.ts.map +1 -0
  31. package/dist-lib/components/voorraad/StepSamenstelling.js +333 -0
  32. package/dist-lib/components/voorraad/StockBulkButtons.d.ts +1 -1
  33. package/dist-lib/components/voorraad/StockBulkButtons.d.ts.map +1 -1
  34. package/dist-lib/components/voorraad/ValidationOverviewTable.d.ts +1 -1
  35. package/dist-lib/components/voorraad/ValidationOverviewTable.d.ts.map +1 -1
  36. package/dist-lib/components/voorraad/ValidationPage.d.ts +1 -1
  37. package/dist-lib/components/voorraad/ValidationPage.d.ts.map +1 -1
  38. package/dist-lib/components/voorraad/VoorraadDashboard.d.ts +1 -1
  39. package/dist-lib/components/voorraad/VoorraadDashboard.d.ts.map +1 -1
  40. package/dist-lib/components/voorraad/VoorraadPage.d.ts +1 -1
  41. package/dist-lib/components/voorraad/VoorraadPage.d.ts.map +1 -1
  42. package/dist-lib/components/voorraad/VoorraadPage.js +14 -3
  43. package/dist-lib/components/voorraad/VoorraadPagination.d.ts +1 -1
  44. package/dist-lib/components/voorraad/VoorraadPagination.d.ts.map +1 -1
  45. package/dist-lib/components/voorraad/VoorraadStockCard.d.ts +1 -1
  46. package/dist-lib/components/voorraad/VoorraadStockCard.d.ts.map +1 -1
  47. package/dist-lib/components/voorraad/VoorraadTable.d.ts +1 -1
  48. package/dist-lib/components/voorraad/VoorraadTable.d.ts.map +1 -1
  49. package/dist-lib/components/voorraad/VoorraadTable.js +6 -13
  50. package/dist-lib/hooks/useFloriday.d.ts +6 -6
  51. package/dist-lib/hooks/useFloriday.d.ts.map +1 -1
  52. package/dist-lib/hooks/useFloridayPriceGroups.d.ts +20 -0
  53. package/dist-lib/hooks/useFloridayPriceGroups.d.ts.map +1 -0
  54. package/dist-lib/hooks/useFloridayPriceGroups.js +55 -0
  55. package/dist-lib/hooks/useFloridayVbnRequired.d.ts +5 -0
  56. package/dist-lib/hooks/useFloridayVbnRequired.d.ts.map +1 -0
  57. package/dist-lib/hooks/useFloridayVbnRequired.js +16 -0
  58. package/dist-lib/hooks/useLocalTradeItems.d.ts.map +1 -1
  59. package/dist-lib/hooks/useLocalTradeItems.js +14 -0
  60. package/dist-lib/hooks/useTradeItemSpec.d.ts.map +1 -1
  61. package/dist-lib/hooks/useTradeItemSpec.js +48 -1
  62. package/dist-lib/hooks/useTradeItemSupplyLine.d.ts +1 -1
  63. package/dist-lib/hooks/useTradeItemSupplyLine.d.ts.map +1 -1
  64. package/dist-lib/hooks/useVbnRegulatoryFeatures.d.ts +1 -1
  65. package/dist-lib/hooks/useVbnRegulatoryFeatures.d.ts.map +1 -1
  66. package/dist-lib/integrations/supabase/auth-middleware.d.ts +2378 -361
  67. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
  68. package/dist-lib/integrations/supabase/client.d.ts +2378 -361
  69. package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
  70. package/dist-lib/integrations/supabase/client.server.d.ts +2378 -361
  71. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
  72. package/dist-lib/integrations/supabase/types.d.ts +2412 -344
  73. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  74. package/dist-lib/integrations/supabase/types.js +11 -9
  75. package/dist-lib/lib/centralSecrets.server.d.ts +21 -0
  76. package/dist-lib/lib/centralSecrets.server.d.ts.map +1 -0
  77. package/dist-lib/lib/centralSecrets.server.js +111 -0
  78. package/dist-lib/lib/floricode-required-features.functions.d.ts +2378 -367
  79. package/dist-lib/lib/floricode-required-features.functions.d.ts.map +1 -1
  80. package/dist-lib/lib/floriday-customer-offer.functions.d.ts +2380 -361
  81. package/dist-lib/lib/floriday-customer-offer.functions.d.ts.map +1 -1
  82. package/dist-lib/lib/floriday-gateway.functions.d.ts +10760 -675
  83. package/dist-lib/lib/floriday-gateway.functions.d.ts.map +1 -1
  84. package/dist-lib/lib/floriday-gateway.server.d.ts.map +1 -1
  85. package/dist-lib/lib/floriday-gateway.server.js +34 -9
  86. package/dist-lib/lib/floriday-payload.d.ts +21 -3
  87. package/dist-lib/lib/floriday-payload.d.ts.map +1 -1
  88. package/dist-lib/lib/floriday-payload.js +167 -34
  89. package/dist-lib/lib/floriday-vbn-required.functions.d.ts +27769 -0
  90. package/dist-lib/lib/floriday-vbn-required.functions.d.ts.map +1 -0
  91. package/dist-lib/lib/floriday-vbn-required.functions.js +85 -0
  92. package/dist-lib/lib/floriday-warehouse.functions.d.ts +6542 -491
  93. package/dist-lib/lib/floriday-warehouse.functions.d.ts.map +1 -1
  94. package/dist-lib/lib/floriday-writes.functions.d.ts +4647 -612
  95. package/dist-lib/lib/floriday-writes.functions.d.ts.map +1 -1
  96. package/dist-lib/lib/floriday-writes.functions.js +36 -1
  97. package/dist-lib/lib/trade-item-prices.d.ts +43 -0
  98. package/dist-lib/lib/trade-item-prices.d.ts.map +1 -0
  99. package/dist-lib/lib/trade-item-prices.js +229 -0
  100. package/package.json +3 -3
  101. package/dist-lib/components/settings/VoorraadSettingsCard.d.ts +0 -2
  102. package/dist-lib/components/settings/VoorraadSettingsCard.d.ts.map +0 -1
  103. package/dist-lib/components/settings/VoorraadSettingsCard.js +0 -39
  104. package/dist-lib/components/voorraad/ConnectionPicker.d.ts +0 -8
  105. package/dist-lib/components/voorraad/ConnectionPicker.d.ts.map +0 -1
  106. package/dist-lib/components/voorraad/ConnectionPicker.js +0 -8
@@ -241,12 +241,98 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
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 supabase: import("@supabase/supabase-js").SupabaseClient<Da
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 supabase: import("@supabase/supabase-js").SupabaseClient<Da
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 supabase: import("@supabase/supabase-js").SupabaseClient<Da
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 supabase: import("@supabase/supabase-js").SupabaseClient<Da
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 supabase: import("@supabase/supabase-js").SupabaseClient<Da
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 supabase: import("@supabase/supabase-js").SupabaseClient<Da
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 supabase: import("@supabase/supabase-js").SupabaseClient<Da
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 supabase: import("@supabase/supabase-js").SupabaseClient<Da
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 supabase: import("@supabase/supabase-js").SupabaseClient<Da
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 supabase: import("@supabase/supabase-js").SupabaseClient<Da
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;
@@ -4700,8 +5324,6 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
4700
5324
  Row: {
4701
5325
  buyer_organization_id: string | null;
4702
5326
  connection_id: string;
4703
- controlled_at: string | null;
4704
- controlled_by: string | null;
4705
5327
  created_at: string;
4706
5328
  data: import("./types").Json;
4707
5329
  floriday_id: string;
@@ -4713,8 +5335,6 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
4713
5335
  Insert: {
4714
5336
  buyer_organization_id?: string | null;
4715
5337
  connection_id: string;
4716
- controlled_at?: string | null;
4717
- controlled_by?: string | null;
4718
5338
  created_at?: string;
4719
5339
  data: import("./types").Json;
4720
5340
  floriday_id: string;
@@ -4726,8 +5346,6 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
4726
5346
  Update: {
4727
5347
  buyer_organization_id?: string | null;
4728
5348
  connection_id?: string;
4729
- controlled_at?: string | null;
4730
- controlled_by?: string | null;
4731
5349
  created_at?: string;
4732
5350
  data?: import("./types").Json;
4733
5351
  floriday_id?: string;
@@ -4909,45 +5527,6 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
4909
5527
  referencedColumns: ["id"];
4910
5528
  }];
4911
5529
  };
4912
- floriday_trade_settings_customers_cache: {
4913
- Row: {
4914
- connection_id: string;
4915
- data: import("./types").Json;
4916
- fetched_at: string;
4917
- floriday_id: string;
4918
- id: string;
4919
- is_deleted: boolean;
4920
- sequence_number: number;
4921
- updated_at: string;
4922
- };
4923
- Insert: {
4924
- connection_id: string;
4925
- data: import("./types").Json;
4926
- fetched_at?: string;
4927
- floriday_id: string;
4928
- id?: string;
4929
- is_deleted?: boolean;
4930
- sequence_number?: number;
4931
- updated_at?: string;
4932
- };
4933
- Update: {
4934
- connection_id?: string;
4935
- data?: import("./types").Json;
4936
- fetched_at?: string;
4937
- floriday_id?: string;
4938
- id?: string;
4939
- is_deleted?: boolean;
4940
- sequence_number?: number;
4941
- updated_at?: string;
4942
- };
4943
- Relationships: [{
4944
- foreignKeyName: "floriday_trade_settings_customers_cache_connection_id_fkey";
4945
- columns: ["connection_id"];
4946
- isOneToOne: false;
4947
- referencedRelation: "floriday_connections";
4948
- referencedColumns: ["id"];
4949
- }];
4950
- };
4951
5530
  floriday_trips_cache: {
4952
5531
  Row: {
4953
5532
  carrier_organization_id: string | null;
@@ -4996,6 +5575,27 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
4996
5575
  referencedColumns: ["id"];
4997
5576
  }];
4998
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
+ };
4999
5599
  floriday_warehouses_cache: {
5000
5600
  Row: {
5001
5601
  connection_id: string;
@@ -5476,172 +6076,454 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
5476
6076
  };
5477
6077
  Relationships: [];
5478
6078
  };
5479
- local_customer_agreements: {
6079
+ itk_contact_persons: {
5480
6080
  Row: {
5481
- base_price: number | null;
5482
6081
  created_at: string;
5483
- currency: string;
5484
6082
  customer_id: string;
6083
+ email: string | null;
5485
6084
  id: string;
5486
- min_quantity: number;
5487
- net_price: number;
5488
- notes: string | null;
5489
- product_category_id: string | null;
5490
- product_id: string | null;
6085
+ name: string;
6086
+ phone: string | null;
6087
+ role: string | null;
5491
6088
  updated_at: string;
5492
- valid_from: string | null;
5493
- valid_until: string | null;
5494
6089
  };
5495
6090
  Insert: {
5496
- base_price?: number | null;
5497
6091
  created_at?: string;
5498
- currency?: string;
5499
6092
  customer_id: string;
6093
+ email?: string | null;
5500
6094
  id?: string;
5501
- min_quantity?: number;
5502
- net_price: number;
5503
- notes?: string | null;
5504
- product_category_id?: string | null;
5505
- product_id?: string | null;
6095
+ name: string;
6096
+ phone?: string | null;
6097
+ role?: string | null;
5506
6098
  updated_at?: string;
5507
- valid_from?: string | null;
5508
- valid_until?: string | null;
5509
6099
  };
5510
6100
  Update: {
5511
- base_price?: number | null;
5512
6101
  created_at?: string;
5513
- currency?: string;
5514
6102
  customer_id?: string;
6103
+ email?: string | null;
5515
6104
  id?: string;
5516
- min_quantity?: number;
5517
- net_price?: number;
5518
- notes?: string | null;
5519
- product_category_id?: string | null;
5520
- product_id?: string | null;
6105
+ name?: string;
6106
+ phone?: string | null;
6107
+ role?: string | null;
5521
6108
  updated_at?: string;
5522
- valid_from?: string | null;
5523
- valid_until?: string | null;
5524
6109
  };
5525
6110
  Relationships: [{
5526
- foreignKeyName: "local_customer_agreements_customer_id_fkey";
6111
+ foreignKeyName: "itk_contact_persons_customer_id_fkey";
5527
6112
  columns: ["customer_id"];
5528
6113
  isOneToOne: false;
5529
- referencedRelation: "customers";
5530
- referencedColumns: ["id"];
5531
- }, {
5532
- foreignKeyName: "local_customer_agreements_product_category_id_fkey";
5533
- columns: ["product_category_id"];
5534
- isOneToOne: false;
5535
- referencedRelation: "product_categories";
5536
- referencedColumns: ["id"];
5537
- }, {
5538
- foreignKeyName: "local_customer_agreements_product_id_fkey";
5539
- columns: ["product_id"];
5540
- isOneToOne: false;
5541
- referencedRelation: "products";
6114
+ referencedRelation: "itk_customers";
5542
6115
  referencedColumns: ["id"];
5543
6116
  }];
5544
6117
  };
5545
- local_customer_price_groups: {
6118
+ itk_customer_dynamic_values: {
5546
6119
  Row: {
5547
6120
  created_at: string;
5548
- currency: string;
5549
6121
  customer_id: string;
5550
- discount_type: string;
5551
- discount_value: number;
6122
+ field_id: string;
5552
6123
  id: string;
5553
- min_quantity: number;
5554
- notes: string | null;
5555
- product_category_id: string | null;
5556
- product_id: string | null;
5557
6124
  updated_at: string;
5558
- valid_from: string | null;
5559
- valid_until: string | null;
6125
+ value: string | null;
5560
6126
  };
5561
6127
  Insert: {
5562
6128
  created_at?: string;
5563
- currency?: string;
5564
6129
  customer_id: string;
5565
- discount_type: string;
5566
- discount_value: number;
6130
+ field_id: string;
5567
6131
  id?: string;
5568
- min_quantity?: number;
5569
- notes?: string | null;
5570
- product_category_id?: string | null;
5571
- product_id?: string | null;
5572
6132
  updated_at?: string;
5573
- valid_from?: string | null;
5574
- valid_until?: string | null;
6133
+ value?: string | null;
5575
6134
  };
5576
6135
  Update: {
5577
6136
  created_at?: string;
5578
- currency?: string;
5579
6137
  customer_id?: string;
5580
- discount_type?: string;
5581
- discount_value?: number;
6138
+ field_id?: string;
5582
6139
  id?: string;
5583
- min_quantity?: number;
5584
- notes?: string | null;
5585
- product_category_id?: string | null;
5586
- product_id?: string | null;
5587
6140
  updated_at?: string;
5588
- valid_from?: string | null;
5589
- valid_until?: string | null;
6141
+ value?: string | null;
5590
6142
  };
5591
6143
  Relationships: [{
5592
- foreignKeyName: "local_customer_price_groups_customer_id_fkey";
6144
+ foreignKeyName: "itk_customer_dynamic_values_customer_id_fkey";
5593
6145
  columns: ["customer_id"];
5594
6146
  isOneToOne: false;
5595
- referencedRelation: "customers";
5596
- referencedColumns: ["id"];
5597
- }, {
5598
- foreignKeyName: "local_customer_price_groups_product_category_id_fkey";
5599
- columns: ["product_category_id"];
5600
- isOneToOne: false;
5601
- referencedRelation: "product_categories";
6147
+ referencedRelation: "itk_customers";
5602
6148
  referencedColumns: ["id"];
5603
6149
  }, {
5604
- foreignKeyName: "local_customer_price_groups_product_id_fkey";
5605
- columns: ["product_id"];
6150
+ foreignKeyName: "itk_customer_dynamic_values_field_id_fkey";
6151
+ columns: ["field_id"];
5606
6152
  isOneToOne: false;
5607
- referencedRelation: "products";
6153
+ referencedRelation: "itk_dynamic_fields";
5608
6154
  referencedColumns: ["id"];
5609
6155
  }];
5610
6156
  };
5611
- local_customer_sales_strategies: {
6157
+ itk_customer_notes: {
5612
6158
  Row: {
6159
+ body: string;
5613
6160
  created_at: string;
5614
- currency: string;
6161
+ created_by: string | null;
5615
6162
  customer_id: string;
5616
- discount_type: string;
5617
- discount_value: number;
5618
6163
  id: string;
5619
- min_quantity: number;
5620
- notes: string | null;
5621
- product_category_id: string | null;
5622
- product_id: string | null;
6164
+ note_type: string;
5623
6165
  updated_at: string;
5624
- valid_from: string | null;
5625
- valid_until: string | null;
5626
6166
  };
5627
6167
  Insert: {
6168
+ body: string;
5628
6169
  created_at?: string;
5629
- currency?: string;
6170
+ created_by?: string | null;
5630
6171
  customer_id: string;
5631
- discount_type: string;
5632
- discount_value: number;
5633
6172
  id?: string;
5634
- min_quantity?: number;
5635
- notes?: string | null;
5636
- product_category_id?: string | null;
5637
- product_id?: string | null;
6173
+ note_type?: string;
5638
6174
  updated_at?: string;
5639
- valid_from?: string | null;
5640
- valid_until?: string | null;
5641
6175
  };
5642
6176
  Update: {
6177
+ body?: string;
5643
6178
  created_at?: string;
5644
- currency?: string;
6179
+ created_by?: string | null;
6180
+ customer_id?: string;
6181
+ id?: string;
6182
+ note_type?: string;
6183
+ updated_at?: string;
6184
+ };
6185
+ Relationships: [{
6186
+ foreignKeyName: "itk_customer_notes_customer_id_fkey";
6187
+ columns: ["customer_id"];
6188
+ isOneToOne: false;
6189
+ referencedRelation: "itk_customers";
6190
+ referencedColumns: ["id"];
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";
6424
+ referencedColumns: ["id"];
6425
+ }];
6426
+ };
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;
5645
6527
  customer_id?: string;
5646
6528
  discount_type?: string;
5647
6529
  discount_value?: number;
@@ -5670,31 +6552,310 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
5670
6552
  foreignKeyName: "local_customer_sales_strategies_product_id_fkey";
5671
6553
  columns: ["product_id"];
5672
6554
  isOneToOne: false;
5673
- referencedRelation: "products";
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: {
6776
+ Row: {
6777
+ condition_expression: string | null;
6778
+ created_at: string;
6779
+ end_date: string | null;
6780
+ id: string;
6781
+ is_enabled: boolean;
6782
+ priority: number;
6783
+ rule_type: string;
6784
+ start_date: string | null;
6785
+ strategy_id: string;
6786
+ updated_at: string;
6787
+ user_id: string;
6788
+ };
6789
+ Insert: {
6790
+ condition_expression?: string | null;
6791
+ created_at?: string;
6792
+ end_date?: string | null;
6793
+ id?: string;
6794
+ is_enabled?: boolean;
6795
+ priority?: number;
6796
+ rule_type: string;
6797
+ start_date?: string | null;
6798
+ strategy_id: string;
6799
+ updated_at?: string;
6800
+ user_id: string;
6801
+ };
6802
+ Update: {
6803
+ condition_expression?: string | null;
6804
+ created_at?: string;
6805
+ end_date?: string | null;
6806
+ id?: string;
6807
+ is_enabled?: boolean;
6808
+ priority?: number;
6809
+ rule_type?: string;
6810
+ start_date?: string | null;
6811
+ strategy_id?: string;
6812
+ updated_at?: string;
6813
+ user_id?: string;
6814
+ };
6815
+ Relationships: [{
6816
+ foreignKeyName: "logistics_strategy_schedules_strategy_id_fkey";
6817
+ columns: ["strategy_id"];
6818
+ isOneToOne: false;
6819
+ referencedRelation: "logistics_strategies";
5674
6820
  referencedColumns: ["id"];
5675
6821
  }];
5676
6822
  };
5677
- locations: {
6823
+ logistics_variables: {
5678
6824
  Row: {
5679
6825
  created_at: string;
6826
+ default_value: string | null;
6827
+ description: string | null;
5680
6828
  id: string;
5681
- name: string;
5682
- sort_order: number;
6829
+ is_builtin: boolean;
6830
+ key: string;
6831
+ label: string;
5683
6832
  updated_at: string;
6833
+ user_id: string;
6834
+ value_type: string;
5684
6835
  };
5685
6836
  Insert: {
5686
6837
  created_at?: string;
6838
+ default_value?: string | null;
6839
+ description?: string | null;
5687
6840
  id?: string;
5688
- name: string;
5689
- sort_order?: number;
6841
+ is_builtin?: boolean;
6842
+ key: string;
6843
+ label: string;
5690
6844
  updated_at?: string;
6845
+ user_id: string;
6846
+ value_type: string;
5691
6847
  };
5692
6848
  Update: {
5693
6849
  created_at?: string;
6850
+ default_value?: string | null;
6851
+ description?: string | null;
5694
6852
  id?: string;
5695
- name?: string;
5696
- sort_order?: number;
6853
+ is_builtin?: boolean;
6854
+ key?: string;
6855
+ label?: string;
5697
6856
  updated_at?: string;
6857
+ user_id?: string;
6858
+ value_type?: string;
5698
6859
  };
5699
6860
  Relationships: [];
5700
6861
  };
@@ -6093,60 +7254,66 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
6093
7254
  };
6094
7255
  manufacture_products: {
6095
7256
  Row: {
6096
- aantal_te_produceren: number;
6097
7257
  created_at: string;
6098
7258
  description: string | null;
6099
7259
  id: string;
6100
7260
  is_active: boolean;
6101
- location_id: string | null;
6102
7261
  name: string;
6103
- partij_nummer: string | null;
6104
- photos: import("./types").Json;
6105
7262
  produced_stock: number;
6106
7263
  product_code: string;
6107
7264
  tenant_id: string;
6108
- unit: string;
6109
7265
  updated_at: string;
6110
7266
  };
6111
7267
  Insert: {
6112
- aantal_te_produceren?: number;
6113
7268
  created_at?: string;
6114
7269
  description?: string | null;
6115
7270
  id?: string;
6116
7271
  is_active?: boolean;
6117
- location_id?: string | null;
6118
7272
  name: string;
6119
- partij_nummer?: string | null;
6120
- photos?: import("./types").Json;
6121
7273
  produced_stock?: number;
6122
7274
  product_code: string;
6123
7275
  tenant_id: string;
6124
- unit?: string;
6125
7276
  updated_at?: string;
6126
7277
  };
6127
7278
  Update: {
6128
- aantal_te_produceren?: number;
6129
7279
  created_at?: string;
6130
7280
  description?: string | null;
6131
7281
  id?: string;
6132
7282
  is_active?: boolean;
6133
- location_id?: string | null;
6134
7283
  name?: string;
6135
- partij_nummer?: string | null;
6136
- photos?: import("./types").Json;
6137
7284
  produced_stock?: number;
6138
7285
  product_code?: string;
6139
7286
  tenant_id?: string;
6140
- unit?: string;
6141
7287
  updated_at?: string;
6142
7288
  };
6143
- Relationships: [{
6144
- foreignKeyName: "manufacture_products_location_id_fkey";
6145
- columns: ["location_id"];
6146
- isOneToOne: false;
6147
- referencedRelation: "locations";
6148
- referencedColumns: ["id"];
6149
- }];
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: [];
6150
7317
  };
6151
7318
  monteurs: {
6152
7319
  Row: {
@@ -6877,6 +8044,42 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
6877
8044
  };
6878
8045
  Relationships: [];
6879
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
+ };
6880
8083
  order_cart_items: {
6881
8084
  Row: {
6882
8085
  cart_id: string;
@@ -6943,6 +8146,7 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
6943
8146
  order_carts: {
6944
8147
  Row: {
6945
8148
  algorithm_version: number;
8149
+ buffer_id: string | null;
6946
8150
  cart_number: number;
6947
8151
  created_at: string;
6948
8152
  id: string;
@@ -6950,13 +8154,14 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
6950
8154
  is_complete: boolean;
6951
8155
  notes: string | null;
6952
8156
  occupancy_pct: number;
6953
- order_id: string;
8157
+ order_id: string | null;
6954
8158
  source: string;
6955
8159
  total_layers_used: number;
6956
8160
  updated_at: string;
6957
8161
  };
6958
8162
  Insert: {
6959
8163
  algorithm_version?: number;
8164
+ buffer_id?: string | null;
6960
8165
  cart_number: number;
6961
8166
  created_at?: string;
6962
8167
  id?: string;
@@ -6964,13 +8169,14 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
6964
8169
  is_complete?: boolean;
6965
8170
  notes?: string | null;
6966
8171
  occupancy_pct?: number;
6967
- order_id: string;
8172
+ order_id?: string | null;
6968
8173
  source?: string;
6969
8174
  total_layers_used?: number;
6970
8175
  updated_at?: string;
6971
8176
  };
6972
8177
  Update: {
6973
8178
  algorithm_version?: number;
8179
+ buffer_id?: string | null;
6974
8180
  cart_number?: number;
6975
8181
  created_at?: string;
6976
8182
  id?: string;
@@ -6978,12 +8184,18 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
6978
8184
  is_complete?: boolean;
6979
8185
  notes?: string | null;
6980
8186
  occupancy_pct?: number;
6981
- order_id?: string;
8187
+ order_id?: string | null;
6982
8188
  source?: string;
6983
8189
  total_layers_used?: number;
6984
8190
  updated_at?: string;
6985
8191
  };
6986
8192
  Relationships: [{
8193
+ foreignKeyName: "order_carts_buffer_id_fkey";
8194
+ columns: ["buffer_id"];
8195
+ isOneToOne: false;
8196
+ referencedRelation: "order_buffers";
8197
+ referencedColumns: ["id"];
8198
+ }, {
6987
8199
  foreignKeyName: "order_carts_order_id_fkey";
6988
8200
  columns: ["order_id"];
6989
8201
  isOneToOne: false;
@@ -7221,12 +8433,14 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
7221
8433
  };
7222
8434
  orders: {
7223
8435
  Row: {
8436
+ buffer_id: string | null;
7224
8437
  created_at: string;
7225
8438
  custom_fields: import("./types").Json;
7226
8439
  customer_id: string | null;
7227
8440
  customer_name: string;
7228
8441
  deleted_at: string | null;
7229
8442
  delivery_date: string | null;
8443
+ floriday_sales_order_id: string | null;
7230
8444
  id: string;
7231
8445
  is_reservation: boolean;
7232
8446
  notes: string | null;
@@ -7240,12 +8454,14 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
7240
8454
  updated_at: string;
7241
8455
  };
7242
8456
  Insert: {
8457
+ buffer_id?: string | null;
7243
8458
  created_at?: string;
7244
8459
  custom_fields?: import("./types").Json;
7245
8460
  customer_id?: string | null;
7246
8461
  customer_name?: string;
7247
8462
  deleted_at?: string | null;
7248
8463
  delivery_date?: string | null;
8464
+ floriday_sales_order_id?: string | null;
7249
8465
  id?: string;
7250
8466
  is_reservation?: boolean;
7251
8467
  notes?: string | null;
@@ -7259,12 +8475,14 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
7259
8475
  updated_at?: string;
7260
8476
  };
7261
8477
  Update: {
8478
+ buffer_id?: string | null;
7262
8479
  created_at?: string;
7263
8480
  custom_fields?: import("./types").Json;
7264
8481
  customer_id?: string | null;
7265
8482
  customer_name?: string;
7266
8483
  deleted_at?: string | null;
7267
8484
  delivery_date?: string | null;
8485
+ floriday_sales_order_id?: string | null;
7268
8486
  id?: string;
7269
8487
  is_reservation?: boolean;
7270
8488
  notes?: string | null;
@@ -7278,6 +8496,12 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
7278
8496
  updated_at?: string;
7279
8497
  };
7280
8498
  Relationships: [{
8499
+ foreignKeyName: "orders_buffer_id_fkey";
8500
+ columns: ["buffer_id"];
8501
+ isOneToOne: false;
8502
+ referencedRelation: "order_buffers";
8503
+ referencedColumns: ["id"];
8504
+ }, {
7281
8505
  foreignKeyName: "orders_customer_id_fkey";
7282
8506
  columns: ["customer_id"];
7283
8507
  isOneToOne: false;
@@ -7408,6 +8632,78 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
7408
8632
  };
7409
8633
  Relationships: [];
7410
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
+ };
7411
8707
  product_bom_items: {
7412
8708
  Row: {
7413
8709
  component_product_id: string | null;
@@ -7415,6 +8711,7 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
7415
8711
  created_at: string;
7416
8712
  id: string;
7417
8713
  notes: string | null;
8714
+ packing_configuration_id: string | null;
7418
8715
  parent_product_id: string | null;
7419
8716
  parent_trade_item_floriday_id: string | null;
7420
8717
  quantity: number;
@@ -7429,6 +8726,7 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
7429
8726
  created_at?: string;
7430
8727
  id?: string;
7431
8728
  notes?: string | null;
8729
+ packing_configuration_id?: string | null;
7432
8730
  parent_product_id?: string | null;
7433
8731
  parent_trade_item_floriday_id?: string | null;
7434
8732
  quantity?: number;
@@ -7443,6 +8741,7 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
7443
8741
  created_at?: string;
7444
8742
  id?: string;
7445
8743
  notes?: string | null;
8744
+ packing_configuration_id?: string | null;
7446
8745
  parent_product_id?: string | null;
7447
8746
  parent_trade_item_floriday_id?: string | null;
7448
8747
  quantity?: number;
@@ -7644,11 +8943,13 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
7644
8943
  created_at: string;
7645
8944
  id: string;
7646
8945
  is_package: boolean;
8946
+ label: string | null;
7647
8947
  layers_per_load_carrier: number | null;
7648
8948
  load_carrier: string | null;
7649
8949
  package_id: string | null;
7650
8950
  package_label: string | null;
7651
8951
  packages_per_layer: number | null;
8952
+ packing_configuration_id: string;
7652
8953
  product_id: string | null;
7653
8954
  tenant_id: string;
7654
8955
  trade_item_floriday_id: string | null;
@@ -7659,11 +8960,13 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
7659
8960
  created_at?: string;
7660
8961
  id?: string;
7661
8962
  is_package?: boolean;
8963
+ label?: string | null;
7662
8964
  layers_per_load_carrier?: number | null;
7663
8965
  load_carrier?: string | null;
7664
8966
  package_id?: string | null;
7665
8967
  package_label?: string | null;
7666
8968
  packages_per_layer?: number | null;
8969
+ packing_configuration_id?: string;
7667
8970
  product_id?: string | null;
7668
8971
  tenant_id: string;
7669
8972
  trade_item_floriday_id?: string | null;
@@ -7674,11 +8977,13 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
7674
8977
  created_at?: string;
7675
8978
  id?: string;
7676
8979
  is_package?: boolean;
8980
+ label?: string | null;
7677
8981
  layers_per_load_carrier?: number | null;
7678
8982
  load_carrier?: string | null;
7679
8983
  package_id?: string | null;
7680
8984
  package_label?: string | null;
7681
8985
  packages_per_layer?: number | null;
8986
+ packing_configuration_id?: string;
7682
8987
  product_id?: string | null;
7683
8988
  tenant_id?: string;
7684
8989
  trade_item_floriday_id?: string | null;
@@ -7740,8 +9045,6 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
7740
9045
  crates_per_layer: number;
7741
9046
  created_at: string;
7742
9047
  custom_fields: import("./types").Json;
7743
- floriday_active: boolean;
7744
- floriday_payload: import("./types").Json;
7745
9048
  floriday_trade_item_id: string | null;
7746
9049
  id: string;
7747
9050
  image_url: string | null;
@@ -7768,8 +9071,6 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
7768
9071
  crates_per_layer?: number;
7769
9072
  created_at?: string;
7770
9073
  custom_fields?: import("./types").Json;
7771
- floriday_active?: boolean;
7772
- floriday_payload?: import("./types").Json;
7773
9074
  floriday_trade_item_id?: string | null;
7774
9075
  id?: string;
7775
9076
  image_url?: string | null;
@@ -7796,8 +9097,6 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
7796
9097
  crates_per_layer?: number;
7797
9098
  created_at?: string;
7798
9099
  custom_fields?: import("./types").Json;
7799
- floriday_active?: boolean;
7800
- floriday_payload?: import("./types").Json;
7801
9100
  floriday_trade_item_id?: string | null;
7802
9101
  id?: string;
7803
9102
  image_url?: string | null;
@@ -7822,6 +9121,7 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
7822
9121
  profiles: {
7823
9122
  Row: {
7824
9123
  address: string | null;
9124
+ avatar_url: string | null;
7825
9125
  created_at: string;
7826
9126
  display_name: string | null;
7827
9127
  email: string | null;
@@ -7833,6 +9133,7 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
7833
9133
  };
7834
9134
  Insert: {
7835
9135
  address?: string | null;
9136
+ avatar_url?: string | null;
7836
9137
  created_at?: string;
7837
9138
  display_name?: string | null;
7838
9139
  email?: string | null;
@@ -7844,6 +9145,7 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
7844
9145
  };
7845
9146
  Update: {
7846
9147
  address?: string | null;
9148
+ avatar_url?: string | null;
7847
9149
  created_at?: string;
7848
9150
  display_name?: string | null;
7849
9151
  email?: string | null;
@@ -8708,7 +10010,6 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
8708
10010
  order_id: string | null;
8709
10011
  order_item_id: string | null;
8710
10012
  order_source: string | null;
8711
- parent_trade_item_key: string | null;
8712
10013
  physical_after: number | null;
8713
10014
  physical_before: number | null;
8714
10015
  production_batch_id: string | null;
@@ -8727,7 +10028,6 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
8727
10028
  order_id?: string | null;
8728
10029
  order_item_id?: string | null;
8729
10030
  order_source?: string | null;
8730
- parent_trade_item_key?: string | null;
8731
10031
  physical_after?: number | null;
8732
10032
  physical_before?: number | null;
8733
10033
  production_batch_id?: string | null;
@@ -8746,7 +10046,6 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
8746
10046
  order_id?: string | null;
8747
10047
  order_item_id?: string | null;
8748
10048
  order_source?: string | null;
8749
- parent_trade_item_key?: string | null;
8750
10049
  physical_after?: number | null;
8751
10050
  physical_before?: number | null;
8752
10051
  production_batch_id?: string | null;
@@ -8851,6 +10150,27 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
8851
10150
  };
8852
10151
  Relationships: [];
8853
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
+ };
8854
10174
  tenants: {
8855
10175
  Row: {
8856
10176
  created_at: string;
@@ -9055,6 +10375,48 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
9055
10375
  };
9056
10376
  Relationships: [];
9057
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: {
10406
+ created_at?: string;
10407
+ currency?: string;
10408
+ id?: 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;
10415
+ updated_at?: string;
10416
+ user_id?: string;
10417
+ };
10418
+ Relationships: [];
10419
+ };
9058
10420
  trade_item_stock: {
9059
10421
  Row: {
9060
10422
  connection_id: string;
@@ -9208,7 +10570,7 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
9208
10570
  twinfield_connections: {
9209
10571
  Row: {
9210
10572
  access_token: string | null;
9211
- client_id: string | null;
10573
+ client_id: string;
9212
10574
  client_secret: string | null;
9213
10575
  cluster_uri: string | null;
9214
10576
  company_code: string | null;
@@ -9220,7 +10582,7 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
9220
10582
  is_active: boolean;
9221
10583
  label: string | null;
9222
10584
  office_code: string | null;
9223
- redirect_uri: string | null;
10585
+ redirect_uri: string;
9224
10586
  refresh_token: string | null;
9225
10587
  token_expires_at: string | null;
9226
10588
  updated_at: string;
@@ -9228,7 +10590,7 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
9228
10590
  };
9229
10591
  Insert: {
9230
10592
  access_token?: string | null;
9231
- client_id?: string | null;
10593
+ client_id: string;
9232
10594
  client_secret?: string | null;
9233
10595
  cluster_uri?: string | null;
9234
10596
  company_code?: string | null;
@@ -9240,7 +10602,7 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
9240
10602
  is_active?: boolean;
9241
10603
  label?: string | null;
9242
10604
  office_code?: string | null;
9243
- redirect_uri?: string | null;
10605
+ redirect_uri: string;
9244
10606
  refresh_token?: string | null;
9245
10607
  token_expires_at?: string | null;
9246
10608
  updated_at?: string;
@@ -9248,7 +10610,7 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
9248
10610
  };
9249
10611
  Update: {
9250
10612
  access_token?: string | null;
9251
- client_id?: string | null;
10613
+ client_id?: string;
9252
10614
  client_secret?: string | null;
9253
10615
  cluster_uri?: string | null;
9254
10616
  company_code?: string | null;
@@ -9260,7 +10622,7 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
9260
10622
  is_active?: boolean;
9261
10623
  label?: string | null;
9262
10624
  office_code?: string | null;
9263
- redirect_uri?: string | null;
10625
+ redirect_uri?: string;
9264
10626
  refresh_token?: string | null;
9265
10627
  token_expires_at?: string | null;
9266
10628
  updated_at?: string;
@@ -9320,6 +10682,7 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
9320
10682
  country: string | null;
9321
10683
  created_at: string;
9322
10684
  email: string | null;
10685
+ external_group_key: string | null;
9323
10686
  id: string;
9324
10687
  last_synced_at: string | null;
9325
10688
  name: string;
@@ -9338,6 +10701,7 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
9338
10701
  country?: string | null;
9339
10702
  created_at?: string;
9340
10703
  email?: string | null;
10704
+ external_group_key?: string | null;
9341
10705
  id?: string;
9342
10706
  last_synced_at?: string | null;
9343
10707
  name: string;
@@ -9356,6 +10720,7 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
9356
10720
  country?: string | null;
9357
10721
  created_at?: string;
9358
10722
  email?: string | null;
10723
+ external_group_key?: string | null;
9359
10724
  id?: string;
9360
10725
  last_synced_at?: string | null;
9361
10726
  name?: string;
@@ -9482,35 +10847,80 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
9482
10847
  vat_rate: number | null;
9483
10848
  };
9484
10849
  Insert: {
9485
- article_code?: string | null;
10850
+ article_code?: string | null;
10851
+ connection_id: string;
10852
+ data?: import("./types").Json;
10853
+ description?: string | null;
10854
+ fetched_at?: string;
10855
+ invoice_number: string;
10856
+ line_number: number;
10857
+ line_total?: number | null;
10858
+ quantity?: number | null;
10859
+ unit_price?: number | null;
10860
+ vat_code?: string | null;
10861
+ vat_rate?: number | null;
10862
+ };
10863
+ Update: {
10864
+ article_code?: string | null;
10865
+ connection_id?: string;
10866
+ data?: import("./types").Json;
10867
+ description?: string | null;
10868
+ fetched_at?: string;
10869
+ invoice_number?: string;
10870
+ line_number?: number;
10871
+ line_total?: number | null;
10872
+ quantity?: number | null;
10873
+ unit_price?: number | null;
10874
+ vat_code?: string | null;
10875
+ vat_rate?: number | null;
10876
+ };
10877
+ Relationships: [{
10878
+ foreignKeyName: "twinfield_invoice_lines_cache_v2_connection_id_fkey";
10879
+ columns: ["connection_id"];
10880
+ isOneToOne: false;
10881
+ referencedRelation: "twinfield_connections";
10882
+ referencedColumns: ["id"];
10883
+ }];
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: {
9486
10899
  connection_id: string;
9487
- data?: import("./types").Json;
9488
- description?: string | null;
10900
+ created_at?: string;
9489
10901
  fetched_at?: string;
10902
+ id?: string;
9490
10903
  invoice_number: string;
9491
- line_number: number;
9492
- line_total?: number | null;
9493
- quantity?: number | null;
9494
- unit_price?: number | null;
9495
- vat_code?: string | null;
9496
- vat_rate?: number | null;
10904
+ last_accessed_at?: string;
10905
+ object_path: string;
10906
+ office_code: string;
10907
+ size_bytes?: number;
10908
+ updated_at?: string;
9497
10909
  };
9498
10910
  Update: {
9499
- article_code?: string | null;
9500
10911
  connection_id?: string;
9501
- data?: import("./types").Json;
9502
- description?: string | null;
10912
+ created_at?: string;
9503
10913
  fetched_at?: string;
10914
+ id?: string;
9504
10915
  invoice_number?: string;
9505
- line_number?: number;
9506
- line_total?: number | null;
9507
- quantity?: number | null;
9508
- unit_price?: number | null;
9509
- vat_code?: string | null;
9510
- vat_rate?: number | null;
10916
+ last_accessed_at?: string;
10917
+ object_path?: string;
10918
+ office_code?: string;
10919
+ size_bytes?: number;
10920
+ updated_at?: string;
9511
10921
  };
9512
10922
  Relationships: [{
9513
- foreignKeyName: "twinfield_invoice_lines_cache_v2_connection_id_fkey";
10923
+ foreignKeyName: "twinfield_invoice_pdf_cache_connection_id_fkey";
9514
10924
  columns: ["connection_id"];
9515
10925
  isOneToOne: false;
9516
10926
  referencedRelation: "twinfield_connections";
@@ -9520,6 +10930,8 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
9520
10930
  twinfield_invoice_settings: {
9521
10931
  Row: {
9522
10932
  created_at: string;
10933
+ debtor_gl_account: string;
10934
+ default_credit_invoice_type: string | null;
9523
10935
  default_gl_account: string;
9524
10936
  default_invoice_type: string;
9525
10937
  default_payment_term_days: number;
@@ -9528,11 +10940,15 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
9528
10940
  invoice_enabled_fo: boolean;
9529
10941
  invoice_enabled_ho: boolean;
9530
10942
  invoice_enabled_mo: boolean;
10943
+ payment_gl_account: string;
10944
+ payment_journal_code: string;
9531
10945
  updated_at: string;
9532
10946
  user_id: string;
9533
10947
  };
9534
10948
  Insert: {
9535
10949
  created_at?: string;
10950
+ debtor_gl_account?: string;
10951
+ default_credit_invoice_type?: string | null;
9536
10952
  default_gl_account?: string;
9537
10953
  default_invoice_type?: string;
9538
10954
  default_payment_term_days?: number;
@@ -9541,11 +10957,15 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
9541
10957
  invoice_enabled_fo?: boolean;
9542
10958
  invoice_enabled_ho?: boolean;
9543
10959
  invoice_enabled_mo?: boolean;
10960
+ payment_gl_account?: string;
10961
+ payment_journal_code?: string;
9544
10962
  updated_at?: string;
9545
10963
  user_id: string;
9546
10964
  };
9547
10965
  Update: {
9548
10966
  created_at?: string;
10967
+ debtor_gl_account?: string;
10968
+ default_credit_invoice_type?: string | null;
9549
10969
  default_gl_account?: string;
9550
10970
  default_invoice_type?: string;
9551
10971
  default_payment_term_days?: number;
@@ -9554,6 +10974,8 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
9554
10974
  invoice_enabled_fo?: boolean;
9555
10975
  invoice_enabled_ho?: boolean;
9556
10976
  invoice_enabled_mo?: boolean;
10977
+ payment_gl_account?: string;
10978
+ payment_journal_code?: string;
9557
10979
  updated_at?: string;
9558
10980
  user_id?: string;
9559
10981
  };
@@ -9774,43 +11196,49 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
9774
11196
  };
9775
11197
  twinfield_push_queue: {
9776
11198
  Row: {
11199
+ action: string;
9777
11200
  attempts: number;
9778
11201
  connection_id: string;
9779
11202
  created_at: string;
11203
+ customer_id: string | null;
9780
11204
  external_id: string | null;
9781
11205
  id: string;
9782
11206
  idempotency_key: string;
9783
11207
  last_error: string | null;
9784
11208
  next_attempt_at: string;
9785
- office_code: string;
11209
+ office_code: string | null;
9786
11210
  payload: import("./types").Json;
9787
11211
  status: string;
9788
11212
  updated_at: string;
9789
11213
  };
9790
11214
  Insert: {
11215
+ action?: string;
9791
11216
  attempts?: number;
9792
11217
  connection_id: string;
9793
11218
  created_at?: string;
11219
+ customer_id?: string | null;
9794
11220
  external_id?: string | null;
9795
11221
  id?: string;
9796
11222
  idempotency_key: string;
9797
11223
  last_error?: string | null;
9798
11224
  next_attempt_at?: string;
9799
- office_code: string;
11225
+ office_code?: string | null;
9800
11226
  payload: import("./types").Json;
9801
11227
  status?: string;
9802
11228
  updated_at?: string;
9803
11229
  };
9804
11230
  Update: {
11231
+ action?: string;
9805
11232
  attempts?: number;
9806
11233
  connection_id?: string;
9807
11234
  created_at?: string;
11235
+ customer_id?: string | null;
9808
11236
  external_id?: string | null;
9809
11237
  id?: string;
9810
11238
  idempotency_key?: string;
9811
11239
  last_error?: string | null;
9812
11240
  next_attempt_at?: string;
9813
- office_code?: string;
11241
+ office_code?: string | null;
9814
11242
  payload?: import("./types").Json;
9815
11243
  status?: string;
9816
11244
  updated_at?: string;
@@ -9821,6 +11249,12 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
9821
11249
  isOneToOne: false;
9822
11250
  referencedRelation: "twinfield_connections";
9823
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"];
9824
11258
  }];
9825
11259
  };
9826
11260
  twinfield_request_metrics: {
@@ -10029,72 +11463,420 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
10029
11463
  size_bytes?: number | null;
10030
11464
  };
10031
11465
  Update: {
10032
- action?: string;
10033
- attempt_number?: number;
10034
- caller?: string;
10035
- client_user_id?: string | null;
10036
- content_type?: string | null;
11466
+ action?: string;
11467
+ attempt_number?: number;
11468
+ caller?: string;
11469
+ client_user_id?: string | null;
11470
+ content_type?: string | null;
11471
+ created_at?: string;
11472
+ environment?: string;
11473
+ error_message?: string | null;
11474
+ filename?: string | null;
11475
+ id?: string;
11476
+ idempotency_key?: string | null;
11477
+ module?: string;
11478
+ path?: string;
11479
+ reference_id?: string | null;
11480
+ request_body_hash?: string | null;
11481
+ request_timestamp?: number | null;
11482
+ response_content_type?: string | null;
11483
+ response_status?: number | null;
11484
+ size_bytes?: number | null;
11485
+ };
11486
+ Relationships: [];
11487
+ };
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: {
11735
+ Row: {
11736
+ activity: string;
11737
+ created_at: string;
11738
+ ended_at: string | null;
11739
+ id: string;
11740
+ started_at: string;
11741
+ user_id: string;
11742
+ werkbon_id: string;
11743
+ };
11744
+ Insert: {
11745
+ activity: string;
11746
+ created_at?: string;
11747
+ ended_at?: string | null;
11748
+ id?: string;
11749
+ started_at?: string;
11750
+ user_id: string;
11751
+ werkbon_id: string;
11752
+ };
11753
+ Update: {
11754
+ activity?: string;
10037
11755
  created_at?: string;
10038
- environment?: string;
10039
- error_message?: string | null;
10040
- filename?: string | null;
11756
+ ended_at?: string | null;
10041
11757
  id?: string;
10042
- idempotency_key?: string | null;
10043
- module?: string;
10044
- path?: string;
10045
- reference_id?: string | null;
10046
- request_body_hash?: string | null;
10047
- request_timestamp?: number | null;
10048
- response_content_type?: string | null;
10049
- response_status?: number | null;
10050
- size_bytes?: number | null;
11758
+ started_at?: string;
11759
+ user_id?: string;
11760
+ werkbon_id?: string;
10051
11761
  };
10052
- 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
+ }];
10053
11769
  };
10054
- voorraad_publish_attempts: {
11770
+ werkbonnen: {
10055
11771
  Row: {
10056
- action: string;
10057
- connection_id: string | null;
11772
+ assigned_user_id: string | null;
11773
+ budget_mandate_cents: number;
11774
+ complaint_description: string | null;
10058
11775
  created_at: string;
10059
- error: string | null;
10060
- gateway_attempt_id: string | null;
10061
- gateway_status: number | null;
11776
+ created_by: string | null;
11777
+ customer_id: string | null;
11778
+ externe_referentie: string | null;
11779
+ first_time_fix: boolean | null;
10062
11780
  id: string;
10063
- intent: string;
10064
- ok: boolean;
10065
- request_summary: import("./types").Json | null;
10066
- trade_item_id: string | null;
10067
- user_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;
10068
11802
  };
10069
11803
  Insert: {
10070
- action: string;
10071
- connection_id?: string | null;
11804
+ assigned_user_id?: string | null;
11805
+ budget_mandate_cents?: number;
11806
+ complaint_description?: string | null;
10072
11807
  created_at?: string;
10073
- error?: string | null;
10074
- gateway_attempt_id?: string | null;
10075
- gateway_status?: number | null;
11808
+ created_by?: string | null;
11809
+ customer_id?: string | null;
11810
+ externe_referentie?: string | null;
11811
+ first_time_fix?: boolean | null;
10076
11812
  id?: string;
10077
- intent: string;
10078
- ok: boolean;
10079
- request_summary?: import("./types").Json | null;
10080
- trade_item_id?: string | null;
10081
- user_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;
10082
11834
  };
10083
11835
  Update: {
10084
- action?: string;
10085
- connection_id?: string | null;
11836
+ assigned_user_id?: string | null;
11837
+ budget_mandate_cents?: number;
11838
+ complaint_description?: string | null;
10086
11839
  created_at?: string;
10087
- error?: string | null;
10088
- gateway_attempt_id?: string | null;
10089
- gateway_status?: number | null;
11840
+ created_by?: string | null;
11841
+ customer_id?: string | null;
11842
+ externe_referentie?: string | null;
11843
+ first_time_fix?: boolean | null;
10090
11844
  id?: string;
10091
- intent?: string;
10092
- ok?: boolean;
10093
- request_summary?: import("./types").Json | null;
10094
- trade_item_id?: string | null;
10095
- user_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;
10096
11866
  };
10097
- Relationships: [];
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
+ }];
10098
11880
  };
10099
11881
  work_order_monteurs: {
10100
11882
  Row: {
@@ -10266,6 +12048,8 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
10266
12048
  created_at: string | null;
10267
12049
  created_by: string | null;
10268
12050
  display_name: string | null;
12051
+ graph_subscription_expires_at: string | null;
12052
+ graph_subscription_id: string | null;
10269
12053
  has_access_token: boolean | null;
10270
12054
  has_client_id: boolean | null;
10271
12055
  has_client_secret: boolean | null;
@@ -10283,6 +12067,7 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
10283
12067
  oauth_mode: string | null;
10284
12068
  provider: string | null;
10285
12069
  purpose_assignments: import("./types").Json | null;
12070
+ realtime_mode: string | null;
10286
12071
  scopes: string[] | null;
10287
12072
  smtp_host: string | null;
10288
12073
  smtp_port: number | null;
@@ -10297,6 +12082,8 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
10297
12082
  created_at?: string | null;
10298
12083
  created_by?: string | null;
10299
12084
  display_name?: string | null;
12085
+ graph_subscription_expires_at?: string | null;
12086
+ graph_subscription_id?: string | null;
10300
12087
  has_access_token?: never;
10301
12088
  has_client_id?: never;
10302
12089
  has_client_secret?: never;
@@ -10314,6 +12101,7 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
10314
12101
  oauth_mode?: string | null;
10315
12102
  provider?: string | null;
10316
12103
  purpose_assignments?: import("./types").Json | null;
12104
+ realtime_mode?: string | null;
10317
12105
  scopes?: string[] | null;
10318
12106
  smtp_host?: string | null;
10319
12107
  smtp_port?: number | null;
@@ -10328,6 +12116,8 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
10328
12116
  created_at?: string | null;
10329
12117
  created_by?: string | null;
10330
12118
  display_name?: string | null;
12119
+ graph_subscription_expires_at?: string | null;
12120
+ graph_subscription_id?: string | null;
10331
12121
  has_access_token?: never;
10332
12122
  has_client_id?: never;
10333
12123
  has_client_secret?: never;
@@ -10345,6 +12135,7 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
10345
12135
  oauth_mode?: string | null;
10346
12136
  provider?: string | null;
10347
12137
  purpose_assignments?: import("./types").Json | null;
12138
+ realtime_mode?: string | null;
10348
12139
  scopes?: string[] | null;
10349
12140
  smtp_host?: string | null;
10350
12141
  smtp_port?: number | null;
@@ -10455,6 +12246,25 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
10455
12246
  };
10456
12247
  Relationships: [];
10457
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
+ };
10458
12268
  local_customer_discounts: {
10459
12269
  Row: {
10460
12270
  base_price: number | null;
@@ -10791,6 +12601,21 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
10791
12601
  };
10792
12602
  Returns: string;
10793
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
+ };
10794
12619
  apply_stock_consumption: {
10795
12620
  Args: {
10796
12621
  p_order_id: string;
@@ -10848,6 +12673,12 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
10848
12673
  processed_items: number;
10849
12674
  }[];
10850
12675
  };
12676
+ calculate_layer_stock: {
12677
+ Args: {
12678
+ p_product_id: string;
12679
+ };
12680
+ Returns: number;
12681
+ };
10851
12682
  call_exact_route: {
10852
12683
  Args: {
10853
12684
  path: string;
@@ -10876,6 +12707,33 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
10876
12707
  };
10877
12708
  Returns: import("./types").Json;
10878
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
+ };
10879
12737
  cleanup_old_bookings: {
10880
12738
  Args: never;
10881
12739
  Returns: undefined;
@@ -10934,6 +12792,12 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
10934
12792
  Args: never;
10935
12793
  Returns: string;
10936
12794
  };
12795
+ custom_access_token_hook: {
12796
+ Args: {
12797
+ event: import("./types").Json;
12798
+ };
12799
+ Returns: import("./types").Json;
12800
+ };
10937
12801
  dashboard_alert_counts: {
10938
12802
  Args: never;
10939
12803
  Returns: import("./types").Json;
@@ -11001,6 +12865,16 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
11001
12865
  status: string;
11002
12866
  }[];
11003
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
+ };
11004
12878
  enqueue_cart_replan_if_unlocked: {
11005
12879
  Args: {
11006
12880
  p_order_id: string;
@@ -11120,6 +12994,19 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
11120
12994
  resource: string;
11121
12995
  }[];
11122
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
+ };
11123
13010
  get_floriday_clock_supplies_window: {
11124
13011
  Args: {
11125
13012
  p_from: string;
@@ -11207,6 +13094,12 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
11207
13094
  };
11208
13095
  Returns: string;
11209
13096
  };
13097
+ get_inventory_stock_for_key: {
13098
+ Args: {
13099
+ p_key: string;
13100
+ };
13101
+ Returns: number;
13102
+ };
11210
13103
  get_offer_by_link_code: {
11211
13104
  Args: {
11212
13105
  p_code: string;
@@ -11237,6 +13130,12 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
11237
13130
  };
11238
13131
  Returns: string;
11239
13132
  };
13133
+ get_product_group_available_stock: {
13134
+ Args: {
13135
+ p_group_id: string;
13136
+ };
13137
+ Returns: number;
13138
+ };
11240
13139
  get_room_busy_windows: {
11241
13140
  Args: {
11242
13141
  p_from: string;
@@ -11268,6 +13167,14 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
11268
13167
  };
11269
13168
  Returns: string;
11270
13169
  };
13170
+ has_module_permission: {
13171
+ Args: {
13172
+ _min: string;
13173
+ _module_id: string;
13174
+ _user_id: string;
13175
+ };
13176
+ Returns: boolean;
13177
+ };
11271
13178
  has_role: {
11272
13179
  Args: {
11273
13180
  _role: Database["public"]["Enums"]["app_role"];
@@ -11275,6 +13182,10 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
11275
13182
  };
11276
13183
  Returns: boolean;
11277
13184
  };
13185
+ has_twinfield_link: {
13186
+ Args: never;
13187
+ Returns: boolean;
13188
+ };
11278
13189
  is_authenticated: {
11279
13190
  Args: never;
11280
13191
  Returns: boolean;
@@ -11289,6 +13200,37 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
11289
13200
  };
11290
13201
  Returns: boolean;
11291
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
+ };
11292
13234
  local_effective_price: {
11293
13235
  Args: {
11294
13236
  _customer_id: string;
@@ -11305,6 +13247,22 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
11305
13247
  source_id: string;
11306
13248
  }[];
11307
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
+ };
11308
13266
  mark_offer_clicked: {
11309
13267
  Args: {
11310
13268
  p_code: string;
@@ -11356,6 +13314,10 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
11356
13314
  };
11357
13315
  Returns: string;
11358
13316
  };
13317
+ next_twinfield_code: {
13318
+ Args: never;
13319
+ Returns: string;
13320
+ };
11359
13321
  next_work_order_number: {
11360
13322
  Args: {
11361
13323
  p_parent_work_order_id?: string;
@@ -11412,6 +13374,15 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
11412
13374
  };
11413
13375
  Returns: undefined;
11414
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
+ };
11415
13386
  pickstation_set_cart_status: {
11416
13387
  Args: {
11417
13388
  p_cart_index: number;
@@ -11482,6 +13453,12 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
11482
13453
  };
11483
13454
  Returns: number;
11484
13455
  };
13456
+ reorder_customer_price_groups: {
13457
+ Args: {
13458
+ _ids: string[];
13459
+ };
13460
+ Returns: undefined;
13461
+ };
11485
13462
  reset_floriday_sync_cursor: {
11486
13463
  Args: {
11487
13464
  p_connection_id: string;
@@ -11517,6 +13494,12 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
11517
13494
  };
11518
13495
  Returns: string;
11519
13496
  };
13497
+ retry_twinfield_push: {
13498
+ Args: {
13499
+ _customer_id: string;
13500
+ };
13501
+ Returns: number;
13502
+ };
11520
13503
  reverse_production: {
11521
13504
  Args: {
11522
13505
  p_connection_id?: string;
@@ -11534,6 +13517,20 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
11534
13517
  };
11535
13518
  Returns: number;
11536
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
+ };
11537
13534
  schedule_floriday_base_items_sync: {
11538
13535
  Args: {
11539
13536
  p_apikey: string;
@@ -11784,6 +13781,13 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
11784
13781
  Args: never;
11785
13782
  Returns: number;
11786
13783
  };
13784
+ set_planning_status: {
13785
+ Args: {
13786
+ _id: string;
13787
+ _status: Database["public"]["Enums"]["planning_item_status"];
13788
+ };
13789
+ Returns: undefined;
13790
+ };
11787
13791
  show_limit: {
11788
13792
  Args: never;
11789
13793
  Returns: number;
@@ -11794,12 +13798,22 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
11794
13798
  };
11795
13799
  Returns: string[];
11796
13800
  };
13801
+ sync_all_layer_stocks: {
13802
+ Args: never;
13803
+ Returns: undefined;
13804
+ };
11797
13805
  sync_cached_packing_from_product: {
11798
13806
  Args: {
11799
13807
  p_product_id: string;
11800
13808
  };
11801
13809
  Returns: undefined;
11802
13810
  };
13811
+ sync_layer_stock: {
13812
+ Args: {
13813
+ p_product_id: string;
13814
+ };
13815
+ Returns: undefined;
13816
+ };
11803
13817
  sync_order_cart_item_packing_from_product: {
11804
13818
  Args: {
11805
13819
  p_product_id: string;
@@ -11843,9 +13857,12 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
11843
13857
  };
11844
13858
  };
11845
13859
  Enums: {
11846
- app_role: "admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie" | "monteur";
13860
+ app_role: "admin" | "planner" | "monteur" | "administratie" | "ai_admin";
11847
13861
  exact_env: "staging" | "live";
11848
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";
11849
13866
  quote_status: "concept" | "verzonden" | "bekeken" | "in_behandeling" | "geaccepteerd" | "afgewezen" | "verlopen" | "gearchiveerd";
11850
13867
  };
11851
13868
  CompositeTypes: { [_ in never]: never; };