@flowselections/floriday-verkoop-module 1.0.21 → 1.0.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/dist-lib/components/karindeling/AfmetingenTab.d.ts +6 -0
  2. package/dist-lib/components/karindeling/AfmetingenTab.d.ts.map +1 -0
  3. package/dist-lib/components/karindeling/AfmetingenTab.js +128 -0
  4. package/dist-lib/components/karindeling/KarindelingPage.d.ts +2 -0
  5. package/dist-lib/components/karindeling/KarindelingPage.d.ts.map +1 -0
  6. package/dist-lib/components/karindeling/KarindelingPage.js +102 -0
  7. package/dist-lib/components/verkoop/OrderKarindelingCard.d.ts.map +1 -1
  8. package/dist-lib/components/verkoop/OrderKarindelingCard.js +83 -37
  9. package/dist-lib/components/verkoop/SalesOrderDetailPage.d.ts.map +1 -1
  10. package/dist-lib/components/verkoop/SalesOrderDetailPage.js +59 -8
  11. package/dist-lib/components/verkoop/SalesOrderDetailView.d.ts +2 -1
  12. package/dist-lib/components/verkoop/SalesOrderDetailView.d.ts.map +1 -1
  13. package/dist-lib/components/verkoop/SalesOrderDetailView.js +2 -2
  14. package/dist-lib/components/verkoop/SalesOrdersTable.d.ts.map +1 -1
  15. package/dist-lib/components/verkoop/SalesOrdersTable.js +36 -4
  16. package/dist-lib/components/verkoop/VerkoopOrdersPage.d.ts.map +1 -1
  17. package/dist-lib/components/verkoop/VerkoopOrdersPage.js +18 -2
  18. package/dist-lib/index.d.ts +1 -0
  19. package/dist-lib/index.d.ts.map +1 -1
  20. package/dist-lib/index.js +12 -1
  21. package/dist-lib/integrations/supabase/auth-middleware.d.ts +2353 -374
  22. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
  23. package/dist-lib/integrations/supabase/client.d.ts +2353 -374
  24. package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
  25. package/dist-lib/integrations/supabase/client.js +24 -9
  26. package/dist-lib/integrations/supabase/client.server.d.ts +2353 -374
  27. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
  28. package/dist-lib/integrations/supabase/types.d.ts +2406 -376
  29. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  30. package/dist-lib/integrations/supabase/types.js +11 -9
  31. package/dist-lib/lib/cart-lock.functions.d.ts +2353 -374
  32. package/dist-lib/lib/cart-lock.functions.d.ts.map +1 -1
  33. package/dist-lib/lib/cart-planner.d.ts +9 -1
  34. package/dist-lib/lib/cart-planner.d.ts.map +1 -1
  35. package/dist-lib/lib/cart-planner.js +21 -4
  36. package/dist-lib/lib/cart-planning-settings.functions.d.ts +152282 -0
  37. package/dist-lib/lib/cart-planning-settings.functions.d.ts.map +1 -0
  38. package/dist-lib/lib/cart-planning-settings.functions.js +375 -0
  39. package/dist-lib/lib/cart-replan.functions.d.ts +18468 -651
  40. package/dist-lib/lib/cart-replan.functions.d.ts.map +1 -1
  41. package/dist-lib/lib/cart-replan.functions.js +85 -27
  42. package/dist-lib/lib/create-order.functions.d.ts +25367 -1619
  43. package/dist-lib/lib/create-order.functions.d.ts.map +1 -1
  44. package/dist-lib/lib/cron/index.d.ts +5 -0
  45. package/dist-lib/lib/cron/index.d.ts.map +1 -0
  46. package/dist-lib/lib/cron/index.js +4 -0
  47. package/dist-lib/lib/cron/mirror-floriday-orders.d.ts +4 -0
  48. package/dist-lib/lib/cron/mirror-floriday-orders.d.ts.map +1 -0
  49. package/dist-lib/lib/cron/mirror-floriday-orders.js +23 -0
  50. package/dist-lib/lib/cron/replan-carts.d.ts +4 -0
  51. package/dist-lib/lib/cron/replan-carts.d.ts.map +1 -0
  52. package/dist-lib/lib/cron/replan-carts.js +18 -0
  53. package/dist-lib/lib/cron/sync-salesorders.d.ts +4 -0
  54. package/dist-lib/lib/cron/sync-salesorders.d.ts.map +1 -0
  55. package/dist-lib/lib/cron/sync-salesorders.js +18 -0
  56. package/dist-lib/lib/cron/sync-tradeitems.d.ts +4 -0
  57. package/dist-lib/lib/cron/sync-tradeitems.d.ts.map +1 -0
  58. package/dist-lib/lib/cron/sync-tradeitems.js +18 -0
  59. package/dist-lib/lib/floriday-auto-fulfillment.functions.d.ts +6539 -602
  60. package/dist-lib/lib/floriday-auto-fulfillment.functions.d.ts.map +1 -1
  61. package/dist-lib/lib/floriday-auto-fulfillment.server.js +1 -1
  62. package/dist-lib/lib/floriday-central-token.server.d.ts +12 -0
  63. package/dist-lib/lib/floriday-central-token.server.d.ts.map +1 -0
  64. package/dist-lib/lib/floriday-central-token.server.js +58 -0
  65. package/dist-lib/lib/floriday-gateway.server.d.ts +2 -2
  66. package/dist-lib/lib/floriday-gateway.server.d.ts.map +1 -1
  67. package/dist-lib/lib/floriday-gateway.server.js +10 -37
  68. package/dist-lib/lib/floriday-logistic-labels.functions.d.ts +2353 -374
  69. package/dist-lib/lib/floriday-logistic-labels.functions.d.ts.map +1 -1
  70. package/dist-lib/lib/floriday-logistic-labels.functions.js +14 -4
  71. package/dist-lib/lib/floriday-mirror.functions.d.ts +13846 -0
  72. package/dist-lib/lib/floriday-mirror.functions.d.ts.map +1 -0
  73. package/dist-lib/lib/floriday-mirror.functions.js +278 -0
  74. package/dist-lib/lib/floriday-public.functions.d.ts +14907 -1054
  75. package/dist-lib/lib/floriday-public.functions.d.ts.map +1 -1
  76. package/dist-lib/lib/floriday-sync.d.ts +0 -1
  77. package/dist-lib/lib/floriday-sync.d.ts.map +1 -1
  78. package/dist-lib/lib/floriday-sync.js +1 -1
  79. package/dist-lib/lib/floriday-writes.functions.d.ts +10723 -828
  80. package/dist-lib/lib/floriday-writes.functions.d.ts.map +1 -1
  81. package/dist-lib/lib/order-buffers.functions.d.ts +41540 -0
  82. package/dist-lib/lib/order-buffers.functions.d.ts.map +1 -0
  83. package/dist-lib/lib/order-buffers.functions.js +244 -0
  84. package/dist-lib/lib/order-shipments.functions.d.ts +8631 -715
  85. package/dist-lib/lib/order-shipments.functions.d.ts.map +1 -1
  86. package/dist-lib/lib/salesorders-mapping.d.ts +3 -0
  87. package/dist-lib/lib/salesorders-mapping.d.ts.map +1 -1
  88. package/dist-lib/lib/salesorders.functions.d.ts +10725 -828
  89. package/dist-lib/lib/salesorders.functions.d.ts.map +1 -1
  90. package/dist-lib/lib/salesorders.functions.js +129 -3
  91. package/dist-lib/lib/tradeitems.functions.d.ts +2353 -374
  92. package/dist-lib/lib/tradeitems.functions.d.ts.map +1 -1
  93. package/dist-lib/lib/useSalesOrdersQuery.d.ts.map +1 -1
  94. package/dist-lib/lib/useSalesOrdersQuery.js +37 -2
  95. package/package.json +27 -5
@@ -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;
@@ -3904,27 +4528,6 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
3904
4528
  referencedColumns: ["id"];
3905
4529
  }];
3906
4530
  };
