@flowselections/floriday-klanten-module 1.0.13 → 1.0.15

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 (42) hide show
  1. package/dist-lib/components/CustomerAvatar.js +1 -1
  2. package/dist-lib/components/klanten/ImportKlanten.d.ts +2 -0
  3. package/dist-lib/components/klanten/ImportKlanten.d.ts.map +1 -0
  4. package/dist-lib/components/klanten/ImportKlanten.js +438 -0
  5. package/dist-lib/components/klanten/KlantenOverzicht.d.ts.map +1 -1
  6. package/dist-lib/components/klanten/KlantenOverzicht.js +2 -2
  7. package/dist-lib/components/klanten/NetwerkPagina.d.ts.map +1 -1
  8. package/dist-lib/components/klanten/NetwerkPagina.js +38 -9
  9. package/dist-lib/components/klanten/NieuweKlant.d.ts.map +1 -1
  10. package/dist-lib/components/klanten/NieuweKlant.js +10 -1
  11. package/dist-lib/index.d.ts +1 -0
  12. package/dist-lib/index.d.ts.map +1 -1
  13. package/dist-lib/index.js +1 -0
  14. package/dist-lib/integrations/supabase/auth-middleware.d.ts +372 -1
  15. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
  16. package/dist-lib/integrations/supabase/client.d.ts +372 -1
  17. package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
  18. package/dist-lib/integrations/supabase/client.server.d.ts +372 -1
  19. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
  20. package/dist-lib/integrations/supabase/types.d.ts +376 -1
  21. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  22. package/dist-lib/lib/accounting.functions.d.ts +1116 -3
  23. package/dist-lib/lib/accounting.functions.d.ts.map +1 -1
  24. package/dist-lib/lib/customer-analytics.functions.d.ts +372 -1
  25. package/dist-lib/lib/customer-analytics.functions.d.ts.map +1 -1
  26. package/dist-lib/lib/customer-schemas.d.ts +147 -0
  27. package/dist-lib/lib/customer-schemas.d.ts.map +1 -1
  28. package/dist-lib/lib/customer-schemas.js +106 -7
  29. package/dist-lib/lib/customers.functions.d.ts +14184 -15
  30. package/dist-lib/lib/customers.functions.d.ts.map +1 -1
  31. package/dist-lib/lib/customers.functions.js +130 -23
  32. package/dist-lib/lib/delivery-locations.functions.d.ts +1488 -4
  33. package/dist-lib/lib/delivery-locations.functions.d.ts.map +1 -1
  34. package/dist-lib/lib/external-customers.functions.d.ts +1488 -4
  35. package/dist-lib/lib/external-customers.functions.d.ts.map +1 -1
  36. package/dist-lib/lib/floriday-discounts.functions.d.ts +744 -2
  37. package/dist-lib/lib/floriday-discounts.functions.d.ts.map +1 -1
  38. package/dist-lib/lib/local-discounts.functions.d.ts +2604 -7
  39. package/dist-lib/lib/local-discounts.functions.d.ts.map +1 -1
  40. package/dist-lib/lib/overdue-invoices.functions.d.ts +372 -1
  41. package/dist-lib/lib/overdue-invoices.functions.d.ts.map +1 -1
  42. package/package.json +10 -3
