@flowselections/floriday-klanten-module 1.0.15 → 1.0.17

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 (102) hide show
  1. package/dist-lib/assets/floriday-logo.png.asset.json +11 -0
  2. package/dist-lib/components/klanten/BackLink.d.ts +12 -0
  3. package/dist-lib/components/klanten/BackLink.d.ts.map +1 -0
  4. package/dist-lib/components/klanten/BackLink.js +12 -0
  5. package/dist-lib/components/klanten/FloridayAssortmentTab.d.ts +4 -0
  6. package/dist-lib/components/klanten/FloridayAssortmentTab.d.ts.map +1 -0
  7. package/dist-lib/components/klanten/FloridayAssortmentTab.js +80 -0
  8. package/dist-lib/components/klanten/FloridayDeeplinkButton.d.ts +8 -0
  9. package/dist-lib/components/klanten/FloridayDeeplinkButton.d.ts.map +1 -0
  10. package/dist-lib/components/klanten/FloridayDeeplinkButton.js +9 -0
  11. package/dist-lib/components/klanten/GroupedKlantDetail.d.ts.map +1 -1
  12. package/dist-lib/components/klanten/GroupedKlantDetail.js +19 -5
  13. package/dist-lib/components/klanten/ImportKlanten.d.ts.map +1 -1
  14. package/dist-lib/components/klanten/ImportKlanten.js +3 -2
  15. package/dist-lib/components/klanten/KlantDetail.d.ts.map +1 -1
  16. package/dist-lib/components/klanten/KlantDetail.js +9 -3
  17. package/dist-lib/components/klanten/KlantenOverzicht.d.ts.map +1 -1
  18. package/dist-lib/components/klanten/KlantenOverzicht.js +9 -6
  19. package/dist-lib/components/klanten/NetwerkPagina.d.ts.map +1 -1
  20. package/dist-lib/components/klanten/NetwerkPagina.js +21 -18
  21. package/dist-lib/components/klanten/NieuweKlant.d.ts.map +1 -1
  22. package/dist-lib/components/klanten/NieuweKlant.js +23 -8
  23. package/dist-lib/components/klanten/PriceGroupBadges.d.ts +7 -0
  24. package/dist-lib/components/klanten/PriceGroupBadges.d.ts.map +1 -0
  25. package/dist-lib/components/klanten/PriceGroupBadges.js +13 -0
  26. package/dist-lib/components/klanten/SyncStatusChip.d.ts +4 -0
  27. package/dist-lib/components/klanten/SyncStatusChip.d.ts.map +1 -0
  28. package/dist-lib/components/klanten/SyncStatusChip.js +49 -0
  29. package/dist-lib/components/klanten/pricegroups/CustomerPickerDialog.d.ts +8 -0
  30. package/dist-lib/components/klanten/pricegroups/CustomerPickerDialog.d.ts.map +1 -0
  31. package/dist-lib/components/klanten/pricegroups/CustomerPickerDialog.js +75 -0
  32. package/dist-lib/components/klanten/pricegroups/PriceGroupFormPage.d.ts +4 -0
  33. package/dist-lib/components/klanten/pricegroups/PriceGroupFormPage.d.ts.map +1 -0
  34. package/dist-lib/components/klanten/pricegroups/PriceGroupFormPage.js +269 -0
  35. package/dist-lib/components/klanten/pricegroups/PriceGroupsPage.d.ts +2 -0
  36. package/dist-lib/components/klanten/pricegroups/PriceGroupsPage.d.ts.map +1 -0
  37. package/dist-lib/components/klanten/pricegroups/PriceGroupsPage.js +133 -0
  38. package/dist-lib/components/klanten/pricegroups/ProductPickerDialog.d.ts +8 -0
  39. package/dist-lib/components/klanten/pricegroups/ProductPickerDialog.d.ts.map +1 -0
  40. package/dist-lib/components/klanten/pricegroups/ProductPickerDialog.js +18 -0
  41. package/dist-lib/index.d.ts +1 -0
  42. package/dist-lib/index.d.ts.map +1 -1
  43. package/dist-lib/index.js +6 -1
  44. package/dist-lib/integrations/supabase/auth-middleware.d.ts +1684 -93
  45. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
  46. package/dist-lib/integrations/supabase/client.d.ts +1684 -93
  47. package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
  48. package/dist-lib/integrations/supabase/client.js +4 -3
  49. package/dist-lib/integrations/supabase/client.server.d.ts +1684 -93
  50. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
  51. package/dist-lib/integrations/supabase/types.d.ts +1712 -72
  52. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  53. package/dist-lib/integrations/supabase/types.js +3 -9
  54. package/dist-lib/lib/accounting/twinfield/client.server.d.ts +21 -0
  55. package/dist-lib/lib/accounting/twinfield/client.server.d.ts.map +1 -0
  56. package/dist-lib/lib/accounting/twinfield/client.server.js +171 -0
  57. package/dist-lib/lib/accounting/twinfield/mapping.d.ts +46 -0
  58. package/dist-lib/lib/accounting/twinfield/mapping.d.ts.map +1 -0
  59. package/dist-lib/lib/accounting/twinfield/mapping.js +121 -0
  60. package/dist-lib/lib/accounting/twinfield/worker.functions.d.ts +38814 -0
  61. package/dist-lib/lib/accounting/twinfield/worker.functions.d.ts.map +1 -0
  62. package/dist-lib/lib/accounting/twinfield/worker.functions.js +48 -0
  63. package/dist-lib/lib/accounting/twinfield/worker.server.d.ts +12 -0
  64. package/dist-lib/lib/accounting/twinfield/worker.server.d.ts.map +1 -0
  65. package/dist-lib/lib/accounting/twinfield/worker.server.js +124 -0
  66. package/dist-lib/lib/accounting.functions.d.ts +4806 -33
  67. package/dist-lib/lib/accounting.functions.d.ts.map +1 -1
  68. package/dist-lib/lib/customer-analytics.functions.d.ts +1684 -93
  69. package/dist-lib/lib/customer-analytics.functions.d.ts.map +1 -1
  70. package/dist-lib/lib/customer-schemas.d.ts +2 -0
  71. package/dist-lib/lib/customer-schemas.d.ts.map +1 -1
  72. package/dist-lib/lib/customer-schemas.js +1 -0
  73. package/dist-lib/lib/customers.functions.d.ts +25793 -163
  74. package/dist-lib/lib/customers.functions.d.ts.map +1 -1
  75. package/dist-lib/lib/customers.functions.js +92 -4
  76. package/dist-lib/lib/delivery-locations.functions.d.ts +6408 -44
  77. package/dist-lib/lib/delivery-locations.functions.d.ts.map +1 -1
  78. package/dist-lib/lib/external-customers.functions.d.ts +6408 -44
  79. package/dist-lib/lib/external-customers.functions.d.ts.map +1 -1
  80. package/dist-lib/lib/floriday-assortment.functions.d.ts +12959 -0
  81. package/dist-lib/lib/floriday-assortment.functions.d.ts.map +1 -0
  82. package/dist-lib/lib/floriday-assortment.functions.js +213 -0
  83. package/dist-lib/lib/floriday-discounts.functions.d.ts +3398 -216
  84. package/dist-lib/lib/floriday-discounts.functions.d.ts.map +1 -1
  85. package/dist-lib/lib/floriday-trade-items.functions.d.ts +12943 -0
  86. package/dist-lib/lib/floriday-trade-items.functions.d.ts.map +1 -0
  87. package/dist-lib/lib/floriday-trade-items.functions.js +107 -0
  88. package/dist-lib/lib/local-discounts.functions.d.ts +11216 -79
  89. package/dist-lib/lib/local-discounts.functions.d.ts.map +1 -1
  90. package/dist-lib/lib/overdue-invoices.functions.d.ts +1684 -93
  91. package/dist-lib/lib/overdue-invoices.functions.d.ts.map +1 -1
  92. package/dist-lib/lib/price-groups-local.functions.d.ts +90665 -0
  93. package/dist-lib/lib/price-groups-local.functions.d.ts.map +1 -0
  94. package/dist-lib/lib/price-groups-local.functions.js +148 -0
  95. package/dist-lib/lib/price-groups.functions.d.ts +12952 -0
  96. package/dist-lib/lib/price-groups.functions.d.ts.map +1 -0
  97. package/dist-lib/lib/price-groups.functions.js +115 -0
  98. package/dist-lib/lib/pricing.d.ts +24 -0
  99. package/dist-lib/lib/pricing.d.ts.map +1 -0
  100. package/dist-lib/lib/pricing.js +60 -0
  101. package/package.json +8 -4
  102. package/public/flowselections-assets/Klanten/floriday-logo.png +0 -0