3907
- floriday_continuous_stock_cache: {
3908
- Row: {
3909
- connection_id: string;
3910
- fetched_at: string;
3911
- number_of_pieces: number;
3912
- trade_item_id: string;
3913
- };
3914
- Insert: {
3915
- connection_id: string;
3916
- fetched_at?: string;
3917
- number_of_pieces?: number;
3918
- trade_item_id: string;
3919
- };
3920
- Update: {
3921
- connection_id?: string;
3922
- fetched_at?: string;
3923
- number_of_pieces?: number;
3924
- trade_item_id?: string;
3925
- };
3926
- Relationships: [];
3927
- };
3928
4531
  floriday_continuous_stock_queue: {
3929
4532
  Row: {
3930
4533
  attempts: number;
@@ -4700,8 +5303,6 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
4700
5303
  Row: {
4701
5304
  buyer_organization_id: string | null;
4702
5305
  connection_id: string;
4703
- controlled_at: string | null;
4704
- controlled_by: string | null;
4705
5306
  created_at: string;
4706
5307
  data: import("./types").Json;
4707
5308
  floriday_id: string;
@@ -4713,8 +5314,6 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
4713
5314
  Insert: {
4714
5315
  buyer_organization_id?: string | null;
4715
5316
  connection_id: string;
4716
- controlled_at?: string | null;
4717
- controlled_by?: string | null;
4718
5317
  created_at?: string;
4719
5318
  data: import("./types").Json;
4720
5319
  floriday_id: string;
@@ -4726,8 +5325,6 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
4726
5325
  Update: {
4727
5326
  buyer_organization_id?: string | null;
4728
5327
  connection_id?: string;
4729
- controlled_at?: string | null;
4730
- controlled_by?: string | null;
4731
5328
  created_at?: string;
4732
5329
  data?: import("./types").Json;
4733
5330
  floriday_id?: string;
@@ -4909,45 +5506,6 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
4909
5506
  referencedColumns: ["id"];
4910
5507
  }];
4911
5508
  };
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
5509
  floriday_trips_cache: {
4952
5510
  Row: {
4953
5511
  carrier_organization_id: string | null;
@@ -5476,162 +6034,444 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
5476
6034
  };
5477
6035
  Relationships: [];
5478
6036
  };
5479
- local_customer_agreements: {
6037
+ itk_contact_persons: {
5480
6038
  Row: {
5481
- base_price: number | null;
5482
6039
  created_at: string;
5483
- currency: string;
5484
6040
  customer_id: string;
6041
+ email: string | null;
5485
6042
  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;
6043
+ name: string;
6044
+ phone: string | null;
6045
+ role: string | null;
5491
6046
  updated_at: string;
5492
- valid_from: string | null;
5493
- valid_until: string | null;
5494
6047
  };
5495
6048
  Insert: {
5496
- base_price?: number | null;
5497
6049
  created_at?: string;
5498
- currency?: string;
5499
6050
  customer_id: string;
6051
+ email?: string | null;
5500
6052
  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;
6053
+ name: string;
6054
+ phone?: string | null;
6055
+ role?: string | null;
5506
6056
  updated_at?: string;
5507
- valid_from?: string | null;
5508
- valid_until?: string | null;
5509
6057
  };
5510
6058
  Update: {
5511
- base_price?: number | null;
5512
6059
  created_at?: string;
5513
- currency?: string;
5514
6060
  customer_id?: string;
6061
+ email?: string | null;
5515
6062
  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;
6063
+ name?: string;
6064
+ phone?: string | null;
6065
+ role?: string | null;
5521
6066
  updated_at?: string;
5522
- valid_from?: string | null;
5523
- valid_until?: string | null;
5524
6067
  };
5525
6068
  Relationships: [{
5526
- foreignKeyName: "local_customer_agreements_customer_id_fkey";
6069
+ foreignKeyName: "itk_contact_persons_customer_id_fkey";
5527
6070
  columns: ["customer_id"];
5528
6071
  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";
6072
+ referencedRelation: "itk_customers";
5542
6073
  referencedColumns: ["id"];
5543
6074
  }];
5544
6075
  };
5545
- local_customer_price_groups: {
6076
+ itk_customer_dynamic_values: {
5546
6077
  Row: {
5547
6078
  created_at: string;
5548
- currency: string;
5549
6079
  customer_id: string;
5550
- discount_type: string;
5551
- discount_value: number;
6080
+ field_id: string;
5552
6081
  id: string;
5553
- min_quantity: number;
5554
- notes: string | null;
5555
- product_category_id: string | null;
5556
- product_id: string | null;
5557
6082
  updated_at: string;
5558
- valid_from: string | null;
5559
- valid_until: string | null;
6083
+ value: string | null;
5560
6084
  };
5561
6085
  Insert: {
5562
6086
  created_at?: string;
5563
- currency?: string;
5564
6087
  customer_id: string;
5565
- discount_type: string;
5566
- discount_value: number;
6088
+ field_id: string;
5567
6089
  id?: string;
5568
- min_quantity?: number;
5569
- notes?: string | null;
5570
- product_category_id?: string | null;
5571
- product_id?: string | null;
5572
6090
  updated_at?: string;
5573
- valid_from?: string | null;
5574
- valid_until?: string | null;
6091
+ value?: string | null;
5575
6092
  };
5576
6093
  Update: {
5577
6094
  created_at?: string;
5578
- currency?: string;
5579
6095
  customer_id?: string;
5580
- discount_type?: string;
5581
- discount_value?: number;
6096
+ field_id?: string;
5582
6097
  id?: string;
5583
- min_quantity?: number;
5584
- notes?: string | null;
5585
- product_category_id?: string | null;
5586
- product_id?: string | null;
5587
6098
  updated_at?: string;
5588
- valid_from?: string | null;
5589
- valid_until?: string | null;
6099
+ value?: string | null;
5590
6100
  };
5591
6101
  Relationships: [{
5592
- foreignKeyName: "local_customer_price_groups_customer_id_fkey";
6102
+ foreignKeyName: "itk_customer_dynamic_values_customer_id_fkey";
5593
6103
  columns: ["customer_id"];
5594
6104
  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";
6105
+ referencedRelation: "itk_customers";
5602
6106
  referencedColumns: ["id"];
5603
6107
  }, {
5604
- foreignKeyName: "local_customer_price_groups_product_id_fkey";
5605
- columns: ["product_id"];
6108
+ foreignKeyName: "itk_customer_dynamic_values_field_id_fkey";
6109
+ columns: ["field_id"];
5606
6110
  isOneToOne: false;
5607
- referencedRelation: "products";
6111
+ referencedRelation: "itk_dynamic_fields";
5608
6112
  referencedColumns: ["id"];
5609
6113
  }];
5610
6114
  };
5611
- local_customer_sales_strategies: {
6115
+ itk_customer_notes: {
5612
6116
  Row: {
6117
+ body: string;
5613
6118
  created_at: string;
5614
- currency: string;
6119
+ created_by: string | null;
5615
6120
  customer_id: string;
5616
- discount_type: string;
5617
- discount_value: number;
5618
6121
  id: string;
5619
- min_quantity: number;
5620
- notes: string | null;
5621
- product_category_id: string | null;
5622
- product_id: string | null;
6122
+ note_type: string;
5623
6123
  updated_at: string;
5624
- valid_from: string | null;
5625
- valid_until: string | null;
5626
6124
  };
5627
6125
  Insert: {
6126
+ body: string;
5628
6127
  created_at?: string;
5629
- currency?: string;
6128
+ created_by?: string | null;
5630
6129
  customer_id: string;
5631
- discount_type: string;
5632
- discount_value: number;
5633
6130
  id?: string;
5634
- min_quantity?: number;
6131
+ note_type?: string;
6132
+ updated_at?: string;
6133
+ };
6134
+ Update: {
6135
+ body?: string;
6136
+ created_at?: string;
6137
+ created_by?: string | null;
6138
+ customer_id?: string;
6139
+ id?: string;
6140
+ note_type?: string;
6141
+ updated_at?: string;
6142
+ };
6143
+ Relationships: [{
6144
+ foreignKeyName: "itk_customer_notes_customer_id_fkey";
6145
+ columns: ["customer_id"];
6146
+ isOneToOne: false;
6147
+ referencedRelation: "itk_customers";
6148
+ referencedColumns: ["id"];
6149
+ }];
6150
+ };
6151
+ itk_customers: {
6152
+ Row: {
6153
+ billing_city: string | null;
6154
+ billing_postcode: string | null;
6155
+ billing_street: string | null;
6156
+ created_at: string;
6157
+ general_email: string | null;
6158
+ general_phone: string | null;
6159
+ id: string;
6160
+ legacy_customer_id: string | null;
6161
+ name: string;
6162
+ segment: Database["public"]["Enums"]["itk_customer_segment"];
6163
+ updated_at: string;
6164
+ };
6165
+ Insert: {
6166
+ billing_city?: string | null;
6167
+ billing_postcode?: string | null;
6168
+ billing_street?: string | null;
6169
+ created_at?: string;
6170
+ general_email?: string | null;
6171
+ general_phone?: string | null;
6172
+ id?: string;
6173
+ legacy_customer_id?: string | null;
6174
+ name: string;
6175
+ segment?: Database["public"]["Enums"]["itk_customer_segment"];
6176
+ updated_at?: string;
6177
+ };
6178
+ Update: {
6179
+ billing_city?: string | null;
6180
+ billing_postcode?: string | null;
6181
+ billing_street?: string | null;
6182
+ created_at?: string;
6183
+ general_email?: string | null;
6184
+ general_phone?: string | null;
6185
+ id?: string;
6186
+ legacy_customer_id?: string | null;
6187
+ name?: string;
6188
+ segment?: Database["public"]["Enums"]["itk_customer_segment"];
6189
+ updated_at?: string;
6190
+ };
6191
+ Relationships: [{
6192
+ foreignKeyName: "itk_customers_legacy_customer_id_fkey";
6193
+ columns: ["legacy_customer_id"];
6194
+ isOneToOne: false;
6195
+ referencedRelation: "customers";
6196
+ referencedColumns: ["id"];
6197
+ }];
6198
+ };
6199
+ itk_dynamic_fields: {
6200
+ Row: {
6201
+ created_at: string;
6202
+ field_name: string;
6203
+ field_type: Database["public"]["Enums"]["itk_dynamic_field_type"];
6204
+ id: string;
6205
+ options: import("./types").Json;
6206
+ sort_order: number;
6207
+ updated_at: string;
6208
+ };
6209
+ Insert: {
6210
+ created_at?: string;
6211
+ field_name: string;
6212
+ field_type?: Database["public"]["Enums"]["itk_dynamic_field_type"];
6213
+ id?: string;
6214
+ options?: import("./types").Json;
6215
+ sort_order?: number;
6216
+ updated_at?: string;
6217
+ };
6218
+ Update: {
6219
+ created_at?: string;
6220
+ field_name?: string;
6221
+ field_type?: Database["public"]["Enums"]["itk_dynamic_field_type"];
6222
+ id?: string;
6223
+ options?: import("./types").Json;
6224
+ sort_order?: number;
6225
+ updated_at?: string;
6226
+ };
6227
+ Relationships: [];
6228
+ };
6229
+ itk_work_locations: {
6230
+ Row: {
6231
+ city: string | null;
6232
+ created_at: string;
6233
+ customer_id: string;
6234
+ id: string;
6235
+ instructions: string | null;
6236
+ label: string;
6237
+ latitude: number | null;
6238
+ longitude: number | null;
6239
+ postcode: string | null;
6240
+ street: string | null;
6241
+ updated_at: string;
6242
+ };
6243
+ Insert: {
6244
+ city?: string | null;
6245
+ created_at?: string;
6246
+ customer_id: string;
6247
+ id?: string;
6248
+ instructions?: string | null;
6249
+ label: string;
6250
+ latitude?: number | null;
6251
+ longitude?: number | null;
6252
+ postcode?: string | null;
6253
+ street?: string | null;
6254
+ updated_at?: string;
6255
+ };
6256
+ Update: {
6257
+ city?: string | null;
6258
+ created_at?: string;
6259
+ customer_id?: string;
6260
+ id?: string;
6261
+ instructions?: string | null;
6262
+ label?: string;
6263
+ latitude?: number | null;
6264
+ longitude?: number | null;
6265
+ postcode?: string | null;
6266
+ street?: string | null;
6267
+ updated_at?: string;
6268
+ };
6269
+ Relationships: [{
6270
+ foreignKeyName: "itk_work_locations_customer_id_fkey";
6271
+ columns: ["customer_id"];
6272
+ isOneToOne: false;
6273
+ referencedRelation: "itk_customers";
6274
+ referencedColumns: ["id"];
6275
+ }];
6276
+ };
6277
+ leave_requests: {
6278
+ Row: {
6279
+ created_at: string;
6280
+ end_date: string;
6281
+ id: string;
6282
+ reason: string | null;
6283
+ start_date: string;
6284
+ status: string;
6285
+ tenant_id: string;
6286
+ updated_at: string;
6287
+ user_id: string;
6288
+ };
6289
+ Insert: {
6290
+ created_at?: string;
6291
+ end_date: string;
6292
+ id?: string;
6293
+ reason?: string | null;
6294
+ start_date: string;
6295
+ status?: string;
6296
+ tenant_id?: string;
6297
+ updated_at?: string;
6298
+ user_id: string;
6299
+ };
6300
+ Update: {
6301
+ created_at?: string;
6302
+ end_date?: string;
6303
+ id?: string;
6304
+ reason?: string | null;
6305
+ start_date?: string;
6306
+ status?: string;
6307
+ tenant_id?: string;
6308
+ updated_at?: string;
6309
+ user_id?: string;
6310
+ };
6311
+ Relationships: [{
6312
+ foreignKeyName: "leave_requests_user_id_fkey";
6313
+ columns: ["user_id"];
6314
+ isOneToOne: false;
6315
+ referencedRelation: "monteurs";
6316
+ referencedColumns: ["id"];
6317
+ }];
6318
+ };
6319
+ local_customer_agreements: {
6320
+ Row: {
6321
+ base_price: number | null;
6322
+ created_at: string;
6323
+ currency: string;
6324
+ customer_id: string;
6325
+ id: string;
6326
+ min_quantity: number;
6327
+ net_price: number;
6328
+ notes: string | null;
6329
+ product_category_id: string | null;
6330
+ product_id: string | null;
6331
+ updated_at: string;
6332
+ valid_from: string | null;
6333
+ valid_until: string | null;
6334
+ };
6335
+ Insert: {
6336
+ base_price?: number | null;
6337
+ created_at?: string;
6338
+ currency?: string;
6339
+ customer_id: string;
6340
+ id?: string;
6341
+ min_quantity?: number;
6342
+ net_price: number;
6343
+ notes?: string | null;
6344
+ product_category_id?: string | null;
6345
+ product_id?: string | null;
6346
+ updated_at?: string;
6347
+ valid_from?: string | null;
6348
+ valid_until?: string | null;
6349
+ };
6350
+ Update: {
6351
+ base_price?: number | null;
6352
+ created_at?: string;
6353
+ currency?: string;
6354
+ customer_id?: string;
6355
+ id?: string;
6356
+ min_quantity?: number;
6357
+ net_price?: number;
6358
+ notes?: string | null;
6359
+ product_category_id?: string | null;
6360
+ product_id?: string | null;
6361
+ updated_at?: string;
6362
+ valid_from?: string | null;
6363
+ valid_until?: string | null;
6364
+ };
6365
+ Relationships: [{
6366
+ foreignKeyName: "local_customer_agreements_customer_id_fkey";
6367
+ columns: ["customer_id"];
6368
+ isOneToOne: false;
6369
+ referencedRelation: "customers";
6370
+ referencedColumns: ["id"];
6371
+ }, {
6372
+ foreignKeyName: "local_customer_agreements_product_category_id_fkey";
6373
+ columns: ["product_category_id"];
6374
+ isOneToOne: false;
6375
+ referencedRelation: "product_categories";
6376
+ referencedColumns: ["id"];
6377
+ }, {
6378
+ foreignKeyName: "local_customer_agreements_product_id_fkey";
6379
+ columns: ["product_id"];
6380
+ isOneToOne: false;
6381
+ referencedRelation: "products";
6382
+ referencedColumns: ["id"];
6383
+ }];
6384
+ };
6385
+ local_customer_price_groups: {
6386
+ Row: {
6387
+ created_at: string;
6388
+ currency: string;
6389
+ customer_id: string;
6390
+ discount_type: string;
6391
+ discount_value: number;
6392
+ id: string;
6393
+ min_quantity: number;
6394
+ notes: string | null;
6395
+ product_category_id: string | null;
6396
+ product_id: string | null;
6397
+ updated_at: string;
6398
+ valid_from: string | null;
6399
+ valid_until: string | null;
6400
+ };
6401
+ Insert: {
6402
+ created_at?: string;
6403
+ currency?: string;
6404
+ customer_id: string;
6405
+ discount_type: string;
6406
+ discount_value: number;
6407
+ id?: string;
6408
+ min_quantity?: number;
6409
+ notes?: string | null;
6410
+ product_category_id?: string | null;
6411
+ product_id?: string | null;
6412
+ updated_at?: string;
6413
+ valid_from?: string | null;
6414
+ valid_until?: string | null;
6415
+ };
6416
+ Update: {
6417
+ created_at?: string;
6418
+ currency?: string;
6419
+ customer_id?: string;
6420
+ discount_type?: string;
6421
+ discount_value?: number;
6422
+ id?: string;
6423
+ min_quantity?: number;
6424
+ notes?: string | null;
6425
+ product_category_id?: string | null;
6426
+ product_id?: string | null;
6427
+ updated_at?: string;
6428
+ valid_from?: string | null;
6429
+ valid_until?: string | null;
6430
+ };
6431
+ Relationships: [{
6432
+ foreignKeyName: "local_customer_price_groups_customer_id_fkey";
6433
+ columns: ["customer_id"];
6434
+ isOneToOne: false;
6435
+ referencedRelation: "customers";
6436
+ referencedColumns: ["id"];
6437
+ }, {
6438
+ foreignKeyName: "local_customer_price_groups_product_category_id_fkey";
6439
+ columns: ["product_category_id"];
6440
+ isOneToOne: false;
6441
+ referencedRelation: "product_categories";
6442
+ referencedColumns: ["id"];
6443
+ }, {
6444
+ foreignKeyName: "local_customer_price_groups_product_id_fkey";
6445
+ columns: ["product_id"];
6446
+ isOneToOne: false;
6447
+ referencedRelation: "products";
6448
+ referencedColumns: ["id"];
6449
+ }];
6450
+ };
6451
+ local_customer_sales_strategies: {
6452
+ Row: {
6453
+ created_at: string;
6454
+ currency: string;
6455
+ customer_id: string;
6456
+ discount_type: string;
6457
+ discount_value: number;
6458
+ id: string;
6459
+ min_quantity: number;
6460
+ notes: string | null;
6461
+ product_category_id: string | null;
6462
+ product_id: string | null;
6463
+ updated_at: string;
6464
+ valid_from: string | null;
6465
+ valid_until: string | null;
6466
+ };
6467
+ Insert: {
6468
+ created_at?: string;
6469
+ currency?: string;
6470
+ customer_id: string;
6471
+ discount_type: string;
6472
+ discount_value: number;
6473
+ id?: string;
6474
+ min_quantity?: number;
5635
6475
  notes?: string | null;
5636
6476
  product_category_id?: string | null;
5637
6477
  product_id?: string | null;
@@ -5678,23 +6518,302 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
5678
6518
  Row: {
5679
6519
  created_at: string;
5680
6520
  id: string;
5681
- name: string;
5682
- sort_order: number;
6521
+ name: string;
6522
+ sort_order: number;
6523
+ updated_at: string;
6524
+ };
6525
+ Insert: {
6526
+ created_at?: string;
6527
+ id?: string;
6528
+ name: string;
6529
+ sort_order?: number;
6530
+ updated_at?: string;
6531
+ };
6532
+ Update: {
6533
+ created_at?: string;
6534
+ id?: string;
6535
+ name?: string;
6536
+ sort_order?: number;
6537
+ updated_at?: string;
6538
+ };
6539
+ Relationships: [];
6540
+ };
6541
+ logistics_capacity_events: {
6542
+ Row: {
6543
+ available_carts: number;
6544
+ created_at: string;
6545
+ id: string;
6546
+ measures: import("./types").Json;
6547
+ note: string | null;
6548
+ outcome: string;
6549
+ required_carts: number;
6550
+ reserve_minutes: number;
6551
+ shortage_carts: number;
6552
+ status: string;
6553
+ user_id: string;
6554
+ };
6555
+ Insert: {
6556
+ available_carts?: number;
6557
+ created_at?: string;
6558
+ id?: string;
6559
+ measures?: import("./types").Json;
6560
+ note?: string | null;
6561
+ outcome?: string;
6562
+ required_carts?: number;
6563
+ reserve_minutes?: number;
6564
+ shortage_carts?: number;
6565
+ status: string;
6566
+ user_id: string;
6567
+ };
6568
+ Update: {
6569
+ available_carts?: number;
6570
+ created_at?: string;
6571
+ id?: string;
6572
+ measures?: import("./types").Json;
6573
+ note?: string | null;
6574
+ outcome?: string;
6575
+ required_carts?: number;
6576
+ reserve_minutes?: number;
6577
+ shortage_carts?: number;
6578
+ status?: string;
6579
+ user_id?: string;
6580
+ };
6581
+ Relationships: [];
6582
+ };
6583
+ logistics_capacity_settings: {
6584
+ Row: {
6585
+ created_at: string;
6586
+ settings: import("./types").Json;
6587
+ updated_at: string;
6588
+ user_id: string;
6589
+ };
6590
+ Insert: {
6591
+ created_at?: string;
6592
+ settings?: import("./types").Json;
6593
+ updated_at?: string;
6594
+ user_id: string;
6595
+ };
6596
+ Update: {
6597
+ created_at?: string;
6598
+ settings?: import("./types").Json;
6599
+ updated_at?: string;
6600
+ user_id?: string;
6601
+ };
6602
+ Relationships: [];
6603
+ };
6604
+ logistics_decisions: {
6605
+ Row: {
6606
+ created_at: string;
6607
+ explanation: string | null;
6608
+ id: string;
6609
+ input_snapshot: import("./types").Json;
6610
+ result: import("./types").Json;
6611
+ slot: string;
6612
+ strategy_id: string | null;
6613
+ subject_id: string;
6614
+ subject_type: string;
6615
+ user_id: string;
6616
+ };
6617
+ Insert: {
6618
+ created_at?: string;
6619
+ explanation?: string | null;
6620
+ id?: string;
6621
+ input_snapshot?: import("./types").Json;
6622
+ result?: import("./types").Json;
6623
+ slot: string;
6624
+ strategy_id?: string | null;
6625
+ subject_id: string;
6626
+ subject_type: string;
6627
+ user_id: string;
6628
+ };
6629
+ Update: {
6630
+ created_at?: string;
6631
+ explanation?: string | null;
6632
+ id?: string;
6633
+ input_snapshot?: import("./types").Json;
6634
+ result?: import("./types").Json;
6635
+ slot?: string;
6636
+ strategy_id?: string | null;
6637
+ subject_id?: string;
6638
+ subject_type?: string;
6639
+ user_id?: string;
6640
+ };
6641
+ Relationships: [{
6642
+ foreignKeyName: "logistics_decisions_strategy_id_fkey";
6643
+ columns: ["strategy_id"];
6644
+ isOneToOne: false;
6645
+ referencedRelation: "logistics_strategies";
6646
+ referencedColumns: ["id"];
6647
+ }];
6648
+ };
6649
+ logistics_formulas: {
6650
+ Row: {
6651
+ created_at: string;
6652
+ expression: string;
6653
+ id: string;
6654
+ notes: string | null;
6655
+ slot: string;
6656
+ strategy_id: string;
6657
+ updated_at: string;
6658
+ user_id: string;
6659
+ version: number;
6660
+ };
6661
+ Insert: {
6662
+ created_at?: string;
6663
+ expression?: string;
6664
+ id?: string;
6665
+ notes?: string | null;
6666
+ slot: string;
6667
+ strategy_id: string;
6668
+ updated_at?: string;
6669
+ user_id: string;
6670
+ version?: number;
6671
+ };
6672
+ Update: {
6673
+ created_at?: string;
6674
+ expression?: string;
6675
+ id?: string;
6676
+ notes?: string | null;
6677
+ slot?: string;
6678
+ strategy_id?: string;
6679
+ updated_at?: string;
6680
+ user_id?: string;
6681
+ version?: number;
6682
+ };
6683
+ Relationships: [{
6684
+ foreignKeyName: "logistics_formulas_strategy_id_fkey";
6685
+ columns: ["strategy_id"];
6686
+ isOneToOne: false;
6687
+ referencedRelation: "logistics_strategies";
6688
+ referencedColumns: ["id"];
6689
+ }];
6690
+ };
6691
+ logistics_strategies: {
6692
+ Row: {
6693
+ color: string;
6694
+ created_at: string;
6695
+ description: string | null;
6696
+ id: string;
6697
+ is_active: boolean;
6698
+ name: string;
6699
+ priority: number;
6700
+ updated_at: string;
6701
+ updated_by: string | null;
6702
+ user_id: string;
6703
+ version: number;
6704
+ };
6705
+ Insert: {
6706
+ color?: string;
6707
+ created_at?: string;
6708
+ description?: string | null;
6709
+ id?: string;
6710
+ is_active?: boolean;
6711
+ name: string;
6712
+ priority?: number;
6713
+ updated_at?: string;
6714
+ updated_by?: string | null;
6715
+ user_id: string;
6716
+ version?: number;
6717
+ };
6718
+ Update: {
6719
+ color?: string;
6720
+ created_at?: string;
6721
+ description?: string | null;
6722
+ id?: string;
6723
+ is_active?: boolean;
6724
+ name?: string;
6725
+ priority?: number;
6726
+ updated_at?: string;
6727
+ updated_by?: string | null;
6728
+ user_id?: string;
6729
+ version?: number;
6730
+ };
6731
+ Relationships: [];
6732
+ };
6733
+ logistics_strategy_schedules: {
6734
+ Row: {
6735
+ condition_expression: string | null;
6736
+ created_at: string;
6737
+ end_date: string | null;
6738
+ id: string;
6739
+ is_enabled: boolean;
6740
+ priority: number;
6741
+ rule_type: string;
6742
+ start_date: string | null;
6743
+ strategy_id: string;
6744
+ updated_at: string;
6745
+ user_id: string;
6746
+ };
6747
+ Insert: {
6748
+ condition_expression?: string | null;
6749
+ created_at?: string;
6750
+ end_date?: string | null;
6751
+ id?: string;
6752
+ is_enabled?: boolean;
6753
+ priority?: number;
6754
+ rule_type: string;
6755
+ start_date?: string | null;
6756
+ strategy_id: string;
6757
+ updated_at?: string;
6758
+ user_id: string;
6759
+ };
6760
+ Update: {
6761
+ condition_expression?: string | null;
6762
+ created_at?: string;
6763
+ end_date?: string | null;
6764
+ id?: string;
6765
+ is_enabled?: boolean;
6766
+ priority?: number;
6767
+ rule_type?: string;
6768
+ start_date?: string | null;
6769
+ strategy_id?: string;
6770
+ updated_at?: string;
6771
+ user_id?: string;
6772
+ };
6773
+ Relationships: [{
6774
+ foreignKeyName: "logistics_strategy_schedules_strategy_id_fkey";
6775
+ columns: ["strategy_id"];
6776
+ isOneToOne: false;
6777
+ referencedRelation: "logistics_strategies";
6778
+ referencedColumns: ["id"];
6779
+ }];
6780
+ };
6781
+ logistics_variables: {
6782
+ Row: {
6783
+ created_at: string;
6784
+ default_value: string | null;
6785
+ description: string | null;
6786
+ id: string;
6787
+ is_builtin: boolean;
6788
+ key: string;
6789
+ label: string;
5683
6790
  updated_at: string;
6791
+ user_id: string;
6792
+ value_type: string;
5684
6793
  };
5685
6794
  Insert: {
5686
6795
  created_at?: string;
6796
+ default_value?: string | null;
6797
+ description?: string | null;
5687
6798
  id?: string;
5688
- name: string;
5689
- sort_order?: number;
6799
+ is_builtin?: boolean;
6800
+ key: string;
6801
+ label: string;
5690
6802
  updated_at?: string;
6803
+ user_id: string;
6804
+ value_type: string;
5691
6805
  };
5692
6806
  Update: {
5693
6807
  created_at?: string;
6808
+ default_value?: string | null;
6809
+ description?: string | null;
5694
6810
  id?: string;
5695
- name?: string;
5696
- sort_order?: number;
6811
+ is_builtin?: boolean;
6812
+ key?: string;
6813
+ label?: string;
5697
6814
  updated_at?: string;
6815
+ user_id?: string;
6816
+ value_type?: string;
5698
6817
  };
5699
6818
  Relationships: [];
5700
6819
  };
@@ -6093,60 +7212,66 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
6093
7212
  };
6094
7213
  manufacture_products: {
6095
7214
  Row: {
6096
- aantal_te_produceren: number;
6097
7215
  created_at: string;
6098
7216
  description: string | null;
6099
7217
  id: string;
6100
7218
  is_active: boolean;
6101
- location_id: string | null;
6102
7219
  name: string;
6103
- partij_nummer: string | null;
6104
- photos: import("./types").Json;
6105
7220
  produced_stock: number;
6106
7221
  product_code: string;
6107
7222
  tenant_id: string;
6108
- unit: string;
6109
7223
  updated_at: string;
6110
7224
  };
6111
7225
  Insert: {
6112
- aantal_te_produceren?: number;
6113
7226
  created_at?: string;
6114
7227
  description?: string | null;
6115
7228
  id?: string;
6116
7229
  is_active?: boolean;
6117
- location_id?: string | null;
6118
7230
  name: string;
6119
- partij_nummer?: string | null;
6120
- photos?: import("./types").Json;
6121
7231
  produced_stock?: number;
6122
7232
  product_code: string;
6123
7233
  tenant_id: string;
6124
- unit?: string;
6125
7234
  updated_at?: string;
6126
7235
  };
6127
7236
  Update: {
6128
- aantal_te_produceren?: number;
6129
7237
  created_at?: string;
6130
7238
  description?: string | null;
6131
7239
  id?: string;
6132
7240
  is_active?: boolean;
6133
- location_id?: string | null;
6134
7241
  name?: string;
6135
- partij_nummer?: string | null;
6136
- photos?: import("./types").Json;
6137
7242
  produced_stock?: number;
6138
7243
  product_code?: string;
6139
7244
  tenant_id?: string;
6140
- unit?: string;
6141
7245
  updated_at?: string;
6142
7246
  };
6143
- Relationships: [{
6144
- foreignKeyName: "manufacture_products_location_id_fkey";
6145
- columns: ["location_id"];
6146
- isOneToOne: false;
6147
- referencedRelation: "locations";
6148
- referencedColumns: ["id"];
6149
- }];
7247
+ Relationships: [];
7248
+ };
7249
+ module_permissions: {
7250
+ Row: {
7251
+ created_at: string;
7252
+ id: string;
7253
+ module_id: string;
7254
+ permission: string;
7255
+ role: Database["public"]["Enums"]["app_role"];
7256
+ updated_at: string;
7257
+ };
7258
+ Insert: {
7259
+ created_at?: string;
7260
+ id?: string;
7261
+ module_id: string;
7262
+ permission: string;
7263
+ role: Database["public"]["Enums"]["app_role"];
7264
+ updated_at?: string;
7265
+ };
7266
+ Update: {
7267
+ created_at?: string;
7268
+ id?: string;
7269
+ module_id?: string;
7270
+ permission?: string;
7271
+ role?: Database["public"]["Enums"]["app_role"];
7272
+ updated_at?: string;
7273
+ };
7274
+ Relationships: [];
6150
7275
  };
6151
7276
  monteurs: {
6152
7277
  Row: {
@@ -6877,6 +8002,42 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
6877
8002
  };
6878
8003
  Relationships: [];
6879
8004
  };
8005
+ order_buffers: {
8006
+ Row: {
8007
+ buffer_key: string;
8008
+ created_at: string;
8009
+ customer_id: string | null;
8010
+ grouping_mode: string;
8011
+ id: string;
8012
+ pickup_date: string | null;
8013
+ pickup_location: string | null;
8014
+ plan_locked_at: string | null;
8015
+ updated_at: string;
8016
+ };
8017
+ Insert: {
8018
+ buffer_key: string;
8019
+ created_at?: string;
8020
+ customer_id?: string | null;
8021
+ grouping_mode: string;
8022
+ id?: string;
8023
+ pickup_date?: string | null;
8024
+ pickup_location?: string | null;
8025
+ plan_locked_at?: string | null;
8026
+ updated_at?: string;
8027
+ };
8028
+ Update: {
8029
+ buffer_key?: string;
8030
+ created_at?: string;
8031
+ customer_id?: string | null;
8032
+ grouping_mode?: string;
8033
+ id?: string;
8034
+ pickup_date?: string | null;
8035
+ pickup_location?: string | null;
8036
+ plan_locked_at?: string | null;
8037
+ updated_at?: string;
8038
+ };
8039
+ Relationships: [];
8040
+ };
6880
8041
  order_cart_items: {
6881
8042
  Row: {
6882
8043
  cart_id: string;
@@ -6943,6 +8104,7 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
6943
8104
  order_carts: {
6944
8105
  Row: {
6945
8106
  algorithm_version: number;
8107
+ buffer_id: string | null;
6946
8108
  cart_number: number;
6947
8109
  created_at: string;
6948
8110
  id: string;
@@ -6950,13 +8112,14 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
6950
8112
  is_complete: boolean;
6951
8113
  notes: string | null;
6952
8114
  occupancy_pct: number;
6953
- order_id: string;
8115
+ order_id: string | null;
6954
8116
  source: string;
6955
8117
  total_layers_used: number;
6956
8118
  updated_at: string;
6957
8119
  };
6958
8120
  Insert: {
6959
8121
  algorithm_version?: number;
8122
+ buffer_id?: string | null;
6960
8123
  cart_number: number;
6961
8124
  created_at?: string;
6962
8125
  id?: string;
@@ -6964,13 +8127,14 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
6964
8127
  is_complete?: boolean;
6965
8128
  notes?: string | null;
6966
8129
  occupancy_pct?: number;
6967
- order_id: string;
8130
+ order_id?: string | null;
6968
8131
  source?: string;
6969
8132
  total_layers_used?: number;
6970
8133
  updated_at?: string;
6971
8134
  };
6972
8135
  Update: {
6973
8136
  algorithm_version?: number;
8137
+ buffer_id?: string | null;
6974
8138
  cart_number?: number;
6975
8139
  created_at?: string;
6976
8140
  id?: string;
@@ -6978,12 +8142,18 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
6978
8142
  is_complete?: boolean;
6979
8143
  notes?: string | null;
6980
8144
  occupancy_pct?: number;
6981
- order_id?: string;
8145
+ order_id?: string | null;
6982
8146
  source?: string;
6983
8147
  total_layers_used?: number;
6984
8148
  updated_at?: string;
6985
8149
  };
6986
8150
  Relationships: [{
8151
+ foreignKeyName: "order_carts_buffer_id_fkey";
8152
+ columns: ["buffer_id"];
8153
+ isOneToOne: false;
8154
+ referencedRelation: "order_buffers";
8155
+ referencedColumns: ["id"];
8156
+ }, {
6987
8157
  foreignKeyName: "order_carts_order_id_fkey";
6988
8158
  columns: ["order_id"];
6989
8159
  isOneToOne: false;
@@ -7221,12 +8391,14 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
7221
8391
  };
7222
8392
  orders: {
7223
8393
  Row: {
8394
+ buffer_id: string | null;
7224
8395
  created_at: string;
7225
8396
  custom_fields: import("./types").Json;
7226
8397
  customer_id: string | null;
7227
8398
  customer_name: string;
7228
8399
  deleted_at: string | null;
7229
8400
  delivery_date: string | null;
8401
+ floriday_sales_order_id: string | null;
7230
8402
  id: string;
7231
8403
  is_reservation: boolean;
7232
8404
  notes: string | null;
@@ -7240,12 +8412,14 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
7240
8412
  updated_at: string;
7241
8413
  };
7242
8414
  Insert: {
8415
+ buffer_id?: string | null;
7243
8416
  created_at?: string;
7244
8417
  custom_fields?: import("./types").Json;
7245
8418
  customer_id?: string | null;
7246
8419
  customer_name?: string;
7247
8420
  deleted_at?: string | null;
7248
8421
  delivery_date?: string | null;
8422
+ floriday_sales_order_id?: string | null;
7249
8423
  id?: string;
7250
8424
  is_reservation?: boolean;
7251
8425
  notes?: string | null;
@@ -7259,12 +8433,14 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
7259
8433
  updated_at?: string;
7260
8434
  };
7261
8435
  Update: {
8436
+ buffer_id?: string | null;
7262
8437
  created_at?: string;
7263
8438
  custom_fields?: import("./types").Json;
7264
8439
  customer_id?: string | null;
7265
8440
  customer_name?: string;
7266
8441
  deleted_at?: string | null;
7267
8442
  delivery_date?: string | null;
8443
+ floriday_sales_order_id?: string | null;
7268
8444
  id?: string;
7269
8445
  is_reservation?: boolean;
7270
8446
  notes?: string | null;
@@ -7278,6 +8454,12 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
7278
8454
  updated_at?: string;
7279
8455
  };
7280
8456
  Relationships: [{
8457
+ foreignKeyName: "orders_buffer_id_fkey";
8458
+ columns: ["buffer_id"];
8459
+ isOneToOne: false;
8460
+ referencedRelation: "order_buffers";
8461
+ referencedColumns: ["id"];
8462
+ }, {
7281
8463
  foreignKeyName: "orders_customer_id_fkey";
7282
8464
  columns: ["customer_id"];
7283
8465
  isOneToOne: false;
@@ -7408,6 +8590,78 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
7408
8590
  };
7409
8591
  Relationships: [];
7410
8592
  };
8593
+ planning_item_assistants: {
8594
+ Row: {
8595
+ created_at: string;
8596
+ created_by: string | null;
8597
+ monteur_id: string;
8598
+ planning_item_id: string;
8599
+ };
8600
+ Insert: {
8601
+ created_at?: string;
8602
+ created_by?: string | null;
8603
+ monteur_id: string;
8604
+ planning_item_id: string;
8605
+ };
8606
+ Update: {
8607
+ created_at?: string;
8608
+ created_by?: string | null;
8609
+ monteur_id?: string;
8610
+ planning_item_id?: string;
8611
+ };
8612
+ Relationships: [{
8613
+ foreignKeyName: "planning_item_assistants_planning_item_id_fkey";
8614
+ columns: ["planning_item_id"];
8615
+ isOneToOne: false;
8616
+ referencedRelation: "planning_items";
8617
+ referencedColumns: ["id"];
8618
+ }];
8619
+ };
8620
+ planning_items: {
8621
+ Row: {
8622
+ assigned_monteur_id: string;
8623
+ created_at: string;
8624
+ created_by: string | null;
8625
+ end_at: string;
8626
+ id: string;
8627
+ notes: string | null;
8628
+ start_at: string;
8629
+ status: Database["public"]["Enums"]["planning_item_status"];
8630
+ updated_at: string;
8631
+ werkbon_id: string;
8632
+ };
8633
+ Insert: {
8634
+ assigned_monteur_id: string;
8635
+ created_at?: string;
8636
+ created_by?: string | null;
8637
+ end_at: string;
8638
+ id?: string;
8639
+ notes?: string | null;
8640
+ start_at: string;
8641
+ status?: Database["public"]["Enums"]["planning_item_status"];
8642
+ updated_at?: string;
8643
+ werkbon_id: string;
8644
+ };
8645
+ Update: {
8646
+ assigned_monteur_id?: string;
8647
+ created_at?: string;
8648
+ created_by?: string | null;
8649
+ end_at?: string;
8650
+ id?: string;
8651
+ notes?: string | null;
8652
+ start_at?: string;
8653
+ status?: Database["public"]["Enums"]["planning_item_status"];
8654
+ updated_at?: string;
8655
+ werkbon_id?: string;
8656
+ };
8657
+ Relationships: [{
8658
+ foreignKeyName: "planning_items_werkbon_id_fkey";
8659
+ columns: ["werkbon_id"];
8660
+ isOneToOne: false;
8661
+ referencedRelation: "werkbonnen";
8662
+ referencedColumns: ["id"];
8663
+ }];
8664
+ };
7411
8665
  product_bom_items: {
7412
8666
  Row: {
7413
8667
  component_product_id: string | null;
@@ -7415,6 +8669,7 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
7415
8669
  created_at: string;
7416
8670
  id: string;
7417
8671
  notes: string | null;
8672
+ packing_configuration_id: string | null;
7418
8673
  parent_product_id: string | null;
7419
8674
  parent_trade_item_floriday_id: string | null;
7420
8675
  quantity: number;
@@ -7429,6 +8684,7 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
7429
8684
  created_at?: string;
7430
8685
  id?: string;
7431
8686
  notes?: string | null;
8687
+ packing_configuration_id?: string | null;
7432
8688
  parent_product_id?: string | null;
7433
8689
  parent_trade_item_floriday_id?: string | null;
7434
8690
  quantity?: number;
@@ -7443,6 +8699,7 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
7443
8699
  created_at?: string;
7444
8700
  id?: string;
7445
8701
  notes?: string | null;
8702
+ packing_configuration_id?: string | null;
7446
8703
  parent_product_id?: string | null;
7447
8704
  parent_trade_item_floriday_id?: string | null;
7448
8705
  quantity?: number;
@@ -7644,11 +8901,13 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
7644
8901
  created_at: string;
7645
8902
  id: string;
7646
8903
  is_package: boolean;
8904
+ label: string | null;
7647
8905
  layers_per_load_carrier: number | null;
7648
8906
  load_carrier: string | null;
7649
8907
  package_id: string | null;
7650
8908
  package_label: string | null;
7651
8909
  packages_per_layer: number | null;
8910
+ packing_configuration_id: string;
7652
8911
  product_id: string | null;
7653
8912
  tenant_id: string;
7654
8913
  trade_item_floriday_id: string | null;
@@ -7659,11 +8918,13 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
7659
8918
  created_at?: string;
7660
8919
  id?: string;
7661
8920
  is_package?: boolean;
8921
+ label?: string | null;
7662
8922
  layers_per_load_carrier?: number | null;
7663
8923
  load_carrier?: string | null;
7664
8924
  package_id?: string | null;
7665
8925
  package_label?: string | null;
7666
8926
  packages_per_layer?: number | null;
8927
+ packing_configuration_id?: string;
7667
8928
  product_id?: string | null;
7668
8929
  tenant_id: string;
7669
8930
  trade_item_floriday_id?: string | null;
@@ -7674,11 +8935,13 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
7674
8935
  created_at?: string;
7675
8936
  id?: string;
7676
8937
  is_package?: boolean;
8938
+ label?: string | null;
7677
8939
  layers_per_load_carrier?: number | null;
7678
8940
  load_carrier?: string | null;
7679
8941
  package_id?: string | null;
7680
8942
  package_label?: string | null;
7681
8943
  packages_per_layer?: number | null;
8944
+ packing_configuration_id?: string;
7682
8945
  product_id?: string | null;
7683
8946
  tenant_id?: string;
7684
8947
  trade_item_floriday_id?: string | null;
@@ -7740,8 +9003,6 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
7740
9003
  crates_per_layer: number;
7741
9004
  created_at: string;
7742
9005
  custom_fields: import("./types").Json;
7743
- floriday_active: boolean;
7744
- floriday_payload: import("./types").Json;
7745
9006
  floriday_trade_item_id: string | null;
7746
9007
  id: string;
7747
9008
  image_url: string | null;
@@ -7768,8 +9029,6 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
7768
9029
  crates_per_layer?: number;
7769
9030
  created_at?: string;
7770
9031
  custom_fields?: import("./types").Json;
7771
- floriday_active?: boolean;
7772
- floriday_payload?: import("./types").Json;
7773
9032
  floriday_trade_item_id?: string | null;
7774
9033
  id?: string;
7775
9034
  image_url?: string | null;
@@ -7796,8 +9055,6 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
7796
9055
  crates_per_layer?: number;
7797
9056
  created_at?: string;
7798
9057
  custom_fields?: import("./types").Json;
7799
- floriday_active?: boolean;
7800
- floriday_payload?: import("./types").Json;
7801
9058
  floriday_trade_item_id?: string | null;
7802
9059
  id?: string;
7803
9060
  image_url?: string | null;
@@ -7822,6 +9079,7 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
7822
9079
  profiles: {
7823
9080
  Row: {
7824
9081
  address: string | null;
9082
+ avatar_url: string | null;
7825
9083
  created_at: string;
7826
9084
  display_name: string | null;
7827
9085
  email: string | null;
@@ -7833,6 +9091,7 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
7833
9091
  };
7834
9092
  Insert: {
7835
9093
  address?: string | null;
9094
+ avatar_url?: string | null;
7836
9095
  created_at?: string;
7837
9096
  display_name?: string | null;
7838
9097
  email?: string | null;
@@ -7844,6 +9103,7 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
7844
9103
  };
7845
9104
  Update: {
7846
9105
  address?: string | null;
9106
+ avatar_url?: string | null;
7847
9107
  created_at?: string;
7848
9108
  display_name?: string | null;
7849
9109
  email?: string | null;
@@ -8708,7 +9968,6 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
8708
9968
  order_id: string | null;
8709
9969
  order_item_id: string | null;
8710
9970
  order_source: string | null;
8711
- parent_trade_item_key: string | null;
8712
9971
  physical_after: number | null;
8713
9972
  physical_before: number | null;
8714
9973
  production_batch_id: string | null;
@@ -8727,7 +9986,6 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
8727
9986
  order_id?: string | null;
8728
9987
  order_item_id?: string | null;
8729
9988
  order_source?: string | null;
8730
- parent_trade_item_key?: string | null;
8731
9989
  physical_after?: number | null;
8732
9990
  physical_before?: number | null;
8733
9991
  production_batch_id?: string | null;
@@ -8746,7 +10004,6 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
8746
10004
  order_id?: string | null;
8747
10005
  order_item_id?: string | null;
8748
10006
  order_source?: string | null;
8749
- parent_trade_item_key?: string | null;
8750
10007
  physical_after?: number | null;
8751
10008
  physical_before?: number | null;
8752
10009
  production_batch_id?: string | null;
@@ -8851,6 +10108,27 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
8851
10108
  };
8852
10109
  Relationships: [];
8853
10110
  };
10111
+ technician_rates: {
10112
+ Row: {
10113
+ created_at: string;
10114
+ hourly_rate_cents: number;
10115
+ updated_at: string;
10116
+ user_id: string;
10117
+ };
10118
+ Insert: {
10119
+ created_at?: string;
10120
+ hourly_rate_cents?: number;
10121
+ updated_at?: string;
10122
+ user_id: string;
10123
+ };
10124
+ Update: {
10125
+ created_at?: string;
10126
+ hourly_rate_cents?: number;
10127
+ updated_at?: string;
10128
+ user_id?: string;
10129
+ };
10130
+ Relationships: [];
10131
+ };
8854
10132
  tenants: {
8855
10133
  Row: {
8856
10134
  created_at: string;
@@ -9055,6 +10333,48 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
9055
10333
  };
9056
10334
  Relationships: [];
9057
10335
  };
10336
+ trade_item_prices: {
10337
+ Row: {
10338
+ created_at: string;
10339
+ currency: string;
10340
+ id: string;
10341
+ last_push_error: string | null;
10342
+ last_pushed_at: string | null;
10343
+ price_group_id: string | null;
10344
+ price_per_piece: number;
10345
+ supply_line_id: string | null;
10346
+ trade_item_key: string;
10347
+ updated_at: string;
10348
+ user_id: string;
10349
+ };
10350
+ Insert: {
10351
+ created_at?: string;
10352
+ currency?: string;
10353
+ id?: string;
10354
+ last_push_error?: string | null;
10355
+ last_pushed_at?: string | null;
10356
+ price_group_id?: string | null;
10357
+ price_per_piece: number;
10358
+ supply_line_id?: string | null;
10359
+ trade_item_key: string;
10360
+ updated_at?: string;
10361
+ user_id: string;
10362
+ };
10363
+ Update: {
10364
+ created_at?: string;
10365
+ currency?: string;
10366
+ id?: string;
10367
+ last_push_error?: string | null;
10368
+ last_pushed_at?: string | null;
10369
+ price_group_id?: string | null;
10370
+ price_per_piece?: number;
10371
+ supply_line_id?: string | null;
10372
+ trade_item_key?: string;
10373
+ updated_at?: string;
10374
+ user_id?: string;
10375
+ };
10376
+ Relationships: [];
10377
+ };
9058
10378
  trade_item_stock: {
9059
10379
  Row: {
9060
10380
  connection_id: string;
@@ -9208,7 +10528,7 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
9208
10528
  twinfield_connections: {
9209
10529
  Row: {
9210
10530
  access_token: string | null;
9211
- client_id: string | null;
10531
+ client_id: string;
9212
10532
  client_secret: string | null;
9213
10533
  cluster_uri: string | null;
9214
10534
  company_code: string | null;
@@ -9220,7 +10540,7 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
9220
10540
  is_active: boolean;
9221
10541
  label: string | null;
9222
10542
  office_code: string | null;
9223
- redirect_uri: string | null;
10543
+ redirect_uri: string;
9224
10544
  refresh_token: string | null;
9225
10545
  token_expires_at: string | null;
9226
10546
  updated_at: string;
@@ -9228,7 +10548,7 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
9228
10548
  };
9229
10549
  Insert: {
9230
10550
  access_token?: string | null;
9231
- client_id?: string | null;
10551
+ client_id: string;
9232
10552
  client_secret?: string | null;
9233
10553
  cluster_uri?: string | null;
9234
10554
  company_code?: string | null;
@@ -9240,7 +10560,7 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
9240
10560
  is_active?: boolean;
9241
10561
  label?: string | null;
9242
10562
  office_code?: string | null;
9243
- redirect_uri?: string | null;
10563
+ redirect_uri: string;
9244
10564
  refresh_token?: string | null;
9245
10565
  token_expires_at?: string | null;
9246
10566
  updated_at?: string;
@@ -9248,7 +10568,7 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
9248
10568
  };
9249
10569
  Update: {
9250
10570
  access_token?: string | null;
9251
- client_id?: string | null;
10571
+ client_id?: string;
9252
10572
  client_secret?: string | null;
9253
10573
  cluster_uri?: string | null;
9254
10574
  company_code?: string | null;
@@ -9260,7 +10580,7 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
9260
10580
  is_active?: boolean;
9261
10581
  label?: string | null;
9262
10582
  office_code?: string | null;
9263
- redirect_uri?: string | null;
10583
+ redirect_uri?: string;
9264
10584
  refresh_token?: string | null;
9265
10585
  token_expires_at?: string | null;
9266
10586
  updated_at?: string;
@@ -9320,6 +10640,7 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
9320
10640
  country: string | null;
9321
10641
  created_at: string;
9322
10642
  email: string | null;
10643
+ external_group_key: string | null;
9323
10644
  id: string;
9324
10645
  last_synced_at: string | null;
9325
10646
  name: string;
@@ -9338,6 +10659,7 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
9338
10659
  country?: string | null;
9339
10660
  created_at?: string;
9340
10661
  email?: string | null;
10662
+ external_group_key?: string | null;
9341
10663
  id?: string;
9342
10664
  last_synced_at?: string | null;
9343
10665
  name: string;
@@ -9356,6 +10678,7 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
9356
10678
  country?: string | null;
9357
10679
  created_at?: string;
9358
10680
  email?: string | null;
10681
+ external_group_key?: string | null;
9359
10682
  id?: string;
9360
10683
  last_synced_at?: string | null;
9361
10684
  name?: string;
@@ -9482,35 +10805,80 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
9482
10805
  vat_rate: number | null;
9483
10806
  };
9484
10807
  Insert: {
9485
- article_code?: string | null;
10808
+ article_code?: string | null;
10809
+ connection_id: string;
10810
+ data?: import("./types").Json;
10811
+ description?: string | null;
10812
+ fetched_at?: string;
10813
+ invoice_number: string;
10814
+ line_number: number;
10815
+ line_total?: number | null;
10816
+ quantity?: number | null;
10817
+ unit_price?: number | null;
10818
+ vat_code?: string | null;
10819
+ vat_rate?: number | null;
10820
+ };
10821
+ Update: {
10822
+ article_code?: string | null;
10823
+ connection_id?: string;
10824
+ data?: import("./types").Json;
10825
+ description?: string | null;
10826
+ fetched_at?: string;
10827
+ invoice_number?: string;
10828
+ line_number?: number;
10829
+ line_total?: number | null;
10830
+ quantity?: number | null;
10831
+ unit_price?: number | null;
10832
+ vat_code?: string | null;
10833
+ vat_rate?: number | null;
10834
+ };
10835
+ Relationships: [{
10836
+ foreignKeyName: "twinfield_invoice_lines_cache_v2_connection_id_fkey";
10837
+ columns: ["connection_id"];
10838
+ isOneToOne: false;
10839
+ referencedRelation: "twinfield_connections";
10840
+ referencedColumns: ["id"];
10841
+ }];
10842
+ };
10843
+ twinfield_invoice_pdf_cache: {
10844
+ Row: {
10845
+ connection_id: string;
10846
+ created_at: string;
10847
+ fetched_at: string;
10848
+ id: string;
10849
+ invoice_number: string;
10850
+ last_accessed_at: string;
10851
+ object_path: string;
10852
+ office_code: string;
10853
+ size_bytes: number;
10854
+ updated_at: string;
10855
+ };
10856
+ Insert: {
9486
10857
  connection_id: string;
9487
- data?: import("./types").Json;
9488
- description?: string | null;
10858
+ created_at?: string;
9489
10859
  fetched_at?: string;
10860
+ id?: string;
9490
10861
  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;
10862
+ last_accessed_at?: string;
10863
+ object_path: string;
10864
+ office_code: string;
10865
+ size_bytes?: number;
10866
+ updated_at?: string;
9497
10867
  };
9498
10868
  Update: {
9499
- article_code?: string | null;
9500
10869
  connection_id?: string;
9501
- data?: import("./types").Json;
9502
- description?: string | null;
10870
+ created_at?: string;
9503
10871
  fetched_at?: string;
10872
+ id?: string;
9504
10873
  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;
10874
+ last_accessed_at?: string;
10875
+ object_path?: string;
10876
+ office_code?: string;
10877
+ size_bytes?: number;
10878
+ updated_at?: string;
9511
10879
  };
9512
10880
  Relationships: [{
9513
- foreignKeyName: "twinfield_invoice_lines_cache_v2_connection_id_fkey";
10881
+ foreignKeyName: "twinfield_invoice_pdf_cache_connection_id_fkey";
9514
10882
  columns: ["connection_id"];
9515
10883
  isOneToOne: false;
9516
10884
  referencedRelation: "twinfield_connections";
@@ -9520,6 +10888,8 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
9520
10888
  twinfield_invoice_settings: {
9521
10889
  Row: {
9522
10890
  created_at: string;
10891
+ debtor_gl_account: string;
10892
+ default_credit_invoice_type: string | null;
9523
10893
  default_gl_account: string;
9524
10894
  default_invoice_type: string;
9525
10895
  default_payment_term_days: number;
@@ -9528,11 +10898,15 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
9528
10898
  invoice_enabled_fo: boolean;
9529
10899
  invoice_enabled_ho: boolean;
9530
10900
  invoice_enabled_mo: boolean;
10901
+ payment_gl_account: string;
10902
+ payment_journal_code: string;
9531
10903
  updated_at: string;
9532
10904
  user_id: string;
9533
10905
  };
9534
10906
  Insert: {
9535
10907
  created_at?: string;
10908
+ debtor_gl_account?: string;
10909
+ default_credit_invoice_type?: string | null;
9536
10910
  default_gl_account?: string;
9537
10911
  default_invoice_type?: string;
9538
10912
  default_payment_term_days?: number;
@@ -9541,11 +10915,15 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
9541
10915
  invoice_enabled_fo?: boolean;
9542
10916
  invoice_enabled_ho?: boolean;
9543
10917
  invoice_enabled_mo?: boolean;
10918
+ payment_gl_account?: string;
10919
+ payment_journal_code?: string;
9544
10920
  updated_at?: string;
9545
10921
  user_id: string;
9546
10922
  };
9547
10923
  Update: {
9548
10924
  created_at?: string;
10925
+ debtor_gl_account?: string;
10926
+ default_credit_invoice_type?: string | null;
9549
10927
  default_gl_account?: string;
9550
10928
  default_invoice_type?: string;
9551
10929
  default_payment_term_days?: number;
@@ -9554,6 +10932,8 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
9554
10932
  invoice_enabled_fo?: boolean;
9555
10933
  invoice_enabled_ho?: boolean;
9556
10934
  invoice_enabled_mo?: boolean;
10935
+ payment_gl_account?: string;
10936
+ payment_journal_code?: string;
9557
10937
  updated_at?: string;
9558
10938
  user_id?: string;
9559
10939
  };
@@ -9774,43 +11154,49 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
9774
11154
  };
9775
11155
  twinfield_push_queue: {
9776
11156
  Row: {
11157
+ action: string;
9777
11158
  attempts: number;
9778
11159
  connection_id: string;
9779
11160
  created_at: string;
11161
+ customer_id: string | null;
9780
11162
  external_id: string | null;
9781
11163
  id: string;
9782
11164
  idempotency_key: string;
9783
11165
  last_error: string | null;
9784
11166
  next_attempt_at: string;
9785
- office_code: string;
11167
+ office_code: string | null;
9786
11168
  payload: import("./types").Json;
9787
11169
  status: string;
9788
11170
  updated_at: string;
9789
11171
  };
9790
11172
  Insert: {
11173
+ action?: string;
9791
11174
  attempts?: number;
9792
11175
  connection_id: string;
9793
11176
  created_at?: string;
11177
+ customer_id?: string | null;
9794
11178
  external_id?: string | null;
9795
11179
  id?: string;
9796
11180
  idempotency_key: string;
9797
11181
  last_error?: string | null;
9798
11182
  next_attempt_at?: string;
9799
- office_code: string;
11183
+ office_code?: string | null;
9800
11184
  payload: import("./types").Json;
9801
11185
  status?: string;
9802
11186
  updated_at?: string;
9803
11187
  };
9804
11188
  Update: {
11189
+ action?: string;
9805
11190
  attempts?: number;
9806
11191
  connection_id?: string;
9807
11192
  created_at?: string;
11193
+ customer_id?: string | null;
9808
11194
  external_id?: string | null;
9809
11195
  id?: string;
9810
11196
  idempotency_key?: string;
9811
11197
  last_error?: string | null;
9812
11198
  next_attempt_at?: string;
9813
- office_code?: string;
11199
+ office_code?: string | null;
9814
11200
  payload?: import("./types").Json;
9815
11201
  status?: string;
9816
11202
  updated_at?: string;
@@ -9821,6 +11207,12 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
9821
11207
  isOneToOne: false;
9822
11208
  referencedRelation: "twinfield_connections";
9823
11209
  referencedColumns: ["id"];
11210
+ }, {
11211
+ foreignKeyName: "twinfield_push_queue_customer_id_fkey";
11212
+ columns: ["customer_id"];
11213
+ isOneToOne: false;
11214
+ referencedRelation: "customers";
11215
+ referencedColumns: ["id"];
9824
11216
  }];
9825
11217
  };
9826
11218
  twinfield_request_metrics: {
@@ -10029,72 +11421,420 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
10029
11421
  size_bytes?: number | null;
10030
11422
  };
10031
11423
  Update: {
10032
- action?: string;
10033
- attempt_number?: number;
10034
- caller?: string;
10035
- client_user_id?: string | null;
10036
- content_type?: string | null;
11424
+ action?: string;
11425
+ attempt_number?: number;
11426
+ caller?: string;
11427
+ client_user_id?: string | null;
11428
+ content_type?: string | null;
11429
+ created_at?: string;
11430
+ environment?: string;
11431
+ error_message?: string | null;
11432
+ filename?: string | null;
11433
+ id?: string;
11434
+ idempotency_key?: string | null;
11435
+ module?: string;
11436
+ path?: string;
11437
+ reference_id?: string | null;
11438
+ request_body_hash?: string | null;
11439
+ request_timestamp?: number | null;
11440
+ response_content_type?: string | null;
11441
+ response_status?: number | null;
11442
+ size_bytes?: number | null;
11443
+ };
11444
+ Relationships: [];
11445
+ };
11446
+ voorraad_publish_attempts: {
11447
+ Row: {
11448
+ action: string;
11449
+ connection_id: string | null;
11450
+ created_at: string;
11451
+ error: string | null;
11452
+ gateway_attempt_id: string | null;
11453
+ gateway_status: number | null;
11454
+ id: string;
11455
+ intent: string;
11456
+ ok: boolean;
11457
+ request_summary: import("./types").Json | null;
11458
+ trade_item_id: string | null;
11459
+ user_id: string;
11460
+ };
11461
+ Insert: {
11462
+ action: string;
11463
+ connection_id?: string | null;
11464
+ created_at?: string;
11465
+ error?: string | null;
11466
+ gateway_attempt_id?: string | null;
11467
+ gateway_status?: number | null;
11468
+ id?: string;
11469
+ intent: string;
11470
+ ok: boolean;
11471
+ request_summary?: import("./types").Json | null;
11472
+ trade_item_id?: string | null;
11473
+ user_id: string;
11474
+ };
11475
+ Update: {
11476
+ action?: string;
11477
+ connection_id?: string | null;
11478
+ created_at?: string;
11479
+ error?: string | null;
11480
+ gateway_attempt_id?: string | null;
11481
+ gateway_status?: number | null;
11482
+ id?: string;
11483
+ intent?: string;
11484
+ ok?: boolean;
11485
+ request_summary?: import("./types").Json | null;
11486
+ trade_item_id?: string | null;
11487
+ user_id?: string;
11488
+ };
11489
+ Relationships: [];
11490
+ };
11491
+ werkbon_package_ai_rules: {
11492
+ Row: {
11493
+ active: boolean;
11494
+ case_sensitive: boolean;
11495
+ created_at: string;
11496
+ id: string;
11497
+ package_id: string;
11498
+ priority: number;
11499
+ rule_type: string;
11500
+ updated_at: string;
11501
+ value: string;
11502
+ };
11503
+ Insert: {
11504
+ active?: boolean;
11505
+ case_sensitive?: boolean;
11506
+ created_at?: string;
11507
+ id?: string;
11508
+ package_id: string;
11509
+ priority?: number;
11510
+ rule_type: string;
11511
+ updated_at?: string;
11512
+ value: string;
11513
+ };
11514
+ Update: {
11515
+ active?: boolean;
11516
+ case_sensitive?: boolean;
11517
+ created_at?: string;
11518
+ id?: string;
11519
+ package_id?: string;
11520
+ priority?: number;
11521
+ rule_type?: string;
11522
+ updated_at?: string;
11523
+ value?: string;
11524
+ };
11525
+ Relationships: [{
11526
+ foreignKeyName: "werkbon_package_ai_rules_package_id_fkey";
11527
+ columns: ["package_id"];
11528
+ isOneToOne: false;
11529
+ referencedRelation: "werkbon_packages";
11530
+ referencedColumns: ["id"];
11531
+ }];
11532
+ };
11533
+ werkbon_package_categories: {
11534
+ Row: {
11535
+ active: boolean;
11536
+ created_at: string;
11537
+ id: string;
11538
+ kleur: string | null;
11539
+ naam: string;
11540
+ sort_order: number;
11541
+ updated_at: string;
11542
+ };
11543
+ Insert: {
11544
+ active?: boolean;
11545
+ created_at?: string;
11546
+ id?: string;
11547
+ kleur?: string | null;
11548
+ naam: string;
11549
+ sort_order?: number;
11550
+ updated_at?: string;
11551
+ };
11552
+ Update: {
11553
+ active?: boolean;
11554
+ created_at?: string;
11555
+ id?: string;
11556
+ kleur?: string | null;
11557
+ naam?: string;
11558
+ sort_order?: number;
11559
+ updated_at?: string;
11560
+ };
11561
+ Relationships: [];
11562
+ };
11563
+ werkbon_package_lines: {
11564
+ Row: {
11565
+ created_at: string;
11566
+ created_by: string | null;
11567
+ id: string;
11568
+ package_id: string;
11569
+ quantity: number;
11570
+ unit_price_cents_snapshot: number;
11571
+ werkbon_id: string;
11572
+ };
11573
+ Insert: {
11574
+ created_at?: string;
11575
+ created_by?: string | null;
11576
+ id?: string;
11577
+ package_id: string;
11578
+ quantity?: number;
11579
+ unit_price_cents_snapshot?: number;
11580
+ werkbon_id: string;
11581
+ };
11582
+ Update: {
11583
+ created_at?: string;
11584
+ created_by?: string | null;
11585
+ id?: string;
11586
+ package_id?: string;
11587
+ quantity?: number;
11588
+ unit_price_cents_snapshot?: number;
11589
+ werkbon_id?: string;
11590
+ };
11591
+ Relationships: [{
11592
+ foreignKeyName: "werkbon_package_lines_package_id_fkey";
11593
+ columns: ["package_id"];
11594
+ isOneToOne: false;
11595
+ referencedRelation: "werkbon_packages";
11596
+ referencedColumns: ["id"];
11597
+ }, {
11598
+ foreignKeyName: "werkbon_package_lines_werkbon_id_fkey";
11599
+ columns: ["werkbon_id"];
11600
+ isOneToOne: false;
11601
+ referencedRelation: "werkbonnen";
11602
+ referencedColumns: ["id"];
11603
+ }];
11604
+ };
11605
+ werkbon_packages: {
11606
+ Row: {
11607
+ active: boolean;
11608
+ ai_tags: string[];
11609
+ category_id: string | null;
11610
+ code: string;
11611
+ created_at: string;
11612
+ default_quantity: number;
11613
+ description: string | null;
11614
+ duration_minutes: number | null;
11615
+ id: string;
11616
+ mandaat_type: string | null;
11617
+ name: string;
11618
+ sort_order: number;
11619
+ unit_price_cents: number;
11620
+ updated_at: string;
11621
+ };
11622
+ Insert: {
11623
+ active?: boolean;
11624
+ ai_tags?: string[];
11625
+ category_id?: string | null;
11626
+ code: string;
11627
+ created_at?: string;
11628
+ default_quantity?: number;
11629
+ description?: string | null;
11630
+ duration_minutes?: number | null;
11631
+ id?: string;
11632
+ mandaat_type?: string | null;
11633
+ name: string;
11634
+ sort_order?: number;
11635
+ unit_price_cents?: number;
11636
+ updated_at?: string;
11637
+ };
11638
+ Update: {
11639
+ active?: boolean;
11640
+ ai_tags?: string[];
11641
+ category_id?: string | null;
11642
+ code?: string;
11643
+ created_at?: string;
11644
+ default_quantity?: number;
11645
+ description?: string | null;
11646
+ duration_minutes?: number | null;
11647
+ id?: string;
11648
+ mandaat_type?: string | null;
11649
+ name?: string;
11650
+ sort_order?: number;
11651
+ unit_price_cents?: number;
11652
+ updated_at?: string;
11653
+ };
11654
+ Relationships: [{
11655
+ foreignKeyName: "werkbon_packages_category_id_fkey";
11656
+ columns: ["category_id"];
11657
+ isOneToOne: false;
11658
+ referencedRelation: "werkbon_package_categories";
11659
+ referencedColumns: ["id"];
11660
+ }];
11661
+ };
11662
+ werkbon_photos: {
11663
+ Row: {
11664
+ created_at: string;
11665
+ id: string;
11666
+ storage_path: string;
11667
+ user_id: string;
11668
+ werkbon_id: string;
11669
+ };
11670
+ Insert: {
11671
+ created_at?: string;
11672
+ id?: string;
11673
+ storage_path: string;
11674
+ user_id: string;
11675
+ werkbon_id: string;
11676
+ };
11677
+ Update: {
11678
+ created_at?: string;
11679
+ id?: string;
11680
+ storage_path?: string;
11681
+ user_id?: string;
11682
+ werkbon_id?: string;
11683
+ };
11684
+ Relationships: [{
11685
+ foreignKeyName: "werkbon_photos_werkbon_id_fkey";
11686
+ columns: ["werkbon_id"];
11687
+ isOneToOne: false;
11688
+ referencedRelation: "werkbonnen";
11689
+ referencedColumns: ["id"];
11690
+ }];
11691
+ };
11692
+ werkbon_time_logs: {
11693
+ Row: {
11694
+ activity: string;
11695
+ created_at: string;
11696
+ ended_at: string | null;
11697
+ id: string;
11698
+ started_at: string;
11699
+ user_id: string;
11700
+ werkbon_id: string;
11701
+ };
11702
+ Insert: {
11703
+ activity: string;
11704
+ created_at?: string;
11705
+ ended_at?: string | null;
11706
+ id?: string;
11707
+ started_at?: string;
11708
+ user_id: string;
11709
+ werkbon_id: string;
11710
+ };
11711
+ Update: {
11712
+ activity?: string;
10037
11713
  created_at?: string;
10038
- environment?: string;
10039
- error_message?: string | null;
10040
- filename?: string | null;
11714
+ ended_at?: string | null;
10041
11715
  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;
11716
+ started_at?: string;
11717
+ user_id?: string;
11718
+ werkbon_id?: string;
10051
11719
  };
10052
- Relationships: [];
11720
+ Relationships: [{
11721
+ foreignKeyName: "werkbon_time_logs_werkbon_id_fkey";
11722
+ columns: ["werkbon_id"];
11723
+ isOneToOne: false;
11724
+ referencedRelation: "werkbonnen";
11725
+ referencedColumns: ["id"];
11726
+ }];
10053
11727
  };
10054
- voorraad_publish_attempts: {
11728
+ werkbonnen: {
10055
11729
  Row: {
10056
- action: string;
10057
- connection_id: string | null;
11730
+ assigned_user_id: string | null;
11731
+ budget_mandate_cents: number;
11732
+ complaint_description: string | null;
10058
11733
  created_at: string;
10059
- error: string | null;
10060
- gateway_attempt_id: string | null;
10061
- gateway_status: number | null;
11734
+ created_by: string | null;
11735
+ customer_id: string | null;
11736
+ externe_referentie: string | null;
11737
+ first_time_fix: boolean | null;
10062
11738
  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;
11739
+ internal_notes: string | null;
11740
+ parent_werkbon_id: string | null;
11741
+ parsed_payload: import("./types").Json | null;
11742
+ planning_status: string;
11743
+ project_number: string | null;
11744
+ room_number: string | null;
11745
+ scheduled_end_time: string | null;
11746
+ scheduled_start_time: string | null;
11747
+ sequence_number: number;
11748
+ source_email_meta: import("./types").Json | null;
11749
+ source_mailbox_message_id: string | null;
11750
+ source_pdf_path: string | null;
11751
+ source_type: string;
11752
+ status: string;
11753
+ technician_id: string | null;
11754
+ technician_notes: string | null;
11755
+ technician_notes_raw: string | null;
11756
+ technician_task_description: string | null;
11757
+ updated_at: string;
11758
+ version: number;
11759
+ work_address: string | null;
10068
11760
  };
10069
11761
  Insert: {
10070
- action: string;
10071
- connection_id?: string | null;
11762
+ assigned_user_id?: string | null;
11763
+ budget_mandate_cents?: number;
11764
+ complaint_description?: string | null;
10072
11765
  created_at?: string;
10073
- error?: string | null;
10074
- gateway_attempt_id?: string | null;
10075
- gateway_status?: number | null;
11766
+ created_by?: string | null;
11767
+ customer_id?: string | null;
11768
+ externe_referentie?: string | null;
11769
+ first_time_fix?: boolean | null;
10076
11770
  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;
11771
+ internal_notes?: string | null;
11772
+ parent_werkbon_id?: string | null;
11773
+ parsed_payload?: import("./types").Json | null;
11774
+ planning_status?: string;
11775
+ project_number?: string | null;
11776
+ room_number?: string | null;
11777
+ scheduled_end_time?: string | null;
11778
+ scheduled_start_time?: string | null;
11779
+ sequence_number: number;
11780
+ source_email_meta?: import("./types").Json | null;
11781
+ source_mailbox_message_id?: string | null;
11782
+ source_pdf_path?: string | null;
11783
+ source_type?: string;
11784
+ status?: string;
11785
+ technician_id?: string | null;
11786
+ technician_notes?: string | null;
11787
+ technician_notes_raw?: string | null;
11788
+ technician_task_description?: string | null;
11789
+ updated_at?: string;
11790
+ version?: number;
11791
+ work_address?: string | null;
10082
11792
  };
10083
11793
  Update: {
10084
- action?: string;
10085
- connection_id?: string | null;
11794
+ assigned_user_id?: string | null;
11795
+ budget_mandate_cents?: number;
11796
+ complaint_description?: string | null;
10086
11797
  created_at?: string;
10087
- error?: string | null;
10088
- gateway_attempt_id?: string | null;
10089
- gateway_status?: number | null;
11798
+ created_by?: string | null;
11799
+ customer_id?: string | null;
11800
+ externe_referentie?: string | null;
11801
+ first_time_fix?: boolean | null;
10090
11802
  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;
11803
+ internal_notes?: string | null;
11804
+ parent_werkbon_id?: string | null;
11805
+ parsed_payload?: import("./types").Json | null;
11806
+ planning_status?: string;
11807
+ project_number?: string | null;
11808
+ room_number?: string | null;
11809
+ scheduled_end_time?: string | null;
11810
+ scheduled_start_time?: string | null;
11811
+ sequence_number?: number;
11812
+ source_email_meta?: import("./types").Json | null;
11813
+ source_mailbox_message_id?: string | null;
11814
+ source_pdf_path?: string | null;
11815
+ source_type?: string;
11816
+ status?: string;
11817
+ technician_id?: string | null;
11818
+ technician_notes?: string | null;
11819
+ technician_notes_raw?: string | null;
11820
+ technician_task_description?: string | null;
11821
+ updated_at?: string;
11822
+ version?: number;
11823
+ work_address?: string | null;
10096
11824
  };
10097
- Relationships: [];
11825
+ Relationships: [{
11826
+ foreignKeyName: "werkbonnen_parent_werkbon_id_fkey";
11827
+ columns: ["parent_werkbon_id"];
11828
+ isOneToOne: false;
11829
+ referencedRelation: "werkbonnen";
11830
+ referencedColumns: ["id"];
11831
+ }, {
11832
+ foreignKeyName: "werkbonnen_source_mailbox_message_id_fkey";
11833
+ columns: ["source_mailbox_message_id"];
11834
+ isOneToOne: false;
11835
+ referencedRelation: "mailbox_messages";
11836
+ referencedColumns: ["id"];
11837
+ }];
10098
11838
  };
10099
11839
  work_order_monteurs: {
10100
11840
  Row: {
@@ -10266,6 +12006,8 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
10266
12006
  created_at: string | null;
10267
12007
  created_by: string | null;
10268
12008
  display_name: string | null;
12009
+ graph_subscription_expires_at: string | null;
12010
+ graph_subscription_id: string | null;
10269
12011
  has_access_token: boolean | null;
10270
12012
  has_client_id: boolean | null;
10271
12013
  has_client_secret: boolean | null;
@@ -10283,6 +12025,7 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
10283
12025
  oauth_mode: string | null;
10284
12026
  provider: string | null;
10285
12027
  purpose_assignments: import("./types").Json | null;
12028
+ realtime_mode: string | null;
10286
12029
  scopes: string[] | null;
10287
12030
  smtp_host: string | null;
10288
12031
  smtp_port: number | null;
@@ -10297,6 +12040,8 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
10297
12040
  created_at?: string | null;
10298
12041
  created_by?: string | null;
10299
12042
  display_name?: string | null;
12043
+ graph_subscription_expires_at?: string | null;
12044
+ graph_subscription_id?: string | null;
10300
12045
  has_access_token?: never;
10301
12046
  has_client_id?: never;
10302
12047
  has_client_secret?: never;
@@ -10314,6 +12059,7 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
10314
12059
  oauth_mode?: string | null;
10315
12060
  provider?: string | null;
10316
12061
  purpose_assignments?: import("./types").Json | null;
12062
+ realtime_mode?: string | null;
10317
12063
  scopes?: string[] | null;
10318
12064
  smtp_host?: string | null;
10319
12065
  smtp_port?: number | null;
@@ -10328,6 +12074,8 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
10328
12074
  created_at?: string | null;
10329
12075
  created_by?: string | null;
10330
12076
  display_name?: string | null;
12077
+ graph_subscription_expires_at?: string | null;
12078
+ graph_subscription_id?: string | null;
10331
12079
  has_access_token?: never;
10332
12080
  has_client_id?: never;
10333
12081
  has_client_secret?: never;
@@ -10345,6 +12093,7 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
10345
12093
  oauth_mode?: string | null;
10346
12094
  provider?: string | null;
10347
12095
  purpose_assignments?: import("./types").Json | null;
12096
+ realtime_mode?: string | null;
10348
12097
  scopes?: string[] | null;
10349
12098
  smtp_host?: string | null;
10350
12099
  smtp_port?: number | null;
@@ -10455,6 +12204,25 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
10455
12204
  };
10456
12205
  Relationships: [];
10457
12206
  };
12207
+ floriday_customer_discounts: {
12208
+ Row: {
12209
+ base_price: number | null;
12210
+ buyer_organization_id: string | null;
12211
+ currency: string | null;
12212
+ discount_type: string | null;
12213
+ discount_value: number | null;
12214
+ min_quantity: number | null;
12215
+ net_price: number | null;
12216
+ product_group_id: string | null;
12217
+ raw: import("./types").Json | null;
12218
+ source: string | null;
12219
+ source_id: string | null;
12220
+ trade_item_id: string | null;
12221
+ valid_from: string | null;
12222
+ valid_until: string | null;
12223
+ };
12224
+ Relationships: [];
12225
+ };
10458
12226
  local_customer_discounts: {
10459
12227
  Row: {
10460
12228
  base_price: number | null;
@@ -10791,6 +12559,21 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
10791
12559
  };
10792
12560
  Returns: string;
10793
12561
  };
12562
+ ai_usage_by_module: {
12563
+ Args: {
12564
+ _from: string;
12565
+ _to: string;
12566
+ };
12567
+ Returns: {
12568
+ calls: number;
12569
+ consumer_module_id: string;
12570
+ cost_usd: number;
12571
+ errors: number;
12572
+ input_tokens: number;
12573
+ output_tokens: number;
12574
+ total_tokens: number;
12575
+ }[];
12576
+ };
10794
12577
  apply_stock_consumption: {
10795
12578
  Args: {
10796
12579
  p_order_id: string;
@@ -10848,6 +12631,12 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
10848
12631
  processed_items: number;
10849
12632
  }[];
10850
12633
  };
12634
+ calculate_layer_stock: {
12635
+ Args: {
12636
+ p_product_id: string;
12637
+ };
12638
+ Returns: number;
12639
+ };
10851
12640
  call_exact_route: {
10852
12641
  Args: {
10853
12642
  path: string;
@@ -10876,6 +12665,33 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
10876
12665
  };
10877
12666
  Returns: import("./types").Json;
10878
12667
  };
12668
+ claim_twinfield_push_batch: {
12669
+ Args: {
12670
+ _limit?: number;
12671
+ };
12672
+ Returns: {
12673
+ action: string;
12674
+ attempts: number;
12675
+ connection_id: string;
12676
+ created_at: string;
12677
+ customer_id: string | null;
12678
+ external_id: string | null;
12679
+ id: string;
12680
+ idempotency_key: string;
12681
+ last_error: string | null;
12682
+ next_attempt_at: string;
12683
+ office_code: string | null;
12684
+ payload: import("./types").Json;
12685
+ status: string;
12686
+ updated_at: string;
12687
+ }[];
12688
+ SetofOptions: {
12689
+ from: "*";
12690
+ to: "twinfield_push_queue";
12691
+ isOneToOne: false;
12692
+ isSetofReturn: true;
12693
+ };
12694
+ };
10879
12695
  cleanup_old_bookings: {
10880
12696
  Args: never;
10881
12697
  Returns: undefined;
@@ -10934,6 +12750,12 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
10934
12750
  Args: never;
10935
12751
  Returns: string;
10936
12752
  };
12753
+ custom_access_token_hook: {
12754
+ Args: {
12755
+ event: import("./types").Json;
12756
+ };
12757
+ Returns: import("./types").Json;
12758
+ };
10937
12759
  dashboard_alert_counts: {
10938
12760
  Args: never;
10939
12761
  Returns: import("./types").Json;
@@ -11001,6 +12823,16 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
11001
12823
  status: string;
11002
12824
  }[];
11003
12825
  };
12826
+ email_auth_upsert_connection: {
12827
+ Args: {
12828
+ _account_email: string;
12829
+ _created_by: string;
12830
+ _is_active: boolean;
12831
+ _provider: string;
12832
+ _status: string;
12833
+ };
12834
+ Returns: string;
12835
+ };
11004
12836
  enqueue_cart_replan_if_unlocked: {
11005
12837
  Args: {
11006
12838
  p_order_id: string;
@@ -11120,6 +12952,19 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
11120
12952
  resource: string;
11121
12953
  }[];
11122
12954
  };
12955
+ get_floriday_agreements_active: {
12956
+ Args: {
12957
+ p_on_date?: string;
12958
+ };
12959
+ Returns: {
12960
+ buyer_organization_id: string;
12961
+ data: import("./types").Json;
12962
+ floriday_id: string;
12963
+ status: string;
12964
+ valid_from: string;
12965
+ valid_until: string;
12966
+ }[];
12967
+ };
11123
12968
  get_floriday_clock_supplies_window: {
11124
12969
  Args: {
11125
12970
  p_from: string;
@@ -11207,6 +13052,12 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
11207
13052
  };
11208
13053
  Returns: string;
11209
13054
  };
13055
+ get_inventory_stock_for_key: {
13056
+ Args: {
13057
+ p_key: string;
13058
+ };
13059
+ Returns: number;
13060
+ };
11210
13061
  get_offer_by_link_code: {
11211
13062
  Args: {
11212
13063
  p_code: string;
@@ -11237,6 +13088,12 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
11237
13088
  };
11238
13089
  Returns: string;
11239
13090
  };
13091
+ get_product_group_available_stock: {
13092
+ Args: {
13093
+ p_group_id: string;
13094
+ };
13095
+ Returns: number;
13096
+ };
11240
13097
  get_room_busy_windows: {
11241
13098
  Args: {
11242
13099
  p_from: string;
@@ -11268,6 +13125,14 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
11268
13125
  };
11269
13126
  Returns: string;
11270
13127
  };
13128
+ has_module_permission: {
13129
+ Args: {
13130
+ _min: string;
13131
+ _module_id: string;
13132
+ _user_id: string;
13133
+ };
13134
+ Returns: boolean;
13135
+ };
11271
13136
  has_role: {
11272
13137
  Args: {
11273
13138
  _role: Database["public"]["Enums"]["app_role"];
@@ -11275,6 +13140,10 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
11275
13140
  };
11276
13141
  Returns: boolean;
11277
13142
  };
13143
+ has_twinfield_link: {
13144
+ Args: never;
13145
+ Returns: boolean;
13146
+ };
11278
13147
  is_authenticated: {
11279
13148
  Args: never;
11280
13149
  Returns: boolean;
@@ -11289,6 +13158,37 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
11289
13158
  };
11290
13159
  Returns: boolean;
11291
13160
  };
13161
+ jwt_has_role: {
13162
+ Args: {
13163
+ _role: Database["public"]["Enums"]["app_role"];
13164
+ };
13165
+ Returns: boolean;
13166
+ };
13167
+ list_monteurs: {
13168
+ Args: never;
13169
+ Returns: {
13170
+ avatar_url: string;
13171
+ display_name: string;
13172
+ email: string;
13173
+ id: string;
13174
+ }[];
13175
+ };
13176
+ list_my_planning_items: {
13177
+ Args: {
13178
+ _from: string;
13179
+ _to: string;
13180
+ };
13181
+ Returns: {
13182
+ assigned_monteur_id: string;
13183
+ end_at: string;
13184
+ id: string;
13185
+ notes: string;
13186
+ role: string;
13187
+ start_at: string;
13188
+ status: Database["public"]["Enums"]["planning_item_status"];
13189
+ werkbon_id: string;
13190
+ }[];
13191
+ };
11292
13192
  local_effective_price: {
11293
13193
  Args: {
11294
13194
  _customer_id: string;
@@ -11305,6 +13205,22 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
11305
13205
  source_id: string;
11306
13206
  }[];
11307
13207
  };
13208
+ log_ai_call: {
13209
+ Args: {
13210
+ _consumer_module_id: string;
13211
+ _cost_usd: number;
13212
+ _duration_ms: number;
13213
+ _error_code: string;
13214
+ _error_message: string;
13215
+ _input_tokens: number;
13216
+ _model_slug: string;
13217
+ _output_tokens: number;
13218
+ _provider_slug: string;
13219
+ _status: string;
13220
+ _total_tokens: number;
13221
+ };
13222
+ Returns: string;
13223
+ };
11308
13224
  mark_offer_clicked: {
11309
13225
  Args: {
11310
13226
  p_code: string;
@@ -11356,6 +13272,10 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
11356
13272
  };
11357
13273
  Returns: string;
11358
13274
  };
13275
+ next_twinfield_code: {
13276
+ Args: never;
13277
+ Returns: string;
13278
+ };
11359
13279
  next_work_order_number: {
11360
13280
  Args: {
11361
13281
  p_parent_work_order_id?: string;
@@ -11412,6 +13332,15 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
11412
13332
  };
11413
13333
  Returns: undefined;
11414
13334
  };
13335
+ pickstation_resolve_delivery_orders: {
13336
+ Args: {
13337
+ p_sales_order_ids: string[];
13338
+ };
13339
+ Returns: {
13340
+ delivery_order_id: string;
13341
+ sales_order_id: string;
13342
+ }[];
13343
+ };
11415
13344
  pickstation_set_cart_status: {
11416
13345
  Args: {
11417
13346
  p_cart_index: number;
@@ -11482,6 +13411,12 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
11482
13411
  };
11483
13412
  Returns: number;
11484
13413
  };
13414
+ reorder_customer_price_groups: {
13415
+ Args: {
13416
+ _ids: string[];
13417
+ };
13418
+ Returns: undefined;
13419
+ };
11485
13420
  reset_floriday_sync_cursor: {
11486
13421
  Args: {
11487
13422
  p_connection_id: string;
@@ -11517,6 +13452,12 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
11517
13452
  };
11518
13453
  Returns: string;
11519
13454
  };
13455
+ retry_twinfield_push: {
13456
+ Args: {
13457
+ _customer_id: string;
13458
+ };
13459
+ Returns: number;
13460
+ };
11520
13461
  reverse_production: {
11521
13462
  Args: {
11522
13463
  p_connection_id?: string;
@@ -11534,6 +13475,20 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
11534
13475
  };
11535
13476
  Returns: number;
11536
13477
  };
13478
+ schedule_floriday_agreement_calloffs_sync: {
13479
+ Args: {
13480
+ p_apikey: string;
13481
+ p_url: string;
13482
+ };
13483
+ Returns: number;
13484
+ };
13485
+ schedule_floriday_agreements_sync: {
13486
+ Args: {
13487
+ p_apikey: string;
13488
+ p_url: string;
13489
+ };
13490
+ Returns: number;
13491
+ };
11537
13492
  schedule_floriday_base_items_sync: {
11538
13493
  Args: {
11539
13494
  p_apikey: string;
@@ -11780,6 +13735,17 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
11780
13735
  };
11781
13736
  Returns: number;
11782
13737
  };
13738
+ self_heal_floriday_links: {
13739
+ Args: never;
13740
+ Returns: number;
13741
+ };
13742
+ set_planning_status: {
13743
+ Args: {
13744
+ _id: string;
13745
+ _status: Database["public"]["Enums"]["planning_item_status"];
13746
+ };
13747
+ Returns: undefined;
13748
+ };
11783
13749
  show_limit: {
11784
13750
  Args: never;
11785
13751
  Returns: number;
@@ -11790,12 +13756,22 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
11790
13756
  };
11791
13757
  Returns: string[];
11792
13758
  };
13759
+ sync_all_layer_stocks: {
13760
+ Args: never;
13761
+ Returns: undefined;
13762
+ };
11793
13763
  sync_cached_packing_from_product: {
11794
13764
  Args: {
11795
13765
  p_product_id: string;
11796
13766
  };
11797
13767
  Returns: undefined;
11798
13768
  };
13769
+ sync_layer_stock: {
13770
+ Args: {
13771
+ p_product_id: string;
13772
+ };
13773
+ Returns: undefined;
13774
+ };
11799
13775
  sync_order_cart_item_packing_from_product: {
11800
13776
  Args: {
11801
13777
  p_product_id: string;
@@ -11839,9 +13815,12 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
11839
13815
  };
11840
13816
  };
11841
13817
  Enums: {
11842
- app_role: "admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie" | "monteur";
13818
+ app_role: "admin" | "planner" | "monteur" | "administratie" | "ai_admin";
11843
13819
  exact_env: "staging" | "live";
11844
13820
  exact_push_status: "pending" | "sent" | "error";
13821
+ itk_customer_segment: "Business" | "Private";
13822
+ itk_dynamic_field_type: "text" | "select" | "date" | "checkbox";
13823
+ planning_item_status: "gepland" | "bezig" | "afgerond" | "geannuleerd" | "concept" | "vrijgegeven";
11845
13824
  quote_status: "concept" | "verzonden" | "bekeken" | "in_behandeling" | "geaccepteerd" | "afgewezen" | "verlopen" | "gearchiveerd";
11846
13825
  };
11847
13826
  CompositeTypes: { [_ in never]: never; };