@@ -57,6 +57,8 @@ export declare const listExternalProviders: import("@tanstack/start-client-core"
57
57
  Tables: {
58
58
  afhandeling_settings: {
59
59
  Row: {
60
+ auto_print_delivery_note: boolean;
61
+ auto_process_paused: boolean;
60
62
  created_at: string;
61
63
  extra_pick_days_with_stickers: number;
62
64
  id: string;
@@ -72,6 +74,8 @@ export declare const listExternalProviders: import("@tanstack/start-client-core"
72
74
  user_id: string;
73
75
  };
74
76
  Insert: {
77
+ auto_print_delivery_note?: boolean;
78
+ auto_process_paused?: boolean;
75
79
  created_at?: string;
76
80
  extra_pick_days_with_stickers?: number;
77
81
  id?: string;
@@ -87,6 +91,8 @@ export declare const listExternalProviders: import("@tanstack/start-client-core"
87
91
  user_id: string;
88
92
  };
89
93
  Update: {
94
+ auto_print_delivery_note?: boolean;
95
+ auto_process_paused?: boolean;
90
96
  created_at?: string;
91
97
  extra_pick_days_with_stickers?: number;
92
98
  id?: string;
@@ -319,6 +325,9 @@ export declare const listExternalProviders: import("@tanstack/start-client-core"
319
325
  created_at: string;
320
326
  extra_id: string;
321
327
  id: string;
328
+ original_unit_price: number | null;
329
+ override_reason: string | null;
330
+ override_unit_price: number | null;
322
331
  quantity: number;
323
332
  total_price: number;
324
333
  unit_price: number;
@@ -328,6 +337,9 @@ export declare const listExternalProviders: import("@tanstack/start-client-core"
328
337
  created_at?: string;
329
338
  extra_id: string;
330
339
  id?: string;
340
+ original_unit_price?: number | null;
341
+ override_reason?: string | null;
342
+ override_unit_price?: number | null;
331
343
  quantity?: number;
332
344
  total_price?: number;
333
345
  unit_price?: number;
@@ -337,6 +349,9 @@ export declare const listExternalProviders: import("@tanstack/start-client-core"
337
349
  created_at?: string;
338
350
  extra_id?: string;
339
351
  id?: string;
352
+ original_unit_price?: number | null;
353
+ override_reason?: string | null;
354
+ override_unit_price?: number | null;
340
355
  quantity?: number;
341
356
  total_price?: number;
342
357
  unit_price?: number;
@@ -357,11 +372,15 @@ export declare const listExternalProviders: import("@tanstack/start-client-core"
357
372
  };
358
373
  bookings: {
359
374
  Row: {
375
+ archive_reason: string | null;
376
+ archived_at: string | null;
377
+ archived_by: string | null;
360
378
  company_name: string | null;
361
379
  conflict_checked_at: string | null;
362
380
  conflict_reason: string | null;
363
381
  created_at: string;
364
382
  created_by_role: string | null;
383
+ customer_address: string | null;
365
384
  customer_email: string | null;
366
385
  customer_name: string | null;
367
386
  end_time: string;
@@ -373,7 +392,12 @@ export declare const listExternalProviders: import("@tanstack/start-client-core"
373
392
  invoiced_at: string | null;
374
393
  notes: string | null;
375
394
  number_of_people: number;
395
+ overridden_at: string | null;
396
+ overridden_by: string | null;
397
+ override_reason: string | null;
398
+ price_override: boolean;
376
399
  room_id: string;
400
+ room_price_override: number | null;
377
401
  start_time: string;
378
402
  status: string;
379
403
  total_excl_vat: number | null;
@@ -382,11 +406,15 @@ export declare const listExternalProviders: import("@tanstack/start-client-core"
382
406
  vat_amount: number | null;
383
407
  };
384
408
  Insert: {
409
+ archive_reason?: string | null;
410
+ archived_at?: string | null;
411
+ archived_by?: string | null;
385
412
  company_name?: string | null;
386
413
  conflict_checked_at?: string | null;
387
414
  conflict_reason?: string | null;
388
415
  created_at?: string;
389
416
  created_by_role?: string | null;
417
+ customer_address?: string | null;
390
418
  customer_email?: string | null;
391
419
  customer_name?: string | null;
392
420
  end_time: string;
@@ -398,7 +426,12 @@ export declare const listExternalProviders: import("@tanstack/start-client-core"
398
426
  invoiced_at?: string | null;
399
427
  notes?: string | null;
400
428
  number_of_people?: number;
429
+ overridden_at?: string | null;
430
+ overridden_by?: string | null;
431
+ override_reason?: string | null;
432
+ price_override?: boolean;
401
433
  room_id: string;
434
+ room_price_override?: number | null;
402
435
  start_time: string;
403
436
  status?: string;
404
437
  total_excl_vat?: number | null;
@@ -407,11 +440,15 @@ export declare const listExternalProviders: import("@tanstack/start-client-core"
407
440
  vat_amount?: number | null;
408
441
  };
409
442
  Update: {
443
+ archive_reason?: string | null;
444
+ archived_at?: string | null;
445
+ archived_by?: string | null;
410
446
  company_name?: string | null;
411
447
  conflict_checked_at?: string | null;
412
448
  conflict_reason?: string | null;
413
449
  created_at?: string;
414
450
  created_by_role?: string | null;
451
+ customer_address?: string | null;
415
452
  customer_email?: string | null;
416
453
  customer_name?: string | null;
417
454
  end_time?: string;
@@ -423,7 +460,12 @@ export declare const listExternalProviders: import("@tanstack/start-client-core"
423
460
  invoiced_at?: string | null;
424
461
  notes?: string | null;
425
462
  number_of_people?: number;
463
+ overridden_at?: string | null;
464
+ overridden_by?: string | null;
465
+ override_reason?: string | null;
466
+ price_override?: boolean;
426
467
  room_id?: string;
468
+ room_price_override?: number | null;
427
469
  start_time?: string;
428
470
  status?: string;
429
471
  total_excl_vat?: number | null;
@@ -1252,8 +1294,27 @@ export declare const listExternalProviders: import("@tanstack/start-client-core"
1252
1294
  customers: {
1253
1295
  Row: {
1254
1296
  address: string | null;
1297
+ address_line1: string | null;
1298
+ address_line2: string | null;
1299
+ address_type: string | null;
1300
+ attention_to: string | null;
1301
+ bank_account_holder: string | null;
1302
+ bank_account_number: string | null;
1303
+ bank_address_line1: string | null;
1304
+ bank_address_line2: string | null;
1305
+ bank_bic: string | null;
1306
+ bank_city: string | null;
1307
+ bank_country: string | null;
1308
+ bank_house_number: string | null;
1309
+ bank_iban: string | null;
1310
+ bank_name: string | null;
1311
+ bank_national_code: string | null;
1312
+ bank_postal_code: string | null;
1313
+ bank_state: string | null;
1314
+ billing_email: string | null;
1255
1315
  bio: string | null;
1256
1316
  city: string | null;
1317
+ coc_number: string | null;
1257
1318
  commercial_name: string | null;
1258
1319
  company_name: string;
1259
1320
  connection_status: string;
@@ -1262,21 +1323,28 @@ export declare const listExternalProviders: import("@tanstack/start-client-core"
1262
1323
  created_at: string;
1263
1324
  custom_fields: import("../integrations/supabase/types").Json;
1264
1325
  customer_class: string | null;
1326
+ customer_number: string | null;
1327
+ discount_days: number | null;
1328
+ discount_percentage: number | null;
1265
1329
  email: string | null;
1266
1330
  external_id: string | null;
1331
+ fax: string | null;
1267
1332
  floriday_connection_id: string | null;
1268
1333
  floriday_organization_id: string | null;
1269
1334
  floriday_raw: import("../integrations/supabase/types").Json | null;
1270
1335
  gln: string | null;
1271
1336
  house_number: string | null;
1337
+ icp_country_code: string | null;
1272
1338
  id: string;
1273
1339
  is_active: boolean;
1340
+ language: string | null;
1274
1341
  last_synced_at: string | null;
1275
1342
  logo_url: string | null;
1276
1343
  markets: string[];
1277
1344
  notes: string | null;
1278
1345
  organization_type: string | null;
1279
1346
  payment_methods: string[];
1347
+ payment_term_days: number | null;
1280
1348
  phone: string | null;
1281
1349
  postal_code: string | null;
1282
1350
  product_groups: string[];
@@ -1287,13 +1355,33 @@ export declare const listExternalProviders: import("@tanstack/start-client-core"
1287
1355
  sync_status: string;
1288
1356
  trade_forms: string[];
1289
1357
  updated_at: string;
1358
+ vat_display: string | null;
1290
1359
  vat_number: string | null;
1291
1360
  website: string | null;
1292
1361
  };
1293
1362
  Insert: {
1294
1363
  address?: string | null;
1364
+ address_line1?: string | null;
1365
+ address_line2?: string | null;
1366
+ address_type?: string | null;
1367
+ attention_to?: string | null;
1368
+ bank_account_holder?: string | null;
1369
+ bank_account_number?: string | null;
1370
+ bank_address_line1?: string | null;
1371
+ bank_address_line2?: string | null;
1372
+ bank_bic?: string | null;
1373
+ bank_city?: string | null;
1374
+ bank_country?: string | null;
1375
+ bank_house_number?: string | null;
1376
+ bank_iban?: string | null;
1377
+ bank_name?: string | null;
1378
+ bank_national_code?: string | null;
1379
+ bank_postal_code?: string | null;
1380
+ bank_state?: string | null;
1381
+ billing_email?: string | null;
1295
1382
  bio?: string | null;
1296
1383
  city?: string | null;
1384
+ coc_number?: string | null;
1297
1385
  commercial_name?: string | null;
1298
1386
  company_name: string;
1299
1387
  connection_status?: string;
@@ -1302,21 +1390,28 @@ export declare const listExternalProviders: import("@tanstack/start-client-core"
1302
1390
  created_at?: string;
1303
1391
  custom_fields?: import("../integrations/supabase/types").Json;
1304
1392
  customer_class?: string | null;
1393
+ customer_number?: string | null;
1394
+ discount_days?: number | null;
1395
+ discount_percentage?: number | null;
1305
1396
  email?: string | null;
1306
1397
  external_id?: string | null;
1398
+ fax?: string | null;
1307
1399
  floriday_connection_id?: string | null;
1308
1400
  floriday_organization_id?: string | null;
1309
1401
  floriday_raw?: import("../integrations/supabase/types").Json | null;
1310
1402
  gln?: string | null;
1311
1403
  house_number?: string | null;
1404
+ icp_country_code?: string | null;
1312
1405
  id?: string;
1313
1406
  is_active?: boolean;
1407
+ language?: string | null;
1314
1408
  last_synced_at?: string | null;
1315
1409
  logo_url?: string | null;
1316
1410
  markets?: string[];
1317
1411
  notes?: string | null;
1318
1412
  organization_type?: string | null;
1319
1413
  payment_methods?: string[];
1414
+ payment_term_days?: number | null;
1320
1415
  phone?: string | null;
1321
1416
  postal_code?: string | null;
1322
1417
  product_groups?: string[];
@@ -1327,13 +1422,33 @@ export declare const listExternalProviders: import("@tanstack/start-client-core"
1327
1422
  sync_status?: string;
1328
1423
  trade_forms?: string[];
1329
1424
  updated_at?: string;
1425
+ vat_display?: string | null;
1330
1426
  vat_number?: string | null;
1331
1427
  website?: string | null;
1332
1428
  };
1333
1429
  Update: {
1334
1430
  address?: string | null;
1431
+ address_line1?: string | null;
1432
+ address_line2?: string | null;
1433
+ address_type?: string | null;
1434
+ attention_to?: string | null;
1435
+ bank_account_holder?: string | null;
1436
+ bank_account_number?: string | null;
1437
+ bank_address_line1?: string | null;
1438
+ bank_address_line2?: string | null;
1439
+ bank_bic?: string | null;
1440
+ bank_city?: string | null;
1441
+ bank_country?: string | null;
1442
+ bank_house_number?: string | null;
1443
+ bank_iban?: string | null;
1444
+ bank_name?: string | null;
1445
+ bank_national_code?: string | null;
1446
+ bank_postal_code?: string | null;
1447
+ bank_state?: string | null;
1448
+ billing_email?: string | null;
1335
1449
  bio?: string | null;
1336
1450
  city?: string | null;
1451
+ coc_number?: string | null;
1337
1452
  commercial_name?: string | null;
1338
1453
  company_name?: string;
1339
1454
  connection_status?: string;
@@ -1342,21 +1457,28 @@ export declare const listExternalProviders: import("@tanstack/start-client-core"
1342
1457
  created_at?: string;
1343
1458
  custom_fields?: import("../integrations/supabase/types").Json;
1344
1459
  customer_class?: string | null;
1460
+ customer_number?: string | null;
1461
+ discount_days?: number | null;
1462
+ discount_percentage?: number | null;
1345
1463
  email?: string | null;
1346
1464
  external_id?: string | null;
1465
+ fax?: string | null;
1347
1466
  floriday_connection_id?: string | null;
1348
1467
  floriday_organization_id?: string | null;
1349
1468
  floriday_raw?: import("../integrations/supabase/types").Json | null;
1350
1469
  gln?: string | null;
1351
1470
  house_number?: string | null;
1471
+ icp_country_code?: string | null;
1352
1472
  id?: string;
1353
1473
  is_active?: boolean;
1474
+ language?: string | null;
1354
1475
  last_synced_at?: string | null;
1355
1476
  logo_url?: string | null;
1356
1477
  markets?: string[];
1357
1478
  notes?: string | null;
1358
1479
  organization_type?: string | null;
1359
1480
  payment_methods?: string[];
1481
+ payment_term_days?: number | null;
1360
1482
  phone?: string | null;
1361
1483
  postal_code?: string | null;
1362
1484
  product_groups?: string[];
@@ -1367,6 +1489,7 @@ export declare const listExternalProviders: import("@tanstack/start-client-core"
1367
1489
  sync_status?: string;
1368
1490
  trade_forms?: string[];
1369
1491
  updated_at?: string;
1492
+ vat_display?: string | null;
1370
1493
  vat_number?: string | null;
1371
1494
  website?: string | null;
1372
1495
  };
@@ -3313,6 +3436,54 @@ export declare const listExternalProviders: import("@tanstack/start-client-core"
3313
3436
  referencedColumns: ["id"];
3314
3437
  }];
3315
3438
  };
3439
+ floriday_auto_fulfillment_log: {
3440
+ Row: {
3441
+ attempts: number;
3442
+ connection_id: string;
3443
+ created_at: string;
3444
+ error: string | null;
3445
+ fulfillment_order_id: string | null;
3446
+ id: string;
3447
+ last_attempt_at: string | null;
3448
+ reason: string | null;
3449
+ sales_order_id: string;
3450
+ status: string;
3451
+ updated_at: string;
3452
+ };
3453
+ Insert: {
3454
+ attempts?: number;
3455
+ connection_id: string;
3456
+ created_at?: string;
3457
+ error?: string | null;
3458
+ fulfillment_order_id?: string | null;
3459
+ id?: string;
3460
+ last_attempt_at?: string | null;
3461
+ reason?: string | null;
3462
+ sales_order_id: string;
3463
+ status?: string;
3464
+ updated_at?: string;
3465
+ };
3466
+ Update: {
3467
+ attempts?: number;
3468
+ connection_id?: string;
3469
+ created_at?: string;
3470
+ error?: string | null;
3471
+ fulfillment_order_id?: string | null;
3472
+ id?: string;
3473
+ last_attempt_at?: string | null;
3474
+ reason?: string | null;
3475
+ sales_order_id?: string;
3476
+ status?: string;
3477
+ updated_at?: string;
3478
+ };
3479
+ Relationships: [{
3480
+ foreignKeyName: "floriday_auto_fulfillment_log_connection_id_fkey";
3481
+ columns: ["connection_id"];
3482
+ isOneToOne: false;
3483
+ referencedRelation: "floriday_connections";
3484
+ referencedColumns: ["id"];
3485
+ }];
3486
+ };
3316
3487
  floriday_base_items_cache: {
3317
3488
  Row: {
3318
3489
  connection_id: string;
@@ -4417,6 +4588,24 @@ export declare const listExternalProviders: import("@tanstack/start-client-core"
4417
4588
  referencedColumns: ["id"];
4418
4589
  }];
4419
4590
  };
4591
+ floriday_rate_limit_state: {
4592
+ Row: {
4593
+ bucket: string;
4594
+ last_refill_at: string;
4595
+ tokens: number;
4596
+ };
4597
+ Insert: {
4598
+ bucket: string;
4599
+ last_refill_at?: string;
4600
+ tokens: number;
4601
+ };
4602
+ Update: {
4603
+ bucket?: string;
4604
+ last_refill_at?: string;
4605
+ tokens?: number;
4606
+ };
4607
+ Relationships: [];
4608
+ };
4420
4609
  floriday_resource_schemas: {
4421
4610
  Row: {
4422
4611
  enums: import("../integrations/supabase/types").Json;
@@ -6851,6 +7040,8 @@ export declare const listExternalProviders: import("@tanstack/start-client-core"
6851
7040
  order_date: string;
6852
7041
  order_number: string;
6853
7042
  order_source: string;
7043
+ plan_locked_at: string | null;
7044
+ plan_locked_ref: string | null;
6854
7045
  status: string;
6855
7046
  total: string;
6856
7047
  updated_at: string;
@@ -6867,6 +7058,8 @@ export declare const listExternalProviders: import("@tanstack/start-client-core"
6867
7058
  order_date?: string;
6868
7059
  order_number: string;
6869
7060
  order_source?: string;
7061
+ plan_locked_at?: string | null;
7062
+ plan_locked_ref?: string | null;
6870
7063
  status?: string;
6871
7064
  total?: string;
6872
7065
  updated_at?: string;
@@ -6883,6 +7076,8 @@ export declare const listExternalProviders: import("@tanstack/start-client-core"
6883
7076
  order_date?: string;
6884
7077
  order_number?: string;
6885
7078
  order_source?: string;
7079
+ plan_locked_at?: string | null;
7080
+ plan_locked_ref?: string | null;
6886
7081
  status?: string;
6887
7082
  total?: string;
6888
7083
  updated_at?: string;
@@ -7251,6 +7446,7 @@ export declare const listExternalProviders: import("@tanstack/start-client-core"
7251
7446
  };
7252
7447
  profiles: {
7253
7448
  Row: {
7449
+ address: string | null;
7254
7450
  created_at: string;
7255
7451
  display_name: string | null;
7256
7452
  email: string | null;
@@ -7261,6 +7457,7 @@ export declare const listExternalProviders: import("@tanstack/start-client-core"
7261
7457
  updated_at: string;
7262
7458
  };
7263
7459
  Insert: {
7460
+ address?: string | null;
7264
7461
  created_at?: string;
7265
7462
  display_name?: string | null;
7266
7463
  email?: string | null;
@@ -7271,6 +7468,7 @@ export declare const listExternalProviders: import("@tanstack/start-client-core"
7271
7468
  updated_at?: string;
7272
7469
  };
7273
7470
  Update: {
7471
+ address?: string | null;
7274
7472
  created_at?: string;
7275
7473
  display_name?: string | null;
7276
7474
  email?: string | null;
@@ -8518,6 +8716,114 @@ export declare const listExternalProviders: import("@tanstack/start-client-core"
8518
8716
  };
8519
8717
  Relationships: [];
8520
8718
  };
8719
+ trade_item_supply_lines: {
8720
+ Row: {
8721
+ available_quantity: number | null;
8722
+ connection_id: string;
8723
+ created_at: string;
8724
+ currency: string | null;
8725
+ endpoint_family: string | null;
8726
+ environment: string | null;
8727
+ id: string;
8728
+ last_error: string | null;
8729
+ last_status: number | null;
8730
+ packing_configuration_id: string | null;
8731
+ period_end: string | null;
8732
+ period_start: string | null;
8733
+ price_per_piece: number | null;
8734
+ sales_unit: string | null;
8735
+ supply_line_id: string | null;
8736
+ supply_type: string;
8737
+ trade_item_id: string;
8738
+ updated_at: string;
8739
+ user_id: string;
8740
+ week: number | null;
8741
+ year: number | null;
8742
+ };
8743
+ Insert: {
8744
+ available_quantity?: number | null;
8745
+ connection_id: string;
8746
+ created_at?: string;
8747
+ currency?: string | null;
8748
+ endpoint_family?: string | null;
8749
+ environment?: string | null;
8750
+ id?: string;
8751
+ last_error?: string | null;
8752
+ last_status?: number | null;
8753
+ packing_configuration_id?: string | null;
8754
+ period_end?: string | null;
8755
+ period_start?: string | null;
8756
+ price_per_piece?: number | null;
8757
+ sales_unit?: string | null;
8758
+ supply_line_id?: string | null;
8759
+ supply_type?: string;
8760
+ trade_item_id: string;
8761
+ updated_at?: string;
8762
+ user_id: string;
8763
+ week?: number | null;
8764
+ year?: number | null;
8765
+ };
8766
+ Update: {
8767
+ available_quantity?: number | null;
8768
+ connection_id?: string;
8769
+ created_at?: string;
8770
+ currency?: string | null;
8771
+ endpoint_family?: string | null;
8772
+ environment?: string | null;
8773
+ id?: string;
8774
+ last_error?: string | null;
8775
+ last_status?: number | null;
8776
+ packing_configuration_id?: string | null;
8777
+ period_end?: string | null;
8778
+ period_start?: string | null;
8779
+ price_per_piece?: number | null;
8780
+ sales_unit?: string | null;
8781
+ supply_line_id?: string | null;
8782
+ supply_type?: string;
8783
+ trade_item_id?: string;
8784
+ updated_at?: string;
8785
+ user_id?: string;
8786
+ week?: number | null;
8787
+ year?: number | null;
8788
+ };
8789
+ Relationships: [];
8790
+ };
8791
+ trade_item_warehouse_preferences: {
8792
+ Row: {
8793
+ connection_id: string;
8794
+ created_at: string;
8795
+ id: string;
8796
+ trade_item_id: string;
8797
+ updated_at: string;
8798
+ warehouse_id: string;
8799
+ warehouse_name: string | null;
8800
+ };
8801
+ Insert: {
8802
+ connection_id: string;
8803
+ created_at?: string;
8804
+ id?: string;
8805
+ trade_item_id: string;
8806
+ updated_at?: string;
8807
+ warehouse_id: string;
8808
+ warehouse_name?: string | null;
8809
+ };
8810
+ Update: {
8811
+ connection_id?: string;
8812
+ created_at?: string;
8813
+ id?: string;
8814
+ trade_item_id?: string;
8815
+ updated_at?: string;
8816
+ warehouse_id?: string;
8817
+ warehouse_name?: string | null;
8818
+ };
8819
+ Relationships: [{
8820
+ foreignKeyName: "trade_item_warehouse_preferences_connection_id_fkey";
8821
+ columns: ["connection_id"];
8822
+ isOneToOne: false;
8823
+ referencedRelation: "floriday_connections";
8824
+ referencedColumns: ["id"];
8825
+ }];
8826
+ };
8521
8827
  twinfield_connections: {
8522
8828
  Row: {
8523
8829
  access_token: string | null;
@@ -10203,7 +10509,19 @@ export declare const listExternalProviders: import("@tanstack/start-client-core"
10203
10509
  };
10204
10510
  cleanup_old_bookings: {
10205
10511
  Args: never;
10206
- Returns: number;
10512
+ Returns: undefined;
10513
+ };
10514
+ consume_floriday_rate_limit: {
10515
+ Args: {
10516
+ p_bucket: string;
10517
+ p_capacity: number;
10518
+ p_cost?: number;
10519
+ p_refill_per_sec: number;
10520
+ };
10521
+ Returns: {
10522
+ granted: boolean;
10523
+ wait_ms: number;
10524
+ }[];
10207
10525
  };
10208
10526
  control_get_todays_carts: {
10209
10527
  Args: never;
@@ -10285,6 +10603,12 @@ export declare const listExternalProviders: import("@tanstack/start-client-core"
10285
10603
  status: string;
10286
10604
  }[];
10287
10605
  };
10606
+ enqueue_cart_replan_if_unlocked: {
10607
+ Args: {
10608
+ p_order_id: string;
10609
+ };
10610
+ Returns: undefined;
10611
+ };
10288
10612
  ensure_trade_item_stock_row: {
10289
10613
  Args: {
10290
10614
  p_key: string;
@@ -10678,6 +11002,24 @@ export declare const listExternalProviders: import("@tanstack/start-client-core"
10678
11002
  };
10679
11003
  Returns: undefined;
10680
11004
  };
11005
+ recompute_order_status: {
11006
+ Args: {
11007
+ p_order_id: string;
11008
+ };
11009
+ Returns: undefined;
11010
+ };
11011
+ recompute_reserved_for_order: {
11012
+ Args: {
11013
+ p_order_id: string;
11014
+ };
11015
+ Returns: undefined;
11016
+ };
11017
+ recompute_reserved_stock: {
11018
+ Args: {
11019
+ p_trade_item_key: string;
11020
+ };
11021
+ Returns: undefined;
11022
+ };
10681
11023
  refresh_external_customers_grouped: {
10682
11024
  Args: never;
10683
11025
  Returns: undefined;
@@ -10992,6 +11334,24 @@ export declare const listExternalProviders: import("@tanstack/start-client-core"
10992
11334
  };
10993
11335
  Returns: string[];
10994
11336
  };
11337
+ sync_cached_packing_from_product: {
11338
+ Args: {
11339
+ p_product_id: string;
11340
+ };
11341
+ Returns: undefined;
11342
+ };
11343
+ sync_order_cart_item_packing_from_product: {
11344
+ Args: {
11345
+ p_product_id: string;
11346
+ };
11347
+ Returns: undefined;
11348
+ };
11349
+ sync_product_packing_from_floriday_cache: {
11350
+ Args: {
11351
+ p_floriday_id: string;
11352
+ };
11353
+ Returns: undefined;
11354
+ };
10995
11355
  twinfield_decrypt: {
10996
11356
  Args: {
10997
11357
  cipher: string;
@@ -11004,6 +11364,17 @@ export declare const listExternalProviders: import("@tanstack/start-client-core"
11004
11364
  };
11005
11365
  Returns: string;
11006
11366
  };
11367
+ upsert_auto_fulfillment_log: {
11368
+ Args: {
11369
+ p_connection_id: string;
11370
+ p_error?: string;
11371
+ p_fulfillment_order_id?: string;
11372
+ p_reason?: string;
11373
+ p_sales_order_id: string;
11374
+ p_status: string;
11375
+ };
11376
+ Returns: undefined;
11377
+ };
11007
11378
  };
11008
11379
  Enums: {
11009
11380
  app_role: "admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie" | "monteur";
@@ -11025,6 +11396,8 @@ export declare const listExternalCustomers: import("@tanstack/start-client-core"
11025
11396
  Tables: {
11026
11397
  afhandeling_settings: {
11027
11398
  Row: {
11399
+ auto_print_delivery_note: boolean;
11400
+ auto_process_paused: boolean;
11028
11401
  created_at: string;
11029
11402
  extra_pick_days_with_stickers: number;
11030
11403
  id: string;
@@ -11040,6 +11413,8 @@ export declare const listExternalCustomers: import("@tanstack/start-client-core"
11040
11413
  user_id: string;
11041
11414
  };
11042
11415
  Insert: {
11416
+ auto_print_delivery_note?: boolean;
11417
+ auto_process_paused?: boolean;
11043
11418
  created_at?: string;
11044
11419
  extra_pick_days_with_stickers?: number;
11045
11420
  id?: string;
@@ -11055,6 +11430,8 @@ export declare const listExternalCustomers: import("@tanstack/start-client-core"
11055
11430
  user_id: string;
11056
11431
  };
11057
11432
  Update: {
11433
+ auto_print_delivery_note?: boolean;
11434
+ auto_process_paused?: boolean;
11058
11435
  created_at?: string;
11059
11436
  extra_pick_days_with_stickers?: number;
11060
11437
  id?: string;
@@ -11287,6 +11664,9 @@ export declare const listExternalCustomers: import("@tanstack/start-client-core"
11287
11664
  created_at: string;
11288
11665
  extra_id: string;
11289
11666
  id: string;
11667
+ original_unit_price: number | null;
11668
+ override_reason: string | null;
11669
+ override_unit_price: number | null;
11290
11670
  quantity: number;
11291
11671
  total_price: number;
11292
11672
  unit_price: number;
@@ -11296,6 +11676,9 @@ export declare const listExternalCustomers: import("@tanstack/start-client-core"
11296
11676
  created_at?: string;
11297
11677
  extra_id: string;
11298
11678
  id?: string;
11679
+ original_unit_price?: number | null;
11680
+ override_reason?: string | null;
11681
+ override_unit_price?: number | null;
11299
11682
  quantity?: number;
11300
11683
  total_price?: number;
11301
11684
  unit_price?: number;
@@ -11305,6 +11688,9 @@ export declare const listExternalCustomers: import("@tanstack/start-client-core"
11305
11688
  created_at?: string;
11306
11689
  extra_id?: string;
11307
11690
  id?: string;
11691
+ original_unit_price?: number | null;
11692
+ override_reason?: string | null;
11693
+ override_unit_price?: number | null;
11308
11694
  quantity?: number;
11309
11695
  total_price?: number;
11310
11696
  unit_price?: number;
@@ -11325,11 +11711,15 @@ export declare const listExternalCustomers: import("@tanstack/start-client-core"
11325
11711
  };
11326
11712
  bookings: {
11327
11713
  Row: {
11714
+ archive_reason: string | null;
11715
+ archived_at: string | null;
11716
+ archived_by: string | null;
11328
11717
  company_name: string | null;
11329
11718
  conflict_checked_at: string | null;
11330
11719
  conflict_reason: string | null;
11331
11720
  created_at: string;
11332
11721
  created_by_role: string | null;
11722
+ customer_address: string | null;
11333
11723
  customer_email: string | null;
11334
11724
  customer_name: string | null;
11335
11725
  end_time: string;
@@ -11341,7 +11731,12 @@ export declare const listExternalCustomers: import("@tanstack/start-client-core"
11341
11731
  invoiced_at: string | null;
11342
11732
  notes: string | null;
11343
11733
  number_of_people: number;
11734
+ overridden_at: string | null;
11735
+ overridden_by: string | null;
11736
+ override_reason: string | null;
11737
+ price_override: boolean;
11344
11738
  room_id: string;
11739
+ room_price_override: number | null;
11345
11740
  start_time: string;
11346
11741
  status: string;
11347
11742
  total_excl_vat: number | null;
@@ -11350,11 +11745,15 @@ export declare const listExternalCustomers: import("@tanstack/start-client-core"
11350
11745
  vat_amount: number | null;
11351
11746
  };
11352
11747
  Insert: {
11748
+ archive_reason?: string | null;
11749
+ archived_at?: string | null;
11750
+ archived_by?: string | null;
11353
11751
  company_name?: string | null;
11354
11752
  conflict_checked_at?: string | null;
11355
11753
  conflict_reason?: string | null;
11356
11754
  created_at?: string;
11357
11755
  created_by_role?: string | null;
11756
+ customer_address?: string | null;
11358
11757
  customer_email?: string | null;
11359
11758
  customer_name?: string | null;
11360
11759
  end_time: string;
@@ -11366,7 +11765,12 @@ export declare const listExternalCustomers: import("@tanstack/start-client-core"
11366
11765
  invoiced_at?: string | null;
11367
11766
  notes?: string | null;
11368
11767
  number_of_people?: number;
11768
+ overridden_at?: string | null;
11769
+ overridden_by?: string | null;
11770
+ override_reason?: string | null;
11771
+ price_override?: boolean;
11369
11772
  room_id: string;
11773
+ room_price_override?: number | null;
11370
11774
  start_time: string;
11371
11775
  status?: string;
11372
11776
  total_excl_vat?: number | null;
@@ -11375,11 +11779,15 @@ export declare const listExternalCustomers: import("@tanstack/start-client-core"
11375
11779
  vat_amount?: number | null;
11376
11780
  };
11377
11781
  Update: {
11782
+ archive_reason?: string | null;
11783
+ archived_at?: string | null;
11784
+ archived_by?: string | null;
11378
11785
  company_name?: string | null;
11379
11786
  conflict_checked_at?: string | null;
11380
11787
  conflict_reason?: string | null;
11381
11788
  created_at?: string;
11382
11789
  created_by_role?: string | null;
11790
+ customer_address?: string | null;
11383
11791
  customer_email?: string | null;
11384
11792
  customer_name?: string | null;
11385
11793
  end_time?: string;
@@ -11391,7 +11799,12 @@ export declare const listExternalCustomers: import("@tanstack/start-client-core"
11391
11799
  invoiced_at?: string | null;
11392
11800
  notes?: string | null;
11393
11801
  number_of_people?: number;
11802
+ overridden_at?: string | null;
11803
+ overridden_by?: string | null;
11804
+ override_reason?: string | null;
11805
+ price_override?: boolean;
11394
11806
  room_id?: string;
11807
+ room_price_override?: number | null;
11395
11808
  start_time?: string;
11396
11809
  status?: string;
11397
11810
  total_excl_vat?: number | null;
@@ -12220,8 +12633,27 @@ export declare const listExternalCustomers: import("@tanstack/start-client-core"
12220
12633
  customers: {
12221
12634
  Row: {
12222
12635
  address: string | null;
12636
+ address_line1: string | null;
12637
+ address_line2: string | null;
12638
+ address_type: string | null;
12639
+ attention_to: string | null;
12640
+ bank_account_holder: string | null;
12641
+ bank_account_number: string | null;
12642
+ bank_address_line1: string | null;
12643
+ bank_address_line2: string | null;
12644
+ bank_bic: string | null;
12645
+ bank_city: string | null;
12646
+ bank_country: string | null;
12647
+ bank_house_number: string | null;
12648
+ bank_iban: string | null;
12649
+ bank_name: string | null;
12650
+ bank_national_code: string | null;
12651
+ bank_postal_code: string | null;
12652
+ bank_state: string | null;
12653
+ billing_email: string | null;
12223
12654
  bio: string | null;
12224
12655
  city: string | null;
12656
+ coc_number: string | null;
12225
12657
  commercial_name: string | null;
12226
12658
  company_name: string;
12227
12659
  connection_status: string;
@@ -12230,21 +12662,28 @@ export declare const listExternalCustomers: import("@tanstack/start-client-core"
12230
12662
  created_at: string;
12231
12663
  custom_fields: import("../integrations/supabase/types").Json;
12232
12664
  customer_class: string | null;
12665
+ customer_number: string | null;
12666
+ discount_days: number | null;
12667
+ discount_percentage: number | null;
12233
12668
  email: string | null;
12234
12669
  external_id: string | null;
12670
+ fax: string | null;
12235
12671
  floriday_connection_id: string | null;
12236
12672
  floriday_organization_id: string | null;
12237
12673
  floriday_raw: import("../integrations/supabase/types").Json | null;
12238
12674
  gln: string | null;
12239
12675
  house_number: string | null;
12676
+ icp_country_code: string | null;
12240
12677
  id: string;
12241
12678
  is_active: boolean;
12679
+ language: string | null;
12242
12680
  last_synced_at: string | null;
12243
12681
  logo_url: string | null;
12244
12682
  markets: string[];
12245
12683
  notes: string | null;
12246
12684
  organization_type: string | null;
12247
12685
  payment_methods: string[];
12686
+ payment_term_days: number | null;
12248
12687
  phone: string | null;
12249
12688
  postal_code: string | null;
12250
12689
  product_groups: string[];
@@ -12255,13 +12694,33 @@ export declare const listExternalCustomers: import("@tanstack/start-client-core"
12255
12694
  sync_status: string;
12256
12695
  trade_forms: string[];
12257
12696
  updated_at: string;
12697
+ vat_display: string | null;
12258
12698
  vat_number: string | null;
12259
12699
  website: string | null;
12260
12700
  };
12261
12701
  Insert: {
12262
12702
  address?: string | null;
12703
+ address_line1?: string | null;
12704
+ address_line2?: string | null;
12705
+ address_type?: string | null;
12706
+ attention_to?: string | null;
12707
+ bank_account_holder?: string | null;
12708
+ bank_account_number?: string | null;
12709
+ bank_address_line1?: string | null;
12710
+ bank_address_line2?: string | null;
12711
+ bank_bic?: string | null;
12712
+ bank_city?: string | null;
12713
+ bank_country?: string | null;
12714
+ bank_house_number?: string | null;
12715
+ bank_iban?: string | null;
12716
+ bank_name?: string | null;
12717
+ bank_national_code?: string | null;
12718
+ bank_postal_code?: string | null;
12719
+ bank_state?: string | null;
12720
+ billing_email?: string | null;
12263
12721
  bio?: string | null;
12264
12722
  city?: string | null;
12723
+ coc_number?: string | null;
12265
12724
  commercial_name?: string | null;
12266
12725
  company_name: string;
12267
12726
  connection_status?: string;
@@ -12270,21 +12729,28 @@ export declare const listExternalCustomers: import("@tanstack/start-client-core"
12270
12729
  created_at?: string;
12271
12730
  custom_fields?: import("../integrations/supabase/types").Json;
12272
12731
  customer_class?: string | null;
12732
+ customer_number?: string | null;
12733
+ discount_days?: number | null;
12734
+ discount_percentage?: number | null;
12273
12735
  email?: string | null;
12274
12736
  external_id?: string | null;
12737
+ fax?: string | null;
12275
12738
  floriday_connection_id?: string | null;
12276
12739
  floriday_organization_id?: string | null;
12277
12740
  floriday_raw?: import("../integrations/supabase/types").Json | null;
12278
12741
  gln?: string | null;
12279
12742
  house_number?: string | null;
12743
+ icp_country_code?: string | null;
12280
12744
  id?: string;
12281
12745
  is_active?: boolean;
12746
+ language?: string | null;
12282
12747
  last_synced_at?: string | null;
12283
12748
  logo_url?: string | null;
12284
12749
  markets?: string[];
12285
12750
  notes?: string | null;
12286
12751
  organization_type?: string | null;
12287
12752
  payment_methods?: string[];
12753
+ payment_term_days?: number | null;
12288
12754
  phone?: string | null;
12289
12755
  postal_code?: string | null;
12290
12756
  product_groups?: string[];
@@ -12295,13 +12761,33 @@ export declare const listExternalCustomers: import("@tanstack/start-client-core"
12295
12761
  sync_status?: string;
12296
12762
  trade_forms?: string[];
12297
12763
  updated_at?: string;
12764
+ vat_display?: string | null;
12298
12765
  vat_number?: string | null;
12299
12766
  website?: string | null;
12300
12767
  };
12301
12768
  Update: {
12302
12769
  address?: string | null;
12770
+ address_line1?: string | null;
12771
+ address_line2?: string | null;
12772
+ address_type?: string | null;
12773
+ attention_to?: string | null;
12774
+ bank_account_holder?: string | null;
12775
+ bank_account_number?: string | null;
12776
+ bank_address_line1?: string | null;
12777
+ bank_address_line2?: string | null;
12778
+ bank_bic?: string | null;
12779
+ bank_city?: string | null;
12780
+ bank_country?: string | null;
12781
+ bank_house_number?: string | null;
12782
+ bank_iban?: string | null;
12783
+ bank_name?: string | null;
12784
+ bank_national_code?: string | null;
12785
+ bank_postal_code?: string | null;
12786
+ bank_state?: string | null;
12787
+ billing_email?: string | null;
12303
12788
  bio?: string | null;
12304
12789
  city?: string | null;
12790
+ coc_number?: string | null;
12305
12791
  commercial_name?: string | null;
12306
12792
  company_name?: string;
12307
12793
  connection_status?: string;
@@ -12310,21 +12796,28 @@ export declare const listExternalCustomers: import("@tanstack/start-client-core"
12310
12796
  created_at?: string;
12311
12797
  custom_fields?: import("../integrations/supabase/types").Json;
12312
12798
  customer_class?: string | null;
12799
+ customer_number?: string | null;
12800
+ discount_days?: number | null;
12801
+ discount_percentage?: number | null;
12313
12802
  email?: string | null;
12314
12803
  external_id?: string | null;
12804
+ fax?: string | null;
12315
12805
  floriday_connection_id?: string | null;
12316
12806
  floriday_organization_id?: string | null;
12317
12807
  floriday_raw?: import("../integrations/supabase/types").Json | null;
12318
12808
  gln?: string | null;
12319
12809
  house_number?: string | null;
12810
+ icp_country_code?: string | null;
12320
12811
  id?: string;
12321
12812
  is_active?: boolean;
12813
+ language?: string | null;
12322
12814
  last_synced_at?: string | null;
12323
12815
  logo_url?: string | null;
12324
12816
  markets?: string[];
12325
12817
  notes?: string | null;
12326
12818
  organization_type?: string | null;
12327
12819
  payment_methods?: string[];
12820
+ payment_term_days?: number | null;
12328
12821
  phone?: string | null;
12329
12822
  postal_code?: string | null;
12330
12823
  product_groups?: string[];
@@ -12335,6 +12828,7 @@ export declare const listExternalCustomers: import("@tanstack/start-client-core"
12335
12828
  sync_status?: string;
12336
12829
  trade_forms?: string[];
12337
12830
  updated_at?: string;
12831
+ vat_display?: string | null;
12338
12832
  vat_number?: string | null;
12339
12833
  website?: string | null;
12340
12834
  };
@@ -14281,6 +14775,54 @@ export declare const listExternalCustomers: import("@tanstack/start-client-core"
14281
14775
  referencedColumns: ["id"];
14282
14776
  }];
14283
14777
  };
14778
+ floriday_auto_fulfillment_log: {
14779
+ Row: {
14780
+ attempts: number;
14781
+ connection_id: string;
14782
+ created_at: string;
14783
+ error: string | null;
14784
+ fulfillment_order_id: string | null;
14785
+ id: string;
14786
+ last_attempt_at: string | null;
14787
+ reason: string | null;
14788
+ sales_order_id: string;
14789
+ status: string;
14790
+ updated_at: string;
14791
+ };
14792
+ Insert: {
14793
+ attempts?: number;
14794
+ connection_id: string;
14795
+ created_at?: string;
14796
+ error?: string | null;
14797
+ fulfillment_order_id?: string | null;
14798
+ id?: string;
14799
+ last_attempt_at?: string | null;
14800
+ reason?: string | null;
14801
+ sales_order_id: string;
14802
+ status?: string;
14803
+ updated_at?: string;
14804
+ };
14805
+ Update: {
14806
+ attempts?: number;
14807
+ connection_id?: string;
14808
+ created_at?: string;
14809
+ error?: string | null;
14810
+ fulfillment_order_id?: string | null;
14811
+ id?: string;
14812
+ last_attempt_at?: string | null;
14813
+ reason?: string | null;
14814
+ sales_order_id?: string;
14815
+ status?: string;
14816
+ updated_at?: string;
14817
+ };
14818
+ Relationships: [{
14819
+ foreignKeyName: "floriday_auto_fulfillment_log_connection_id_fkey";
14820
+ columns: ["connection_id"];
14821
+ isOneToOne: false;
14822
+ referencedRelation: "floriday_connections";
14823
+ referencedColumns: ["id"];
14824
+ }];
14825
+ };
14284
14826
  floriday_base_items_cache: {
14285
14827
  Row: {
14286
14828
  connection_id: string;
@@ -15385,6 +15927,24 @@ export declare const listExternalCustomers: import("@tanstack/start-client-core"
15385
15927
  referencedColumns: ["id"];
15386
15928
  }];
15387
15929
  };
15930
+ floriday_rate_limit_state: {
15931
+ Row: {
15932
+ bucket: string;
15933
+ last_refill_at: string;
15934
+ tokens: number;
15935
+ };
15936
+ Insert: {
15937
+ bucket: string;
15938
+ last_refill_at?: string;
15939
+ tokens: number;
15940
+ };
15941
+ Update: {
15942
+ bucket?: string;
15943
+ last_refill_at?: string;
15944
+ tokens?: number;
15945
+ };
15946
+ Relationships: [];
15947
+ };
15388
15948
  floriday_resource_schemas: {
15389
15949
  Row: {
15390
15950
  enums: import("../integrations/supabase/types").Json;
@@ -17819,6 +18379,8 @@ export declare const listExternalCustomers: import("@tanstack/start-client-core"
17819
18379
  order_date: string;
17820
18380
  order_number: string;
17821
18381
  order_source: string;
18382
+ plan_locked_at: string | null;
18383
+ plan_locked_ref: string | null;
17822
18384
  status: string;
17823
18385
  total: string;
17824
18386
  updated_at: string;
@@ -17835,6 +18397,8 @@ export declare const listExternalCustomers: import("@tanstack/start-client-core"
17835
18397
  order_date?: string;
17836
18398
  order_number: string;
17837
18399
  order_source?: string;
18400
+ plan_locked_at?: string | null;
18401
+ plan_locked_ref?: string | null;
17838
18402
  status?: string;
17839
18403
  total?: string;
17840
18404
  updated_at?: string;
@@ -17851,6 +18415,8 @@ export declare const listExternalCustomers: import("@tanstack/start-client-core"
17851
18415
  order_date?: string;
17852
18416
  order_number?: string;
17853
18417
  order_source?: string;
18418
+ plan_locked_at?: string | null;
18419
+ plan_locked_ref?: string | null;
17854
18420
  status?: string;
17855
18421
  total?: string;
17856
18422
  updated_at?: string;
@@ -18219,6 +18785,7 @@ export declare const listExternalCustomers: import("@tanstack/start-client-core"
18219
18785
  };
18220
18786
  profiles: {
18221
18787
  Row: {
18788
+ address: string | null;
18222
18789
  created_at: string;
18223
18790
  display_name: string | null;
18224
18791
  email: string | null;
@@ -18229,6 +18796,7 @@ export declare const listExternalCustomers: import("@tanstack/start-client-core"
18229
18796
  updated_at: string;
18230
18797
  };
18231
18798
  Insert: {
18799
+ address?: string | null;
18232
18800
  created_at?: string;
18233
18801
  display_name?: string | null;
18234
18802
  email?: string | null;
@@ -18239,6 +18807,7 @@ export declare const listExternalCustomers: import("@tanstack/start-client-core"
18239
18807
  updated_at?: string;
18240
18808
  };
18241
18809
  Update: {
18810
+ address?: string | null;
18242
18811
  created_at?: string;
18243
18812
  display_name?: string | null;
18244
18813
  email?: string | null;
@@ -19486,6 +20055,114 @@ export declare const listExternalCustomers: import("@tanstack/start-client-core"
19486
20055
  };
19487
20056
  Relationships: [];
19488
20057
  };
20058
+ trade_item_supply_lines: {
20059
+ Row: {
20060
+ available_quantity: number | null;
20061
+ connection_id: string;
20062
+ created_at: string;
20063
+ currency: string | null;
20064
+ endpoint_family: string | null;
20065
+ environment: string | null;
20066
+ id: string;
20067
+ last_error: string | null;
20068
+ last_status: number | null;
20069
+ packing_configuration_id: string | null;
20070
+ period_end: string | null;
20071
+ period_start: string | null;
20072
+ price_per_piece: number | null;
20073
+ sales_unit: string | null;
20074
+ supply_line_id: string | null;
20075
+ supply_type: string;
20076
+ trade_item_id: string;
20077
+ updated_at: string;
20078
+ user_id: string;
20079
+ week: number | null;
20080
+ year: number | null;
20081
+ };
20082
+ Insert: {
20083
+ available_quantity?: number | null;
20084
+ connection_id: string;
20085
+ created_at?: string;
20086
+ currency?: string | null;
20087
+ endpoint_family?: string | null;
20088
+ environment?: string | null;
20089
+ id?: string;
20090
+ last_error?: string | null;
20091
+ last_status?: number | null;
20092
+ packing_configuration_id?: string | null;
20093
+ period_end?: string | null;
20094
+ period_start?: string | null;
20095
+ price_per_piece?: number | null;
20096
+ sales_unit?: string | null;
20097
+ supply_line_id?: string | null;
20098
+ supply_type?: string;
20099
+ trade_item_id: string;
20100
+ updated_at?: string;
20101
+ user_id: string;
20102
+ week?: number | null;
20103
+ year?: number | null;
20104
+ };
20105
+ Update: {
20106
+ available_quantity?: number | null;
20107
+ connection_id?: string;
20108
+ created_at?: string;
20109
+ currency?: string | null;
20110
+ endpoint_family?: string | null;
20111
+ environment?: string | null;
20112
+ id?: string;
20113
+ last_error?: string | null;
20114
+ last_status?: number | null;
20115
+ packing_configuration_id?: string | null;
20116
+ period_end?: string | null;
20117
+ period_start?: string | null;
20118
+ price_per_piece?: number | null;
20119
+ sales_unit?: string | null;
20120
+ supply_line_id?: string | null;
20121
+ supply_type?: string;
20122
+ trade_item_id?: string;
20123
+ updated_at?: string;
20124
+ user_id?: string;
20125
+ week?: number | null;
20126
+ year?: number | null;
20127
+ };
20128
+ Relationships: [];
20129
+ };
20130
+ trade_item_warehouse_preferences: {
20131
+ Row: {
20132
+ connection_id: string;
20133
+ created_at: string;
20134
+ id: string;
20135
+ trade_item_id: string;
20136
+ updated_at: string;
20137
+ warehouse_id: string;
20138
+ warehouse_name: string | null;
20139
+ };
20140
+ Insert: {
20141
+ connection_id: string;
20142
+ created_at?: string;
20143
+ id?: string;
20144
+ trade_item_id: string;
20145
+ updated_at?: string;
20146
+ warehouse_id: string;
20147
+ warehouse_name?: string | null;
20148
+ };
20149
+ Update: {
20150
+ connection_id?: string;
20151
+ created_at?: string;
20152
+ id?: string;
20153
+ trade_item_id?: string;
20154
+ updated_at?: string;
20155
+ warehouse_id?: string;
20156
+ warehouse_name?: string | null;
20157
+ };
20158
+ Relationships: [{
20159
+ foreignKeyName: "trade_item_warehouse_preferences_connection_id_fkey";
20160
+ columns: ["connection_id"];
20161
+ isOneToOne: false;
20162
+ referencedRelation: "floriday_connections";
20163
+ referencedColumns: ["id"];
20164
+ }];
20165
+ };
19489
20166
  twinfield_connections: {
19490
20167
  Row: {
19491
20168
  access_token: string | null;
@@ -21171,7 +21848,19 @@ export declare const listExternalCustomers: import("@tanstack/start-client-core"
21171
21848
  };
21172
21849
  cleanup_old_bookings: {
21173
21850
  Args: never;
21174
- Returns: number;
21851
+ Returns: undefined;
21852
+ };
21853
+ consume_floriday_rate_limit: {
21854
+ Args: {
21855
+ p_bucket: string;
21856
+ p_capacity: number;
21857
+ p_cost?: number;
21858
+ p_refill_per_sec: number;
21859
+ };
21860
+ Returns: {
21861
+ granted: boolean;
21862
+ wait_ms: number;
21863
+ }[];
21175
21864
  };
21176
21865
  control_get_todays_carts: {
21177
21866
  Args: never;
@@ -21253,6 +21942,12 @@ export declare const listExternalCustomers: import("@tanstack/start-client-core"
21253
21942
  status: string;
21254
21943
  }[];
21255
21944
  };
21945
+ enqueue_cart_replan_if_unlocked: {
21946
+ Args: {
21947
+ p_order_id: string;
21948
+ };
21949
+ Returns: undefined;
21950
+ };
21256
21951
  ensure_trade_item_stock_row: {
21257
21952
  Args: {
21258
21953
  p_key: string;
@@ -21646,6 +22341,24 @@ export declare const listExternalCustomers: import("@tanstack/start-client-core"
21646
22341
  };
21647
22342
  Returns: undefined;
21648
22343
  };
22344
+ recompute_order_status: {
22345
+ Args: {
22346
+ p_order_id: string;
22347
+ };
22348
+ Returns: undefined;
22349
+ };
22350
+ recompute_reserved_for_order: {
22351
+ Args: {
22352
+ p_order_id: string;
22353
+ };
22354
+ Returns: undefined;
22355
+ };
22356
+ recompute_reserved_stock: {
22357
+ Args: {
22358
+ p_trade_item_key: string;
22359
+ };
22360
+ Returns: undefined;
22361
+ };
21649
22362
  refresh_external_customers_grouped: {
21650
22363
  Args: never;
21651
22364
  Returns: undefined;
@@ -21960,6 +22673,24 @@ export declare const listExternalCustomers: import("@tanstack/start-client-core"
21960
22673
  };
21961
22674
  Returns: string[];
21962
22675
  };
22676
+ sync_cached_packing_from_product: {
22677
+ Args: {
22678
+ p_product_id: string;
22679
+ };
22680
+ Returns: undefined;
22681
+ };
22682
+ sync_order_cart_item_packing_from_product: {
22683
+ Args: {
22684
+ p_product_id: string;
22685
+ };
22686
+ Returns: undefined;
22687
+ };
22688
+ sync_product_packing_from_floriday_cache: {
22689
+ Args: {
22690
+ p_floriday_id: string;
22691
+ };
22692
+ Returns: undefined;
22693
+ };
21963
22694
  twinfield_decrypt: {
21964
22695
  Args: {
21965
22696
  cipher: string;
@@ -21972,6 +22703,17 @@ export declare const listExternalCustomers: import("@tanstack/start-client-core"
21972
22703
  };
21973
22704
  Returns: string;
21974
22705
  };
22706
+ upsert_auto_fulfillment_log: {
22707
+ Args: {
22708
+ p_connection_id: string;
22709
+ p_error?: string;
22710
+ p_fulfillment_order_id?: string;
22711
+ p_reason?: string;
22712
+ p_sales_order_id: string;
22713
+ p_status: string;
22714
+ };
22715
+ Returns: undefined;
22716
+ };
21975
22717
  };
21976
22718
  Enums: {
21977
22719
  app_role: "admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie" | "monteur";
@@ -22000,6 +22742,8 @@ export declare const getGroupedCustomerDetail: import("@tanstack/start-client-co
22000
22742
  Tables: {
22001
22743
  afhandeling_settings: {
22002
22744
  Row: {
22745
+ auto_print_delivery_note: boolean;
22746
+ auto_process_paused: boolean;
22003
22747
  created_at: string;
22004
22748
  extra_pick_days_with_stickers: number;
22005
22749
  id: string;
@@ -22015,6 +22759,8 @@ export declare const getGroupedCustomerDetail: import("@tanstack/start-client-co
22015
22759
  user_id: string;
22016
22760
  };
22017
22761
  Insert: {
22762
+ auto_print_delivery_note?: boolean;
22763
+ auto_process_paused?: boolean;
22018
22764
  created_at?: string;
22019
22765
  extra_pick_days_with_stickers?: number;
22020
22766
  id?: string;
@@ -22030,6 +22776,8 @@ export declare const getGroupedCustomerDetail: import("@tanstack/start-client-co
22030
22776
  user_id: string;
22031
22777
  };
22032
22778
  Update: {
22779
+ auto_print_delivery_note?: boolean;
22780
+ auto_process_paused?: boolean;
22033
22781
  created_at?: string;
22034
22782
  extra_pick_days_with_stickers?: number;
22035
22783
  id?: string;
@@ -22262,6 +23010,9 @@ export declare const getGroupedCustomerDetail: import("@tanstack/start-client-co
22262
23010
  created_at: string;
22263
23011
  extra_id: string;
22264
23012
  id: string;
23013
+ original_unit_price: number | null;
23014
+ override_reason: string | null;
23015
+ override_unit_price: number | null;
22265
23016
  quantity: number;
22266
23017
  total_price: number;
22267
23018
  unit_price: number;
@@ -22271,6 +23022,9 @@ export declare const getGroupedCustomerDetail: import("@tanstack/start-client-co
22271
23022
  created_at?: string;
22272
23023
  extra_id: string;
22273
23024
  id?: string;
23025
+ original_unit_price?: number | null;
23026
+ override_reason?: string | null;
23027
+ override_unit_price?: number | null;
22274
23028
  quantity?: number;
22275
23029
  total_price?: number;
22276
23030
  unit_price?: number;
@@ -22280,6 +23034,9 @@ export declare const getGroupedCustomerDetail: import("@tanstack/start-client-co
22280
23034
  created_at?: string;
22281
23035
  extra_id?: string;
22282
23036
  id?: string;
23037
+ original_unit_price?: number | null;
23038
+ override_reason?: string | null;
23039
+ override_unit_price?: number | null;
22283
23040
  quantity?: number;
22284
23041
  total_price?: number;
22285
23042
  unit_price?: number;
@@ -22300,11 +23057,15 @@ export declare const getGroupedCustomerDetail: import("@tanstack/start-client-co
22300
23057
  };
22301
23058
  bookings: {
22302
23059
  Row: {
23060
+ archive_reason: string | null;
23061
+ archived_at: string | null;
23062
+ archived_by: string | null;
22303
23063
  company_name: string | null;
22304
23064
  conflict_checked_at: string | null;
22305
23065
  conflict_reason: string | null;
22306
23066
  created_at: string;
22307
23067
  created_by_role: string | null;
23068
+ customer_address: string | null;
22308
23069
  customer_email: string | null;
22309
23070
  customer_name: string | null;
22310
23071
  end_time: string;
@@ -22316,7 +23077,12 @@ export declare const getGroupedCustomerDetail: import("@tanstack/start-client-co
22316
23077
  invoiced_at: string | null;
22317
23078
  notes: string | null;
22318
23079
  number_of_people: number;
23080
+ overridden_at: string | null;
23081
+ overridden_by: string | null;
23082
+ override_reason: string | null;
23083
+ price_override: boolean;
22319
23084
  room_id: string;
23085
+ room_price_override: number | null;
22320
23086
  start_time: string;
22321
23087
  status: string;
22322
23088
  total_excl_vat: number | null;
@@ -22325,11 +23091,15 @@ export declare const getGroupedCustomerDetail: import("@tanstack/start-client-co
22325
23091
  vat_amount: number | null;
22326
23092
  };
22327
23093
  Insert: {
23094
+ archive_reason?: string | null;
23095
+ archived_at?: string | null;
23096
+ archived_by?: string | null;
22328
23097
  company_name?: string | null;
22329
23098
  conflict_checked_at?: string | null;
22330
23099
  conflict_reason?: string | null;
22331
23100
  created_at?: string;
22332
23101
  created_by_role?: string | null;
23102
+ customer_address?: string | null;
22333
23103
  customer_email?: string | null;
22334
23104
  customer_name?: string | null;
22335
23105
  end_time: string;
@@ -22341,7 +23111,12 @@ export declare const getGroupedCustomerDetail: import("@tanstack/start-client-co
22341
23111
  invoiced_at?: string | null;
22342
23112
  notes?: string | null;
22343
23113
  number_of_people?: number;
23114
+ overridden_at?: string | null;
23115
+ overridden_by?: string | null;
23116
+ override_reason?: string | null;
23117
+ price_override?: boolean;
22344
23118
  room_id: string;
23119
+ room_price_override?: number | null;
22345
23120
  start_time: string;
22346
23121
  status?: string;
22347
23122
  total_excl_vat?: number | null;
@@ -22350,11 +23125,15 @@ export declare const getGroupedCustomerDetail: import("@tanstack/start-client-co
22350
23125
  vat_amount?: number | null;
22351
23126
  };
22352
23127
  Update: {
23128
+ archive_reason?: string | null;
23129
+ archived_at?: string | null;
23130
+ archived_by?: string | null;
22353
23131
  company_name?: string | null;
22354
23132
  conflict_checked_at?: string | null;
22355
23133
  conflict_reason?: string | null;
22356
23134
  created_at?: string;
22357
23135
  created_by_role?: string | null;
23136
+ customer_address?: string | null;
22358
23137
  customer_email?: string | null;
22359
23138
  customer_name?: string | null;
22360
23139
  end_time?: string;
@@ -22366,7 +23145,12 @@ export declare const getGroupedCustomerDetail: import("@tanstack/start-client-co
22366
23145
  invoiced_at?: string | null;
22367
23146
  notes?: string | null;
22368
23147
  number_of_people?: number;
23148
+ overridden_at?: string | null;
23149
+ overridden_by?: string | null;
23150
+ override_reason?: string | null;
23151
+ price_override?: boolean;
22369
23152
  room_id?: string;
23153
+ room_price_override?: number | null;
22370
23154
  start_time?: string;
22371
23155
  status?: string;
22372
23156
  total_excl_vat?: number | null;
@@ -23195,8 +23979,27 @@ export declare const getGroupedCustomerDetail: import("@tanstack/start-client-co
23195
23979
  customers: {
23196
23980
  Row: {
23197
23981
  address: string | null;
23982
+ address_line1: string | null;
23983
+ address_line2: string | null;
23984
+ address_type: string | null;
23985
+ attention_to: string | null;
23986
+ bank_account_holder: string | null;
23987
+ bank_account_number: string | null;
23988
+ bank_address_line1: string | null;
23989
+ bank_address_line2: string | null;
23990
+ bank_bic: string | null;
23991
+ bank_city: string | null;
23992
+ bank_country: string | null;
23993
+ bank_house_number: string | null;
23994
+ bank_iban: string | null;
23995
+ bank_name: string | null;
23996
+ bank_national_code: string | null;
23997
+ bank_postal_code: string | null;
23998
+ bank_state: string | null;
23999
+ billing_email: string | null;
23198
24000
  bio: string | null;
23199
24001
  city: string | null;
24002
+ coc_number: string | null;
23200
24003
  commercial_name: string | null;
23201
24004
  company_name: string;
23202
24005
  connection_status: string;
@@ -23205,21 +24008,28 @@ export declare const getGroupedCustomerDetail: import("@tanstack/start-client-co
23205
24008
  created_at: string;
23206
24009
  custom_fields: import("../integrations/supabase/types").Json;
23207
24010
  customer_class: string | null;
24011
+ customer_number: string | null;
24012
+ discount_days: number | null;
24013
+ discount_percentage: number | null;
23208
24014
  email: string | null;
23209
24015
  external_id: string | null;
24016
+ fax: string | null;
23210
24017
  floriday_connection_id: string | null;
23211
24018
  floriday_organization_id: string | null;
23212
24019
  floriday_raw: import("../integrations/supabase/types").Json | null;
23213
24020
  gln: string | null;
23214
24021
  house_number: string | null;
24022
+ icp_country_code: string | null;
23215
24023
  id: string;
23216
24024
  is_active: boolean;
24025
+ language: string | null;
23217
24026
  last_synced_at: string | null;
23218
24027
  logo_url: string | null;
23219
24028
  markets: string[];
23220
24029
  notes: string | null;
23221
24030
  organization_type: string | null;
23222
24031
  payment_methods: string[];
24032
+ payment_term_days: number | null;
23223
24033
  phone: string | null;
23224
24034
  postal_code: string | null;
23225
24035
  product_groups: string[];
@@ -23230,13 +24040,33 @@ export declare const getGroupedCustomerDetail: import("@tanstack/start-client-co
23230
24040
  sync_status: string;
23231
24041
  trade_forms: string[];
23232
24042
  updated_at: string;
24043
+ vat_display: string | null;
23233
24044
  vat_number: string | null;
23234
24045
  website: string | null;
23235
24046
  };
23236
24047
  Insert: {
23237
24048
  address?: string | null;
24049
+ address_line1?: string | null;
24050
+ address_line2?: string | null;
24051
+ address_type?: string | null;
24052
+ attention_to?: string | null;
24053
+ bank_account_holder?: string | null;
24054
+ bank_account_number?: string | null;
24055
+ bank_address_line1?: string | null;
24056
+ bank_address_line2?: string | null;
24057
+ bank_bic?: string | null;
24058
+ bank_city?: string | null;
24059
+ bank_country?: string | null;
24060
+ bank_house_number?: string | null;
24061
+ bank_iban?: string | null;
24062
+ bank_name?: string | null;
24063
+ bank_national_code?: string | null;
24064
+ bank_postal_code?: string | null;
24065
+ bank_state?: string | null;
24066
+ billing_email?: string | null;
23238
24067
  bio?: string | null;
23239
24068
  city?: string | null;
24069
+ coc_number?: string | null;
23240
24070
  commercial_name?: string | null;
23241
24071
  company_name: string;
23242
24072
  connection_status?: string;
@@ -23245,21 +24075,28 @@ export declare const getGroupedCustomerDetail: import("@tanstack/start-client-co
23245
24075
  created_at?: string;
23246
24076
  custom_fields?: import("../integrations/supabase/types").Json;
23247
24077
  customer_class?: string | null;
24078
+ customer_number?: string | null;
24079
+ discount_days?: number | null;
24080
+ discount_percentage?: number | null;
23248
24081
  email?: string | null;
23249
24082
  external_id?: string | null;
24083
+ fax?: string | null;
23250
24084
  floriday_connection_id?: string | null;
23251
24085
  floriday_organization_id?: string | null;
23252
24086
  floriday_raw?: import("../integrations/supabase/types").Json | null;
23253
24087
  gln?: string | null;
23254
24088
  house_number?: string | null;
24089
+ icp_country_code?: string | null;
23255
24090
  id?: string;
23256
24091
  is_active?: boolean;
24092
+ language?: string | null;
23257
24093
  last_synced_at?: string | null;
23258
24094
  logo_url?: string | null;
23259
24095
  markets?: string[];
23260
24096
  notes?: string | null;
23261
24097
  organization_type?: string | null;
23262
24098
  payment_methods?: string[];
24099
+ payment_term_days?: number | null;
23263
24100
  phone?: string | null;
23264
24101
  postal_code?: string | null;
23265
24102
  product_groups?: string[];
@@ -23270,13 +24107,33 @@ export declare const getGroupedCustomerDetail: import("@tanstack/start-client-co
23270
24107
  sync_status?: string;
23271
24108
  trade_forms?: string[];
23272
24109
  updated_at?: string;
24110
+ vat_display?: string | null;
23273
24111
  vat_number?: string | null;
23274
24112
  website?: string | null;
23275
24113
  };
23276
24114
  Update: {
23277
24115
  address?: string | null;
24116
+ address_line1?: string | null;
24117
+ address_line2?: string | null;
24118
+ address_type?: string | null;
24119
+ attention_to?: string | null;
24120
+ bank_account_holder?: string | null;
24121
+ bank_account_number?: string | null;
24122
+ bank_address_line1?: string | null;
24123
+ bank_address_line2?: string | null;
24124
+ bank_bic?: string | null;
24125
+ bank_city?: string | null;
24126
+ bank_country?: string | null;
24127
+ bank_house_number?: string | null;
24128
+ bank_iban?: string | null;
24129
+ bank_name?: string | null;
24130
+ bank_national_code?: string | null;
24131
+ bank_postal_code?: string | null;
24132
+ bank_state?: string | null;
24133
+ billing_email?: string | null;
23278
24134
  bio?: string | null;
23279
24135
  city?: string | null;
24136
+ coc_number?: string | null;
23280
24137
  commercial_name?: string | null;
23281
24138
  company_name?: string;
23282
24139
  connection_status?: string;
@@ -23285,21 +24142,28 @@ export declare const getGroupedCustomerDetail: import("@tanstack/start-client-co
23285
24142
  created_at?: string;
23286
24143
  custom_fields?: import("../integrations/supabase/types").Json;
23287
24144
  customer_class?: string | null;
24145
+ customer_number?: string | null;
24146
+ discount_days?: number | null;
24147
+ discount_percentage?: number | null;
23288
24148
  email?: string | null;
23289
24149
  external_id?: string | null;
24150
+ fax?: string | null;
23290
24151
  floriday_connection_id?: string | null;
23291
24152
  floriday_organization_id?: string | null;
23292
24153
  floriday_raw?: import("../integrations/supabase/types").Json | null;
23293
24154
  gln?: string | null;
23294
24155
  house_number?: string | null;
24156
+ icp_country_code?: string | null;
23295
24157
  id?: string;
23296
24158
  is_active?: boolean;
24159
+ language?: string | null;
23297
24160
  last_synced_at?: string | null;
23298
24161
  logo_url?: string | null;
23299
24162
  markets?: string[];
23300
24163
  notes?: string | null;
23301
24164
  organization_type?: string | null;
23302
24165
  payment_methods?: string[];
24166
+ payment_term_days?: number | null;
23303
24167
  phone?: string | null;
23304
24168
  postal_code?: string | null;
23305
24169
  product_groups?: string[];
@@ -23310,6 +24174,7 @@ export declare const getGroupedCustomerDetail: import("@tanstack/start-client-co
23310
24174
  sync_status?: string;
23311
24175
  trade_forms?: string[];
23312
24176
  updated_at?: string;
24177
+ vat_display?: string | null;
23313
24178
  vat_number?: string | null;
23314
24179
  website?: string | null;
23315
24180
  };
@@ -25256,6 +26121,54 @@ export declare const getGroupedCustomerDetail: import("@tanstack/start-client-co
25256
26121
  referencedColumns: ["id"];
25257
26122
  }];
25258
26123
  };
26124
+ floriday_auto_fulfillment_log: {
26125
+ Row: {
26126
+ attempts: number;
26127
+ connection_id: string;
26128
+ created_at: string;
26129
+ error: string | null;
26130
+ fulfillment_order_id: string | null;
26131
+ id: string;
26132
+ last_attempt_at: string | null;
26133
+ reason: string | null;
26134
+ sales_order_id: string;
26135
+ status: string;
26136
+ updated_at: string;
26137
+ };
26138
+ Insert: {
26139
+ attempts?: number;
26140
+ connection_id: string;
26141
+ created_at?: string;
26142
+ error?: string | null;
26143
+ fulfillment_order_id?: string | null;
26144
+ id?: string;
26145
+ last_attempt_at?: string | null;
26146
+ reason?: string | null;
26147
+ sales_order_id: string;
26148
+ status?: string;
26149
+ updated_at?: string;
26150
+ };
26151
+ Update: {
26152
+ attempts?: number;
26153
+ connection_id?: string;
26154
+ created_at?: string;
26155
+ error?: string | null;
26156
+ fulfillment_order_id?: string | null;
26157
+ id?: string;
26158
+ last_attempt_at?: string | null;
26159
+ reason?: string | null;
26160
+ sales_order_id?: string;
26161
+ status?: string;
26162
+ updated_at?: string;
26163
+ };
26164
+ Relationships: [{
26165
+ foreignKeyName: "floriday_auto_fulfillment_log_connection_id_fkey";
26166
+ columns: ["connection_id"];
26167
+ isOneToOne: false;
26168
+ referencedRelation: "floriday_connections";
26169
+ referencedColumns: ["id"];
26170
+ }];
26171
+ };
25259
26172
  floriday_base_items_cache: {
25260
26173
  Row: {
25261
26174
  connection_id: string;
@@ -26360,6 +27273,24 @@ export declare const getGroupedCustomerDetail: import("@tanstack/start-client-co
26360
27273
  referencedColumns: ["id"];
26361
27274
  }];
26362
27275
  };
27276
+ floriday_rate_limit_state: {
27277
+ Row: {
27278
+ bucket: string;
27279
+ last_refill_at: string;
27280
+ tokens: number;
27281
+ };
27282
+ Insert: {
27283
+ bucket: string;
27284
+ last_refill_at?: string;
27285
+ tokens: number;
27286
+ };
27287
+ Update: {
27288
+ bucket?: string;
27289
+ last_refill_at?: string;
27290
+ tokens?: number;
27291
+ };
27292
+ Relationships: [];
27293
+ };
26363
27294
  floriday_resource_schemas: {
26364
27295
  Row: {
26365
27296
  enums: import("../integrations/supabase/types").Json;
@@ -28794,6 +29725,8 @@ export declare const getGroupedCustomerDetail: import("@tanstack/start-client-co
28794
29725
  order_date: string;
28795
29726
  order_number: string;
28796
29727
  order_source: string;
29728
+ plan_locked_at: string | null;
29729
+ plan_locked_ref: string | null;
28797
29730
  status: string;
28798
29731
  total: string;
28799
29732
  updated_at: string;
@@ -28810,6 +29743,8 @@ export declare const getGroupedCustomerDetail: import("@tanstack/start-client-co
28810
29743
  order_date?: string;
28811
29744
  order_number: string;
28812
29745
  order_source?: string;
29746
+ plan_locked_at?: string | null;
29747
+ plan_locked_ref?: string | null;
28813
29748
  status?: string;
28814
29749
  total?: string;
28815
29750
  updated_at?: string;
@@ -28826,6 +29761,8 @@ export declare const getGroupedCustomerDetail: import("@tanstack/start-client-co
28826
29761
  order_date?: string;
28827
29762
  order_number?: string;
28828
29763
  order_source?: string;
29764
+ plan_locked_at?: string | null;
29765
+ plan_locked_ref?: string | null;
28829
29766
  status?: string;
28830
29767
  total?: string;
28831
29768
  updated_at?: string;
@@ -29194,6 +30131,7 @@ export declare const getGroupedCustomerDetail: import("@tanstack/start-client-co
29194
30131
  };
29195
30132
  profiles: {
29196
30133
  Row: {
30134
+ address: string | null;
29197
30135
  created_at: string;
29198
30136
  display_name: string | null;
29199
30137
  email: string | null;
@@ -29204,6 +30142,7 @@ export declare const getGroupedCustomerDetail: import("@tanstack/start-client-co
29204
30142
  updated_at: string;
29205
30143
  };
29206
30144
  Insert: {
30145
+ address?: string | null;
29207
30146
  created_at?: string;
29208
30147
  display_name?: string | null;
29209
30148
  email?: string | null;
@@ -29214,6 +30153,7 @@ export declare const getGroupedCustomerDetail: import("@tanstack/start-client-co
29214
30153
  updated_at?: string;
29215
30154
  };
29216
30155
  Update: {
30156
+ address?: string | null;
29217
30157
  created_at?: string;
29218
30158
  display_name?: string | null;
29219
30159
  email?: string | null;
@@ -30461,6 +31401,114 @@ export declare const getGroupedCustomerDetail: import("@tanstack/start-client-co
30461
31401
  };
30462
31402
  Relationships: [];
30463
31403
  };
31404
+ trade_item_supply_lines: {
31405
+ Row: {
31406
+ available_quantity: number | null;
31407
+ connection_id: string;
31408
+ created_at: string;
31409
+ currency: string | null;
31410
+ endpoint_family: string | null;
31411
+ environment: string | null;
31412
+ id: string;
31413
+ last_error: string | null;
31414
+ last_status: number | null;
31415
+ packing_configuration_id: string | null;
31416
+ period_end: string | null;
31417
+ period_start: string | null;
31418
+ price_per_piece: number | null;
31419
+ sales_unit: string | null;
31420
+ supply_line_id: string | null;
31421
+ supply_type: string;
31422
+ trade_item_id: string;
31423
+ updated_at: string;
31424
+ user_id: string;
31425
+ week: number | null;
31426
+ year: number | null;
31427
+ };
31428
+ Insert: {
31429
+ available_quantity?: number | null;
31430
+ connection_id: string;
31431
+ created_at?: string;
31432
+ currency?: string | null;
31433
+ endpoint_family?: string | null;
31434
+ environment?: string | null;
31435
+ id?: string;
31436
+ last_error?: string | null;
31437
+ last_status?: number | null;
31438
+ packing_configuration_id?: string | null;
31439
+ period_end?: string | null;
31440
+ period_start?: string | null;
31441
+ price_per_piece?: number | null;
31442
+ sales_unit?: string | null;
31443
+ supply_line_id?: string | null;
31444
+ supply_type?: string;
31445
+ trade_item_id: string;
31446
+ updated_at?: string;
31447
+ user_id: string;
31448
+ week?: number | null;
31449
+ year?: number | null;
31450
+ };
31451
+ Update: {
31452
+ available_quantity?: number | null;
31453
+ connection_id?: string;
31454
+ created_at?: string;
31455
+ currency?: string | null;
31456
+ endpoint_family?: string | null;
31457
+ environment?: string | null;
31458
+ id?: string;
31459
+ last_error?: string | null;
31460
+ last_status?: number | null;
31461
+ packing_configuration_id?: string | null;
31462
+ period_end?: string | null;
31463
+ period_start?: string | null;
31464
+ price_per_piece?: number | null;
31465
+ sales_unit?: string | null;
31466
+ supply_line_id?: string | null;
31467
+ supply_type?: string;
31468
+ trade_item_id?: string;
31469
+ updated_at?: string;
31470
+ user_id?: string;
31471
+ week?: number | null;
31472
+ year?: number | null;
31473
+ };
31474
+ Relationships: [];
31475
+ };
31476
+ trade_item_warehouse_preferences: {
31477
+ Row: {
31478
+ connection_id: string;
31479
+ created_at: string;
31480
+ id: string;
31481
+ trade_item_id: string;
31482
+ updated_at: string;
31483
+ warehouse_id: string;
31484
+ warehouse_name: string | null;
31485
+ };
31486
+ Insert: {
31487
+ connection_id: string;
31488
+ created_at?: string;
31489
+ id?: string;
31490
+ trade_item_id: string;
31491
+ updated_at?: string;
31492
+ warehouse_id: string;
31493
+ warehouse_name?: string | null;
31494
+ };
31495
+ Update: {
31496
+ connection_id?: string;
31497
+ created_at?: string;
31498
+ id?: string;
31499
+ trade_item_id?: string;
31500
+ updated_at?: string;
31501
+ warehouse_id?: string;
31502
+ warehouse_name?: string | null;
31503
+ };
31504
+ Relationships: [{
31505
+ foreignKeyName: "trade_item_warehouse_preferences_connection_id_fkey";
31506
+ columns: ["connection_id"];
31507
+ isOneToOne: false;
31508
+ referencedRelation: "floriday_connections";
31509
+ referencedColumns: ["id"];
31510
+ }];
31511
+ };
30464
31512
  twinfield_connections: {
30465
31513
  Row: {
30466
31514
  access_token: string | null;
@@ -32146,7 +33194,19 @@ export declare const getGroupedCustomerDetail: import("@tanstack/start-client-co
32146
33194
  };
32147
33195
  cleanup_old_bookings: {
32148
33196
  Args: never;
32149
- Returns: number;
33197
+ Returns: undefined;
33198
+ };
33199
+ consume_floriday_rate_limit: {
33200
+ Args: {
33201
+ p_bucket: string;
33202
+ p_capacity: number;
33203
+ p_cost?: number;
33204
+ p_refill_per_sec: number;
33205
+ };
33206
+ Returns: {
33207
+ granted: boolean;
33208
+ wait_ms: number;
33209
+ }[];
32150
33210
  };
32151
33211
  control_get_todays_carts: {
32152
33212
  Args: never;
@@ -32228,6 +33288,12 @@ export declare const getGroupedCustomerDetail: import("@tanstack/start-client-co
32228
33288
  status: string;
32229
33289
  }[];
32230
33290
  };
33291
+ enqueue_cart_replan_if_unlocked: {
33292
+ Args: {
33293
+ p_order_id: string;
33294
+ };
33295
+ Returns: undefined;
33296
+ };
32231
33297
  ensure_trade_item_stock_row: {
32232
33298
  Args: {
32233
33299
  p_key: string;
@@ -32621,6 +33687,24 @@ export declare const getGroupedCustomerDetail: import("@tanstack/start-client-co
32621
33687
  };
32622
33688
  Returns: undefined;
32623
33689
  };
33690
+ recompute_order_status: {
33691
+ Args: {
33692
+ p_order_id: string;
33693
+ };
33694
+ Returns: undefined;
33695
+ };
33696
+ recompute_reserved_for_order: {
33697
+ Args: {
33698
+ p_order_id: string;
33699
+ };
33700
+ Returns: undefined;
33701
+ };
33702
+ recompute_reserved_stock: {
33703
+ Args: {
33704
+ p_trade_item_key: string;
33705
+ };
33706
+ Returns: undefined;
33707
+ };
32624
33708
  refresh_external_customers_grouped: {
32625
33709
  Args: never;
32626
33710
  Returns: undefined;
@@ -32935,6 +34019,24 @@ export declare const getGroupedCustomerDetail: import("@tanstack/start-client-co
32935
34019
  };
32936
34020
  Returns: string[];
32937
34021
  };
34022
+ sync_cached_packing_from_product: {
34023
+ Args: {
34024
+ p_product_id: string;
34025
+ };
34026
+ Returns: undefined;
34027
+ };
34028
+ sync_order_cart_item_packing_from_product: {
34029
+ Args: {
34030
+ p_product_id: string;
34031
+ };
34032
+ Returns: undefined;
34033
+ };
34034
+ sync_product_packing_from_floriday_cache: {
34035
+ Args: {
34036
+ p_floriday_id: string;
34037
+ };
34038
+ Returns: undefined;
34039
+ };
32938
34040
  twinfield_decrypt: {
32939
34041
  Args: {
32940
34042
  cipher: string;
@@ -32947,6 +34049,17 @@ export declare const getGroupedCustomerDetail: import("@tanstack/start-client-co
32947
34049
  };
32948
34050
  Returns: string;
32949
34051
  };
34052
+ upsert_auto_fulfillment_log: {
34053
+ Args: {
34054
+ p_connection_id: string;
34055
+ p_error?: string;
34056
+ p_fulfillment_order_id?: string;
34057
+ p_reason?: string;
34058
+ p_sales_order_id: string;
34059
+ p_status: string;
34060
+ };
34061
+ Returns: undefined;
34062
+ };
32950
34063
  };
32951
34064
  Enums: {
32952
34065
  app_role: "admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie" | "monteur";
@@ -32973,6 +34086,8 @@ export declare const getExternalCustomerDetail: import("@tanstack/start-client-c
32973
34086
  Tables: {
32974
34087
  afhandeling_settings: {
32975
34088
  Row: {
34089
+ auto_print_delivery_note: boolean;
34090
+ auto_process_paused: boolean;
32976
34091
  created_at: string;
32977
34092
  extra_pick_days_with_stickers: number;
32978
34093
  id: string;
@@ -32988,6 +34103,8 @@ export declare const getExternalCustomerDetail: import("@tanstack/start-client-c
32988
34103
  user_id: string;
32989
34104
  };
32990
34105
  Insert: {
34106
+ auto_print_delivery_note?: boolean;
34107
+ auto_process_paused?: boolean;
32991
34108
  created_at?: string;
32992
34109
  extra_pick_days_with_stickers?: number;
32993
34110
  id?: string;
@@ -33003,6 +34120,8 @@ export declare const getExternalCustomerDetail: import("@tanstack/start-client-c
33003
34120
  user_id: string;
33004
34121
  };
33005
34122
  Update: {
34123
+ auto_print_delivery_note?: boolean;
34124
+ auto_process_paused?: boolean;
33006
34125
  created_at?: string;
33007
34126
  extra_pick_days_with_stickers?: number;
33008
34127
  id?: string;
@@ -33235,6 +34354,9 @@ export declare const getExternalCustomerDetail: import("@tanstack/start-client-c
33235
34354
  created_at: string;
33236
34355
  extra_id: string;
33237
34356
  id: string;
34357
+ original_unit_price: number | null;
34358
+ override_reason: string | null;
34359
+ override_unit_price: number | null;
33238
34360
  quantity: number;
33239
34361
  total_price: number;
33240
34362
  unit_price: number;
@@ -33244,6 +34366,9 @@ export declare const getExternalCustomerDetail: import("@tanstack/start-client-c
33244
34366
  created_at?: string;
33245
34367
  extra_id: string;
33246
34368
  id?: string;
34369
+ original_unit_price?: number | null;
34370
+ override_reason?: string | null;
34371
+ override_unit_price?: number | null;
33247
34372
  quantity?: number;
33248
34373
  total_price?: number;
33249
34374
  unit_price?: number;
@@ -33253,6 +34378,9 @@ export declare const getExternalCustomerDetail: import("@tanstack/start-client-c
33253
34378
  created_at?: string;
33254
34379
  extra_id?: string;
33255
34380
  id?: string;
34381
+ original_unit_price?: number | null;
34382
+ override_reason?: string | null;
34383
+ override_unit_price?: number | null;
33256
34384
  quantity?: number;
33257
34385
  total_price?: number;
33258
34386
  unit_price?: number;
@@ -33273,11 +34401,15 @@ export declare const getExternalCustomerDetail: import("@tanstack/start-client-c
33273
34401
  };
33274
34402
  bookings: {
33275
34403
  Row: {
34404
+ archive_reason: string | null;
34405
+ archived_at: string | null;
34406
+ archived_by: string | null;
33276
34407
  company_name: string | null;
33277
34408
  conflict_checked_at: string | null;
33278
34409
  conflict_reason: string | null;
33279
34410
  created_at: string;
33280
34411
  created_by_role: string | null;
34412
+ customer_address: string | null;
33281
34413
  customer_email: string | null;
33282
34414
  customer_name: string | null;
33283
34415
  end_time: string;
@@ -33289,7 +34421,12 @@ export declare const getExternalCustomerDetail: import("@tanstack/start-client-c
33289
34421
  invoiced_at: string | null;
33290
34422
  notes: string | null;
33291
34423
  number_of_people: number;
34424
+ overridden_at: string | null;
34425
+ overridden_by: string | null;
34426
+ override_reason: string | null;
34427
+ price_override: boolean;
33292
34428
  room_id: string;
34429
+ room_price_override: number | null;
33293
34430
  start_time: string;
33294
34431
  status: string;
33295
34432
  total_excl_vat: number | null;
@@ -33298,11 +34435,15 @@ export declare const getExternalCustomerDetail: import("@tanstack/start-client-c
33298
34435
  vat_amount: number | null;
33299
34436
  };
33300
34437
  Insert: {
34438
+ archive_reason?: string | null;
34439
+ archived_at?: string | null;
34440
+ archived_by?: string | null;
33301
34441
  company_name?: string | null;
33302
34442
  conflict_checked_at?: string | null;
33303
34443
  conflict_reason?: string | null;
33304
34444
  created_at?: string;
33305
34445
  created_by_role?: string | null;
34446
+ customer_address?: string | null;
33306
34447
  customer_email?: string | null;
33307
34448
  customer_name?: string | null;
33308
34449
  end_time: string;
@@ -33314,7 +34455,12 @@ export declare const getExternalCustomerDetail: import("@tanstack/start-client-c
33314
34455
  invoiced_at?: string | null;
33315
34456
  notes?: string | null;
33316
34457
  number_of_people?: number;
34458
+ overridden_at?: string | null;
34459
+ overridden_by?: string | null;
34460
+ override_reason?: string | null;
34461
+ price_override?: boolean;
33317
34462
  room_id: string;
34463
+ room_price_override?: number | null;
33318
34464
  start_time: string;
33319
34465
  status?: string;
33320
34466
  total_excl_vat?: number | null;
@@ -33323,11 +34469,15 @@ export declare const getExternalCustomerDetail: import("@tanstack/start-client-c
33323
34469
  vat_amount?: number | null;
33324
34470
  };
33325
34471
  Update: {
34472
+ archive_reason?: string | null;
34473
+ archived_at?: string | null;
34474
+ archived_by?: string | null;
33326
34475
  company_name?: string | null;
33327
34476
  conflict_checked_at?: string | null;
33328
34477
  conflict_reason?: string | null;
33329
34478
  created_at?: string;
33330
34479
  created_by_role?: string | null;
34480
+ customer_address?: string | null;
33331
34481
  customer_email?: string | null;
33332
34482
  customer_name?: string | null;
33333
34483
  end_time?: string;
@@ -33339,7 +34489,12 @@ export declare const getExternalCustomerDetail: import("@tanstack/start-client-c
33339
34489
  invoiced_at?: string | null;
33340
34490
  notes?: string | null;
33341
34491
  number_of_people?: number;
34492
+ overridden_at?: string | null;
34493
+ overridden_by?: string | null;
34494
+ override_reason?: string | null;
34495
+ price_override?: boolean;
33342
34496
  room_id?: string;
34497
+ room_price_override?: number | null;
33343
34498
  start_time?: string;
33344
34499
  status?: string;
33345
34500
  total_excl_vat?: number | null;
@@ -34168,8 +35323,27 @@ export declare const getExternalCustomerDetail: import("@tanstack/start-client-c
34168
35323
  customers: {
34169
35324
  Row: {
34170
35325
  address: string | null;
35326
+ address_line1: string | null;
35327
+ address_line2: string | null;
35328
+ address_type: string | null;
35329
+ attention_to: string | null;
35330
+ bank_account_holder: string | null;
35331
+ bank_account_number: string | null;
35332
+ bank_address_line1: string | null;
35333
+ bank_address_line2: string | null;
35334
+ bank_bic: string | null;
35335
+ bank_city: string | null;
35336
+ bank_country: string | null;
35337
+ bank_house_number: string | null;
35338
+ bank_iban: string | null;
35339
+ bank_name: string | null;
35340
+ bank_national_code: string | null;
35341
+ bank_postal_code: string | null;
35342
+ bank_state: string | null;
35343
+ billing_email: string | null;
34171
35344
  bio: string | null;
34172
35345
  city: string | null;
35346
+ coc_number: string | null;
34173
35347
  commercial_name: string | null;
34174
35348
  company_name: string;
34175
35349
  connection_status: string;
@@ -34178,21 +35352,28 @@ export declare const getExternalCustomerDetail: import("@tanstack/start-client-c
34178
35352
  created_at: string;
34179
35353
  custom_fields: import("../integrations/supabase/types").Json;
34180
35354
  customer_class: string | null;
35355
+ customer_number: string | null;
35356
+ discount_days: number | null;
35357
+ discount_percentage: number | null;
34181
35358
  email: string | null;
34182
35359
  external_id: string | null;
35360
+ fax: string | null;
34183
35361
  floriday_connection_id: string | null;
34184
35362
  floriday_organization_id: string | null;
34185
35363
  floriday_raw: import("../integrations/supabase/types").Json | null;
34186
35364
  gln: string | null;
34187
35365
  house_number: string | null;
35366
+ icp_country_code: string | null;
34188
35367
  id: string;
34189
35368
  is_active: boolean;
35369
+ language: string | null;
34190
35370
  last_synced_at: string | null;
34191
35371
  logo_url: string | null;
34192
35372
  markets: string[];
34193
35373
  notes: string | null;
34194
35374
  organization_type: string | null;
34195
35375
  payment_methods: string[];
35376
+ payment_term_days: number | null;
34196
35377
  phone: string | null;
34197
35378
  postal_code: string | null;
34198
35379
  product_groups: string[];
@@ -34203,13 +35384,33 @@ export declare const getExternalCustomerDetail: import("@tanstack/start-client-c
34203
35384
  sync_status: string;
34204
35385
  trade_forms: string[];
34205
35386
  updated_at: string;
35387
+ vat_display: string | null;
34206
35388
  vat_number: string | null;
34207
35389
  website: string | null;
34208
35390
  };
34209
35391
  Insert: {
34210
35392
  address?: string | null;
35393
+ address_line1?: string | null;
35394
+ address_line2?: string | null;
35395
+ address_type?: string | null;
35396
+ attention_to?: string | null;
35397
+ bank_account_holder?: string | null;
35398
+ bank_account_number?: string | null;
35399
+ bank_address_line1?: string | null;
35400
+ bank_address_line2?: string | null;
35401
+ bank_bic?: string | null;
35402
+ bank_city?: string | null;
35403
+ bank_country?: string | null;
35404
+ bank_house_number?: string | null;
35405
+ bank_iban?: string | null;
35406
+ bank_name?: string | null;
35407
+ bank_national_code?: string | null;
35408
+ bank_postal_code?: string | null;
35409
+ bank_state?: string | null;
35410
+ billing_email?: string | null;
34211
35411
  bio?: string | null;
34212
35412
  city?: string | null;
35413
+ coc_number?: string | null;
34213
35414
  commercial_name?: string | null;
34214
35415
  company_name: string;
34215
35416
  connection_status?: string;
@@ -34218,21 +35419,28 @@ export declare const getExternalCustomerDetail: import("@tanstack/start-client-c
34218
35419
  created_at?: string;
34219
35420
  custom_fields?: import("../integrations/supabase/types").Json;
34220
35421
  customer_class?: string | null;
35422
+ customer_number?: string | null;
35423
+ discount_days?: number | null;
35424
+ discount_percentage?: number | null;
34221
35425
  email?: string | null;
34222
35426
  external_id?: string | null;
35427
+ fax?: string | null;
34223
35428
  floriday_connection_id?: string | null;
34224
35429
  floriday_organization_id?: string | null;
34225
35430
  floriday_raw?: import("../integrations/supabase/types").Json | null;
34226
35431
  gln?: string | null;
34227
35432
  house_number?: string | null;
35433
+ icp_country_code?: string | null;
34228
35434
  id?: string;
34229
35435
  is_active?: boolean;
35436
+ language?: string | null;
34230
35437
  last_synced_at?: string | null;
34231
35438
  logo_url?: string | null;
34232
35439
  markets?: string[];
34233
35440
  notes?: string | null;
34234
35441
  organization_type?: string | null;
34235
35442
  payment_methods?: string[];
35443
+ payment_term_days?: number | null;
34236
35444
  phone?: string | null;
34237
35445
  postal_code?: string | null;
34238
35446
  product_groups?: string[];
@@ -34243,13 +35451,33 @@ export declare const getExternalCustomerDetail: import("@tanstack/start-client-c
34243
35451
  sync_status?: string;
34244
35452
  trade_forms?: string[];
34245
35453
  updated_at?: string;
35454
+ vat_display?: string | null;
34246
35455
  vat_number?: string | null;
34247
35456
  website?: string | null;
34248
35457
  };
34249
35458
  Update: {
34250
35459
  address?: string | null;
35460
+ address_line1?: string | null;
35461
+ address_line2?: string | null;
35462
+ address_type?: string | null;
35463
+ attention_to?: string | null;
35464
+ bank_account_holder?: string | null;
35465
+ bank_account_number?: string | null;
35466
+ bank_address_line1?: string | null;
35467
+ bank_address_line2?: string | null;
35468
+ bank_bic?: string | null;
35469
+ bank_city?: string | null;
35470
+ bank_country?: string | null;
35471
+ bank_house_number?: string | null;
35472
+ bank_iban?: string | null;
35473
+ bank_name?: string | null;
35474
+ bank_national_code?: string | null;
35475
+ bank_postal_code?: string | null;
35476
+ bank_state?: string | null;
35477
+ billing_email?: string | null;
34251
35478
  bio?: string | null;
34252
35479
  city?: string | null;
35480
+ coc_number?: string | null;
34253
35481
  commercial_name?: string | null;
34254
35482
  company_name?: string;
34255
35483
  connection_status?: string;
@@ -34258,21 +35486,28 @@ export declare const getExternalCustomerDetail: import("@tanstack/start-client-c
34258
35486
  created_at?: string;
34259
35487
  custom_fields?: import("../integrations/supabase/types").Json;
34260
35488
  customer_class?: string | null;
35489
+ customer_number?: string | null;
35490
+ discount_days?: number | null;
35491
+ discount_percentage?: number | null;
34261
35492
  email?: string | null;
34262
35493
  external_id?: string | null;
35494
+ fax?: string | null;
34263
35495
  floriday_connection_id?: string | null;
34264
35496
  floriday_organization_id?: string | null;
34265
35497
  floriday_raw?: import("../integrations/supabase/types").Json | null;
34266
35498
  gln?: string | null;
34267
35499
  house_number?: string | null;
35500
+ icp_country_code?: string | null;
34268
35501
  id?: string;
34269
35502
  is_active?: boolean;
35503
+ language?: string | null;
34270
35504
  last_synced_at?: string | null;
34271
35505
  logo_url?: string | null;
34272
35506
  markets?: string[];
34273
35507
  notes?: string | null;
34274
35508
  organization_type?: string | null;
34275
35509
  payment_methods?: string[];
35510
+ payment_term_days?: number | null;
34276
35511
  phone?: string | null;
34277
35512
  postal_code?: string | null;
34278
35513
  product_groups?: string[];
@@ -34283,6 +35518,7 @@ export declare const getExternalCustomerDetail: import("@tanstack/start-client-c
34283
35518
  sync_status?: string;
34284
35519
  trade_forms?: string[];
34285
35520
  updated_at?: string;
35521
+ vat_display?: string | null;
34286
35522
  vat_number?: string | null;
34287
35523
  website?: string | null;
34288
35524
  };
@@ -36229,6 +37465,54 @@ export declare const getExternalCustomerDetail: import("@tanstack/start-client-c
36229
37465
  referencedColumns: ["id"];
36230
37466
  }];
36231
37467
  };
37468
+ floriday_auto_fulfillment_log: {
37469
+ Row: {
37470
+ attempts: number;
37471
+ connection_id: string;
37472
+ created_at: string;
37473
+ error: string | null;
37474
+ fulfillment_order_id: string | null;
37475
+ id: string;
37476
+ last_attempt_at: string | null;
37477
+ reason: string | null;
37478
+ sales_order_id: string;
37479
+ status: string;
37480
+ updated_at: string;
37481
+ };
37482
+ Insert: {
37483
+ attempts?: number;
37484
+ connection_id: string;
37485
+ created_at?: string;
37486
+ error?: string | null;
37487
+ fulfillment_order_id?: string | null;
37488
+ id?: string;
37489
+ last_attempt_at?: string | null;
37490
+ reason?: string | null;
37491
+ sales_order_id: string;
37492
+ status?: string;
37493
+ updated_at?: string;
37494
+ };
37495
+ Update: {
37496
+ attempts?: number;
37497
+ connection_id?: string;
37498
+ created_at?: string;
37499
+ error?: string | null;
37500
+ fulfillment_order_id?: string | null;
37501
+ id?: string;
37502
+ last_attempt_at?: string | null;
37503
+ reason?: string | null;
37504
+ sales_order_id?: string;
37505
+ status?: string;
37506
+ updated_at?: string;
37507
+ };
37508
+ Relationships: [{
37509
+ foreignKeyName: "floriday_auto_fulfillment_log_connection_id_fkey";
37510
+ columns: ["connection_id"];
37511
+ isOneToOne: false;
37512
+ referencedRelation: "floriday_connections";
37513
+ referencedColumns: ["id"];
37514
+ }];
37515
+ };
36232
37516
  floriday_base_items_cache: {
36233
37517
  Row: {
36234
37518
  connection_id: string;
@@ -37333,6 +38617,24 @@ export declare const getExternalCustomerDetail: import("@tanstack/start-client-c
37333
38617
  referencedColumns: ["id"];
37334
38618
  }];
37335
38619
  };
38620
+ floriday_rate_limit_state: {
38621
+ Row: {
38622
+ bucket: string;
38623
+ last_refill_at: string;
38624
+ tokens: number;
38625
+ };
38626
+ Insert: {
38627
+ bucket: string;
38628
+ last_refill_at?: string;
38629
+ tokens: number;
38630
+ };
38631
+ Update: {
38632
+ bucket?: string;
38633
+ last_refill_at?: string;
38634
+ tokens?: number;
38635
+ };
38636
+ Relationships: [];
38637
+ };
37336
38638
  floriday_resource_schemas: {
37337
38639
  Row: {
37338
38640
  enums: import("../integrations/supabase/types").Json;
@@ -39767,6 +41069,8 @@ export declare const getExternalCustomerDetail: import("@tanstack/start-client-c
39767
41069
  order_date: string;
39768
41070
  order_number: string;
39769
41071
  order_source: string;
41072
+ plan_locked_at: string | null;
41073
+ plan_locked_ref: string | null;
39770
41074
  status: string;
39771
41075
  total: string;
39772
41076
  updated_at: string;
@@ -39783,6 +41087,8 @@ export declare const getExternalCustomerDetail: import("@tanstack/start-client-c
39783
41087
  order_date?: string;
39784
41088
  order_number: string;
39785
41089
  order_source?: string;
41090
+ plan_locked_at?: string | null;
41091
+ plan_locked_ref?: string | null;
39786
41092
  status?: string;
39787
41093
  total?: string;
39788
41094
  updated_at?: string;
@@ -39799,6 +41105,8 @@ export declare const getExternalCustomerDetail: import("@tanstack/start-client-c
39799
41105
  order_date?: string;
39800
41106
  order_number?: string;
39801
41107
  order_source?: string;
41108
+ plan_locked_at?: string | null;
41109
+ plan_locked_ref?: string | null;
39802
41110
  status?: string;
39803
41111
  total?: string;
39804
41112
  updated_at?: string;
@@ -40167,6 +41475,7 @@ export declare const getExternalCustomerDetail: import("@tanstack/start-client-c
40167
41475
  };
40168
41476
  profiles: {
40169
41477
  Row: {
41478
+ address: string | null;
40170
41479
  created_at: string;
40171
41480
  display_name: string | null;
40172
41481
  email: string | null;
@@ -40177,6 +41486,7 @@ export declare const getExternalCustomerDetail: import("@tanstack/start-client-c
40177
41486
  updated_at: string;
40178
41487
  };
40179
41488
  Insert: {
41489
+ address?: string | null;
40180
41490
  created_at?: string;
40181
41491
  display_name?: string | null;
40182
41492
  email?: string | null;
@@ -40187,6 +41497,7 @@ export declare const getExternalCustomerDetail: import("@tanstack/start-client-c
40187
41497
  updated_at?: string;
40188
41498
  };
40189
41499
  Update: {
41500
+ address?: string | null;
40190
41501
  created_at?: string;
40191
41502
  display_name?: string | null;
40192
41503
  email?: string | null;
@@ -41434,6 +42745,114 @@ export declare const getExternalCustomerDetail: import("@tanstack/start-client-c
41434
42745
  };
41435
42746
  Relationships: [];
41436
42747
  };
42748
+ trade_item_supply_lines: {
42749
+ Row: {
42750
+ available_quantity: number | null;
42751
+ connection_id: string;
42752
+ created_at: string;
42753
+ currency: string | null;
42754
+ endpoint_family: string | null;
42755
+ environment: string | null;
42756
+ id: string;
42757
+ last_error: string | null;
42758
+ last_status: number | null;
42759
+ packing_configuration_id: string | null;
42760
+ period_end: string | null;
42761
+ period_start: string | null;
42762
+ price_per_piece: number | null;
42763
+ sales_unit: string | null;
42764
+ supply_line_id: string | null;
42765
+ supply_type: string;
42766
+ trade_item_id: string;
42767
+ updated_at: string;
42768
+ user_id: string;
42769
+ week: number | null;
42770
+ year: number | null;
42771
+ };
42772
+ Insert: {
42773
+ available_quantity?: number | null;
42774
+ connection_id: string;
42775
+ created_at?: string;
42776
+ currency?: string | null;
42777
+ endpoint_family?: string | null;
42778
+ environment?: string | null;
42779
+ id?: string;
42780
+ last_error?: string | null;
42781
+ last_status?: number | null;
42782
+ packing_configuration_id?: string | null;
42783
+ period_end?: string | null;
42784
+ period_start?: string | null;
42785
+ price_per_piece?: number | null;
42786
+ sales_unit?: string | null;
42787
+ supply_line_id?: string | null;
42788
+ supply_type?: string;
42789
+ trade_item_id: string;
42790
+ updated_at?: string;
42791
+ user_id: string;
42792
+ week?: number | null;
42793
+ year?: number | null;
42794
+ };
42795
+ Update: {
42796
+ available_quantity?: number | null;
42797
+ connection_id?: string;
42798
+ created_at?: string;
42799
+ currency?: string | null;
42800
+ endpoint_family?: string | null;
42801
+ environment?: string | null;
42802
+ id?: string;
42803
+ last_error?: string | null;
42804
+ last_status?: number | null;
42805
+ packing_configuration_id?: string | null;
42806
+ period_end?: string | null;
42807
+ period_start?: string | null;
42808
+ price_per_piece?: number | null;
42809
+ sales_unit?: string | null;
42810
+ supply_line_id?: string | null;
42811
+ supply_type?: string;
42812
+ trade_item_id?: string;
42813
+ updated_at?: string;
42814
+ user_id?: string;
42815
+ week?: number | null;
42816
+ year?: number | null;
42817
+ };
42818
+ Relationships: [];
42819
+ };
42820
+ trade_item_warehouse_preferences: {
42821
+ Row: {
42822
+ connection_id: string;
42823
+ created_at: string;
42824
+ id: string;
42825
+ trade_item_id: string;
42826
+ updated_at: string;
42827
+ warehouse_id: string;
42828
+ warehouse_name: string | null;
42829
+ };
42830
+ Insert: {
42831
+ connection_id: string;
42832
+ created_at?: string;
42833
+ id?: string;
42834
+ trade_item_id: string;
42835
+ updated_at?: string;
42836
+ warehouse_id: string;
42837
+ warehouse_name?: string | null;
42838
+ };
42839
+ Update: {
42840
+ connection_id?: string;
42841
+ created_at?: string;
42842
+ id?: string;
42843
+ trade_item_id?: string;
42844
+ updated_at?: string;
42845
+ warehouse_id?: string;
42846
+ warehouse_name?: string | null;
42847
+ };
42848
+ Relationships: [{
42849
+ foreignKeyName: "trade_item_warehouse_preferences_connection_id_fkey";
42850
+ columns: ["connection_id"];
42851
+ isOneToOne: false;
42852
+ referencedRelation: "floriday_connections";
42853
+ referencedColumns: ["id"];
42854
+ }];
42855
+ };
41437
42856
  twinfield_connections: {
41438
42857
  Row: {
41439
42858
  access_token: string | null;
@@ -43119,7 +44538,19 @@ export declare const getExternalCustomerDetail: import("@tanstack/start-client-c
43119
44538
  };
43120
44539
  cleanup_old_bookings: {
43121
44540
  Args: never;
43122
- Returns: number;
44541
+ Returns: undefined;
44542
+ };
44543
+ consume_floriday_rate_limit: {
44544
+ Args: {
44545
+ p_bucket: string;
44546
+ p_capacity: number;
44547
+ p_cost?: number;
44548
+ p_refill_per_sec: number;
44549
+ };
44550
+ Returns: {
44551
+ granted: boolean;
44552
+ wait_ms: number;
44553
+ }[];
43123
44554
  };
43124
44555
  control_get_todays_carts: {
43125
44556
  Args: never;
@@ -43201,6 +44632,12 @@ export declare const getExternalCustomerDetail: import("@tanstack/start-client-c
43201
44632
  status: string;
43202
44633
  }[];
43203
44634
  };
44635
+ enqueue_cart_replan_if_unlocked: {
44636
+ Args: {
44637
+ p_order_id: string;
44638
+ };
44639
+ Returns: undefined;
44640
+ };
43204
44641
  ensure_trade_item_stock_row: {
43205
44642
  Args: {
43206
44643
  p_key: string;
@@ -43594,6 +45031,24 @@ export declare const getExternalCustomerDetail: import("@tanstack/start-client-c
43594
45031
  };
43595
45032
  Returns: undefined;
43596
45033
  };
45034
+ recompute_order_status: {
45035
+ Args: {
45036
+ p_order_id: string;
45037
+ };
45038
+ Returns: undefined;
45039
+ };
45040
+ recompute_reserved_for_order: {
45041
+ Args: {
45042
+ p_order_id: string;
45043
+ };
45044
+ Returns: undefined;
45045
+ };
45046
+ recompute_reserved_stock: {
45047
+ Args: {
45048
+ p_trade_item_key: string;
45049
+ };
45050
+ Returns: undefined;
45051
+ };
43597
45052
  refresh_external_customers_grouped: {
43598
45053
  Args: never;
43599
45054
  Returns: undefined;
@@ -43908,6 +45363,24 @@ export declare const getExternalCustomerDetail: import("@tanstack/start-client-c
43908
45363
  };
43909
45364
  Returns: string[];
43910
45365
  };
45366
+ sync_cached_packing_from_product: {
45367
+ Args: {
45368
+ p_product_id: string;
45369
+ };
45370
+ Returns: undefined;
45371
+ };
45372
+ sync_order_cart_item_packing_from_product: {
45373
+ Args: {
45374
+ p_product_id: string;
45375
+ };
45376
+ Returns: undefined;
45377
+ };
45378
+ sync_product_packing_from_floriday_cache: {
45379
+ Args: {
45380
+ p_floriday_id: string;
45381
+ };
45382
+ Returns: undefined;
45383
+ };
43911
45384
  twinfield_decrypt: {
43912
45385
  Args: {
43913
45386
  cipher: string;
@@ -43920,6 +45393,17 @@ export declare const getExternalCustomerDetail: import("@tanstack/start-client-c
43920
45393
  };
43921
45394
  Returns: string;
43922
45395
  };
45396
+ upsert_auto_fulfillment_log: {
45397
+ Args: {
45398
+ p_connection_id: string;
45399
+ p_error?: string;
45400
+ p_fulfillment_order_id?: string;
45401
+ p_reason?: string;
45402
+ p_sales_order_id: string;
45403
+ p_status: string;
45404
+ };
45405
+ Returns: undefined;
45406
+ };
43923
45407
  };
43924
45408
  Enums: {
43925
45409
  app_role: "admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie" | "monteur";