@@ -241,6 +241,318 @@ 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
+ };
331
+ ai_credentials: {
332
+ Row: {
333
+ active: boolean;
334
+ api_key: string;
335
+ created_at: string;
336
+ id: string;
337
+ label: string;
338
+ provider_id: string;
339
+ updated_at: string;
340
+ };
341
+ Insert: {
342
+ active?: boolean;
343
+ api_key: string;
344
+ created_at?: string;
345
+ id?: string;
346
+ label: string;
347
+ provider_id: string;
348
+ updated_at?: string;
349
+ };
350
+ Update: {
351
+ active?: boolean;
352
+ api_key?: string;
353
+ created_at?: string;
354
+ id?: string;
355
+ label?: string;
356
+ provider_id?: string;
357
+ updated_at?: string;
358
+ };
359
+ Relationships: [{
360
+ foreignKeyName: "ai_credentials_provider_id_fkey";
361
+ columns: ["provider_id"];
362
+ isOneToOne: false;
363
+ referencedRelation: "ai_providers";
364
+ referencedColumns: ["id"];
365
+ }];
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
+ };
436
+ ai_models: {
437
+ Row: {
438
+ active: boolean;
439
+ context_window: number | null;
440
+ created_at: string;
441
+ display_name: string;
442
+ id: string;
443
+ is_default: boolean;
444
+ modality: string;
445
+ provider_id: string;
446
+ slug: string;
447
+ updated_at: string;
448
+ };
449
+ Insert: {
450
+ active?: boolean;
451
+ context_window?: number | null;
452
+ created_at?: string;
453
+ display_name: string;
454
+ id?: string;
455
+ is_default?: boolean;
456
+ modality?: string;
457
+ provider_id: string;
458
+ slug: string;
459
+ updated_at?: string;
460
+ };
461
+ Update: {
462
+ active?: boolean;
463
+ context_window?: number | null;
464
+ created_at?: string;
465
+ display_name?: string;
466
+ id?: string;
467
+ is_default?: boolean;
468
+ modality?: string;
469
+ provider_id?: string;
470
+ slug?: string;
471
+ updated_at?: string;
472
+ };
473
+ Relationships: [{
474
+ foreignKeyName: "ai_models_provider_id_fkey";
475
+ columns: ["provider_id"];
476
+ isOneToOne: false;
477
+ referencedRelation: "ai_providers";
478
+ referencedColumns: ["id"];
479
+ }];
480
+ };
481
+ ai_module_bindings: {
482
+ Row: {
483
+ consumer_module_id: string;
484
+ created_at: string;
485
+ credential_id: string;
486
+ id: string;
487
+ model_id: string;
488
+ notes: string | null;
489
+ updated_at: string;
490
+ };
491
+ Insert: {
492
+ consumer_module_id: string;
493
+ created_at?: string;
494
+ credential_id: string;
495
+ id?: string;
496
+ model_id: string;
497
+ notes?: string | null;
498
+ updated_at?: string;
499
+ };
500
+ Update: {
501
+ consumer_module_id?: string;
502
+ created_at?: string;
503
+ credential_id?: string;
504
+ id?: string;
505
+ model_id?: string;
506
+ notes?: string | null;
507
+ updated_at?: string;
508
+ };
509
+ Relationships: [{
510
+ foreignKeyName: "ai_module_bindings_credential_id_fkey";
511
+ columns: ["credential_id"];
512
+ isOneToOne: false;
513
+ referencedRelation: "ai_credentials";
514
+ referencedColumns: ["id"];
515
+ }, {
516
+ foreignKeyName: "ai_module_bindings_model_id_fkey";
517
+ columns: ["model_id"];
518
+ isOneToOne: false;
519
+ referencedRelation: "ai_models";
520
+ referencedColumns: ["id"];
521
+ }];
522
+ };
523
+ ai_providers: {
524
+ Row: {
525
+ active: boolean;
526
+ auth_type: string;
527
+ base_url: string | null;
528
+ created_at: string;
529
+ id: string;
530
+ name: string;
531
+ slug: string;
532
+ updated_at: string;
533
+ };
534
+ Insert: {
535
+ active?: boolean;
536
+ auth_type?: string;
537
+ base_url?: string | null;
538
+ created_at?: string;
539
+ id?: string;
540
+ name: string;
541
+ slug: string;
542
+ updated_at?: string;
543
+ };
544
+ Update: {
545
+ active?: boolean;
546
+ auth_type?: string;
547
+ base_url?: string | null;
548
+ created_at?: string;
549
+ id?: string;
550
+ name?: string;
551
+ slug?: string;
552
+ updated_at?: string;
553
+ };
554
+ Relationships: [];
555
+ };
244
556
  app_settings: {
245
557
  Row: {
246
558
  created_at: string;
@@ -868,6 +1180,141 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
868
1180
  };
869
1181
  Relationships: [];
870
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
+ };
871
1318
  cart_replan_queue: {
872
1319
  Row: {
873
1320
  attempts: number;
@@ -898,6 +1345,102 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
898
1345
  referencedColumns: ["id"];
899
1346
  }];
900
1347
  };
1348
+ cart_types: {
1349
+ Row: {
1350
+ created_at: string;
1351
+ id: string;
1352
+ is_default: boolean;
1353
+ layer_length_cm: number;
1354
+ layer_width_cm: number;
1355
+ layers_per_cart: number;
1356
+ name: string;
1357
+ updated_at: string;
1358
+ };
1359
+ Insert: {
1360
+ created_at?: string;
1361
+ id?: string;
1362
+ is_default?: boolean;
1363
+ layer_length_cm: number;
1364
+ layer_width_cm: number;
1365
+ layers_per_cart?: number;
1366
+ name: string;
1367
+ updated_at?: string;
1368
+ };
1369
+ Update: {
1370
+ created_at?: string;
1371
+ id?: string;
1372
+ is_default?: boolean;
1373
+ layer_length_cm?: number;
1374
+ layer_width_cm?: number;
1375
+ layers_per_cart?: number;
1376
+ name?: string;
1377
+ updated_at?: string;
1378
+ };
1379
+ Relationships: [];
1380
+ };
1381
+ catalog_articles_cache: {
1382
+ Row: {
1383
+ created_at: string;
1384
+ default_price: number;
1385
+ default_vat_rate_ref: string | null;
1386
+ external_ref: string;
1387
+ id: string;
1388
+ name: string;
1389
+ updated_at: string;
1390
+ user_id: string;
1391
+ };
1392
+ Insert: {
1393
+ created_at?: string;
1394
+ default_price?: number;
1395
+ default_vat_rate_ref?: string | null;
1396
+ external_ref: string;
1397
+ id?: string;
1398
+ name: string;
1399
+ updated_at?: string;
1400
+ user_id: string;
1401
+ };
1402
+ Update: {
1403
+ created_at?: string;
1404
+ default_price?: number;
1405
+ default_vat_rate_ref?: string | null;
1406
+ external_ref?: string;
1407
+ id?: string;
1408
+ name?: string;
1409
+ updated_at?: string;
1410
+ user_id?: string;
1411
+ };
1412
+ Relationships: [];
1413
+ };
1414
+ catalog_vat_rates_cache: {
1415
+ Row: {
1416
+ created_at: string;
1417
+ external_ref: string;
1418
+ id: string;
1419
+ label: string;
1420
+ percentage: number;
1421
+ updated_at: string;
1422
+ user_id: string;
1423
+ };
1424
+ Insert: {
1425
+ created_at?: string;
1426
+ external_ref: string;
1427
+ id?: string;
1428
+ label: string;
1429
+ percentage?: number;
1430
+ updated_at?: string;
1431
+ user_id: string;
1432
+ };
1433
+ Update: {
1434
+ created_at?: string;
1435
+ external_ref?: string;
1436
+ id?: string;
1437
+ label?: string;
1438
+ percentage?: number;
1439
+ updated_at?: string;
1440
+ user_id?: string;
1441
+ };
1442
+ Relationships: [];
1443
+ };
901
1444
  collections: {
902
1445
  Row: {
903
1446
  created_at: string;
@@ -922,6 +1465,36 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
922
1465
  };
923
1466
  Relationships: [];
924
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
+ };
925
1498
  customer_audit_log: {
926
1499
  Row: {
927
1500
  action: string;
@@ -1096,53 +1669,152 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
1096
1669
  created_at?: string;
1097
1670
  field_setting_id: string;
1098
1671
  id?: string;
1099
- label: string;
1100
- sort_order?: number;
1672
+ label: string;
1673
+ sort_order?: number;
1674
+ };
1675
+ Update: {
1676
+ created_at?: string;
1677
+ field_setting_id?: string;
1678
+ id?: string;
1679
+ label?: string;
1680
+ sort_order?: number;
1681
+ };
1682
+ Relationships: [{
1683
+ foreignKeyName: "customer_field_options_field_setting_id_fkey";
1684
+ columns: ["field_setting_id"];
1685
+ isOneToOne: false;
1686
+ referencedRelation: "customer_field_settings";
1687
+ referencedColumns: ["id"];
1688
+ }];
1689
+ };
1690
+ customer_field_settings: {
1691
+ Row: {
1692
+ created_at: string;
1693
+ field_key: string;
1694
+ field_label: string;
1695
+ field_type: string;
1696
+ id: string;
1697
+ is_custom: boolean;
1698
+ sort_order: number;
1699
+ updated_at: string;
1700
+ };
1701
+ Insert: {
1702
+ created_at?: string;
1703
+ field_key: string;
1704
+ field_label: string;
1705
+ field_type?: string;
1706
+ id?: string;
1707
+ is_custom?: boolean;
1708
+ sort_order?: number;
1709
+ updated_at?: string;
1710
+ };
1711
+ Update: {
1712
+ created_at?: string;
1713
+ field_key?: string;
1714
+ field_label?: string;
1715
+ field_type?: string;
1716
+ id?: string;
1717
+ is_custom?: boolean;
1718
+ sort_order?: number;
1719
+ updated_at?: string;
1720
+ };
1721
+ Relationships: [];
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;
1101
1737
  };
