@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
@@ -242,6 +242,318 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
242
242
  };
243
243
  Relationships: [];
244
244
  };
245
+ ai_admin_credentials: {
246
+ Row: {
247
+ active: boolean;
248
+ admin_key: string;
249
+ created_at: string;
250
+ id: string;
251
+ label: string;
252
+ provider_id: string;
253
+ updated_at: string;
254
+ };
255
+ Insert: {
256
+ active?: boolean;
257
+ admin_key: string;
258
+ created_at?: string;
259
+ id?: string;
260
+ label: string;
261
+ provider_id: string;
262
+ updated_at?: string;
263
+ };
264
+ Update: {
265
+ active?: boolean;
266
+ admin_key?: string;
267
+ created_at?: string;
268
+ id?: string;
269
+ label?: string;
270
+ provider_id?: string;
271
+ updated_at?: string;
272
+ };
273
+ Relationships: [{
274
+ foreignKeyName: "ai_admin_credentials_provider_id_fkey";
275
+ columns: ["provider_id"];
276
+ isOneToOne: true;
277
+ referencedRelation: "ai_providers";
278
+ referencedColumns: ["id"];
279
+ }];
280
+ };
281
+ ai_call_log: {
282
+ Row: {
283
+ consumer_module_id: string;
284
+ cost_usd: number | null;
285
+ created_at: string;
286
+ created_by: string | null;
287
+ duration_ms: number | null;
288
+ error_code: string | null;
289
+ error_message: string | null;
290
+ id: string;
291
+ input_tokens: number;
292
+ model_slug: string | null;
293
+ output_tokens: number;
294
+ provider_slug: string | null;
295
+ status: string;
296
+ total_tokens: number;
297
+ };
298
+ Insert: {
299
+ consumer_module_id: string;
300
+ cost_usd?: number | null;
301
+ created_at?: string;
302
+ created_by?: string | null;
303
+ duration_ms?: number | null;
304
+ error_code?: string | null;
305
+ error_message?: string | null;
306
+ id?: string;
307
+ input_tokens?: number;
308
+ model_slug?: string | null;
309
+ output_tokens?: number;
310
+ provider_slug?: string | null;
311
+ status: string;
312
+ total_tokens?: number;
313
+ };
314
+ Update: {
315
+ consumer_module_id?: string;
316
+ cost_usd?: number | null;
317
+ created_at?: string;
318
+ created_by?: string | null;
319
+ duration_ms?: number | null;
320
+ error_code?: string | null;
321
+ error_message?: string | null;
322
+ id?: string;
323
+ input_tokens?: number;
324
+ model_slug?: string | null;
325
+ output_tokens?: number;
326
+ provider_slug?: string | null;
327
+ status?: string;
328
+ total_tokens?: number;
329
+ };
330
+ Relationships: [];
331
+ };
332
+ ai_credentials: {
333
+ Row: {
334
+ active: boolean;
335
+ api_key: string;
336
+ created_at: string;
337
+ id: string;
338
+ label: string;
339
+ provider_id: string;
340
+ updated_at: string;
341
+ };
342
+ Insert: {
343
+ active?: boolean;
344
+ api_key: string;
345
+ created_at?: string;
346
+ id?: string;
347
+ label: string;
348
+ provider_id: string;
349
+ updated_at?: string;
350
+ };
351
+ Update: {
352
+ active?: boolean;
353
+ api_key?: string;
354
+ created_at?: string;
355
+ id?: string;
356
+ label?: string;
357
+ provider_id?: string;
358
+ updated_at?: string;
359
+ };
360
+ Relationships: [{
361
+ foreignKeyName: "ai_credentials_provider_id_fkey";
362
+ columns: ["provider_id"];
363
+ isOneToOne: false;
364
+ referencedRelation: "ai_providers";
365
+ referencedColumns: ["id"];
366
+ }];
367
+ };
368
+ ai_goals: {
369
+ Row: {
370
+ active: boolean;
371
+ created_at: string;
372
+ description: string | null;
373
+ key: string;
374
+ label: string;
375
+ sort_order: number;
376
+ updated_at: string;
377
+ };
378
+ Insert: {
379
+ active?: boolean;
380
+ created_at?: string;
381
+ description?: string | null;
382
+ key: string;
383
+ label: string;
384
+ sort_order?: number;
385
+ updated_at?: string;
386
+ };
387
+ Update: {
388
+ active?: boolean;
389
+ created_at?: string;
390
+ description?: string | null;
391
+ key?: string;
392
+ label?: string;
393
+ sort_order?: number;
394
+ updated_at?: string;
395
+ };
396
+ Relationships: [];
397
+ };
398
+ ai_model_pricing: {
399
+ Row: {
400
+ created_at: string;
401
+ currency: string;
402
+ fetched_at: string;
403
+ id: string;
404
+ input_per_mtok: number | null;
405
+ model_slug: string;
406
+ output_per_mtok: number | null;
407
+ provider_slug: string;
408
+ source: string;
409
+ updated_at: string;
410
+ };
411
+ Insert: {
412
+ created_at?: string;
413
+ currency?: string;
414
+ fetched_at?: string;
415
+ id?: string;
416
+ input_per_mtok?: number | null;
417
+ model_slug: string;
418
+ output_per_mtok?: number | null;
419
+ provider_slug: string;
420
+ source?: string;
421
+ updated_at?: string;
422
+ };
423
+ Update: {
424
+ created_at?: string;
425
+ currency?: string;
426
+ fetched_at?: string;
427
+ id?: string;
428
+ input_per_mtok?: number | null;
429
+ model_slug?: string;
430
+ output_per_mtok?: number | null;
431
+ provider_slug?: string;
432
+ source?: string;
433
+ updated_at?: string;
434
+ };
435
+ Relationships: [];
436
+ };
437
+ ai_models: {
438
+ Row: {
439
+ active: boolean;
440
+ context_window: number | null;
441
+ created_at: string;
442
+ display_name: string;
443
+ id: string;
444
+ is_default: boolean;
445
+ modality: string;
446
+ provider_id: string;
447
+ slug: string;
448
+ updated_at: string;
449
+ };
450
+ Insert: {
451
+ active?: boolean;
452
+ context_window?: number | null;
453
+ created_at?: string;
454
+ display_name: string;
455
+ id?: string;
456
+ is_default?: boolean;
457
+ modality?: string;
458
+ provider_id: string;
459
+ slug: string;
460
+ updated_at?: string;
461
+ };
462
+ Update: {
463
+ active?: boolean;
464
+ context_window?: number | null;
465
+ created_at?: string;
466
+ display_name?: string;
467
+ id?: string;
468
+ is_default?: boolean;
469
+ modality?: string;
470
+ provider_id?: string;
471
+ slug?: string;
472
+ updated_at?: string;
473
+ };
474
+ Relationships: [{
475
+ foreignKeyName: "ai_models_provider_id_fkey";
476
+ columns: ["provider_id"];
477
+ isOneToOne: false;
478
+ referencedRelation: "ai_providers";
479
+ referencedColumns: ["id"];
480
+ }];
481
+ };
482
+ ai_module_bindings: {
483
+ Row: {
484
+ consumer_module_id: string;
485
+ created_at: string;
486
+ credential_id: string;
487
+ id: string;
488
+ model_id: string;
489
+ notes: string | null;
490
+ updated_at: string;
491
+ };
492
+ Insert: {
493
+ consumer_module_id: string;
494
+ created_at?: string;
495
+ credential_id: string;
496
+ id?: string;
497
+ model_id: string;
498
+ notes?: string | null;
499
+ updated_at?: string;
500
+ };
501
+ Update: {
502
+ consumer_module_id?: string;
503
+ created_at?: string;
504
+ credential_id?: string;
505
+ id?: string;
506
+ model_id?: string;
507
+ notes?: string | null;
508
+ updated_at?: string;
509
+ };
510
+ Relationships: [{
511
+ foreignKeyName: "ai_module_bindings_credential_id_fkey";
512
+ columns: ["credential_id"];
513
+ isOneToOne: false;
514
+ referencedRelation: "ai_credentials";
515
+ referencedColumns: ["id"];
516
+ }, {
517
+ foreignKeyName: "ai_module_bindings_model_id_fkey";
518
+ columns: ["model_id"];
519
+ isOneToOne: false;
520
+ referencedRelation: "ai_models";
521
+ referencedColumns: ["id"];
522
+ }];
523
+ };
524
+ ai_providers: {
525
+ Row: {
526
+ active: boolean;
527
+ auth_type: string;
528
+ base_url: string | null;
529
+ created_at: string;
530
+ id: string;
531
+ name: string;
532
+ slug: string;
533
+ updated_at: string;
534
+ };
535
+ Insert: {
536
+ active?: boolean;
537
+ auth_type?: string;
538
+ base_url?: string | null;
539
+ created_at?: string;
540
+ id?: string;
541
+ name: string;
542
+ slug: string;
543
+ updated_at?: string;
544
+ };
545
+ Update: {
546
+ active?: boolean;
547
+ auth_type?: string;
548
+ base_url?: string | null;
549
+ created_at?: string;
550
+ id?: string;
551
+ name?: string;
552
+ slug?: string;
553
+ updated_at?: string;
554
+ };
555
+ Relationships: [];
556
+ };
245
557
  app_settings: {
246
558
  Row: {
247
559
  created_at: string;
@@ -869,6 +1181,141 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
869
1181
  };
870
1182
  Relationships: [];
871
1183
  };