1102
1738
  Update: {
1103
1739
  created_at?: string;
1104
- field_setting_id?: string;
1740
+ customer_key?: string;
1105
1741
  id?: string;
1106
- label?: string;
1107
- sort_order?: number;
1742
+ owner_id?: string;
1743
+ price_group_id?: string;
1108
1744
  };
1109
1745
  Relationships: [{
1110
- foreignKeyName: "customer_field_options_field_setting_id_fkey";
1111
- columns: ["field_setting_id"];
1746
+ foreignKeyName: "customer_price_group_members_price_group_id_fkey";
1747
+ columns: ["price_group_id"];
1112
1748
  isOneToOne: false;
1113
- referencedRelation: "customer_field_settings";
1749
+ referencedRelation: "customer_price_groups";
1114
1750
  referencedColumns: ["id"];
1115
1751
  }];
1116
1752
  };
1117
- customer_field_settings: {
1753
+ customer_price_groups: {
1118
1754
  Row: {
1755
+ calc_type: string | null;
1756
+ calc_value: number | null;
1757
+ calc_value_type: string | null;
1119
1758
  created_at: string;
1120
- field_key: string;
1121
- field_label: string;
1122
- field_type: string;
1759
+ currency: string;
1760
+ distribute_over: string | null;
1761
+ group_type: string;
1762
+ handling_fee: number | null;
1123
1763
  id: string;
1124
- is_custom: boolean;
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;
1125
1772
  sort_order: number;
1773
+ unit: string;
1126
1774
  updated_at: string;
1127
1775
  };
1128
1776
  Insert: {
1777
+ calc_type?: string | null;
1778
+ calc_value?: number | null;
1779
+ calc_value_type?: string | null;
1129
1780
  created_at?: string;
1130
- field_key: string;
1131
- field_label: string;
1132
- field_type?: string;
1781
+ currency?: string;
1782
+ distribute_over?: string | null;
1783
+ group_type?: string;
1784
+ handling_fee?: number | null;
1133
1785
  id?: string;
1134
- is_custom?: boolean;
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;
1135
1794
  sort_order?: number;
1795
+ unit?: string;
1136
1796
  updated_at?: string;
1137
1797
  };
1138
1798
  Update: {
1799
+ calc_type?: string | null;
1800
+ calc_value?: number | null;
1801
+ calc_value_type?: string | null;
1139
1802
  created_at?: string;
1140
- field_key?: string;
1141
- field_label?: string;
1142
- field_type?: string;
1803
+ currency?: string;
1804
+ distribute_over?: string | null;
1805
+ group_type?: string;
1806
+ handling_fee?: number | null;
1143
1807
  id?: string;
1144
- is_custom?: boolean;
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;
1145
1816
  sort_order?: number;
1817
+ unit?: string;
1146
1818
  updated_at?: string;
1147
1819
  };
1148
1820
  Relationships: [];
@@ -1300,6 +1972,10 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
1300
1972
  sync_error: string | null;
1301
1973
  sync_status: string;
1302
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;
1303
1979
  updated_at: string;
1304
1980
  vat_display: string | null;
1305
1981
  vat_number: string | null;
@@ -1367,6 +2043,10 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
1367
2043
  sync_error?: string | null;
1368
2044
  sync_status?: string;
1369
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;
1370
2050
  updated_at?: string;
1371
2051
  vat_display?: string | null;
1372
2052
  vat_number?: string | null;
@@ -1434,6 +2114,10 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
1434
2114
  sync_error?: string | null;
1435
2115
  sync_status?: string;
1436
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;
1437
2121
  updated_at?: string;
1438
2122
  vat_display?: string | null;
1439
2123
  vat_number?: string | null;
@@ -5271,84 +5955,366 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
5271
5955
  vat_amount: number | null;
5272
5956
  };
5273
5957
  Insert: {
5274
- booking_id?: string | null;
5275
- company_name?: string | null;
5958
+ booking_id?: string | null;
5959
+ company_name?: string | null;
5960
+ created_at?: string;
5961
+ customer_email?: string | null;
5962
+ description?: string | null;
5963
+ exact_article_id?: string | null;
5964
+ id?: string;
5965
+ invoice_run_id?: string | null;
5966
+ quantity?: number | null;
5967
+ total_excl_vat?: number | null;
5968
+ total_incl_vat?: number | null;
5969
+ unit_price?: number | null;
5970
+ vat_amount?: number | null;
5971
+ };
5972
+ Update: {
5973
+ booking_id?: string | null;
5974
+ company_name?: string | null;
5975
+ created_at?: string;
5976
+ customer_email?: string | null;
5977
+ description?: string | null;
5978
+ exact_article_id?: string | null;
5979
+ id?: string;
5980
+ invoice_run_id?: string | null;
5981
+ quantity?: number | null;
5982
+ total_excl_vat?: number | null;
5983
+ total_incl_vat?: number | null;
5984
+ unit_price?: number | null;
5985
+ vat_amount?: number | null;
5986
+ };
5987
+ Relationships: [{
5988
+ foreignKeyName: "invoice_run_items_booking_id_fkey";
5989
+ columns: ["booking_id"];
5990
+ isOneToOne: false;
5991
+ referencedRelation: "bookings";
5992
+ referencedColumns: ["id"];
5993
+ }, {
5994
+ foreignKeyName: "invoice_run_items_invoice_run_id_fkey";
5995
+ columns: ["invoice_run_id"];
5996
+ isOneToOne: false;
5997
+ referencedRelation: "invoice_runs";
5998
+ referencedColumns: ["id"];
5999
+ }];
6000
+ };
6001
+ invoice_runs: {
6002
+ Row: {
6003
+ created_at: string;
6004
+ created_by: string | null;
6005
+ id: string;
6006
+ period_end: string;
6007
+ period_start: string;
6008
+ status: string;
6009
+ total_excl_vat: number | null;
6010
+ total_incl_vat: number | null;
6011
+ vat_amount: number | null;
6012
+ };
6013
+ Insert: {
6014
+ created_at?: string;
6015
+ created_by?: string | null;
6016
+ id?: string;
6017
+ period_end: string;
6018
+ period_start: string;
6019
+ status?: string;
6020
+ total_excl_vat?: number | null;
6021
+ total_incl_vat?: number | null;
6022
+ vat_amount?: number | null;
6023
+ };
6024
+ Update: {
6025
+ created_at?: string;
6026
+ created_by?: string | null;
6027
+ id?: string;
6028
+ period_end?: string;
6029
+ period_start?: string;
6030
+ status?: string;
6031
+ total_excl_vat?: number | null;
6032
+ total_incl_vat?: number | null;
6033
+ vat_amount?: number | null;
6034
+ };
6035
+ Relationships: [];
6036
+ };
6037
+ itk_contact_persons: {
6038
+ Row: {
6039
+ created_at: string;
6040
+ customer_id: string;
6041
+ email: string | null;
6042
+ id: string;
6043
+ name: string;
6044
+ phone: string | null;
6045
+ role: string | null;
6046
+ updated_at: string;
6047
+ };
6048
+ Insert: {
6049
+ created_at?: string;
6050
+ customer_id: string;
6051
+ email?: string | null;
6052
+ id?: string;
6053
+ name: string;
6054
+ phone?: string | null;
6055
+ role?: string | null;
6056
+ updated_at?: string;
6057
+ };
6058
+ Update: {
6059
+ created_at?: string;
6060
+ customer_id?: string;
6061
+ email?: string | null;
6062
+ id?: string;
6063
+ name?: string;
6064
+ phone?: string | null;
6065
+ role?: string | null;
6066
+ updated_at?: string;
6067
+ };
6068
+ Relationships: [{
6069
+ foreignKeyName: "itk_contact_persons_customer_id_fkey";
6070
+ columns: ["customer_id"];
6071
+ isOneToOne: false;
6072
+ referencedRelation: "itk_customers";
6073
+ referencedColumns: ["id"];
6074
+ }];
6075
+ };
6076
+ itk_customer_dynamic_values: {
6077
+ Row: {
6078
+ created_at: string;
6079
+ customer_id: string;
6080
+ field_id: string;
6081
+ id: string;
6082
+ updated_at: string;
6083
+ value: string | null;
6084
+ };
6085
+ Insert: {
6086
+ created_at?: string;
6087
+ customer_id: string;
6088
+ field_id: string;
6089
+ id?: string;
6090
+ updated_at?: string;
6091
+ value?: string | null;
6092
+ };
6093
+ Update: {
6094
+ created_at?: string;
6095
+ customer_id?: string;
6096
+ field_id?: string;
6097
+ id?: string;
6098
+ updated_at?: string;
6099
+ value?: string | null;
6100
+ };
6101
+ Relationships: [{
6102
+ foreignKeyName: "itk_customer_dynamic_values_customer_id_fkey";
6103
+ columns: ["customer_id"];
6104
+ isOneToOne: false;
6105
+ referencedRelation: "itk_customers";
6106
+ referencedColumns: ["id"];
6107
+ }, {
6108
+ foreignKeyName: "itk_customer_dynamic_values_field_id_fkey";
6109
+ columns: ["field_id"];
6110
+ isOneToOne: false;
6111
+ referencedRelation: "itk_dynamic_fields";
6112
+ referencedColumns: ["id"];
6113
+ }];
6114
+ };
6115
+ itk_customer_notes: {
6116
+ Row: {
6117
+ body: string;
6118
+ created_at: string;
6119
+ created_by: string | null;
6120
+ customer_id: string;
6121
+ id: string;
6122
+ note_type: string;
6123
+ updated_at: string;
6124
+ };
6125
+ Insert: {
6126
+ body: string;
6127
+ created_at?: string;
6128
+ created_by?: string | null;
6129
+ customer_id: string;
6130
+ id?: string;
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;
5276
6245
  created_at?: string;
5277
- customer_email?: string | null;
5278
- description?: string | null;
5279
- exact_article_id?: string | null;
6246
+ customer_id: string;
5280
6247
  id?: string;
5281
- invoice_run_id?: string | null;
5282
- quantity?: number | null;
5283
- total_excl_vat?: number | null;
5284
- total_incl_vat?: number | null;
5285
- unit_price?: number | null;
5286
- vat_amount?: number | null;
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;
5287
6255
  };
5288
6256
  Update: {
5289
- booking_id?: string | null;
5290
- company_name?: string | null;
6257
+ city?: string | null;
5291
6258
  created_at?: string;
5292
- customer_email?: string | null;
5293
- description?: string | null;
5294
- exact_article_id?: string | null;
6259
+ customer_id?: string;
5295
6260
  id?: string;
5296
- invoice_run_id?: string | null;
5297
- quantity?: number | null;
5298
- total_excl_vat?: number | null;
5299
- total_incl_vat?: number | null;
5300
- unit_price?: number | null;
5301
- vat_amount?: number | null;
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;
5302
6268
  };
5303
6269
  Relationships: [{
5304
- foreignKeyName: "invoice_run_items_booking_id_fkey";
5305
- columns: ["booking_id"];
5306
- isOneToOne: false;
5307
- referencedRelation: "bookings";
5308
- referencedColumns: ["id"];
5309
- }, {
5310
- foreignKeyName: "invoice_run_items_invoice_run_id_fkey";
5311
- columns: ["invoice_run_id"];
6270
+ foreignKeyName: "itk_work_locations_customer_id_fkey";
6271
+ columns: ["customer_id"];
5312
6272
  isOneToOne: false;
5313
- referencedRelation: "invoice_runs";
6273
+ referencedRelation: "itk_customers";
5314
6274
  referencedColumns: ["id"];
5315
6275
  }];
5316
6276
  };