1184
+ cart_planning_pick_times: {
1185
+ Row: {
1186
+ created_at: string;
1187
+ id: string;
1188
+ pot_size: string;
1189
+ seconds_per_cart: number;
1190
+ updated_at: string;
1191
+ };
1192
+ Insert: {
1193
+ created_at?: string;
1194
+ id?: string;
1195
+ pot_size: string;
1196
+ seconds_per_cart: number;
1197
+ updated_at?: string;
1198
+ };
1199
+ Update: {
1200
+ created_at?: string;
1201
+ id?: string;
1202
+ pot_size?: string;
1203
+ seconds_per_cart?: number;
1204
+ updated_at?: string;
1205
+ };
1206
+ Relationships: [];
1207
+ };
1208
+ cart_planning_product_overrides: {
1209
+ Row: {
1210
+ created_at: string;
1211
+ id: string;
1212
+ max_party_share_per_layer_pct_override: number | null;
1213
+ never_mix: boolean;
1214
+ notes: string | null;
1215
+ product_id: string;
1216
+ updated_at: string;
1217
+ };
1218
+ Insert: {
1219
+ created_at?: string;
1220
+ id?: string;
1221
+ max_party_share_per_layer_pct_override?: number | null;
1222
+ never_mix?: boolean;
1223
+ notes?: string | null;
1224
+ product_id: string;
1225
+ updated_at?: string;
1226
+ };
1227
+ Update: {
1228
+ created_at?: string;
1229
+ id?: string;
1230
+ max_party_share_per_layer_pct_override?: number | null;
1231
+ never_mix?: boolean;
1232
+ notes?: string | null;
1233
+ product_id?: string;
1234
+ updated_at?: string;
1235
+ };
1236
+ Relationships: [{
1237
+ foreignKeyName: "cart_planning_product_overrides_product_id_fkey";
1238
+ columns: ["product_id"];
1239
+ isOneToOne: true;
1240
+ referencedRelation: "products";
1241
+ referencedColumns: ["id"];
1242
+ }];
1243
+ };
1244
+ cart_planning_settings: {
1245
+ Row: {
1246
+ allow_editing_after_pickstation_send: boolean;
1247
+ buffer_grouping_mode: string;
1248
+ combine_floriday_orders: boolean;
1249
+ combine_floriday_orders_window: string;
1250
+ combine_orders_scope: string;
1251
+ default_workers: number;
1252
+ id: number;
1253
+ max_beladingen_per_layer: number;
1254
+ max_customers_per_cart: number;
1255
+ max_one_customer_per_layer: boolean;
1256
+ max_party_share_per_layer_pct: number;
1257
+ optimization_strategy: string;
1258
+ own_cart_from_layers: number;
1259
+ pick_time_mode: string;
1260
+ plants_per_day: number;
1261
+ plants_per_hour: number;
1262
+ require_same_carrier: boolean;
1263
+ require_same_crate_type: boolean;
1264
+ require_same_delivery_date: boolean;
1265
+ require_same_delivery_location: boolean;
1266
+ updated_at: string;
1267
+ updated_by: string | null;
1268
+ };
1269
+ Insert: {
1270
+ allow_editing_after_pickstation_send?: boolean;
1271
+ buffer_grouping_mode?: string;
1272
+ combine_floriday_orders?: boolean;
1273
+ combine_floriday_orders_window?: string;
1274
+ combine_orders_scope?: string;
1275
+ default_workers?: number;
1276
+ id?: number;
1277
+ max_beladingen_per_layer?: number;
1278
+ max_customers_per_cart?: number;
1279
+ max_one_customer_per_layer?: boolean;
1280
+ max_party_share_per_layer_pct?: number;
1281
+ optimization_strategy?: string;
1282
+ own_cart_from_layers?: number;
1283
+ pick_time_mode?: string;
1284
+ plants_per_day?: number;
1285
+ plants_per_hour?: number;
1286
+ require_same_carrier?: boolean;
1287
+ require_same_crate_type?: boolean;
1288
+ require_same_delivery_date?: boolean;
1289
+ require_same_delivery_location?: boolean;
1290
+ updated_at?: string;
1291
+ updated_by?: string | null;
1292
+ };
1293
+ Update: {
1294
+ allow_editing_after_pickstation_send?: boolean;
1295
+ buffer_grouping_mode?: string;
1296
+ combine_floriday_orders?: boolean;
1297
+ combine_floriday_orders_window?: string;
1298
+ combine_orders_scope?: string;
1299
+ default_workers?: number;
1300
+ id?: number;
1301
+ max_beladingen_per_layer?: number;
1302
+ max_customers_per_cart?: number;
1303
+ max_one_customer_per_layer?: boolean;
1304
+ max_party_share_per_layer_pct?: number;
1305
+ optimization_strategy?: string;
1306
+ own_cart_from_layers?: number;
1307
+ pick_time_mode?: string;
1308
+ plants_per_day?: number;
1309
+ plants_per_hour?: number;
1310
+ require_same_carrier?: boolean;
1311
+ require_same_crate_type?: boolean;
1312
+ require_same_delivery_date?: boolean;
1313
+ require_same_delivery_location?: boolean;
1314
+ updated_at?: string;
1315
+ updated_by?: string | null;
1316
+ };
1317
+ Relationships: [];
1318
+ };
872
1319
  cart_replan_queue: {
873
1320
  Row: {
874
1321
  attempts: number;
@@ -899,6 +1346,102 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
899
1346
  referencedColumns: ["id"];
900
1347
  }];
901
1348
  };
1349
+ cart_types: {
1350
+ Row: {
1351
+ created_at: string;
1352
+ id: string;
1353
+ is_default: boolean;
1354
+ layer_length_cm: number;
1355
+ layer_width_cm: number;
1356
+ layers_per_cart: number;
1357
+ name: string;
1358
+ updated_at: string;
1359
+ };
1360
+ Insert: {
1361
+ created_at?: string;
1362
+ id?: string;
1363
+ is_default?: boolean;
1364
+ layer_length_cm: number;
1365
+ layer_width_cm: number;
1366
+ layers_per_cart?: number;
1367
+ name: string;
1368
+ updated_at?: string;
1369
+ };
1370
+ Update: {
1371
+ created_at?: string;
1372
+ id?: string;
1373
+ is_default?: boolean;
1374
+ layer_length_cm?: number;
1375
+ layer_width_cm?: number;
1376
+ layers_per_cart?: number;
1377
+ name?: string;
1378
+ updated_at?: string;
1379
+ };
1380
+ Relationships: [];
1381
+ };
1382
+ catalog_articles_cache: {
1383
+ Row: {
1384
+ created_at: string;
1385
+ default_price: number;
1386
+ default_vat_rate_ref: string | null;
1387
+ external_ref: string;
1388
+ id: string;
1389
+ name: string;
1390
+ updated_at: string;
1391
+ user_id: string;
1392
+ };
1393
+ Insert: {
1394
+ created_at?: string;
1395
+ default_price?: number;
1396
+ default_vat_rate_ref?: string | null;
1397
+ external_ref: string;
1398
+ id?: string;
1399
+ name: string;
1400
+ updated_at?: string;
1401
+ user_id: string;
1402
+ };
1403
+ Update: {
1404
+ created_at?: string;
1405
+ default_price?: number;
1406
+ default_vat_rate_ref?: string | null;
1407
+ external_ref?: string;
1408
+ id?: string;
1409
+ name?: string;
1410
+ updated_at?: string;
1411
+ user_id?: string;
1412
+ };
1413
+ Relationships: [];
1414
+ };
1415
+ catalog_vat_rates_cache: {
1416
+ Row: {
1417
+ created_at: string;
1418
+ external_ref: string;
1419
+ id: string;
1420
+ label: string;
1421
+ percentage: number;
1422
+ updated_at: string;
1423
+ user_id: string;
1424
+ };
1425
+ Insert: {
1426
+ created_at?: string;
1427
+ external_ref: string;
1428
+ id?: string;
1429
+ label: string;
1430
+ percentage?: number;
1431
+ updated_at?: string;
1432
+ user_id: string;
1433
+ };
1434
+ Update: {
1435
+ created_at?: string;
1436
+ external_ref?: string;
1437
+ id?: string;
1438
+ label?: string;
1439
+ percentage?: number;
1440
+ updated_at?: string;
1441
+ user_id?: string;
1442
+ };
1443
+ Relationships: [];
1444
+ };
902
1445
  collections: {
903
1446
  Row: {
904
1447
  created_at: string;
@@ -923,6 +1466,36 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
923
1466
  };
924
1467
  Relationships: [];
925
1468
  };
1469
+ crate_types: {
1470
+ Row: {
1471
+ created_at: string;
1472
+ id: string;
1473
+ length_cm: number;
1474
+ name: string;
1475
+ plants_per_crate: number;
1476
+ updated_at: string;
1477
+ width_cm: number;
1478
+ };
1479
+ Insert: {
1480
+ created_at?: string;
1481
+ id?: string;
1482
+ length_cm: number;
1483
+ name: string;
1484
+ plants_per_crate?: number;
1485
+ updated_at?: string;
1486
+ width_cm: number;
1487
+ };
1488
+ Update: {
1489
+ created_at?: string;
1490
+ id?: string;
1491
+ length_cm?: number;
1492
+ name?: string;
1493
+ plants_per_crate?: number;
1494
+ updated_at?: string;
1495
+ width_cm?: number;
1496
+ };
1497
+ Relationships: [];
1498
+ };
926
1499
  customer_audit_log: {
927
1500
  Row: {
928
1501
  action: string;
@@ -1097,53 +1670,152 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
1097
1670
  created_at?: string;
1098
1671
  field_setting_id: string;
1099
1672
  id?: string;
1100
- label: string;
1101
- sort_order?: number;
1673
+ label: string;
1674
+ sort_order?: number;
1675
+ };
1676
+ Update: {
1677
+ created_at?: string;
1678
+ field_setting_id?: string;
1679
+ id?: string;
1680
+ label?: string;
1681
+ sort_order?: number;
1682
+ };
1683
+ Relationships: [{
1684
+ foreignKeyName: "customer_field_options_field_setting_id_fkey";
1685
+ columns: ["field_setting_id"];
1686
+ isOneToOne: false;
1687
+ referencedRelation: "customer_field_settings";
1688
+ referencedColumns: ["id"];
1689
+ }];
1690
+ };
1691
+ customer_field_settings: {
1692
+ Row: {
1693
+ created_at: string;
1694
+ field_key: string;
1695
+ field_label: string;
1696
+ field_type: string;
1697
+ id: string;
1698
+ is_custom: boolean;
1699
+ sort_order: number;
1700
+ updated_at: string;
1701
+ };
1702
+ Insert: {
1703
+ created_at?: string;
1704
+ field_key: string;
1705
+ field_label: string;
1706
+ field_type?: string;
1707
+ id?: string;
1708
+ is_custom?: boolean;
1709
+ sort_order?: number;
1710
+ updated_at?: string;
1711
+ };
1712
+ Update: {
1713
+ created_at?: string;
1714
+ field_key?: string;
1715
+ field_label?: string;
1716
+ field_type?: string;
1717
+ id?: string;
1718
+ is_custom?: boolean;
1719
+ sort_order?: number;
1720
+ updated_at?: string;
1721
+ };
1722
+ Relationships: [];
1723
+ };
1724
+ customer_price_group_members: {
1725
+ Row: {
1726
+ created_at: string;
1727
+ customer_key: string;
1728
+ id: string;
1729
+ owner_id: string;
1730
+ price_group_id: string;
1731
+ };
1732
+ Insert: {
1733
+ created_at?: string;
1734
+ customer_key: string;
1735
+ id?: string;
1736
+ owner_id?: string;
1737
+ price_group_id: string;
1102
1738
  };
1103
1739
  Update: {
1104
1740
  created_at?: string;
1105
- field_setting_id?: string;
1741
+ customer_key?: string;
1106
1742
  id?: string;
1107
- label?: string;
1108
- sort_order?: number;
1743
+ owner_id?: string;
1744
+ price_group_id?: string;
1109
1745
  };
1110
1746
  Relationships: [{
1111
- foreignKeyName: "customer_field_options_field_setting_id_fkey";
1112
- columns: ["field_setting_id"];
1747
+ foreignKeyName: "customer_price_group_members_price_group_id_fkey";
1748
+ columns: ["price_group_id"];
1113
1749
  isOneToOne: false;
1114
- referencedRelation: "customer_field_settings";
1750
+ referencedRelation: "customer_price_groups";
1115
1751
  referencedColumns: ["id"];
1116
1752
  }];
1117
1753
  };