5317
- invoice_runs: {
6277
+ leave_requests: {
5318
6278
  Row: {
5319
6279
  created_at: string;
5320
- created_by: string | null;
6280
+ end_date: string;
5321
6281
  id: string;
5322
- period_end: string;
5323
- period_start: string;
6282
+ reason: string | null;
6283
+ start_date: string;
5324
6284
  status: string;
5325
- total_excl_vat: number | null;
5326
- total_incl_vat: number | null;
5327
- vat_amount: number | null;
6285
+ tenant_id: string;
6286
+ updated_at: string;
6287
+ user_id: string;
5328
6288
  };
5329
6289
  Insert: {
5330
6290
  created_at?: string;
5331
- created_by?: string | null;
6291
+ end_date: string;
5332
6292
  id?: string;
5333
- period_end: string;
5334
- period_start: string;
6293
+ reason?: string | null;
6294
+ start_date: string;
5335
6295
  status?: string;
5336
- total_excl_vat?: number | null;
5337
- total_incl_vat?: number | null;
5338
- vat_amount?: number | null;
6296
+ tenant_id?: string;
6297
+ updated_at?: string;
6298
+ user_id: string;
5339
6299
  };
5340
6300
  Update: {
5341
6301
  created_at?: string;
5342
- created_by?: string | null;
6302
+ end_date?: string;
5343
6303
  id?: string;
5344
- period_end?: string;
5345
- period_start?: string;
6304
+ reason?: string | null;
6305
+ start_date?: string;
5346
6306
  status?: string;
5347
- total_excl_vat?: number | null;
5348
- total_incl_vat?: number | null;
5349
- vat_amount?: number | null;
6307
+ tenant_id?: string;
6308
+ updated_at?: string;
6309
+ user_id?: string;
5350
6310
  };
5351
- Relationships: [];
6311
+ Relationships: [{
6312
+ foreignKeyName: "leave_requests_user_id_fkey";
6313
+ columns: ["user_id"];
6314
+ isOneToOne: false;
6315
+ referencedRelation: "monteurs";
6316
+ referencedColumns: ["id"];
6317
+ }];
5352
6318
  };
5353
6319
  local_customer_agreements: {
5354
6320
  Row: {
@@ -6001,6 +6967,33 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
6001
6967
  };
6002
6968
  Relationships: [];
6003
6969
  };
6970
+ module_permissions: {
6971
+ Row: {
6972
+ created_at: string;
6973
+ id: string;
6974
+ module_id: string;
6975
+ permission: string;
6976
+ role: Database["public"]["Enums"]["app_role"];
6977
+ updated_at: string;
6978
+ };
6979
+ Insert: {
6980
+ created_at?: string;
6981
+ id?: string;
6982
+ module_id: string;
6983
+ permission: string;
6984
+ role: Database["public"]["Enums"]["app_role"];
6985
+ updated_at?: string;
6986
+ };
6987
+ Update: {
6988
+ created_at?: string;
6989
+ id?: string;
6990
+ module_id?: string;
6991
+ permission?: string;
6992
+ role?: Database["public"]["Enums"]["app_role"];
6993
+ updated_at?: string;
6994
+ };
6995
+ Relationships: [];
6996
+ };
6004
6997
  monteurs: {
6005
6998
  Row: {
6006
6999
  avatar_url: string | null;
@@ -6730,6 +7723,42 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
6730
7723
  };
6731
7724
  Relationships: [];
6732
7725
  };
7726
+ order_buffers: {
7727
+ Row: {
7728
+ buffer_key: string;
7729
+ created_at: string;
7730
+ customer_id: string | null;
7731
+ grouping_mode: string;
7732
+ id: string;
7733
+ pickup_date: string | null;
7734
+ pickup_location: string | null;
7735
+ plan_locked_at: string | null;
7736
+ updated_at: string;
7737
+ };
7738
+ Insert: {
7739
+ buffer_key: string;
7740
+ created_at?: string;
7741
+ customer_id?: string | null;
7742
+ grouping_mode: string;
7743
+ id?: string;
7744
+ pickup_date?: string | null;
7745
+ pickup_location?: string | null;
7746
+ plan_locked_at?: string | null;
7747
+ updated_at?: string;
7748
+ };
7749
+ Update: {
7750
+ buffer_key?: string;
7751
+ created_at?: string;
7752
+ customer_id?: string | null;
7753
+ grouping_mode?: string;
7754
+ id?: string;
7755
+ pickup_date?: string | null;
7756
+ pickup_location?: string | null;
7757
+ plan_locked_at?: string | null;
7758
+ updated_at?: string;
7759
+ };
7760
+ Relationships: [];
7761
+ };
6733
7762
  order_cart_items: {
6734
7763
  Row: {
6735
7764
  cart_id: string;
@@ -6796,6 +7825,7 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
6796
7825
  order_carts: {
6797
7826
  Row: {
6798
7827
  algorithm_version: number;
7828
+ buffer_id: string | null;
6799
7829
  cart_number: number;
6800
7830
  created_at: string;
6801
7831
  id: string;
@@ -6803,13 +7833,14 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
6803
7833
  is_complete: boolean;
6804
7834
  notes: string | null;
6805
7835
  occupancy_pct: number;
6806
- order_id: string;
7836
+ order_id: string | null;
6807
7837
  source: string;
6808
7838
  total_layers_used: number;
6809
7839
  updated_at: string;
6810
7840
  };
6811
7841
  Insert: {
6812
7842
  algorithm_version?: number;
7843
+ buffer_id?: string | null;
6813
7844
  cart_number: number;
6814
7845
  created_at?: string;
6815
7846
  id?: string;
@@ -6817,13 +7848,14 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
6817
7848
  is_complete?: boolean;
6818
7849
  notes?: string | null;
6819
7850
  occupancy_pct?: number;
6820
- order_id: string;
7851
+ order_id?: string | null;
6821
7852
  source?: string;
6822
7853
  total_layers_used?: number;
6823
7854
  updated_at?: string;
6824
7855
  };
6825
7856
  Update: {
6826
7857
  algorithm_version?: number;
7858
+ buffer_id?: string | null;
6827
7859
  cart_number?: number;
6828
7860
  created_at?: string;
6829
7861
  id?: string;
@@ -6831,12 +7863,18 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
6831
7863
  is_complete?: boolean;
6832
7864
  notes?: string | null;
6833
7865
  occupancy_pct?: number;
6834
- order_id?: string;
7866
+ order_id?: string | null;
6835
7867
  source?: string;
6836
7868
  total_layers_used?: number;
6837
7869
  updated_at?: string;
6838
7870
  };
6839
7871
  Relationships: [{
7872
+ foreignKeyName: "order_carts_buffer_id_fkey";
7873
+ columns: ["buffer_id"];
7874
+ isOneToOne: false;
7875
+ referencedRelation: "order_buffers";
7876
+ referencedColumns: ["id"];
7877
+ }, {
6840
7878
  foreignKeyName: "order_carts_order_id_fkey";
6841
7879
  columns: ["order_id"];
6842
7880
  isOneToOne: false;
@@ -6973,15 +8011,117 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
6973
8011
  };
6974
8012
  Relationships: [];
6975
8013
  };
8014
+ order_shipment_items: {
8015
+ Row: {
8016
+ created_at: string;
8017
+ id: string;
8018
+ order_item_id: string;
8019
+ product_id: string | null;
8020
+ product_name: string;
8021
+ quantity: number;
8022
+ shipment_id: string;
8023
+ updated_at: string;
8024
+ };
8025
+ Insert: {
8026
+ created_at?: string;
8027
+ id?: string;
8028
+ order_item_id: string;
8029
+ product_id?: string | null;
8030
+ product_name: string;
8031
+ quantity: number;
8032
+ shipment_id: string;
8033
+ updated_at?: string;
8034
+ };
8035
+ Update: {
8036
+ created_at?: string;
8037
+ id?: string;
8038
+ order_item_id?: string;
8039
+ product_id?: string | null;
8040
+ product_name?: string;
8041
+ quantity?: number;
8042
+ shipment_id?: string;
8043
+ updated_at?: string;
8044
+ };
8045
+ Relationships: [{
8046
+ foreignKeyName: "order_shipment_items_order_item_id_fkey";
8047
+ columns: ["order_item_id"];
8048
+ isOneToOne: false;
8049
+ referencedRelation: "order_items";
8050
+ referencedColumns: ["id"];
8051
+ }, {
8052
+ foreignKeyName: "order_shipment_items_shipment_id_fkey";
8053
+ columns: ["shipment_id"];
8054
+ isOneToOne: false;
8055
+ referencedRelation: "order_shipments";
8056
+ referencedColumns: ["id"];
8057
+ }];
8058
+ };
8059
+ order_shipments: {
8060
+ Row: {
8061
+ carrier_id: string | null;
8062
+ created_at: string;
8063
+ delivery_date: string | null;
8064
+ delivery_location_id: string | null;
8065
+ id: string;
8066
+ notes: string | null;
8067
+ order_id: string;
8068
+ shipment_number: number;
8069
+ shipped_at: string | null;
8070
+ status: string;
8071
+ updated_at: string;
8072
+ };
8073
+ Insert: {
8074
+ carrier_id?: string | null;
8075
+ created_at?: string;
8076
+ delivery_date?: string | null;
8077
+ delivery_location_id?: string | null;
8078
+ id?: string;
8079
+ notes?: string | null;
8080
+ order_id: string;
8081
+ shipment_number: number;
8082
+ shipped_at?: string | null;
8083
+ status?: string;
8084
+ updated_at?: string;
8085
+ };
8086
+ Update: {
8087
+ carrier_id?: string | null;
8088
+ created_at?: string;
8089
+ delivery_date?: string | null;
8090
+ delivery_location_id?: string | null;
8091
+ id?: string;
8092
+ notes?: string | null;
8093
+ order_id?: string;
8094
+ shipment_number?: number;
8095
+ shipped_at?: string | null;
8096
+ status?: string;
8097
+ updated_at?: string;
8098
+ };
8099
+ Relationships: [{
8100
+ foreignKeyName: "order_shipments_carrier_id_fkey";
8101
+ columns: ["carrier_id"];
8102
+ isOneToOne: false;
8103
+ referencedRelation: "carriers";
8104
+ referencedColumns: ["id"];
8105
+ }, {
8106
+ foreignKeyName: "order_shipments_order_id_fkey";
8107
+ columns: ["order_id"];
8108
+ isOneToOne: false;
8109
+ referencedRelation: "orders";
8110
+ referencedColumns: ["id"];
8111
+ }];
8112
+ };
6976
8113
  orders: {
6977
8114
  Row: {
8115
+ buffer_id: string | null;
6978
8116
  created_at: string;
6979
8117
  custom_fields: import("./types").Json;
6980
8118
  customer_id: string | null;
6981
8119
  customer_name: string;
6982
8120
  deleted_at: string | null;
6983
- delivery_date: string;
8121
+ delivery_date: string | null;
8122
+ floriday_sales_order_id: string | null;
6984
8123
  id: string;
8124
+ is_reservation: boolean;
6985
8125
  notes: string | null;
6986
8126
  order_date: string;
6987
8127
  order_number: string;
@@ -6993,13 +8133,16 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
6993
8133
  updated_at: string;
6994
8134
  };
6995
8135
  Insert: {
8136
+ buffer_id?: string | null;
6996
8137
  created_at?: string;
6997
8138
  custom_fields?: import("./types").Json;
6998
8139
  customer_id?: string | null;
6999
8140
  customer_name?: string;
7000
8141
  deleted_at?: string | null;
7001
- delivery_date: string;
8142
+ delivery_date?: string | null;
8143
+ floriday_sales_order_id?: string | null;
7002
8144
  id?: string;
8145
+ is_reservation?: boolean;
7003
8146
  notes?: string | null;
7004
8147
  order_date?: string;
7005
8148
  order_number: string;
@@ -7011,13 +8154,16 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
7011
8154
  updated_at?: string;
7012
8155
  };
7013
8156
  Update: {
8157
+ buffer_id?: string | null;
7014
8158
  created_at?: string;
7015
8159
  custom_fields?: import("./types").Json;
7016
8160
  customer_id?: string | null;
7017
8161
  customer_name?: string;
7018
8162
  deleted_at?: string | null;
7019
- delivery_date?: string;
8163
+ delivery_date?: string | null;
8164
+ floriday_sales_order_id?: string | null;
7020
8165
  id?: string;
8166
+ is_reservation?: boolean;
7021
8167
  notes?: string | null;
7022
8168
  order_date?: string;
7023
8169
  order_number?: string;
@@ -7029,6 +8175,12 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
7029
8175
  updated_at?: string;
7030
8176
  };
7031
8177
  Relationships: [{
8178
+ foreignKeyName: "orders_buffer_id_fkey";
8179
+ columns: ["buffer_id"];
8180
+ isOneToOne: false;
8181
+ referencedRelation: "order_buffers";
8182
+ referencedColumns: ["id"];
8183
+ }, {
7032
8184
  foreignKeyName: "orders_customer_id_fkey";
7033
8185
  columns: ["customer_id"];
7034
8186
  isOneToOne: false;
@@ -7292,6 +8444,8 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
7292
8444
  Row: {
7293
8445
  created_at: string;
7294
8446
  description: string | null;
8447
+ head_product_id: string | null;
8448
+ head_trade_item_floriday_id: string | null;
7295
8449
  id: string;
7296
8450
  is_active: boolean;
7297
8451
  name: string;
@@ -7301,6 +8455,8 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
7301
8455
  Insert: {
7302
8456
  created_at?: string;
7303
8457
  description?: string | null;
8458
+ head_product_id?: string | null;
8459
+ head_trade_item_floriday_id?: string | null;
7304
8460
  id?: string;
7305
8461
  is_active?: boolean;
7306
8462
  name: string;
@@ -7310,13 +8466,21 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
7310
8466
  Update: {
7311
8467
  created_at?: string;
7312
8468
  description?: string | null;
8469
+ head_product_id?: string | null;
8470
+ head_trade_item_floriday_id?: string | null;
7313
8471
  id?: string;
7314
8472
  is_active?: boolean;
7315
8473
  name?: string;
7316
8474
  tenant_id?: string;
7317
8475
  updated_at?: string;
7318
8476
  };
7319
- Relationships: [];
8477
+ Relationships: [{
8478
+ foreignKeyName: "product_groups_head_product_id_fkey";
8479
+ columns: ["head_product_id"];
8480
+ isOneToOne: false;
8481
+ referencedRelation: "products";
8482
+ referencedColumns: ["id"];
8483
+ }];
7320
8484
  };
7321
8485
  products: {
7322
8486
  Row: {
@@ -8401,18 +9565,39 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
8401
9565
  updated_at?: string;
8402
9566
  };
8403
9567
  Update: {
8404
- address?: string | null;
8405
- column_mappings?: import("./types").Json | null;
8406
- contact_person?: string | null;
9568
+ address?: string | null;
9569
+ column_mappings?: import("./types").Json | null;
9570
+ contact_person?: string | null;
9571
+ created_at?: string;
9572
+ default_product_type?: string;
9573
+ email?: string | null;
9574
+ id?: string;
9575
+ imported_file_name?: string | null;
9576
+ name?: string;
9577
+ notes?: string | null;
9578
+ phone?: string | null;
9579
+ updated_at?: string;
9580
+ };
9581
+ Relationships: [];
9582
+ };
9583
+ technician_rates: {
9584
+ Row: {
9585
+ created_at: string;
9586
+ hourly_rate_cents: number;
9587
+ updated_at: string;
9588
+ user_id: string;
9589
+ };
9590
+ Insert: {
9591
+ created_at?: string;
9592
+ hourly_rate_cents?: number;
9593
+ updated_at?: string;
9594
+ user_id: string;
9595
+ };
9596
+ Update: {
8407
9597
  created_at?: string;
8408
- default_product_type?: string;
8409
- email?: string | null;
8410
- id?: string;
8411
- imported_file_name?: string | null;
8412
- name?: string;
8413
- notes?: string | null;
8414
- phone?: string | null;
9598
+ hourly_rate_cents?: number;
8415
9599
  updated_at?: string;
9600
+ user_id?: string;
8416
9601
  };
8417
9602
  Relationships: [];
8418
9603
  };
@@ -8885,6 +10070,7 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
8885
10070
  country: string | null;
8886
10071
  created_at: string;
8887
10072
  email: string | null;
10073
+ external_group_key: string | null;
8888
10074
  id: string;
8889
10075
  last_synced_at: string | null;
8890
10076
  name: string;
@@ -8903,6 +10089,7 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
8903
10089
  country?: string | null;
8904
10090
  created_at?: string;
8905
10091
  email?: string | null;
10092
+ external_group_key?: string | null;
8906
10093
  id?: string;
8907
10094
  last_synced_at?: string | null;
8908
10095
  name: string;
@@ -8921,6 +10108,7 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
8921
10108
  country?: string | null;
8922
10109
  created_at?: string;
8923
10110
  email?: string | null;
10111
+ external_group_key?: string | null;
8924
10112
  id?: string;
8925
10113
  last_synced_at?: string | null;
8926
10114
  name?: string;
@@ -9085,6 +10273,8 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
9085
10273
  twinfield_invoice_settings: {
9086
10274
  Row: {
9087
10275
  created_at: string;
10276
+ debtor_gl_account: string;
10277
+ default_credit_invoice_type: string | null;
9088
10278
  default_gl_account: string;
9089
10279
  default_invoice_type: string;
9090
10280
  default_payment_term_days: number;
@@ -9093,11 +10283,15 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
9093
10283
  invoice_enabled_fo: boolean;
9094
10284
  invoice_enabled_ho: boolean;
9095
10285
  invoice_enabled_mo: boolean;
10286
+ payment_gl_account: string;
10287
+ payment_journal_code: string;
9096
10288
  updated_at: string;
9097
10289
  user_id: string;
9098
10290
  };
9099
10291
  Insert: {
9100
10292
  created_at?: string;
10293
+ debtor_gl_account?: string;
10294
+ default_credit_invoice_type?: string | null;
9101
10295
  default_gl_account?: string;
9102
10296
  default_invoice_type?: string;
9103
10297
  default_payment_term_days?: number;
@@ -9106,11 +10300,15 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
9106
10300
  invoice_enabled_fo?: boolean;
9107
10301
  invoice_enabled_ho?: boolean;
9108
10302
  invoice_enabled_mo?: boolean;
10303
+ payment_gl_account?: string;
10304
+ payment_journal_code?: string;
9109
10305
  updated_at?: string;
9110
10306
  user_id: string;
9111
10307
  };
9112
10308
  Update: {
9113
10309
  created_at?: string;
10310
+ debtor_gl_account?: string;
10311
+ default_credit_invoice_type?: string | null;
9114
10312
  default_gl_account?: string;
9115
10313
  default_invoice_type?: string;
9116
10314
  default_payment_term_days?: number;
@@ -9119,6 +10317,8 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
9119
10317
  invoice_enabled_fo?: boolean;
9120
10318
  invoice_enabled_ho?: boolean;
9121
10319
  invoice_enabled_mo?: boolean;
10320
+ payment_gl_account?: string;
10321
+ payment_journal_code?: string;
9122
10322
  updated_at?: string;
9123
10323
  user_id?: string;
9124
10324
  };
@@ -9339,43 +10539,49 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
9339
10539
  };
9340
10540
  twinfield_push_queue: {
9341
10541
  Row: {
10542
+ action: string;
9342
10543
  attempts: number;
9343
10544
  connection_id: string;
9344
10545
  created_at: string;
10546
+ customer_id: string | null;
9345
10547
  external_id: string | null;
9346
10548
  id: string;
9347
10549
  idempotency_key: string;
9348
10550
  last_error: string | null;
9349
10551
  next_attempt_at: string;
9350
- office_code: string;
10552
+ office_code: string | null;
9351
10553
  payload: import("./types").Json;
9352
10554
  status: string;
9353
10555
  updated_at: string;
9354
10556
  };
9355
10557
  Insert: {
10558
+ action?: string;
9356
10559
  attempts?: number;
9357
10560
  connection_id: string;
9358
10561
  created_at?: string;
10562
+ customer_id?: string | null;
9359
10563
  external_id?: string | null;
9360
10564
  id?: string;
9361
10565
  idempotency_key: string;
9362
10566
  last_error?: string | null;
9363
10567
  next_attempt_at?: string;
9364
- office_code: string;
10568
+ office_code?: string | null;
9365
10569
  payload: import("./types").Json;
9366
10570
  status?: string;
9367
10571
  updated_at?: string;
9368
10572
  };
9369
10573
  Update: {
10574
+ action?: string;
9370
10575
  attempts?: number;
9371
10576
  connection_id?: string;
9372
10577
  created_at?: string;
10578
+ customer_id?: string | null;
9373
10579
  external_id?: string | null;
9374
10580
  id?: string;
9375
10581
  idempotency_key?: string;
9376
10582
  last_error?: string | null;
9377
10583
  next_attempt_at?: string;
9378
- office_code?: string;
10584
+ office_code?: string | null;
9379
10585
  payload?: import("./types").Json;
9380
10586
  status?: string;
9381
10587
  updated_at?: string;
@@ -9386,6 +10592,12 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
9386
10592
  isOneToOne: false;
9387
10593
  referencedRelation: "twinfield_connections";
9388
10594
  referencedColumns: ["id"];
10595
+ }, {
10596
+ foreignKeyName: "twinfield_push_queue_customer_id_fkey";
10597
+ columns: ["customer_id"];
10598
+ isOneToOne: false;
10599
+ referencedRelation: "customers";
10600
+ referencedColumns: ["id"];
9389
10601
  }];
9390
10602
  };
9391
10603
  twinfield_request_metrics: {
@@ -9661,6 +10873,252 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
9661
10873
  };
9662
10874
  Relationships: [];
9663
10875
  };
10876
+ werkbon_package_lines: {
10877
+ Row: {
10878
+ created_at: string;
10879
+ created_by: string | null;
10880
+ id: string;
10881
+ package_id: string;
10882
+ quantity: number;
10883
+ unit_price_cents_snapshot: number;
10884
+ werkbon_id: string;
10885
+ };
10886
+ Insert: {
10887
+ created_at?: string;
10888
+ created_by?: string | null;
10889
+ id?: string;
10890
+ package_id: string;
10891
+ quantity?: number;
10892
+ unit_price_cents_snapshot?: number;
10893
+ werkbon_id: string;
10894
+ };
10895
+ Update: {
10896
+ created_at?: string;
10897
+ created_by?: string | null;
10898
+ id?: string;
10899
+ package_id?: string;
10900
+ quantity?: number;
10901
+ unit_price_cents_snapshot?: number;
10902
+ werkbon_id?: string;
10903
+ };
10904
+ Relationships: [{
10905
+ foreignKeyName: "werkbon_package_lines_package_id_fkey";
10906
+ columns: ["package_id"];
10907
+ isOneToOne: false;
10908
+ referencedRelation: "werkbon_packages";
10909
+ referencedColumns: ["id"];
10910
+ }, {
10911
+ foreignKeyName: "werkbon_package_lines_werkbon_id_fkey";
10912
+ columns: ["werkbon_id"];
10913
+ isOneToOne: false;
10914
+ referencedRelation: "werkbonnen";
10915
+ referencedColumns: ["id"];
10916
+ }];
10917
+ };
10918
+ werkbon_packages: {
10919
+ Row: {
10920
+ active: boolean;
10921
+ code: string;
10922
+ created_at: string;
10923
+ default_quantity: number;
10924
+ description: string | null;
10925
+ id: string;
10926
+ name: string;
10927
+ unit_price_cents: number;
10928
+ updated_at: string;
10929
+ };
10930
+ Insert: {
10931
+ active?: boolean;
10932
+ code: string;
10933
+ created_at?: string;
10934
+ default_quantity?: number;
10935
+ description?: string | null;
10936
+ id?: string;
10937
+ name: string;
10938
+ unit_price_cents?: number;
10939
+ updated_at?: string;
10940
+ };
10941
+ Update: {
10942
+ active?: boolean;
10943
+ code?: string;
10944
+ created_at?: string;
10945
+ default_quantity?: number;
10946
+ description?: string | null;
10947
+ id?: string;
10948
+ name?: string;
10949
+ unit_price_cents?: number;
10950
+ updated_at?: string;
10951
+ };
10952
+ Relationships: [];
10953
+ };
10954
+ werkbon_photos: {
10955
+ Row: {
10956
+ created_at: string;
10957
+ id: string;
10958
+ storage_path: string;
10959
+ user_id: string;
10960
+ werkbon_id: string;
10961
+ };
10962
+ Insert: {
10963
+ created_at?: string;
10964
+ id?: string;
10965
+ storage_path: string;
10966
+ user_id: string;
10967
+ werkbon_id: string;
10968
+ };
10969
+ Update: {
10970
+ created_at?: string;
10971
+ id?: string;
10972
+ storage_path?: string;
10973
+ user_id?: string;
10974
+ werkbon_id?: string;
10975
+ };
10976
+ Relationships: [{
10977
+ foreignKeyName: "werkbon_photos_werkbon_id_fkey";
10978
+ columns: ["werkbon_id"];
10979
+ isOneToOne: false;
10980
+ referencedRelation: "werkbonnen";
10981
+ referencedColumns: ["id"];
10982
+ }];
10983
+ };
10984
+ werkbon_time_logs: {
10985
+ Row: {
10986
+ activity: string;
10987
+ created_at: string;
10988
+ ended_at: string | null;
10989
+ id: string;
10990
+ started_at: string;
10991
+ user_id: string;
10992
+ werkbon_id: string;
10993
+ };
10994
+ Insert: {
10995
+ activity: string;
10996
+ created_at?: string;
10997
+ ended_at?: string | null;
10998
+ id?: string;
10999
+ started_at?: string;
11000
+ user_id: string;
11001
+ werkbon_id: string;
11002
+ };
11003
+ Update: {
11004
+ activity?: string;
11005
+ created_at?: string;
11006
+ ended_at?: string | null;
11007
+ id?: string;
11008
+ started_at?: string;
11009
+ user_id?: string;
11010
+ werkbon_id?: string;
11011
+ };
11012
+ Relationships: [{
11013
+ foreignKeyName: "werkbon_time_logs_werkbon_id_fkey";
11014
+ columns: ["werkbon_id"];
11015
+ isOneToOne: false;
11016
+ referencedRelation: "werkbonnen";
11017
+ referencedColumns: ["id"];
11018
+ }];
11019
+ };
11020
+ werkbonnen: {
11021
+ Row: {
11022
+ assigned_user_id: string | null;
11023
+ budget_mandate_cents: number;
11024
+ complaint_description: string | null;
11025
+ created_at: string;
11026
+ created_by: string | null;
11027
+ customer_id: string | null;
11028
+ externe_referentie: string | null;
11029
+ first_time_fix: boolean | null;
11030
+ id: string;
11031
+ internal_notes: string | null;
11032
+ parent_werkbon_id: string | null;
11033
+ parsed_payload: import("./types").Json | null;
11034
+ planning_status: string;
11035
+ project_number: string | null;
11036
+ room_number: string | null;
11037
+ scheduled_end_time: string | null;
11038
+ scheduled_start_time: string | null;
11039
+ sequence_number: number;
11040
+ source_pdf_path: string | null;
11041
+ status: string;
11042
+ technician_id: string | null;
11043
+ technician_notes: string | null;
11044
+ technician_notes_raw: string | null;
11045
+ technician_task_description: string | null;
11046
+ updated_at: string;
11047
+ version: number;
11048
+ work_address: string | null;
11049
+ };
11050
+ Insert: {
11051
+ assigned_user_id?: string | null;
11052
+ budget_mandate_cents?: number;
11053
+ complaint_description?: string | null;
11054
+ created_at?: string;
11055
+ created_by?: string | null;
11056
+ customer_id?: string | null;
11057
+ externe_referentie?: string | null;
11058
+ first_time_fix?: boolean | null;
11059
+ id?: string;
11060
+ internal_notes?: string | null;
11061
+ parent_werkbon_id?: string | null;
11062
+ parsed_payload?: import("./types").Json | null;
11063
+ planning_status?: string;
11064
+ project_number?: string | null;
11065
+ room_number?: string | null;
11066
+ scheduled_end_time?: string | null;
11067
+ scheduled_start_time?: string | null;
11068
+ sequence_number: number;
11069
+ source_pdf_path?: string | null;
11070
+ status?: string;
11071
+ technician_id?: string | null;
11072
+ technician_notes?: string | null;
11073
+ technician_notes_raw?: string | null;
11074
+ technician_task_description?: string | null;
11075
+ updated_at?: string;
11076
+ version?: number;
11077
+ work_address?: string | null;
11078
+ };
11079
+ Update: {
11080
+ assigned_user_id?: string | null;
11081
+ budget_mandate_cents?: number;
11082
+ complaint_description?: string | null;
11083
+ created_at?: string;
11084
+ created_by?: string | null;
11085
+ customer_id?: string | null;
11086
+ externe_referentie?: string | null;
11087
+ first_time_fix?: boolean | null;
11088
+ id?: string;
11089
+ internal_notes?: string | null;
11090
+ parent_werkbon_id?: string | null;
11091
+ parsed_payload?: import("./types").Json | null;
11092
+ planning_status?: string;
11093
+ project_number?: string | null;
11094
+ room_number?: string | null;
11095
+ scheduled_end_time?: string | null;
11096
+ scheduled_start_time?: string | null;
11097
+ sequence_number?: number;
11098
+ source_pdf_path?: string | null;
11099
+ status?: string;
11100
+ technician_id?: string | null;
11101
+ technician_notes?: string | null;
11102
+ technician_notes_raw?: string | null;
11103
+ technician_task_description?: string | null;
11104
+ updated_at?: string;
11105
+ version?: number;
11106
+ work_address?: string | null;
11107
+ };
11108
+ Relationships: [{
11109
+ foreignKeyName: "werkbonnen_parent_werkbon_id_fkey";
11110
+ columns: ["parent_werkbon_id"];
11111
+ isOneToOne: false;
11112
+ referencedRelation: "werkbonnen";
11113
+ referencedColumns: ["id"];
11114
+ }, {
11115
+ foreignKeyName: "werkbonnen_technician_id_fkey";
11116
+ columns: ["technician_id"];
11117
+ isOneToOne: false;
11118
+ referencedRelation: "monteurs";
11119
+ referencedColumns: ["id"];
11120
+ }];
11121
+ };
9664
11122
  work_order_monteurs: {
9665
11123
  Row: {
9666
11124
  created_at: string;
@@ -9831,6 +11289,8 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
9831
11289
  created_at: string | null;
9832
11290
  created_by: string | null;
9833
11291
  display_name: string | null;
11292
+ graph_subscription_expires_at: string | null;
11293
+ graph_subscription_id: string | null;
9834
11294
  has_access_token: boolean | null;
9835
11295
  has_client_id: boolean | null;
9836
11296
  has_client_secret: boolean | null;
@@ -9848,6 +11308,7 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
9848
11308
  oauth_mode: string | null;
9849
11309
  provider: string | null;
9850
11310
  purpose_assignments: import("./types").Json | null;
11311
+ realtime_mode: string | null;
9851
11312
  scopes: string[] | null;
9852
11313
  smtp_host: string | null;
9853
11314
  smtp_port: number | null;
@@ -9862,6 +11323,8 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
9862
11323
  created_at?: string | null;
9863
11324
  created_by?: string | null;
9864
11325
  display_name?: string | null;
11326
+ graph_subscription_expires_at?: string | null;
11327
+ graph_subscription_id?: string | null;
9865
11328
  has_access_token?: never;
9866
11329
  has_client_id?: never;
9867
11330
  has_client_secret?: never;
@@ -9879,6 +11342,7 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
9879
11342
  oauth_mode?: string | null;
9880
11343
  provider?: string | null;
9881
11344
  purpose_assignments?: import("./types").Json | null;
11345
+ realtime_mode?: string | null;
9882
11346
  scopes?: string[] | null;
9883
11347
  smtp_host?: string | null;
9884
11348
  smtp_port?: number | null;
@@ -9893,6 +11357,8 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
9893
11357
  created_at?: string | null;
9894
11358
  created_by?: string | null;
9895
11359
  display_name?: string | null;
11360
+ graph_subscription_expires_at?: string | null;
11361
+ graph_subscription_id?: string | null;
9896
11362
  has_access_token?: never;
9897
11363
  has_client_id?: never;
9898
11364
  has_client_secret?: never;
@@ -9910,6 +11376,7 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
9910
11376
  oauth_mode?: string | null;
9911
11377
  provider?: string | null;
9912
11378
  purpose_assignments?: import("./types").Json | null;
11379
+ realtime_mode?: string | null;
9913
11380
  scopes?: string[] | null;
9914
11381
  smtp_host?: string | null;
9915
11382
  smtp_port?: number | null;
@@ -10368,6 +11835,21 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
10368
11835
  };
10369
11836
  Returns: string;
10370
11837
  };
11838
+ ai_usage_by_module: {
11839
+ Args: {
11840
+ _from: string;
11841
+ _to: string;
11842
+ };
11843
+ Returns: {
11844
+ calls: number;
11845
+ consumer_module_id: string;
11846
+ cost_usd: number;
11847
+ errors: number;
11848
+ input_tokens: number;
11849
+ output_tokens: number;
11850
+ total_tokens: number;
11851
+ }[];
11852
+ };
10371
11853
  apply_stock_consumption: {
10372
11854
  Args: {
10373
11855
  p_order_id: string;
@@ -10453,6 +11935,33 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
10453
11935
  };
10454
11936
  Returns: import("./types").Json;
10455
11937
  };
11938
+ claim_twinfield_push_batch: {
11939
+ Args: {
11940
+ _limit?: number;
11941
+ };
11942
+ Returns: {
11943
+ action: string;
11944
+ attempts: number;
11945
+ connection_id: string;
11946
+ created_at: string;
11947
+ customer_id: string | null;
11948
+ external_id: string | null;
11949
+ id: string;
11950
+ idempotency_key: string;
11951
+ last_error: string | null;
11952
+ next_attempt_at: string;
11953
+ office_code: string | null;
11954
+ payload: import("./types").Json;
11955
+ status: string;
11956
+ updated_at: string;
11957
+ }[];
11958
+ SetofOptions: {
11959
+ from: "*";
11960
+ to: "twinfield_push_queue";
11961
+ isOneToOne: false;
11962
+ isSetofReturn: true;
11963
+ };
11964
+ };
10456
11965
  cleanup_old_bookings: {
10457
11966
  Args: never;
10458
11967
  Returns: undefined;
@@ -10489,6 +11998,12 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
10489
11998
  Args: never;
10490
11999
  Returns: string;
10491
12000
  };
12001
+ custom_access_token_hook: {
12002
+ Args: {
12003
+ event: import("./types").Json;
12004
+ };
12005
+ Returns: import("./types").Json;
12006
+ };
10492
12007
  dashboard_alert_counts: {
10493
12008
  Args: never;
10494
12009
  Returns: import("./types").Json;
@@ -10549,6 +12064,16 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
10549
12064
  status: string;
10550
12065
  }[];
10551
12066
  };
12067
+ email_auth_upsert_connection: {
12068
+ Args: {
12069
+ _account_email: string;
12070
+ _created_by: string;
12071
+ _is_active: boolean;
12072
+ _provider: string;
12073
+ _status: string;
12074
+ };
12075
+ Returns: string;
12076
+ };
10552
12077
  enqueue_cart_replan_if_unlocked: {
10553
12078
  Args: {
10554
12079
  p_order_id: string;
@@ -10814,6 +12339,14 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
10814
12339
  };
10815
12340
  Returns: string;
10816
12341
  };
12342
+ has_module_permission: {
12343
+ Args: {
12344
+ _min: string;
12345
+ _module_id: string;
12346
+ _user_id: string;
12347
+ };
12348
+ Returns: boolean;
12349
+ };
10817
12350
  has_role: {
10818
12351
  Args: {
10819
12352
  _role: Database["public"]["Enums"]["app_role"];
@@ -10821,6 +12354,10 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
10821
12354
  };
10822
12355
  Returns: boolean;
10823
12356
  };
12357
+ has_twinfield_link: {
12358
+ Args: never;
12359
+ Returns: boolean;
12360
+ };
10824
12361
  is_authenticated: {
10825
12362
  Args: never;
10826
12363
  Returns: boolean;
@@ -10835,6 +12372,20 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
10835
12372
  };
10836
12373
  Returns: boolean;
10837
12374
  };
12375
+ jwt_has_role: {
12376
+ Args: {
12377
+ _role: Database["public"]["Enums"]["app_role"];
12378
+ };
12379
+ Returns: boolean;
12380
+ };
12381
+ list_monteurs: {
12382
+ Args: never;
12383
+ Returns: {
12384
+ display_name: string;
12385
+ email: string;
12386
+ user_id: string;
12387
+ }[];
12388
+ };
10838
12389
  local_effective_price: {
10839
12390
  Args: {
10840
12391
  _customer_id: string;
@@ -10851,6 +12402,22 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
10851
12402
  source_id: string;
10852
12403
  }[];
10853
12404
  };
12405
+ log_ai_call: {
12406
+ Args: {
12407
+ _consumer_module_id: string;
12408
+ _cost_usd: number;
12409
+ _duration_ms: number;
12410
+ _error_code: string;
12411
+ _error_message: string;
12412
+ _input_tokens: number;
12413
+ _model_slug: string;
12414
+ _output_tokens: number;
12415
+ _provider_slug: string;
12416
+ _status: string;
12417
+ _total_tokens: number;
12418
+ };
12419
+ Returns: string;
12420
+ };
10854
12421
  mark_offer_clicked: {
10855
12422
  Args: {
10856
12423
  p_code: string;
@@ -10863,6 +12430,12 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
10863
12430
  };
10864
12431
  Returns: undefined;
10865
12432
  };
12433
+ mark_shipment_shipped: {
12434
+ Args: {
12435
+ p_shipment_id: string;
12436
+ };
12437
+ Returns: undefined;
12438
+ };
10866
12439
  next_order_number: {
10867
12440
  Args: {
10868
12441
  p_prefix: string;
@@ -10876,6 +12449,10 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
10876
12449
  };
10877
12450
  Returns: string;
10878
12451
  };
12452
+ next_twinfield_code: {
12453
+ Args: never;
12454
+ Returns: string;
12455
+ };
10879
12456
  next_work_order_number: {
10880
12457
  Args: {
10881
12458
  p_parent_work_order_id?: string;
@@ -10990,6 +12567,12 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
10990
12567
  };
10991
12568
  Returns: number;
10992
12569
  };
12570
+ reorder_customer_price_groups: {
12571
+ Args: {
12572
+ _ids: string[];
12573
+ };
12574
+ Returns: undefined;
12575
+ };
10993
12576
  reset_floriday_sync_cursor: {
10994
12577
  Args: {
10995
12578
  p_connection_id: string;
@@ -11003,6 +12586,12 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
11003
12586
  };
11004
12587
  Returns: string;
11005
12588
  };
12589
+ retry_twinfield_push: {
12590
+ Args: {
12591
+ _customer_id: string;
12592
+ };
12593
+ Returns: number;
12594
+ };
11006
12595
  schedule_floriday_additional_services_sync: {
11007
12596
  Args: {
11008
12597
  p_apikey: string;
@@ -11323,9 +12912,11 @@ export declare const supabase: import("@supabase/supabase-js").SupabaseClient<Da
11323
12912
  };
11324
12913
  };
11325
12914
  Enums: {
11326
- app_role: "admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie" | "monteur";
12915
+ app_role: "admin" | "planner" | "monteur" | "administratie" | "ai_admin";
11327
12916
  exact_env: "staging" | "live";
11328
12917
  exact_push_status: "pending" | "sent" | "error";
12918
+ itk_customer_segment: "Business" | "Private";
12919
+ itk_dynamic_field_type: "text" | "select" | "date" | "checkbox";
11329
12920
  quote_status: "concept" | "verzonden" | "bekeken" | "in_behandeling" | "geaccepteerd" | "afgewezen" | "verlopen" | "gearchiveerd";
11330
12921
  };
11331
12922
  CompositeTypes: { [_ in never]: never; };