1118
- customer_field_settings: {
1754
+ customer_price_groups: {
1119
1755
  Row: {
1756
+ calc_type: string | null;
1757
+ calc_value: number | null;
1758
+ calc_value_type: string | null;
1120
1759
  created_at: string;
1121
- field_key: string;
1122
- field_label: string;
1123
- field_type: string;
1760
+ currency: string;
1761
+ distribute_over: string | null;
1762
+ group_type: string;
1763
+ handling_fee: number | null;
1124
1764
  id: string;
1125
- is_custom: boolean;
1765
+ include_stickers: boolean;
1766
+ is_active: boolean;
1767
+ name: string;
1768
+ owner_id: string;
1769
+ price_scope: string;
1770
+ pricing_mode: string;
1771
+ rounding: string;
1772
+ rounding_step: number;
1126
1773
  sort_order: number;
1774
+ unit: string;
1127
1775
  updated_at: string;
1128
1776
  };
1129
1777
  Insert: {
1778
+ calc_type?: string | null;
1779
+ calc_value?: number | null;
1780
+ calc_value_type?: string | null;
1130
1781
  created_at?: string;
1131
- field_key: string;
1132
- field_label: string;
1133
- field_type?: string;
1782
+ currency?: string;
1783
+ distribute_over?: string | null;
1784
+ group_type?: string;
1785
+ handling_fee?: number | null;
1134
1786
  id?: string;
1135
- is_custom?: boolean;
1787
+ include_stickers?: boolean;
1788
+ is_active?: boolean;
1789
+ name: string;
1790
+ owner_id?: string;
1791
+ price_scope?: string;
1792
+ pricing_mode?: string;
1793
+ rounding?: string;
1794
+ rounding_step?: number;
1136
1795
  sort_order?: number;
1796
+ unit?: string;
1137
1797
  updated_at?: string;
1138
1798
  };
1139
1799
  Update: {
1800
+ calc_type?: string | null;
1801
+ calc_value?: number | null;
1802
+ calc_value_type?: string | null;
1140
1803
  created_at?: string;
1141
- field_key?: string;
1142
- field_label?: string;
1143
- field_type?: string;
1804
+ currency?: string;
1805
+ distribute_over?: string | null;
1806
+ group_type?: string;
1807
+ handling_fee?: number | null;
1144
1808
  id?: string;
1145
- is_custom?: boolean;
1809
+ include_stickers?: boolean;
1810
+ is_active?: boolean;
1811
+ name?: string;
1812
+ owner_id?: string;
1813
+ price_scope?: string;
1814
+ pricing_mode?: string;
1815
+ rounding?: string;
1816
+ rounding_step?: number;
1146
1817
  sort_order?: number;
1818
+ unit?: string;
1147
1819
  updated_at?: string;
1148
1820
  };
1149
1821
  Relationships: [];
@@ -1301,6 +1973,10 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
1301
1973
  sync_error: string | null;
1302
1974
  sync_status: string;
1303
1975
  trade_forms: string[];
1976
+ twinfield_code: string | null;
1977
+ twinfield_last_hash: string | null;
1978
+ twinfield_sync_error: string | null;
1979
+ twinfield_synced_at: string | null;
1304
1980
  updated_at: string;
1305
1981
  vat_display: string | null;
1306
1982
  vat_number: string | null;
@@ -1368,6 +2044,10 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
1368
2044
  sync_error?: string | null;
1369
2045
  sync_status?: string;
1370
2046
  trade_forms?: string[];
2047
+ twinfield_code?: string | null;
2048
+ twinfield_last_hash?: string | null;
2049
+ twinfield_sync_error?: string | null;
2050
+ twinfield_synced_at?: string | null;
1371
2051
  updated_at?: string;
1372
2052
  vat_display?: string | null;
1373
2053
  vat_number?: string | null;
@@ -1435,6 +2115,10 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
1435
2115
  sync_error?: string | null;
1436
2116
  sync_status?: string;
1437
2117
  trade_forms?: string[];
2118
+ twinfield_code?: string | null;
2119
+ twinfield_last_hash?: string | null;
2120
+ twinfield_sync_error?: string | null;
2121
+ twinfield_synced_at?: string | null;
1438
2122
  updated_at?: string;
1439
2123
  vat_display?: string | null;
1440
2124
  vat_number?: string | null;
@@ -5272,84 +5956,366 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
5272
5956
  vat_amount: number | null;
5273
5957
  };
5274
5958
  Insert: {
5275
- booking_id?: string | null;
5276
- company_name?: string | null;
5959
+ booking_id?: string | null;
5960
+ company_name?: string | null;
5961
+ created_at?: string;
5962
+ customer_email?: string | null;
5963
+ description?: string | null;
5964
+ exact_article_id?: string | null;
5965
+ id?: string;
5966
+ invoice_run_id?: string | null;
5967
+ quantity?: number | null;
5968
+ total_excl_vat?: number | null;
5969
+ total_incl_vat?: number | null;
5970
+ unit_price?: number | null;
5971
+ vat_amount?: number | null;
5972
+ };
5973
+ Update: {
5974
+ booking_id?: string | null;
5975
+ company_name?: string | null;
5976
+ created_at?: string;
5977
+ customer_email?: string | null;
5978
+ description?: string | null;
5979
+ exact_article_id?: string | null;
5980
+ id?: string;
5981
+ invoice_run_id?: string | null;
5982
+ quantity?: number | null;
5983
+ total_excl_vat?: number | null;
5984
+ total_incl_vat?: number | null;
5985
+ unit_price?: number | null;
5986
+ vat_amount?: number | null;
5987
+ };
5988
+ Relationships: [{
5989
+ foreignKeyName: "invoice_run_items_booking_id_fkey";
5990
+ columns: ["booking_id"];
5991
+ isOneToOne: false;
5992
+ referencedRelation: "bookings";
5993
+ referencedColumns: ["id"];
5994
+ }, {
5995
+ foreignKeyName: "invoice_run_items_invoice_run_id_fkey";
5996
+ columns: ["invoice_run_id"];
5997
+ isOneToOne: false;
5998
+ referencedRelation: "invoice_runs";
5999
+ referencedColumns: ["id"];
6000
+ }];
6001
+ };
6002
+ invoice_runs: {
6003
+ Row: {
6004
+ created_at: string;
6005
+ created_by: string | null;
6006
+ id: string;
6007
+ period_end: string;
6008
+ period_start: string;
6009
+ status: string;
6010
+ total_excl_vat: number | null;
6011
+ total_incl_vat: number | null;
6012
+ vat_amount: number | null;
6013
+ };
6014
+ Insert: {
6015
+ created_at?: string;
6016
+ created_by?: string | null;
6017
+ id?: string;
6018
+ period_end: string;
6019
+ period_start: string;
6020
+ status?: string;
6021
+ total_excl_vat?: number | null;
6022
+ total_incl_vat?: number | null;
6023
+ vat_amount?: number | null;
6024
+ };
6025
+ Update: {
6026
+ created_at?: string;
6027
+ created_by?: string | null;
6028
+ id?: string;
6029
+ period_end?: string;
6030
+ period_start?: string;
6031
+ status?: string;
6032
+ total_excl_vat?: number | null;
6033
+ total_incl_vat?: number | null;
6034
+ vat_amount?: number | null;
6035
+ };
6036
+ Relationships: [];
6037
+ };
6038
+ itk_contact_persons: {
6039
+ Row: {
6040
+ created_at: string;
6041
+ customer_id: string;
6042
+ email: string | null;
6043
+ id: string;
6044
+ name: string;
6045
+ phone: string | null;
6046
+ role: string | null;
6047
+ updated_at: string;
6048
+ };
6049
+ Insert: {
6050
+ created_at?: string;
6051
+ customer_id: string;
6052
+ email?: string | null;
6053
+ id?: string;
6054
+ name: string;
6055
+ phone?: string | null;
6056
+ role?: string | null;
6057
+ updated_at?: string;
6058
+ };
6059
+ Update: {
6060
+ created_at?: string;
6061
+ customer_id?: string;
6062
+ email?: string | null;
6063
+ id?: string;
6064
+ name?: string;
6065
+ phone?: string | null;
6066
+ role?: string | null;
6067
+ updated_at?: string;
6068
+ };
6069
+ Relationships: [{
6070
+ foreignKeyName: "itk_contact_persons_customer_id_fkey";
6071
+ columns: ["customer_id"];
6072
+ isOneToOne: false;
6073
+ referencedRelation: "itk_customers";
6074
+ referencedColumns: ["id"];
6075
+ }];
6076
+ };
6077
+ itk_customer_dynamic_values: {
6078
+ Row: {
6079
+ created_at: string;
6080
+ customer_id: string;
6081
+ field_id: string;
6082
+ id: string;
6083
+ updated_at: string;
6084
+ value: string | null;
6085
+ };
6086
+ Insert: {
6087
+ created_at?: string;
6088
+ customer_id: string;
6089
+ field_id: string;
6090
+ id?: string;
6091
+ updated_at?: string;
6092
+ value?: string | null;
6093
+ };
6094
+ Update: {
6095
+ created_at?: string;
6096
+ customer_id?: string;
6097
+ field_id?: string;
6098
+ id?: string;
6099
+ updated_at?: string;
6100
+ value?: string | null;
6101
+ };
6102
+ Relationships: [{
6103
+ foreignKeyName: "itk_customer_dynamic_values_customer_id_fkey";
6104
+ columns: ["customer_id"];
6105
+ isOneToOne: false;
6106
+ referencedRelation: "itk_customers";
6107
+ referencedColumns: ["id"];
6108
+ }, {
6109
+ foreignKeyName: "itk_customer_dynamic_values_field_id_fkey";
6110
+ columns: ["field_id"];
6111
+ isOneToOne: false;
6112
+ referencedRelation: "itk_dynamic_fields";
6113
+ referencedColumns: ["id"];
6114
+ }];
6115
+ };
6116
+ itk_customer_notes: {
6117
+ Row: {
6118
+ body: string;
6119
+ created_at: string;
6120
+ created_by: string | null;
6121
+ customer_id: string;
6122
+ id: string;
6123
+ note_type: string;
6124
+ updated_at: string;
6125
+ };
6126
+ Insert: {
6127
+ body: string;
6128
+ created_at?: string;
6129
+ created_by?: string | null;
6130
+ customer_id: string;
6131
+ id?: string;
6132
+ note_type?: string;
6133
+ updated_at?: string;
6134
+ };
6135
+ Update: {
6136
+ body?: string;
6137
+ created_at?: string;
6138
+ created_by?: string | null;
6139
+ customer_id?: string;
6140
+ id?: string;
6141
+ note_type?: string;
6142
+ updated_at?: string;
6143
+ };
6144
+ Relationships: [{
6145
+ foreignKeyName: "itk_customer_notes_customer_id_fkey";
6146
+ columns: ["customer_id"];
6147
+ isOneToOne: false;
6148
+ referencedRelation: "itk_customers";
6149
+ referencedColumns: ["id"];
6150
+ }];
6151
+ };
6152
+ itk_customers: {
6153
+ Row: {
6154
+ billing_city: string | null;
6155
+ billing_postcode: string | null;
6156
+ billing_street: string | null;
6157
+ created_at: string;
6158
+ general_email: string | null;
6159
+ general_phone: string | null;
6160
+ id: string;
6161
+ legacy_customer_id: string | null;
6162
+ name: string;
6163
+ segment: Database["public"]["Enums"]["itk_customer_segment"];
6164
+ updated_at: string;
6165
+ };
6166
+ Insert: {
6167
+ billing_city?: string | null;
6168
+ billing_postcode?: string | null;
6169
+ billing_street?: string | null;
6170
+ created_at?: string;
6171
+ general_email?: string | null;
6172
+ general_phone?: string | null;
6173
+ id?: string;
6174
+ legacy_customer_id?: string | null;
6175
+ name: string;
6176
+ segment?: Database["public"]["Enums"]["itk_customer_segment"];
6177
+ updated_at?: string;
6178
+ };
6179
+ Update: {
6180
+ billing_city?: string | null;
6181
+ billing_postcode?: string | null;
6182
+ billing_street?: string | null;
6183
+ created_at?: string;
6184
+ general_email?: string | null;
6185
+ general_phone?: string | null;
6186
+ id?: string;
6187
+ legacy_customer_id?: string | null;
6188
+ name?: string;
6189
+ segment?: Database["public"]["Enums"]["itk_customer_segment"];
6190
+ updated_at?: string;
6191
+ };
6192
+ Relationships: [{
6193
+ foreignKeyName: "itk_customers_legacy_customer_id_fkey";
6194
+ columns: ["legacy_customer_id"];
6195
+ isOneToOne: false;
6196
+ referencedRelation: "customers";
6197
+ referencedColumns: ["id"];
6198
+ }];
6199
+ };
6200
+ itk_dynamic_fields: {
6201
+ Row: {
6202
+ created_at: string;
6203
+ field_name: string;
6204
+ field_type: Database["public"]["Enums"]["itk_dynamic_field_type"];
6205
+ id: string;
6206
+ options: import("./types").Json;
6207
+ sort_order: number;
6208
+ updated_at: string;
6209
+ };
6210
+ Insert: {
6211
+ created_at?: string;
6212
+ field_name: string;
6213
+ field_type?: Database["public"]["Enums"]["itk_dynamic_field_type"];
6214
+ id?: string;
6215
+ options?: import("./types").Json;
6216
+ sort_order?: number;
6217
+ updated_at?: string;
6218
+ };
6219
+ Update: {
6220
+ created_at?: string;
6221
+ field_name?: string;
6222
+ field_type?: Database["public"]["Enums"]["itk_dynamic_field_type"];
6223
+ id?: string;
6224
+ options?: import("./types").Json;
6225
+ sort_order?: number;
6226
+ updated_at?: string;
6227
+ };
6228
+ Relationships: [];
6229
+ };
6230
+ itk_work_locations: {
6231
+ Row: {
6232
+ city: string | null;
6233
+ created_at: string;
6234
+ customer_id: string;
6235
+ id: string;
6236
+ instructions: string | null;
6237
+ label: string;
6238
+ latitude: number | null;
6239
+ longitude: number | null;
6240
+ postcode: string | null;
6241
+ street: string | null;
6242
+ updated_at: string;
6243
+ };
6244
+ Insert: {
6245
+ city?: string | null;
5277
6246
  created_at?: string;
5278
- customer_email?: string | null;
5279
- description?: string | null;
5280
- exact_article_id?: string | null;
6247
+ customer_id: string;
5281
6248
  id?: string;
5282
- invoice_run_id?: string | null;
5283
- quantity?: number | null;
5284
- total_excl_vat?: number | null;
5285
- total_incl_vat?: number | null;
5286
- unit_price?: number | null;
5287
- vat_amount?: number | null;
6249
+ instructions?: string | null;
6250
+ label: string;
6251
+ latitude?: number | null;
6252
+ longitude?: number | null;
6253
+ postcode?: string | null;
6254
+ street?: string | null;
6255
+ updated_at?: string;
5288
6256
  };
5289
6257
  Update: {
5290
- booking_id?: string | null;
5291
- company_name?: string | null;
6258
+ city?: string | null;
5292
6259
  created_at?: string;
5293
- customer_email?: string | null;
5294
- description?: string | null;
5295
- exact_article_id?: string | null;
6260
+ customer_id?: string;
5296
6261
  id?: string;
5297
- invoice_run_id?: string | null;
5298
- quantity?: number | null;
5299
- total_excl_vat?: number | null;
5300
- total_incl_vat?: number | null;
5301
- unit_price?: number | null;
5302
- vat_amount?: number | null;
6262
+ instructions?: string | null;
6263
+ label?: string;
6264
+ latitude?: number | null;
6265
+ longitude?: number | null;
6266
+ postcode?: string | null;
6267
+ street?: string | null;
6268
+ updated_at?: string;
5303
6269
  };
5304
6270
  Relationships: [{
5305
- foreignKeyName: "invoice_run_items_booking_id_fkey";
5306
- columns: ["booking_id"];
5307
- isOneToOne: false;
5308
- referencedRelation: "bookings";
5309
- referencedColumns: ["id"];
5310
- }, {
5311
- foreignKeyName: "invoice_run_items_invoice_run_id_fkey";
5312
- columns: ["invoice_run_id"];
6271
+ foreignKeyName: "itk_work_locations_customer_id_fkey";
6272
+ columns: ["customer_id"];
5313
6273
  isOneToOne: false;
5314
- referencedRelation: "invoice_runs";
6274
+ referencedRelation: "itk_customers";
5315
6275
  referencedColumns: ["id"];
5316
6276
  }];
5317
6277
  };
5318
- invoice_runs: {
6278
+ leave_requests: {
5319
6279
  Row: {
5320
6280
  created_at: string;
5321
- created_by: string | null;
6281
+ end_date: string;
5322
6282
  id: string;
5323
- period_end: string;
5324
- period_start: string;
6283
+ reason: string | null;
6284
+ start_date: string;
5325
6285
  status: string;
5326
- total_excl_vat: number | null;
5327
- total_incl_vat: number | null;
5328
- vat_amount: number | null;
6286
+ tenant_id: string;
6287
+ updated_at: string;
6288
+ user_id: string;
5329
6289
  };
5330
6290
  Insert: {
5331
6291
  created_at?: string;
5332
- created_by?: string | null;
6292
+ end_date: string;
5333
6293
  id?: string;
5334
- period_end: string;
5335
- period_start: string;
6294
+ reason?: string | null;
6295
+ start_date: string;
5336
6296
  status?: string;
5337
- total_excl_vat?: number | null;
5338
- total_incl_vat?: number | null;
5339
- vat_amount?: number | null;
6297
+ tenant_id?: string;
6298
+ updated_at?: string;
6299
+ user_id: string;
5340
6300
  };
5341
6301
  Update: {
5342
6302
  created_at?: string;
5343
- created_by?: string | null;
6303
+ end_date?: string;
5344
6304
  id?: string;
5345
- period_end?: string;
5346
- period_start?: string;
6305
+ reason?: string | null;
6306
+ start_date?: string;
5347
6307
  status?: string;
5348
- total_excl_vat?: number | null;
5349
- total_incl_vat?: number | null;
5350
- vat_amount?: number | null;
6308
+ tenant_id?: string;
6309
+ updated_at?: string;
6310
+ user_id?: string;
5351
6311
  };
5352
- Relationships: [];
6312
+ Relationships: [{
6313
+ foreignKeyName: "leave_requests_user_id_fkey";
6314
+ columns: ["user_id"];
6315
+ isOneToOne: false;
6316
+ referencedRelation: "monteurs";
6317
+ referencedColumns: ["id"];
6318
+ }];
5353
6319
  };
5354
6320
  local_customer_agreements: {
5355
6321
  Row: {
@@ -6002,6 +6968,33 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
6002
6968
  };
6003
6969
  Relationships: [];
6004
6970
  };
6971
+ module_permissions: {
6972
+ Row: {
6973
+ created_at: string;
6974
+ id: string;
6975
+ module_id: string;
6976
+ permission: string;
6977
+ role: Database["public"]["Enums"]["app_role"];
6978
+ updated_at: string;
6979
+ };
6980
+ Insert: {
6981
+ created_at?: string;
6982
+ id?: string;
6983
+ module_id: string;
6984
+ permission: string;
6985
+ role: Database["public"]["Enums"]["app_role"];
6986
+ updated_at?: string;
6987
+ };
6988
+ Update: {
6989
+ created_at?: string;
6990
+ id?: string;
6991
+ module_id?: string;
6992
+ permission?: string;
6993
+ role?: Database["public"]["Enums"]["app_role"];
6994
+ updated_at?: string;
6995
+ };
6996
+ Relationships: [];
6997
+ };
6005
6998
  monteurs: {
6006
6999
  Row: {
6007
7000
  avatar_url: string | null;
@@ -6731,6 +7724,42 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
6731
7724
  };
6732
7725
  Relationships: [];
6733
7726
  };
7727
+ order_buffers: {
7728
+ Row: {
7729
+ buffer_key: string;
7730
+ created_at: string;
7731
+ customer_id: string | null;
7732
+ grouping_mode: string;
7733
+ id: string;
7734
+ pickup_date: string | null;
7735
+ pickup_location: string | null;
7736
+ plan_locked_at: string | null;
7737
+ updated_at: string;
7738
+ };
7739
+ Insert: {
7740
+ buffer_key: string;
7741
+ created_at?: string;
7742
+ customer_id?: string | null;
7743
+ grouping_mode: string;
7744
+ id?: string;
7745
+ pickup_date?: string | null;
7746
+ pickup_location?: string | null;
7747
+ plan_locked_at?: string | null;
7748
+ updated_at?: string;
7749
+ };
7750
+ Update: {
7751
+ buffer_key?: string;
7752
+ created_at?: string;
7753
+ customer_id?: string | null;
7754
+ grouping_mode?: string;
7755
+ id?: string;
7756
+ pickup_date?: string | null;
7757
+ pickup_location?: string | null;
7758
+ plan_locked_at?: string | null;
7759
+ updated_at?: string;
7760
+ };
7761
+ Relationships: [];
7762
+ };
6734
7763
  order_cart_items: {
6735
7764
  Row: {
6736
7765
  cart_id: string;
@@ -6797,6 +7826,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
6797
7826
  order_carts: {
6798
7827
  Row: {
6799
7828
  algorithm_version: number;
7829
+ buffer_id: string | null;
6800
7830
  cart_number: number;
6801
7831
  created_at: string;
6802
7832
  id: string;
@@ -6804,13 +7834,14 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
6804
7834
  is_complete: boolean;
6805
7835
  notes: string | null;
6806
7836
  occupancy_pct: number;
6807
- order_id: string;
7837
+ order_id: string | null;
6808
7838
  source: string;
6809
7839
  total_layers_used: number;
6810
7840
  updated_at: string;
6811
7841
  };
6812
7842
  Insert: {
6813
7843
  algorithm_version?: number;
7844
+ buffer_id?: string | null;
6814
7845
  cart_number: number;
6815
7846
  created_at?: string;
6816
7847
  id?: string;
@@ -6818,13 +7849,14 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
6818
7849
  is_complete?: boolean;
6819
7850
  notes?: string | null;
6820
7851
  occupancy_pct?: number;
6821
- order_id: string;
7852
+ order_id?: string | null;
6822
7853
  source?: string;
6823
7854
  total_layers_used?: number;
6824
7855
  updated_at?: string;
6825
7856
  };
6826
7857
  Update: {
6827
7858
  algorithm_version?: number;
7859
+ buffer_id?: string | null;
6828
7860
  cart_number?: number;
6829
7861
  created_at?: string;
6830
7862
  id?: string;
@@ -6832,12 +7864,18 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
6832
7864
  is_complete?: boolean;
6833
7865
  notes?: string | null;
6834
7866
  occupancy_pct?: number;
6835
- order_id?: string;
7867
+ order_id?: string | null;
6836
7868
  source?: string;
6837
7869
  total_layers_used?: number;
6838
7870
  updated_at?: string;
6839
7871
  };
6840
7872
  Relationships: [{
7873
+ foreignKeyName: "order_carts_buffer_id_fkey";
7874
+ columns: ["buffer_id"];
7875
+ isOneToOne: false;
7876
+ referencedRelation: "order_buffers";
7877
+ referencedColumns: ["id"];
7878
+ }, {
6841
7879
  foreignKeyName: "order_carts_order_id_fkey";
6842
7880
  columns: ["order_id"];
6843
7881
  isOneToOne: false;
@@ -6974,15 +8012,117 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
6974
8012
  };
6975
8013
  Relationships: [];
6976
8014
  };
8015
+ order_shipment_items: {
8016
+ Row: {
8017
+ created_at: string;
8018
+ id: string;
8019
+ order_item_id: string;
8020
+ product_id: string | null;
8021
+ product_name: string;
8022
+ quantity: number;
8023
+ shipment_id: string;
8024
+ updated_at: string;
8025
+ };
8026
+ Insert: {
8027
+ created_at?: string;
8028
+ id?: string;
8029
+ order_item_id: string;
8030
+ product_id?: string | null;
8031
+ product_name: string;
8032
+ quantity: number;
8033
+ shipment_id: string;
8034
+ updated_at?: string;
8035
+ };
8036
+ Update: {
8037
+ created_at?: string;
8038
+ id?: string;
8039
+ order_item_id?: string;
8040
+ product_id?: string | null;
8041
+ product_name?: string;
8042
+ quantity?: number;
8043
+ shipment_id?: string;
8044
+ updated_at?: string;
8045
+ };
8046
+ Relationships: [{
8047
+ foreignKeyName: "order_shipment_items_order_item_id_fkey";
8048
+ columns: ["order_item_id"];
8049
+ isOneToOne: false;
8050
+ referencedRelation: "order_items";
8051
+ referencedColumns: ["id"];
8052
+ }, {
8053
+ foreignKeyName: "order_shipment_items_shipment_id_fkey";
8054
+ columns: ["shipment_id"];
8055
+ isOneToOne: false;
8056
+ referencedRelation: "order_shipments";
8057
+ referencedColumns: ["id"];
8058
+ }];
8059
+ };
8060
+ order_shipments: {
8061
+ Row: {
8062
+ carrier_id: string | null;
8063
+ created_at: string;
8064
+ delivery_date: string | null;
8065
+ delivery_location_id: string | null;
8066
+ id: string;
8067
+ notes: string | null;
8068
+ order_id: string;
8069
+ shipment_number: number;
8070
+ shipped_at: string | null;
8071
+ status: string;
8072
+ updated_at: string;
8073
+ };
8074
+ Insert: {
8075
+ carrier_id?: string | null;
8076
+ created_at?: string;
8077
+ delivery_date?: string | null;
8078
+ delivery_location_id?: string | null;
8079
+ id?: string;
8080
+ notes?: string | null;
8081
+ order_id: string;
8082
+ shipment_number: number;
8083
+ shipped_at?: string | null;
8084
+ status?: string;
8085
+ updated_at?: string;
8086
+ };
8087
+ Update: {
8088
+ carrier_id?: string | null;
8089
+ created_at?: string;
8090
+ delivery_date?: string | null;
8091
+ delivery_location_id?: string | null;
8092
+ id?: string;
8093
+ notes?: string | null;
8094
+ order_id?: string;
8095
+ shipment_number?: number;
8096
+ shipped_at?: string | null;
8097
+ status?: string;
8098
+ updated_at?: string;
8099
+ };
8100
+ Relationships: [{
8101
+ foreignKeyName: "order_shipments_carrier_id_fkey";
8102
+ columns: ["carrier_id"];
8103
+ isOneToOne: false;
8104
+ referencedRelation: "carriers";
8105
+ referencedColumns: ["id"];
8106
+ }, {
8107
+ foreignKeyName: "order_shipments_order_id_fkey";
8108
+ columns: ["order_id"];
8109
+ isOneToOne: false;
8110
+ referencedRelation: "orders";
8111
+ referencedColumns: ["id"];
8112
+ }];
8113
+ };
6977
8114
  orders: {
6978
8115
  Row: {
8116
+ buffer_id: string | null;
6979
8117
  created_at: string;
6980
8118
  custom_fields: import("./types").Json;
6981
8119
  customer_id: string | null;
6982
8120
  customer_name: string;
6983
8121
  deleted_at: string | null;
6984
- delivery_date: string;
8122
+ delivery_date: string | null;
8123
+ floriday_sales_order_id: string | null;
6985
8124
  id: string;
8125
+ is_reservation: boolean;
6986
8126
  notes: string | null;
6987
8127
  order_date: string;
6988
8128
  order_number: string;
@@ -6994,13 +8134,16 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
6994
8134
  updated_at: string;
6995
8135
  };
6996
8136
  Insert: {
8137
+ buffer_id?: string | null;
6997
8138
  created_at?: string;
6998
8139
  custom_fields?: import("./types").Json;
6999
8140
  customer_id?: string | null;
7000
8141
  customer_name?: string;
7001
8142
  deleted_at?: string | null;
7002
- delivery_date: string;
8143
+ delivery_date?: string | null;
8144
+ floriday_sales_order_id?: string | null;
7003
8145
  id?: string;
8146
+ is_reservation?: boolean;
7004
8147
  notes?: string | null;
7005
8148
  order_date?: string;
7006
8149
  order_number: string;
@@ -7012,13 +8155,16 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7012
8155
  updated_at?: string;
7013
8156
  };
7014
8157
  Update: {
8158
+ buffer_id?: string | null;
7015
8159
  created_at?: string;
7016
8160
  custom_fields?: import("./types").Json;
7017
8161
  customer_id?: string | null;
7018
8162
  customer_name?: string;
7019
8163
  deleted_at?: string | null;
7020
- delivery_date?: string;
8164
+ delivery_date?: string | null;
8165
+ floriday_sales_order_id?: string | null;
7021
8166
  id?: string;
8167
+ is_reservation?: boolean;
7022
8168
  notes?: string | null;
7023
8169
  order_date?: string;
7024
8170
  order_number?: string;
@@ -7030,6 +8176,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7030
8176
  updated_at?: string;
7031
8177
  };
7032
8178
  Relationships: [{
8179
+ foreignKeyName: "orders_buffer_id_fkey";
8180
+ columns: ["buffer_id"];
8181
+ isOneToOne: false;
8182
+ referencedRelation: "order_buffers";
8183
+ referencedColumns: ["id"];
8184
+ }, {
7033
8185
  foreignKeyName: "orders_customer_id_fkey";
7034
8186
  columns: ["customer_id"];
7035
8187
  isOneToOne: false;
@@ -7293,6 +8445,8 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7293
8445
  Row: {
7294
8446
  created_at: string;
7295
8447
  description: string | null;
8448
+ head_product_id: string | null;
8449
+ head_trade_item_floriday_id: string | null;
7296
8450
  id: string;
7297
8451
  is_active: boolean;
7298
8452
  name: string;
@@ -7302,6 +8456,8 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7302
8456
  Insert: {
7303
8457
  created_at?: string;
7304
8458
  description?: string | null;
8459
+ head_product_id?: string | null;
8460
+ head_trade_item_floriday_id?: string | null;
7305
8461
  id?: string;
7306
8462
  is_active?: boolean;
7307
8463
  name: string;
@@ -7311,13 +8467,21 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7311
8467
  Update: {
7312
8468
  created_at?: string;
7313
8469
  description?: string | null;
8470
+ head_product_id?: string | null;
8471
+ head_trade_item_floriday_id?: string | null;
7314
8472
  id?: string;
7315
8473
  is_active?: boolean;
7316
8474
  name?: string;
7317
8475
  tenant_id?: string;
7318
8476
  updated_at?: string;
7319
8477
  };
7320
- Relationships: [];
8478
+ Relationships: [{
8479
+ foreignKeyName: "product_groups_head_product_id_fkey";
8480
+ columns: ["head_product_id"];
8481
+ isOneToOne: false;
8482
+ referencedRelation: "products";
8483
+ referencedColumns: ["id"];
8484
+ }];
7321
8485
  };
7322
8486
  products: {
7323
8487
  Row: {
@@ -8402,18 +9566,39 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
8402
9566
  updated_at?: string;
8403
9567
  };
8404
9568
  Update: {
8405
- address?: string | null;
8406
- column_mappings?: import("./types").Json | null;
8407
- contact_person?: string | null;
9569
+ address?: string | null;
9570
+ column_mappings?: import("./types").Json | null;
9571
+ contact_person?: string | null;
9572
+ created_at?: string;
9573
+ default_product_type?: string;
9574
+ email?: string | null;
9575
+ id?: string;
9576
+ imported_file_name?: string | null;
9577
+ name?: string;
9578
+ notes?: string | null;
9579
+ phone?: string | null;
9580
+ updated_at?: string;
9581
+ };
9582
+ Relationships: [];
9583
+ };
9584
+ technician_rates: {
9585
+ Row: {
9586
+ created_at: string;
9587
+ hourly_rate_cents: number;
9588
+ updated_at: string;
9589
+ user_id: string;
9590
+ };
9591
+ Insert: {
9592
+ created_at?: string;
9593
+ hourly_rate_cents?: number;
9594
+ updated_at?: string;
9595
+ user_id: string;
9596
+ };
9597
+ Update: {
8408
9598
  created_at?: string;
8409
- default_product_type?: string;
8410
- email?: string | null;
8411
- id?: string;
8412
- imported_file_name?: string | null;
8413
- name?: string;
8414
- notes?: string | null;
8415
- phone?: string | null;
9599
+ hourly_rate_cents?: number;
8416
9600
  updated_at?: string;
9601
+ user_id?: string;
8417
9602
  };
8418
9603
  Relationships: [];
8419
9604
  };
@@ -8886,6 +10071,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
8886
10071
  country: string | null;
8887
10072
  created_at: string;
8888
10073
  email: string | null;
10074
+ external_group_key: string | null;
8889
10075
  id: string;
8890
10076
  last_synced_at: string | null;
8891
10077
  name: string;
@@ -8904,6 +10090,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
8904
10090
  country?: string | null;
8905
10091
  created_at?: string;
8906
10092
  email?: string | null;
10093
+ external_group_key?: string | null;
8907
10094
  id?: string;
8908
10095
  last_synced_at?: string | null;
8909
10096
  name: string;
@@ -8922,6 +10109,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
8922
10109
  country?: string | null;
8923
10110
  created_at?: string;
8924
10111
  email?: string | null;
10112
+ external_group_key?: string | null;
8925
10113
  id?: string;
8926
10114
  last_synced_at?: string | null;
8927
10115
  name?: string;
@@ -9086,6 +10274,8 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9086
10274
  twinfield_invoice_settings: {
9087
10275
  Row: {
9088
10276
  created_at: string;
10277
+ debtor_gl_account: string;
10278
+ default_credit_invoice_type: string | null;
9089
10279
  default_gl_account: string;
9090
10280
  default_invoice_type: string;
9091
10281
  default_payment_term_days: number;
@@ -9094,11 +10284,15 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9094
10284
  invoice_enabled_fo: boolean;
9095
10285
  invoice_enabled_ho: boolean;
9096
10286
  invoice_enabled_mo: boolean;
10287
+ payment_gl_account: string;
10288
+ payment_journal_code: string;
9097
10289
  updated_at: string;
9098
10290
  user_id: string;
9099
10291
  };
9100
10292
  Insert: {
9101
10293
  created_at?: string;
10294
+ debtor_gl_account?: string;
10295
+ default_credit_invoice_type?: string | null;
9102
10296
  default_gl_account?: string;
9103
10297
  default_invoice_type?: string;
9104
10298
  default_payment_term_days?: number;
@@ -9107,11 +10301,15 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9107
10301
  invoice_enabled_fo?: boolean;
9108
10302
  invoice_enabled_ho?: boolean;
9109
10303
  invoice_enabled_mo?: boolean;
10304
+ payment_gl_account?: string;
10305
+ payment_journal_code?: string;
9110
10306
  updated_at?: string;
9111
10307
  user_id: string;
9112
10308
  };
9113
10309
  Update: {
9114
10310
  created_at?: string;
10311
+ debtor_gl_account?: string;
10312
+ default_credit_invoice_type?: string | null;
9115
10313
  default_gl_account?: string;
9116
10314
  default_invoice_type?: string;
9117
10315
  default_payment_term_days?: number;
@@ -9120,6 +10318,8 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9120
10318
  invoice_enabled_fo?: boolean;
9121
10319
  invoice_enabled_ho?: boolean;
9122
10320
  invoice_enabled_mo?: boolean;
10321
+ payment_gl_account?: string;
10322
+ payment_journal_code?: string;
9123
10323
  updated_at?: string;
9124
10324
  user_id?: string;
9125
10325
  };
@@ -9340,43 +10540,49 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9340
10540
  };
9341
10541
  twinfield_push_queue: {
9342
10542
  Row: {
10543
+ action: string;
9343
10544
  attempts: number;
9344
10545
  connection_id: string;
9345
10546
  created_at: string;
10547
+ customer_id: string | null;
9346
10548
  external_id: string | null;
9347
10549
  id: string;
9348
10550
  idempotency_key: string;
9349
10551
  last_error: string | null;
9350
10552
  next_attempt_at: string;
9351
- office_code: string;
10553
+ office_code: string | null;
9352
10554
  payload: import("./types").Json;
9353
10555
  status: string;
9354
10556
  updated_at: string;
9355
10557
  };
9356
10558
  Insert: {
10559
+ action?: string;
9357
10560
  attempts?: number;
9358
10561
  connection_id: string;
9359
10562
  created_at?: string;
10563
+ customer_id?: string | null;
9360
10564
  external_id?: string | null;
9361
10565
  id?: string;
9362
10566
  idempotency_key: string;
9363
10567
  last_error?: string | null;
9364
10568
  next_attempt_at?: string;
9365
- office_code: string;
10569
+ office_code?: string | null;
9366
10570
  payload: import("./types").Json;
9367
10571
  status?: string;
9368
10572
  updated_at?: string;
9369
10573
  };
9370
10574
  Update: {
10575
+ action?: string;
9371
10576
  attempts?: number;
9372
10577
  connection_id?: string;
9373
10578
  created_at?: string;
10579
+ customer_id?: string | null;
9374
10580
  external_id?: string | null;
9375
10581
  id?: string;
9376
10582
  idempotency_key?: string;
9377
10583
  last_error?: string | null;
9378
10584
  next_attempt_at?: string;
9379
- office_code?: string;
10585
+ office_code?: string | null;
9380
10586
  payload?: import("./types").Json;
9381
10587
  status?: string;
9382
10588
  updated_at?: string;
@@ -9387,6 +10593,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9387
10593
  isOneToOne: false;
9388
10594
  referencedRelation: "twinfield_connections";
9389
10595
  referencedColumns: ["id"];
10596
+ }, {
10597
+ foreignKeyName: "twinfield_push_queue_customer_id_fkey";
10598
+ columns: ["customer_id"];
10599
+ isOneToOne: false;
10600
+ referencedRelation: "customers";
10601
+ referencedColumns: ["id"];
9390
10602
  }];
9391
10603
  };
9392
10604
  twinfield_request_metrics: {
@@ -9662,6 +10874,252 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9662
10874
  };
9663
10875
  Relationships: [];
9664
10876
  };
10877
+ werkbon_package_lines: {
10878
+ Row: {
10879
+ created_at: string;
10880
+ created_by: string | null;
10881
+ id: string;
10882
+ package_id: string;
10883
+ quantity: number;
10884
+ unit_price_cents_snapshot: number;
10885
+ werkbon_id: string;
10886
+ };
10887
+ Insert: {
10888
+ created_at?: string;
10889
+ created_by?: string | null;
10890
+ id?: string;
10891
+ package_id: string;
10892
+ quantity?: number;
10893
+ unit_price_cents_snapshot?: number;
10894
+ werkbon_id: string;
10895
+ };
10896
+ Update: {
10897
+ created_at?: string;
10898
+ created_by?: string | null;
10899
+ id?: string;
10900
+ package_id?: string;
10901
+ quantity?: number;
10902
+ unit_price_cents_snapshot?: number;
10903
+ werkbon_id?: string;
10904
+ };
10905
+ Relationships: [{
10906
+ foreignKeyName: "werkbon_package_lines_package_id_fkey";
10907
+ columns: ["package_id"];
10908
+ isOneToOne: false;
10909
+ referencedRelation: "werkbon_packages";
10910
+ referencedColumns: ["id"];
10911
+ }, {
10912
+ foreignKeyName: "werkbon_package_lines_werkbon_id_fkey";
10913
+ columns: ["werkbon_id"];
10914
+ isOneToOne: false;
10915
+ referencedRelation: "werkbonnen";
10916
+ referencedColumns: ["id"];
10917
+ }];
10918
+ };
10919
+ werkbon_packages: {
10920
+ Row: {
10921
+ active: boolean;
10922
+ code: string;
10923
+ created_at: string;
10924
+ default_quantity: number;
10925
+ description: string | null;
10926
+ id: string;
10927
+ name: string;
10928
+ unit_price_cents: number;
10929
+ updated_at: string;
10930
+ };
10931
+ Insert: {
10932
+ active?: boolean;
10933
+ code: string;
10934
+ created_at?: string;
10935
+ default_quantity?: number;
10936
+ description?: string | null;
10937
+ id?: string;
10938
+ name: string;
10939
+ unit_price_cents?: number;
10940
+ updated_at?: string;
10941
+ };
10942
+ Update: {
10943
+ active?: boolean;
10944
+ code?: string;
10945
+ created_at?: string;
10946
+ default_quantity?: number;
10947
+ description?: string | null;
10948
+ id?: string;
10949
+ name?: string;
10950
+ unit_price_cents?: number;
10951
+ updated_at?: string;
10952
+ };
10953
+ Relationships: [];
10954
+ };
10955
+ werkbon_photos: {
10956
+ Row: {
10957
+ created_at: string;
10958
+ id: string;
10959
+ storage_path: string;
10960
+ user_id: string;
10961
+ werkbon_id: string;
10962
+ };
10963
+ Insert: {
10964
+ created_at?: string;
10965
+ id?: string;
10966
+ storage_path: string;
10967
+ user_id: string;
10968
+ werkbon_id: string;
10969
+ };
10970
+ Update: {
10971
+ created_at?: string;
10972
+ id?: string;
10973
+ storage_path?: string;
10974
+ user_id?: string;
10975
+ werkbon_id?: string;
10976
+ };
10977
+ Relationships: [{
10978
+ foreignKeyName: "werkbon_photos_werkbon_id_fkey";
10979
+ columns: ["werkbon_id"];
10980
+ isOneToOne: false;
10981
+ referencedRelation: "werkbonnen";
10982
+ referencedColumns: ["id"];
10983
+ }];
10984
+ };
10985
+ werkbon_time_logs: {
10986
+ Row: {
10987
+ activity: string;
10988
+ created_at: string;
10989
+ ended_at: string | null;
10990
+ id: string;
10991
+ started_at: string;
10992
+ user_id: string;
10993
+ werkbon_id: string;
10994
+ };
10995
+ Insert: {
10996
+ activity: string;
10997
+ created_at?: string;
10998
+ ended_at?: string | null;
10999
+ id?: string;
11000
+ started_at?: string;
11001
+ user_id: string;
11002
+ werkbon_id: string;
11003
+ };
11004
+ Update: {
11005
+ activity?: string;
11006
+ created_at?: string;
11007
+ ended_at?: string | null;
11008
+ id?: string;
11009
+ started_at?: string;
11010
+ user_id?: string;
11011
+ werkbon_id?: string;
11012
+ };
11013
+ Relationships: [{
11014
+ foreignKeyName: "werkbon_time_logs_werkbon_id_fkey";
11015
+ columns: ["werkbon_id"];
11016
+ isOneToOne: false;
11017
+ referencedRelation: "werkbonnen";
11018
+ referencedColumns: ["id"];
11019
+ }];
11020
+ };
11021
+ werkbonnen: {
11022
+ Row: {
11023
+ assigned_user_id: string | null;
11024
+ budget_mandate_cents: number;
11025
+ complaint_description: string | null;
11026
+ created_at: string;
11027
+ created_by: string | null;
11028
+ customer_id: string | null;
11029
+ externe_referentie: string | null;
11030
+ first_time_fix: boolean | null;
11031
+ id: string;
11032
+ internal_notes: string | null;
11033
+ parent_werkbon_id: string | null;
11034
+ parsed_payload: import("./types").Json | null;
11035
+ planning_status: string;
11036
+ project_number: string | null;
11037
+ room_number: string | null;
11038
+ scheduled_end_time: string | null;
11039
+ scheduled_start_time: string | null;
11040
+ sequence_number: number;
11041
+ source_pdf_path: string | null;
11042
+ status: string;
11043
+ technician_id: string | null;
11044
+ technician_notes: string | null;
11045
+ technician_notes_raw: string | null;
11046
+ technician_task_description: string | null;
11047
+ updated_at: string;
11048
+ version: number;
11049
+ work_address: string | null;
11050
+ };
11051
+ Insert: {
11052
+ assigned_user_id?: string | null;
11053
+ budget_mandate_cents?: number;
11054
+ complaint_description?: string | null;
11055
+ created_at?: string;
11056
+ created_by?: string | null;
11057
+ customer_id?: string | null;
11058
+ externe_referentie?: string | null;
11059
+ first_time_fix?: boolean | null;
11060
+ id?: string;
11061
+ internal_notes?: string | null;
11062
+ parent_werkbon_id?: string | null;
11063
+ parsed_payload?: import("./types").Json | null;
11064
+ planning_status?: string;
11065
+ project_number?: string | null;
11066
+ room_number?: string | null;
11067
+ scheduled_end_time?: string | null;
11068
+ scheduled_start_time?: string | null;
11069
+ sequence_number: number;
11070
+ source_pdf_path?: string | null;
11071
+ status?: string;
11072
+ technician_id?: string | null;
11073
+ technician_notes?: string | null;
11074
+ technician_notes_raw?: string | null;
11075
+ technician_task_description?: string | null;
11076
+ updated_at?: string;
11077
+ version?: number;
11078
+ work_address?: string | null;
11079
+ };
11080
+ Update: {
11081
+ assigned_user_id?: string | null;
11082
+ budget_mandate_cents?: number;
11083
+ complaint_description?: string | null;
11084
+ created_at?: string;
11085
+ created_by?: string | null;
11086
+ customer_id?: string | null;
11087
+ externe_referentie?: string | null;
11088
+ first_time_fix?: boolean | null;
11089
+ id?: string;
11090
+ internal_notes?: string | null;
11091
+ parent_werkbon_id?: string | null;
11092
+ parsed_payload?: import("./types").Json | null;
11093
+ planning_status?: string;
11094
+ project_number?: string | null;
11095
+ room_number?: string | null;
11096
+ scheduled_end_time?: string | null;
11097
+ scheduled_start_time?: string | null;
11098
+ sequence_number?: number;
11099
+ source_pdf_path?: string | null;
11100
+ status?: string;
11101
+ technician_id?: string | null;
11102
+ technician_notes?: string | null;
11103
+ technician_notes_raw?: string | null;
11104
+ technician_task_description?: string | null;
11105
+ updated_at?: string;
11106
+ version?: number;
11107
+ work_address?: string | null;
11108
+ };
11109
+ Relationships: [{
11110
+ foreignKeyName: "werkbonnen_parent_werkbon_id_fkey";
11111
+ columns: ["parent_werkbon_id"];
11112
+ isOneToOne: false;
11113
+ referencedRelation: "werkbonnen";
11114
+ referencedColumns: ["id"];
11115
+ }, {
11116
+ foreignKeyName: "werkbonnen_technician_id_fkey";
11117
+ columns: ["technician_id"];
11118
+ isOneToOne: false;
11119
+ referencedRelation: "monteurs";
11120
+ referencedColumns: ["id"];
11121
+ }];
11122
+ };
9665
11123
  work_order_monteurs: {
9666
11124
  Row: {
9667
11125
  created_at: string;
@@ -9832,6 +11290,8 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9832
11290
  created_at: string | null;
9833
11291
  created_by: string | null;
9834
11292
  display_name: string | null;
11293
+ graph_subscription_expires_at: string | null;
11294
+ graph_subscription_id: string | null;
9835
11295
  has_access_token: boolean | null;
9836
11296
  has_client_id: boolean | null;
9837
11297
  has_client_secret: boolean | null;
@@ -9849,6 +11309,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9849
11309
  oauth_mode: string | null;
9850
11310
  provider: string | null;
9851
11311
  purpose_assignments: import("./types").Json | null;
11312
+ realtime_mode: string | null;
9852
11313
  scopes: string[] | null;
9853
11314
  smtp_host: string | null;
9854
11315
  smtp_port: number | null;
@@ -9863,6 +11324,8 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9863
11324
  created_at?: string | null;
9864
11325
  created_by?: string | null;
9865
11326
  display_name?: string | null;
11327
+ graph_subscription_expires_at?: string | null;
11328
+ graph_subscription_id?: string | null;
9866
11329
  has_access_token?: never;
9867
11330
  has_client_id?: never;
9868
11331
  has_client_secret?: never;
@@ -9880,6 +11343,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9880
11343
  oauth_mode?: string | null;
9881
11344
  provider?: string | null;
9882
11345
  purpose_assignments?: import("./types").Json | null;
11346
+ realtime_mode?: string | null;
9883
11347
  scopes?: string[] | null;
9884
11348
  smtp_host?: string | null;
9885
11349
  smtp_port?: number | null;
@@ -9894,6 +11358,8 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9894
11358
  created_at?: string | null;
9895
11359
  created_by?: string | null;
9896
11360
  display_name?: string | null;
11361
+ graph_subscription_expires_at?: string | null;
11362
+ graph_subscription_id?: string | null;
9897
11363
  has_access_token?: never;
9898
11364
  has_client_id?: never;
9899
11365
  has_client_secret?: never;
@@ -9911,6 +11377,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
9911
11377
  oauth_mode?: string | null;
9912
11378
  provider?: string | null;
9913
11379
  purpose_assignments?: import("./types").Json | null;
11380
+ realtime_mode?: string | null;
9914
11381
  scopes?: string[] | null;
9915
11382
  smtp_host?: string | null;
9916
11383
  smtp_port?: number | null;
@@ -10369,6 +11836,21 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10369
11836
  };
10370
11837
  Returns: string;
10371
11838
  };
11839
+ ai_usage_by_module: {
11840
+ Args: {
11841
+ _from: string;
11842
+ _to: string;
11843
+ };
11844
+ Returns: {
11845
+ calls: number;
11846
+ consumer_module_id: string;
11847
+ cost_usd: number;
11848
+ errors: number;
11849
+ input_tokens: number;
11850
+ output_tokens: number;
11851
+ total_tokens: number;
11852
+ }[];
11853
+ };
10372
11854
  apply_stock_consumption: {
10373
11855
  Args: {
10374
11856
  p_order_id: string;
@@ -10454,6 +11936,33 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10454
11936
  };
10455
11937
  Returns: import("./types").Json;
10456
11938
  };
11939
+ claim_twinfield_push_batch: {
11940
+ Args: {
11941
+ _limit?: number;
11942
+ };
11943
+ Returns: {
11944
+ action: string;
11945
+ attempts: number;
11946
+ connection_id: string;
11947
+ created_at: string;
11948
+ customer_id: string | null;
11949
+ external_id: string | null;
11950
+ id: string;
11951
+ idempotency_key: string;
11952
+ last_error: string | null;
11953
+ next_attempt_at: string;
11954
+ office_code: string | null;
11955
+ payload: import("./types").Json;
11956
+ status: string;
11957
+ updated_at: string;
11958
+ }[];
11959
+ SetofOptions: {
11960
+ from: "*";
11961
+ to: "twinfield_push_queue";
11962
+ isOneToOne: false;
11963
+ isSetofReturn: true;
11964
+ };
11965
+ };
10457
11966
  cleanup_old_bookings: {
10458
11967
  Args: never;
10459
11968
  Returns: undefined;
@@ -10490,6 +11999,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10490
11999
  Args: never;
10491
12000
  Returns: string;
10492
12001
  };
12002
+ custom_access_token_hook: {
12003
+ Args: {
12004
+ event: import("./types").Json;
12005
+ };
12006
+ Returns: import("./types").Json;
12007
+ };
10493
12008
  dashboard_alert_counts: {
10494
12009
  Args: never;
10495
12010
  Returns: import("./types").Json;
@@ -10550,6 +12065,16 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10550
12065
  status: string;
10551
12066
  }[];
10552
12067
  };
12068
+ email_auth_upsert_connection: {
12069
+ Args: {
12070
+ _account_email: string;
12071
+ _created_by: string;
12072
+ _is_active: boolean;
12073
+ _provider: string;
12074
+ _status: string;
12075
+ };
12076
+ Returns: string;
12077
+ };
10553
12078
  enqueue_cart_replan_if_unlocked: {
10554
12079
  Args: {
10555
12080
  p_order_id: string;
@@ -10815,6 +12340,14 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10815
12340
  };
10816
12341
  Returns: string;
10817
12342
  };
12343
+ has_module_permission: {
12344
+ Args: {
12345
+ _min: string;
12346
+ _module_id: string;
12347
+ _user_id: string;
12348
+ };
12349
+ Returns: boolean;
12350
+ };
10818
12351
  has_role: {
10819
12352
  Args: {
10820
12353
  _role: Database["public"]["Enums"]["app_role"];
@@ -10822,6 +12355,10 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10822
12355
  };
10823
12356
  Returns: boolean;
10824
12357
  };
12358
+ has_twinfield_link: {
12359
+ Args: never;
12360
+ Returns: boolean;
12361
+ };
10825
12362
  is_authenticated: {
10826
12363
  Args: never;
10827
12364
  Returns: boolean;
@@ -10836,6 +12373,20 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10836
12373
  };
10837
12374
  Returns: boolean;
10838
12375
  };
12376
+ jwt_has_role: {
12377
+ Args: {
12378
+ _role: Database["public"]["Enums"]["app_role"];
12379
+ };
12380
+ Returns: boolean;
12381
+ };
12382
+ list_monteurs: {
12383
+ Args: never;
12384
+ Returns: {
12385
+ display_name: string;
12386
+ email: string;
12387
+ user_id: string;
12388
+ }[];
12389
+ };
10839
12390
  local_effective_price: {
10840
12391
  Args: {
10841
12392
  _customer_id: string;
@@ -10852,6 +12403,22 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10852
12403
  source_id: string;
10853
12404
  }[];
10854
12405
  };
12406
+ log_ai_call: {
12407
+ Args: {
12408
+ _consumer_module_id: string;
12409
+ _cost_usd: number;
12410
+ _duration_ms: number;
12411
+ _error_code: string;
12412
+ _error_message: string;
12413
+ _input_tokens: number;
12414
+ _model_slug: string;
12415
+ _output_tokens: number;
12416
+ _provider_slug: string;
12417
+ _status: string;
12418
+ _total_tokens: number;
12419
+ };
12420
+ Returns: string;
12421
+ };
10855
12422
  mark_offer_clicked: {
10856
12423
  Args: {
10857
12424
  p_code: string;
@@ -10864,6 +12431,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10864
12431
  };
10865
12432
  Returns: undefined;
10866
12433
  };
12434
+ mark_shipment_shipped: {
12435
+ Args: {
12436
+ p_shipment_id: string;
12437
+ };
12438
+ Returns: undefined;
12439
+ };
10867
12440
  next_order_number: {
10868
12441
  Args: {
10869
12442
  p_prefix: string;
@@ -10877,6 +12450,10 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10877
12450
  };
10878
12451
  Returns: string;
10879
12452
  };
12453
+ next_twinfield_code: {
12454
+ Args: never;
12455
+ Returns: string;
12456
+ };
10880
12457
  next_work_order_number: {
10881
12458
  Args: {
10882
12459
  p_parent_work_order_id?: string;
@@ -10991,6 +12568,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10991
12568
  };
10992
12569
  Returns: number;
10993
12570
  };
12571
+ reorder_customer_price_groups: {
12572
+ Args: {
12573
+ _ids: string[];
12574
+ };
12575
+ Returns: undefined;
12576
+ };
10994
12577
  reset_floriday_sync_cursor: {
10995
12578
  Args: {
10996
12579
  p_connection_id: string;
@@ -11004,6 +12587,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
11004
12587
  };
11005
12588
  Returns: string;
11006
12589
  };
12590
+ retry_twinfield_push: {
12591
+ Args: {
12592
+ _customer_id: string;
12593
+ };
12594
+ Returns: number;
12595
+ };
11007
12596
  schedule_floriday_additional_services_sync: {
11008
12597
  Args: {
11009
12598
  p_apikey: string;
@@ -11324,9 +12913,11 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
11324
12913
  };
11325
12914
  };
11326
12915
  Enums: {
11327
- app_role: "admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie" | "monteur";
12916
+ app_role: "admin" | "planner" | "monteur" | "administratie" | "ai_admin";
11328
12917
  exact_env: "staging" | "live";
11329
12918
  exact_push_status: "pending" | "sent" | "error";
12919
+ itk_customer_segment: "Business" | "Private";
12920
+ itk_dynamic_field_type: "text" | "select" | "date" | "checkbox";
11330
12921
  quote_status: "concept" | "verzonden" | "bekeken" | "in_behandeling" | "geaccepteerd" | "afgewezen" | "verlopen" | "gearchiveerd";
11331
12922
  };
11332
12923
  CompositeTypes: { [_ in never]: never; };