@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
@@ -28,6 +28,8 @@ export declare const listLocalCustomerDiscounts: import("@tanstack/start-client-
28
28
  Tables: {
29
29
  afhandeling_settings: {
30
30
  Row: {
31
+ auto_print_delivery_note: boolean;
32
+ auto_process_paused: boolean;
31
33
  created_at: string;
32
34
  extra_pick_days_with_stickers: number;
33
35
  id: string;
@@ -43,6 +45,8 @@ export declare const listLocalCustomerDiscounts: import("@tanstack/start-client-
43
45
  user_id: string;
44
46
  };
45
47
  Insert: {
48
+ auto_print_delivery_note?: boolean;
49
+ auto_process_paused?: boolean;
46
50
  created_at?: string;
47
51
  extra_pick_days_with_stickers?: number;
48
52
  id?: string;
@@ -58,6 +62,8 @@ export declare const listLocalCustomerDiscounts: import("@tanstack/start-client-
58
62
  user_id: string;
59
63
  };
60
64
  Update: {
65
+ auto_print_delivery_note?: boolean;
66
+ auto_process_paused?: boolean;
61
67
  created_at?: string;
62
68
  extra_pick_days_with_stickers?: number;
63
69
  id?: string;
@@ -290,6 +296,9 @@ export declare const listLocalCustomerDiscounts: import("@tanstack/start-client-
290
296
  created_at: string;
291
297
  extra_id: string;
292
298
  id: string;
299
+ original_unit_price: number | null;
300
+ override_reason: string | null;
301
+ override_unit_price: number | null;
293
302
  quantity: number;
294
303
  total_price: number;
295
304
  unit_price: number;
@@ -299,6 +308,9 @@ export declare const listLocalCustomerDiscounts: import("@tanstack/start-client-
299
308
  created_at?: string;
300
309
  extra_id: string;
301
310
  id?: string;
311
+ original_unit_price?: number | null;
312
+ override_reason?: string | null;
313
+ override_unit_price?: number | null;
302
314
  quantity?: number;
303
315
  total_price?: number;
304
316
  unit_price?: number;
@@ -308,6 +320,9 @@ export declare const listLocalCustomerDiscounts: import("@tanstack/start-client-
308
320
  created_at?: string;
309
321
  extra_id?: string;
310
322
  id?: string;
323
+ original_unit_price?: number | null;
324
+ override_reason?: string | null;
325
+ override_unit_price?: number | null;
311
326
  quantity?: number;
312
327
  total_price?: number;
313
328
  unit_price?: number;
@@ -328,11 +343,15 @@ export declare const listLocalCustomerDiscounts: import("@tanstack/start-client-
328
343
  };
329
344
  bookings: {
330
345
  Row: {
346
+ archive_reason: string | null;
347
+ archived_at: string | null;
348
+ archived_by: string | null;
331
349
  company_name: string | null;
332
350
  conflict_checked_at: string | null;
333
351
  conflict_reason: string | null;
334
352
  created_at: string;
335
353
  created_by_role: string | null;
354
+ customer_address: string | null;
336
355
  customer_email: string | null;
337
356
  customer_name: string | null;
338
357
  end_time: string;
@@ -344,7 +363,12 @@ export declare const listLocalCustomerDiscounts: import("@tanstack/start-client-
344
363
  invoiced_at: string | null;
345
364
  notes: string | null;
346
365
  number_of_people: number;
366
+ overridden_at: string | null;
367
+ overridden_by: string | null;
368
+ override_reason: string | null;
369
+ price_override: boolean;
347
370
  room_id: string;
371
+ room_price_override: number | null;
348
372
  start_time: string;
349
373
  status: string;
350
374
  total_excl_vat: number | null;
@@ -353,11 +377,15 @@ export declare const listLocalCustomerDiscounts: import("@tanstack/start-client-
353
377
  vat_amount: number | null;
354
378
  };
355
379
  Insert: {
380
+ archive_reason?: string | null;
381
+ archived_at?: string | null;
382
+ archived_by?: string | null;
356
383
  company_name?: string | null;
357
384
  conflict_checked_at?: string | null;
358
385
  conflict_reason?: string | null;
359
386
  created_at?: string;
360
387
  created_by_role?: string | null;
388
+ customer_address?: string | null;
361
389
  customer_email?: string | null;
362
390
  customer_name?: string | null;
363
391
  end_time: string;
@@ -369,7 +397,12 @@ export declare const listLocalCustomerDiscounts: import("@tanstack/start-client-
369
397
  invoiced_at?: string | null;
370
398
  notes?: string | null;
371
399
  number_of_people?: number;
400
+ overridden_at?: string | null;
401
+ overridden_by?: string | null;
402
+ override_reason?: string | null;
403
+ price_override?: boolean;
372
404
  room_id: string;
405
+ room_price_override?: number | null;
373
406
  start_time: string;
374
407
  status?: string;
375
408
  total_excl_vat?: number | null;
@@ -378,11 +411,15 @@ export declare const listLocalCustomerDiscounts: import("@tanstack/start-client-
378
411
  vat_amount?: number | null;
379
412
  };
380
413
  Update: {
414
+ archive_reason?: string | null;
415
+ archived_at?: string | null;
416
+ archived_by?: string | null;
381
417
  company_name?: string | null;
382
418
  conflict_checked_at?: string | null;
383
419
  conflict_reason?: string | null;
384
420
  created_at?: string;
385
421
  created_by_role?: string | null;
422
+ customer_address?: string | null;
386
423
  customer_email?: string | null;
387
424
  customer_name?: string | null;
388
425
  end_time?: string;
@@ -394,7 +431,12 @@ export declare const listLocalCustomerDiscounts: import("@tanstack/start-client-
394
431
  invoiced_at?: string | null;
395
432
  notes?: string | null;
396
433
  number_of_people?: number;
434
+ overridden_at?: string | null;
435
+ overridden_by?: string | null;
436
+ override_reason?: string | null;
437
+ price_override?: boolean;
397
438
  room_id?: string;
439
+ room_price_override?: number | null;
398
440
  start_time?: string;
399
441
  status?: string;
400
442
  total_excl_vat?: number | null;
@@ -1223,8 +1265,27 @@ export declare const listLocalCustomerDiscounts: import("@tanstack/start-client-
1223
1265
  customers: {
1224
1266
  Row: {
1225
1267
  address: string | null;
1268
+ address_line1: string | null;
1269
+ address_line2: string | null;
1270
+ address_type: string | null;
1271
+ attention_to: string | null;
1272
+ bank_account_holder: string | null;
1273
+ bank_account_number: string | null;
1274
+ bank_address_line1: string | null;
1275
+ bank_address_line2: string | null;
1276
+ bank_bic: string | null;
1277
+ bank_city: string | null;
1278
+ bank_country: string | null;
1279
+ bank_house_number: string | null;
1280
+ bank_iban: string | null;
1281
+ bank_name: string | null;
1282
+ bank_national_code: string | null;
1283
+ bank_postal_code: string | null;
1284
+ bank_state: string | null;
1285
+ billing_email: string | null;
1226
1286
  bio: string | null;
1227
1287
  city: string | null;
1288
+ coc_number: string | null;
1228
1289
  commercial_name: string | null;
1229
1290
  company_name: string;
1230
1291
  connection_status: string;
@@ -1233,21 +1294,28 @@ export declare const listLocalCustomerDiscounts: import("@tanstack/start-client-
1233
1294
  created_at: string;
1234
1295
  custom_fields: import("../integrations/supabase/types").Json;
1235
1296
  customer_class: string | null;
1297
+ customer_number: string | null;
1298
+ discount_days: number | null;
1299
+ discount_percentage: number | null;
1236
1300
  email: string | null;
1237
1301
  external_id: string | null;
1302
+ fax: string | null;
1238
1303
  floriday_connection_id: string | null;
1239
1304
  floriday_organization_id: string | null;
1240
1305
  floriday_raw: import("../integrations/supabase/types").Json | null;
1241
1306
  gln: string | null;
1242
1307
  house_number: string | null;
1308
+ icp_country_code: string | null;
1243
1309
  id: string;
1244
1310
  is_active: boolean;
1311
+ language: string | null;
1245
1312
  last_synced_at: string | null;
1246
1313
  logo_url: string | null;
1247
1314
  markets: string[];
1248
1315
  notes: string | null;
1249
1316
  organization_type: string | null;
1250
1317
  payment_methods: string[];
1318
+ payment_term_days: number | null;
1251
1319
  phone: string | null;
1252
1320
  postal_code: string | null;
1253
1321
  product_groups: string[];
@@ -1258,13 +1326,33 @@ export declare const listLocalCustomerDiscounts: import("@tanstack/start-client-
1258
1326
  sync_status: string;
1259
1327
  trade_forms: string[];
1260
1328
  updated_at: string;
1329
+ vat_display: string | null;
1261
1330
  vat_number: string | null;
1262
1331
  website: string | null;
1263
1332
  };
1264
1333
  Insert: {
1265
1334
  address?: string | null;
1335
+ address_line1?: string | null;
1336
+ address_line2?: string | null;
1337
+ address_type?: string | null;
1338
+ attention_to?: string | null;
1339
+ bank_account_holder?: string | null;
1340
+ bank_account_number?: string | null;
1341
+ bank_address_line1?: string | null;
1342
+ bank_address_line2?: string | null;
1343
+ bank_bic?: string | null;
1344
+ bank_city?: string | null;
1345
+ bank_country?: string | null;
1346
+ bank_house_number?: string | null;
1347
+ bank_iban?: string | null;
1348
+ bank_name?: string | null;
1349
+ bank_national_code?: string | null;
1350
+ bank_postal_code?: string | null;
1351
+ bank_state?: string | null;
1352
+ billing_email?: string | null;
1266
1353
  bio?: string | null;
1267
1354
  city?: string | null;
1355
+ coc_number?: string | null;
1268
1356
  commercial_name?: string | null;
1269
1357
  company_name: string;
1270
1358
  connection_status?: string;
@@ -1273,21 +1361,28 @@ export declare const listLocalCustomerDiscounts: import("@tanstack/start-client-
1273
1361
  created_at?: string;
1274
1362
  custom_fields?: import("../integrations/supabase/types").Json;
1275
1363
  customer_class?: string | null;
1364
+ customer_number?: string | null;
1365
+ discount_days?: number | null;
1366
+ discount_percentage?: number | null;
1276
1367
  email?: string | null;
1277
1368
  external_id?: string | null;
1369
+ fax?: string | null;
1278
1370
  floriday_connection_id?: string | null;
1279
1371
  floriday_organization_id?: string | null;
1280
1372
  floriday_raw?: import("../integrations/supabase/types").Json | null;
1281
1373
  gln?: string | null;
1282
1374
  house_number?: string | null;
1375
+ icp_country_code?: string | null;
1283
1376
  id?: string;
1284
1377
  is_active?: boolean;
1378
+ language?: string | null;
1285
1379
  last_synced_at?: string | null;
1286
1380
  logo_url?: string | null;
1287
1381
  markets?: string[];
1288
1382
  notes?: string | null;
1289
1383
  organization_type?: string | null;
1290
1384
  payment_methods?: string[];
1385
+ payment_term_days?: number | null;
1291
1386
  phone?: string | null;
1292
1387
  postal_code?: string | null;
1293
1388
  product_groups?: string[];
@@ -1298,13 +1393,33 @@ export declare const listLocalCustomerDiscounts: import("@tanstack/start-client-
1298
1393
  sync_status?: string;
1299
1394
  trade_forms?: string[];
1300
1395
  updated_at?: string;
1396
+ vat_display?: string | null;
1301
1397
  vat_number?: string | null;
1302
1398
  website?: string | null;
1303
1399
  };
1304
1400
  Update: {
1305
1401
  address?: string | null;
1402
+ address_line1?: string | null;
1403
+ address_line2?: string | null;
1404
+ address_type?: string | null;
1405
+ attention_to?: string | null;
1406
+ bank_account_holder?: string | null;
1407
+ bank_account_number?: string | null;
1408
+ bank_address_line1?: string | null;
1409
+ bank_address_line2?: string | null;
1410
+ bank_bic?: string | null;
1411
+ bank_city?: string | null;
1412
+ bank_country?: string | null;
1413
+ bank_house_number?: string | null;
1414
+ bank_iban?: string | null;
1415
+ bank_name?: string | null;
1416
+ bank_national_code?: string | null;
1417
+ bank_postal_code?: string | null;
1418
+ bank_state?: string | null;
1419
+ billing_email?: string | null;
1306
1420
  bio?: string | null;
1307
1421
  city?: string | null;
1422
+ coc_number?: string | null;
1308
1423
  commercial_name?: string | null;
1309
1424
  company_name?: string;
1310
1425
  connection_status?: string;
@@ -1313,21 +1428,28 @@ export declare const listLocalCustomerDiscounts: import("@tanstack/start-client-
1313
1428
  created_at?: string;
1314
1429
  custom_fields?: import("../integrations/supabase/types").Json;
1315
1430
  customer_class?: string | null;
1431
+ customer_number?: string | null;
1432
+ discount_days?: number | null;
1433
+ discount_percentage?: number | null;
1316
1434
  email?: string | null;
1317
1435
  external_id?: string | null;
1436
+ fax?: string | null;
1318
1437
  floriday_connection_id?: string | null;
1319
1438
  floriday_organization_id?: string | null;
1320
1439
  floriday_raw?: import("../integrations/supabase/types").Json | null;
1321
1440
  gln?: string | null;
1322
1441
  house_number?: string | null;
1442
+ icp_country_code?: string | null;
1323
1443
  id?: string;
1324
1444
  is_active?: boolean;
1445
+ language?: string | null;
1325
1446
  last_synced_at?: string | null;
1326
1447
  logo_url?: string | null;
1327
1448
  markets?: string[];
1328
1449
  notes?: string | null;
1329
1450
  organization_type?: string | null;
1330
1451
  payment_methods?: string[];
1452
+ payment_term_days?: number | null;
1331
1453
  phone?: string | null;
1332
1454
  postal_code?: string | null;
1333
1455
  product_groups?: string[];
@@ -1338,6 +1460,7 @@ export declare const listLocalCustomerDiscounts: import("@tanstack/start-client-
1338
1460
  sync_status?: string;
1339
1461
  trade_forms?: string[];
1340
1462
  updated_at?: string;
1463
+ vat_display?: string | null;
1341
1464
  vat_number?: string | null;
1342
1465
  website?: string | null;
1343
1466
  };
@@ -3284,6 +3407,54 @@ export declare const listLocalCustomerDiscounts: import("@tanstack/start-client-
3284
3407
  referencedColumns: ["id"];
3285
3408
  }];
3286
3409
  };
3410
+ floriday_auto_fulfillment_log: {
3411
+ Row: {
3412
+ attempts: number;
3413
+ connection_id: string;
3414
+ created_at: string;
3415
+ error: string | null;
3416
+ fulfillment_order_id: string | null;
3417
+ id: string;
3418
+ last_attempt_at: string | null;
3419
+ reason: string | null;
3420
+ sales_order_id: string;
3421
+ status: string;
3422
+ updated_at: string;
3423
+ };
3424
+ Insert: {
3425
+ attempts?: number;
3426
+ connection_id: string;
3427
+ created_at?: string;
3428
+ error?: string | null;
3429
+ fulfillment_order_id?: string | null;
3430
+ id?: string;
3431
+ last_attempt_at?: string | null;
3432
+ reason?: string | null;
3433
+ sales_order_id: string;
3434
+ status?: string;
3435
+ updated_at?: string;
3436
+ };
3437
+ Update: {
3438
+ attempts?: number;
3439
+ connection_id?: string;
3440
+ created_at?: string;
3441
+ error?: string | null;
3442
+ fulfillment_order_id?: string | null;
3443
+ id?: string;
3444
+ last_attempt_at?: string | null;
3445
+ reason?: string | null;
3446
+ sales_order_id?: string;
3447
+ status?: string;
3448
+ updated_at?: string;
3449
+ };
3450
+ Relationships: [{
3451
+ foreignKeyName: "floriday_auto_fulfillment_log_connection_id_fkey";
3452
+ columns: ["connection_id"];
3453
+ isOneToOne: false;
3454
+ referencedRelation: "floriday_connections";
3455
+ referencedColumns: ["id"];
3456
+ }];
3457
+ };
3287
3458
  floriday_base_items_cache: {
3288
3459
  Row: {
3289
3460
  connection_id: string;
@@ -4388,6 +4559,24 @@ export declare const listLocalCustomerDiscounts: import("@tanstack/start-client-
4388
4559
  referencedColumns: ["id"];
4389
4560
  }];
4390
4561
  };
4562
+ floriday_rate_limit_state: {
4563
+ Row: {
4564
+ bucket: string;
4565
+ last_refill_at: string;
4566
+ tokens: number;
4567
+ };
4568
+ Insert: {
4569
+ bucket: string;
4570
+ last_refill_at?: string;
4571
+ tokens: number;
4572
+ };
4573
+ Update: {
4574
+ bucket?: string;
4575
+ last_refill_at?: string;
4576
+ tokens?: number;
4577
+ };
4578
+ Relationships: [];
4579
+ };
4391
4580
  floriday_resource_schemas: {
4392
4581
  Row: {
4393
4582
  enums: import("../integrations/supabase/types").Json;
@@ -6822,6 +7011,8 @@ export declare const listLocalCustomerDiscounts: import("@tanstack/start-client-
6822
7011
  order_date: string;
6823
7012
  order_number: string;
6824
7013
  order_source: string;
7014
+ plan_locked_at: string | null;
7015
+ plan_locked_ref: string | null;
6825
7016
  status: string;
6826
7017
  total: string;
6827
7018
  updated_at: string;
@@ -6838,6 +7029,8 @@ export declare const listLocalCustomerDiscounts: import("@tanstack/start-client-
6838
7029
  order_date?: string;
6839
7030
  order_number: string;
6840
7031
  order_source?: string;
7032
+ plan_locked_at?: string | null;
7033
+ plan_locked_ref?: string | null;
6841
7034
  status?: string;
6842
7035
  total?: string;
6843
7036
  updated_at?: string;
@@ -6854,6 +7047,8 @@ export declare const listLocalCustomerDiscounts: import("@tanstack/start-client-
6854
7047
  order_date?: string;
6855
7048
  order_number?: string;
6856
7049
  order_source?: string;
7050
+ plan_locked_at?: string | null;
7051
+ plan_locked_ref?: string | null;
6857
7052
  status?: string;
6858
7053
  total?: string;
6859
7054
  updated_at?: string;
@@ -7222,6 +7417,7 @@ export declare const listLocalCustomerDiscounts: import("@tanstack/start-client-
7222
7417
  };
7223
7418
  profiles: {
7224
7419
  Row: {
7420
+ address: string | null;
7225
7421
  created_at: string;
7226
7422
  display_name: string | null;
7227
7423
  email: string | null;
@@ -7232,6 +7428,7 @@ export declare const listLocalCustomerDiscounts: import("@tanstack/start-client-
7232
7428
  updated_at: string;
7233
7429
  };
7234
7430
  Insert: {
7431
+ address?: string | null;
7235
7432
  created_at?: string;
7236
7433
  display_name?: string | null;
7237
7434
  email?: string | null;
@@ -7242,6 +7439,7 @@ export declare const listLocalCustomerDiscounts: import("@tanstack/start-client-
7242
7439
  updated_at?: string;
7243
7440
  };
7244
7441
  Update: {
7442
+ address?: string | null;
7245
7443
  created_at?: string;
7246
7444
  display_name?: string | null;
7247
7445
  email?: string | null;
@@ -8489,6 +8687,114 @@ export declare const listLocalCustomerDiscounts: import("@tanstack/start-client-
8489
8687
  };
8490
8688
  Relationships: [];
8491
8689
  };
8690
+ trade_item_supply_lines: {
8691
+ Row: {
8692
+ available_quantity: number | null;
8693
+ connection_id: string;
8694
+ created_at: string;
8695
+ currency: string | null;
8696
+ endpoint_family: string | null;
8697
+ environment: string | null;
8698
+ id: string;
8699
+ last_error: string | null;
8700
+ last_status: number | null;
8701
+ packing_configuration_id: string | null;
8702
+ period_end: string | null;
8703
+ period_start: string | null;
8704
+ price_per_piece: number | null;
8705
+ sales_unit: string | null;
8706
+ supply_line_id: string | null;
8707
+ supply_type: string;
8708
+ trade_item_id: string;
8709
+ updated_at: string;
8710
+ user_id: string;
8711
+ week: number | null;
8712
+ year: number | null;
8713
+ };
8714
+ Insert: {
8715
+ available_quantity?: number | null;
8716
+ connection_id: string;
8717
+ created_at?: string;
8718
+ currency?: string | null;
8719
+ endpoint_family?: string | null;
8720
+ environment?: string | null;
8721
+ id?: string;
8722
+ last_error?: string | null;
8723
+ last_status?: number | null;
8724
+ packing_configuration_id?: string | null;
8725
+ period_end?: string | null;
8726
+ period_start?: string | null;
8727
+ price_per_piece?: number | null;
8728
+ sales_unit?: string | null;
8729
+ supply_line_id?: string | null;
8730
+ supply_type?: string;
8731
+ trade_item_id: string;
8732
+ updated_at?: string;
8733
+ user_id: string;
8734
+ week?: number | null;
8735
+ year?: number | null;
8736
+ };
8737
+ Update: {
8738
+ available_quantity?: number | null;
8739
+ connection_id?: string;
8740
+ created_at?: string;
8741
+ currency?: string | null;
8742
+ endpoint_family?: string | null;
8743
+ environment?: string | null;
8744
+ id?: string;
8745
+ last_error?: string | null;
8746
+ last_status?: number | null;
8747
+ packing_configuration_id?: string | null;
8748
+ period_end?: string | null;
8749
+ period_start?: string | null;
8750
+ price_per_piece?: number | null;
8751
+ sales_unit?: string | null;
8752
+ supply_line_id?: string | null;
8753
+ supply_type?: string;
8754
+ trade_item_id?: string;
8755
+ updated_at?: string;
8756
+ user_id?: string;
8757
+ week?: number | null;
8758
+ year?: number | null;
8759
+ };
8760
+ Relationships: [];
8761
+ };
8762
+ trade_item_warehouse_preferences: {
8763
+ Row: {
8764
+ connection_id: string;
8765
+ created_at: string;
8766
+ id: string;
8767
+ trade_item_id: string;
8768
+ updated_at: string;
8769
+ warehouse_id: string;
8770
+ warehouse_name: string | null;
8771
+ };
8772
+ Insert: {
8773
+ connection_id: string;
8774
+ created_at?: string;
8775
+ id?: string;
8776
+ trade_item_id: string;
8777
+ updated_at?: string;
8778
+ warehouse_id: string;
8779
+ warehouse_name?: string | null;
8780
+ };
8781
+ Update: {
8782
+ connection_id?: string;
8783
+ created_at?: string;
8784
+ id?: string;
8785
+ trade_item_id?: string;
8786
+ updated_at?: string;
8787
+ warehouse_id?: string;
8788
+ warehouse_name?: string | null;
8789
+ };
8790
+ Relationships: [{
8791
+ foreignKeyName: "trade_item_warehouse_preferences_connection_id_fkey";
8792
+ columns: ["connection_id"];
8793
+ isOneToOne: false;
8794
+ referencedRelation: "floriday_connections";
8795
+ referencedColumns: ["id"];
8796
+ }];
8797
+ };
8492
8798
  twinfield_connections: {
8493
8799
  Row: {
8494
8800
  access_token: string | null;
@@ -10174,7 +10480,19 @@ export declare const listLocalCustomerDiscounts: import("@tanstack/start-client-
10174
10480
  };
10175
10481
  cleanup_old_bookings: {
10176
10482
  Args: never;
10177
- Returns: number;
10483
+ Returns: undefined;
10484
+ };
10485
+ consume_floriday_rate_limit: {
10486
+ Args: {
10487
+ p_bucket: string;
10488
+ p_capacity: number;
10489
+ p_cost?: number;
10490
+ p_refill_per_sec: number;
10491
+ };
10492
+ Returns: {
10493
+ granted: boolean;
10494
+ wait_ms: number;
10495
+ }[];
10178
10496
  };
10179
10497
  control_get_todays_carts: {
10180
10498
  Args: never;
@@ -10256,6 +10574,12 @@ export declare const listLocalCustomerDiscounts: import("@tanstack/start-client-
10256
10574
  status: string;
10257
10575
  }[];
10258
10576
  };
10577
+ enqueue_cart_replan_if_unlocked: {
10578
+ Args: {
10579
+ p_order_id: string;
10580
+ };
10581
+ Returns: undefined;
10582
+ };
10259
10583
  ensure_trade_item_stock_row: {
10260
10584
  Args: {
10261
10585
  p_key: string;
@@ -10649,6 +10973,24 @@ export declare const listLocalCustomerDiscounts: import("@tanstack/start-client-
10649
10973
  };
10650
10974
  Returns: undefined;
10651
10975
  };
10976
+ recompute_order_status: {
10977
+ Args: {
10978
+ p_order_id: string;
10979
+ };
10980
+ Returns: undefined;
10981
+ };
10982
+ recompute_reserved_for_order: {
10983
+ Args: {
10984
+ p_order_id: string;
10985
+ };
10986
+ Returns: undefined;
10987
+ };
10988
+ recompute_reserved_stock: {
10989
+ Args: {
10990
+ p_trade_item_key: string;
10991
+ };
10992
+ Returns: undefined;
10993
+ };
10652
10994
  refresh_external_customers_grouped: {
10653
10995
  Args: never;
10654
10996
  Returns: undefined;
@@ -10963,6 +11305,24 @@ export declare const listLocalCustomerDiscounts: import("@tanstack/start-client-
10963
11305
  };
10964
11306
  Returns: string[];
10965
11307
  };
11308
+ sync_cached_packing_from_product: {
11309
+ Args: {
11310
+ p_product_id: string;
11311
+ };
11312
+ Returns: undefined;
11313
+ };
11314
+ sync_order_cart_item_packing_from_product: {
11315
+ Args: {
11316
+ p_product_id: string;
11317
+ };
11318
+ Returns: undefined;
11319
+ };
11320
+ sync_product_packing_from_floriday_cache: {
11321
+ Args: {
11322
+ p_floriday_id: string;
11323
+ };
11324
+ Returns: undefined;
11325
+ };
10966
11326
  twinfield_decrypt: {
10967
11327
  Args: {
10968
11328
  cipher: string;
@@ -10975,6 +11335,17 @@ export declare const listLocalCustomerDiscounts: import("@tanstack/start-client-
10975
11335
  };
10976
11336
  Returns: string;
10977
11337
  };
11338
+ upsert_auto_fulfillment_log: {
11339
+ Args: {
11340
+ p_connection_id: string;
11341
+ p_error?: string;
11342
+ p_fulfillment_order_id?: string;
11343
+ p_reason?: string;
11344
+ p_sales_order_id: string;
11345
+ p_status: string;
11346
+ };
11347
+ Returns: undefined;
11348
+ };
10978
11349
  };
10979
11350
  Enums: {
10980
11351
  app_role: "admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie" | "monteur";
@@ -10996,6 +11367,8 @@ export declare const getLocalEffectivePrice: import("@tanstack/start-client-core
10996
11367
  Tables: {
10997
11368
  afhandeling_settings: {
10998
11369
  Row: {
11370
+ auto_print_delivery_note: boolean;
11371
+ auto_process_paused: boolean;
10999
11372
  created_at: string;
11000
11373
  extra_pick_days_with_stickers: number;
11001
11374
  id: string;
@@ -11011,6 +11384,8 @@ export declare const getLocalEffectivePrice: import("@tanstack/start-client-core
11011
11384
  user_id: string;
11012
11385
  };
11013
11386
  Insert: {
11387
+ auto_print_delivery_note?: boolean;
11388
+ auto_process_paused?: boolean;
11014
11389
  created_at?: string;
11015
11390
  extra_pick_days_with_stickers?: number;
11016
11391
  id?: string;
@@ -11026,6 +11401,8 @@ export declare const getLocalEffectivePrice: import("@tanstack/start-client-core
11026
11401
  user_id: string;
11027
11402
  };
11028
11403
  Update: {
11404
+ auto_print_delivery_note?: boolean;
11405
+ auto_process_paused?: boolean;
11029
11406
  created_at?: string;
11030
11407
  extra_pick_days_with_stickers?: number;
11031
11408
  id?: string;
@@ -11258,6 +11635,9 @@ export declare const getLocalEffectivePrice: import("@tanstack/start-client-core
11258
11635
  created_at: string;
11259
11636
  extra_id: string;
11260
11637
  id: string;
11638
+ original_unit_price: number | null;
11639
+ override_reason: string | null;
11640
+ override_unit_price: number | null;
11261
11641
  quantity: number;
11262
11642
  total_price: number;
11263
11643
  unit_price: number;
@@ -11267,6 +11647,9 @@ export declare const getLocalEffectivePrice: import("@tanstack/start-client-core
11267
11647
  created_at?: string;
11268
11648
  extra_id: string;
11269
11649
  id?: string;
11650
+ original_unit_price?: number | null;
11651
+ override_reason?: string | null;
11652
+ override_unit_price?: number | null;
11270
11653
  quantity?: number;
11271
11654
  total_price?: number;
11272
11655
  unit_price?: number;
@@ -11276,6 +11659,9 @@ export declare const getLocalEffectivePrice: import("@tanstack/start-client-core
11276
11659
  created_at?: string;
11277
11660
  extra_id?: string;
11278
11661
  id?: string;
11662
+ original_unit_price?: number | null;
11663
+ override_reason?: string | null;
11664
+ override_unit_price?: number | null;
11279
11665
  quantity?: number;
11280
11666
  total_price?: number;
11281
11667
  unit_price?: number;
@@ -11296,11 +11682,15 @@ export declare const getLocalEffectivePrice: import("@tanstack/start-client-core
11296
11682
  };
11297
11683
  bookings: {
11298
11684
  Row: {
11685
+ archive_reason: string | null;
11686
+ archived_at: string | null;
11687
+ archived_by: string | null;
11299
11688
  company_name: string | null;
11300
11689
  conflict_checked_at: string | null;
11301
11690
  conflict_reason: string | null;
11302
11691
  created_at: string;
11303
11692
  created_by_role: string | null;
11693
+ customer_address: string | null;
11304
11694
  customer_email: string | null;
11305
11695
  customer_name: string | null;
11306
11696
  end_time: string;
@@ -11312,7 +11702,12 @@ export declare const getLocalEffectivePrice: import("@tanstack/start-client-core
11312
11702
  invoiced_at: string | null;
11313
11703
  notes: string | null;
11314
11704
  number_of_people: number;
11705
+ overridden_at: string | null;
11706
+ overridden_by: string | null;
11707
+ override_reason: string | null;
11708
+ price_override: boolean;
11315
11709
  room_id: string;
11710
+ room_price_override: number | null;
11316
11711
  start_time: string;
11317
11712
  status: string;
11318
11713
  total_excl_vat: number | null;
@@ -11321,11 +11716,15 @@ export declare const getLocalEffectivePrice: import("@tanstack/start-client-core
11321
11716
  vat_amount: number | null;
11322
11717
  };
11323
11718
  Insert: {
11719
+ archive_reason?: string | null;
11720
+ archived_at?: string | null;
11721
+ archived_by?: string | null;
11324
11722
  company_name?: string | null;
11325
11723
  conflict_checked_at?: string | null;
11326
11724
  conflict_reason?: string | null;
11327
11725
  created_at?: string;
11328
11726
  created_by_role?: string | null;
11727
+ customer_address?: string | null;
11329
11728
  customer_email?: string | null;
11330
11729
  customer_name?: string | null;
11331
11730
  end_time: string;
@@ -11337,7 +11736,12 @@ export declare const getLocalEffectivePrice: import("@tanstack/start-client-core
11337
11736
  invoiced_at?: string | null;
11338
11737
  notes?: string | null;
11339
11738
  number_of_people?: number;
11739
+ overridden_at?: string | null;
11740
+ overridden_by?: string | null;
11741
+ override_reason?: string | null;
11742
+ price_override?: boolean;
11340
11743
  room_id: string;
11744
+ room_price_override?: number | null;
11341
11745
  start_time: string;
11342
11746
  status?: string;
11343
11747
  total_excl_vat?: number | null;
@@ -11346,11 +11750,15 @@ export declare const getLocalEffectivePrice: import("@tanstack/start-client-core
11346
11750
  vat_amount?: number | null;
11347
11751
  };
11348
11752
  Update: {
11753
+ archive_reason?: string | null;
11754
+ archived_at?: string | null;
11755
+ archived_by?: string | null;
11349
11756
  company_name?: string | null;
11350
11757
  conflict_checked_at?: string | null;
11351
11758
  conflict_reason?: string | null;
11352
11759
  created_at?: string;
11353
11760
  created_by_role?: string | null;
11761
+ customer_address?: string | null;
11354
11762
  customer_email?: string | null;
11355
11763
  customer_name?: string | null;
11356
11764
  end_time?: string;
@@ -11362,7 +11770,12 @@ export declare const getLocalEffectivePrice: import("@tanstack/start-client-core
11362
11770
  invoiced_at?: string | null;
11363
11771
  notes?: string | null;
11364
11772
  number_of_people?: number;
11773
+ overridden_at?: string | null;
11774
+ overridden_by?: string | null;
11775
+ override_reason?: string | null;
11776
+ price_override?: boolean;
11365
11777
  room_id?: string;
11778
+ room_price_override?: number | null;
11366
11779
  start_time?: string;
11367
11780
  status?: string;
11368
11781
  total_excl_vat?: number | null;
@@ -12191,8 +12604,27 @@ export declare const getLocalEffectivePrice: import("@tanstack/start-client-core
12191
12604
  customers: {
12192
12605
  Row: {
12193
12606
  address: string | null;
12607
+ address_line1: string | null;
12608
+ address_line2: string | null;
12609
+ address_type: string | null;
12610
+ attention_to: string | null;
12611
+ bank_account_holder: string | null;
12612
+ bank_account_number: string | null;
12613
+ bank_address_line1: string | null;
12614
+ bank_address_line2: string | null;
12615
+ bank_bic: string | null;
12616
+ bank_city: string | null;
12617
+ bank_country: string | null;
12618
+ bank_house_number: string | null;
12619
+ bank_iban: string | null;
12620
+ bank_name: string | null;
12621
+ bank_national_code: string | null;
12622
+ bank_postal_code: string | null;
12623
+ bank_state: string | null;
12624
+ billing_email: string | null;
12194
12625
  bio: string | null;
12195
12626
  city: string | null;
12627
+ coc_number: string | null;
12196
12628
  commercial_name: string | null;
12197
12629
  company_name: string;
12198
12630
  connection_status: string;
@@ -12201,21 +12633,28 @@ export declare const getLocalEffectivePrice: import("@tanstack/start-client-core
12201
12633
  created_at: string;
12202
12634
  custom_fields: import("../integrations/supabase/types").Json;
12203
12635
  customer_class: string | null;
12636
+ customer_number: string | null;
12637
+ discount_days: number | null;
12638
+ discount_percentage: number | null;
12204
12639
  email: string | null;
12205
12640
  external_id: string | null;
12641
+ fax: string | null;
12206
12642
  floriday_connection_id: string | null;
12207
12643
  floriday_organization_id: string | null;
12208
12644
  floriday_raw: import("../integrations/supabase/types").Json | null;
12209
12645
  gln: string | null;
12210
12646
  house_number: string | null;
12647
+ icp_country_code: string | null;
12211
12648
  id: string;
12212
12649
  is_active: boolean;
12650
+ language: string | null;
12213
12651
  last_synced_at: string | null;
12214
12652
  logo_url: string | null;
12215
12653
  markets: string[];
12216
12654
  notes: string | null;
12217
12655
  organization_type: string | null;
12218
12656
  payment_methods: string[];
12657
+ payment_term_days: number | null;
12219
12658
  phone: string | null;
12220
12659
  postal_code: string | null;
12221
12660
  product_groups: string[];
@@ -12226,13 +12665,33 @@ export declare const getLocalEffectivePrice: import("@tanstack/start-client-core
12226
12665
  sync_status: string;
12227
12666
  trade_forms: string[];
12228
12667
  updated_at: string;
12668
+ vat_display: string | null;
12229
12669
  vat_number: string | null;
12230
12670
  website: string | null;
12231
12671
  };
12232
12672
  Insert: {
12233
12673
  address?: string | null;
12674
+ address_line1?: string | null;
12675
+ address_line2?: string | null;
12676
+ address_type?: string | null;
12677
+ attention_to?: string | null;
12678
+ bank_account_holder?: string | null;
12679
+ bank_account_number?: string | null;
12680
+ bank_address_line1?: string | null;
12681
+ bank_address_line2?: string | null;
12682
+ bank_bic?: string | null;
12683
+ bank_city?: string | null;
12684
+ bank_country?: string | null;
12685
+ bank_house_number?: string | null;
12686
+ bank_iban?: string | null;
12687
+ bank_name?: string | null;
12688
+ bank_national_code?: string | null;
12689
+ bank_postal_code?: string | null;
12690
+ bank_state?: string | null;
12691
+ billing_email?: string | null;
12234
12692
  bio?: string | null;
12235
12693
  city?: string | null;
12694
+ coc_number?: string | null;
12236
12695
  commercial_name?: string | null;
12237
12696
  company_name: string;
12238
12697
  connection_status?: string;
@@ -12241,21 +12700,28 @@ export declare const getLocalEffectivePrice: import("@tanstack/start-client-core
12241
12700
  created_at?: string;
12242
12701
  custom_fields?: import("../integrations/supabase/types").Json;
12243
12702
  customer_class?: string | null;
12703
+ customer_number?: string | null;
12704
+ discount_days?: number | null;
12705
+ discount_percentage?: number | null;
12244
12706
  email?: string | null;
12245
12707
  external_id?: string | null;
12708
+ fax?: string | null;
12246
12709
  floriday_connection_id?: string | null;
12247
12710
  floriday_organization_id?: string | null;
12248
12711
  floriday_raw?: import("../integrations/supabase/types").Json | null;
12249
12712
  gln?: string | null;
12250
12713
  house_number?: string | null;
12714
+ icp_country_code?: string | null;
12251
12715
  id?: string;
12252
12716
  is_active?: boolean;
12717
+ language?: string | null;
12253
12718
  last_synced_at?: string | null;
12254
12719
  logo_url?: string | null;
12255
12720
  markets?: string[];
12256
12721
  notes?: string | null;
12257
12722
  organization_type?: string | null;
12258
12723
  payment_methods?: string[];
12724
+ payment_term_days?: number | null;
12259
12725
  phone?: string | null;
12260
12726
  postal_code?: string | null;
12261
12727
  product_groups?: string[];
@@ -12266,13 +12732,33 @@ export declare const getLocalEffectivePrice: import("@tanstack/start-client-core
12266
12732
  sync_status?: string;
12267
12733
  trade_forms?: string[];
12268
12734
  updated_at?: string;
12735
+ vat_display?: string | null;
12269
12736
  vat_number?: string | null;
12270
12737
  website?: string | null;
12271
12738
  };
12272
12739
  Update: {
12273
12740
  address?: string | null;
12741
+ address_line1?: string | null;
12742
+ address_line2?: string | null;
12743
+ address_type?: string | null;
12744
+ attention_to?: string | null;
12745
+ bank_account_holder?: string | null;
12746
+ bank_account_number?: string | null;
12747
+ bank_address_line1?: string | null;
12748
+ bank_address_line2?: string | null;
12749
+ bank_bic?: string | null;
12750
+ bank_city?: string | null;
12751
+ bank_country?: string | null;
12752
+ bank_house_number?: string | null;
12753
+ bank_iban?: string | null;
12754
+ bank_name?: string | null;
12755
+ bank_national_code?: string | null;
12756
+ bank_postal_code?: string | null;
12757
+ bank_state?: string | null;
12758
+ billing_email?: string | null;
12274
12759
  bio?: string | null;
12275
12760
  city?: string | null;
12761
+ coc_number?: string | null;
12276
12762
  commercial_name?: string | null;
12277
12763
  company_name?: string;
12278
12764
  connection_status?: string;
@@ -12281,21 +12767,28 @@ export declare const getLocalEffectivePrice: import("@tanstack/start-client-core
12281
12767
  created_at?: string;
12282
12768
  custom_fields?: import("../integrations/supabase/types").Json;
12283
12769
  customer_class?: string | null;
12770
+ customer_number?: string | null;
12771
+ discount_days?: number | null;
12772
+ discount_percentage?: number | null;
12284
12773
  email?: string | null;
12285
12774
  external_id?: string | null;
12775
+ fax?: string | null;
12286
12776
  floriday_connection_id?: string | null;
12287
12777
  floriday_organization_id?: string | null;
12288
12778
  floriday_raw?: import("../integrations/supabase/types").Json | null;
12289
12779
  gln?: string | null;
12290
12780
  house_number?: string | null;
12781
+ icp_country_code?: string | null;
12291
12782
  id?: string;
12292
12783
  is_active?: boolean;
12784
+ language?: string | null;
12293
12785
  last_synced_at?: string | null;
12294
12786
  logo_url?: string | null;
12295
12787
  markets?: string[];
12296
12788
  notes?: string | null;
12297
12789
  organization_type?: string | null;
12298
12790
  payment_methods?: string[];
12791
+ payment_term_days?: number | null;
12299
12792
  phone?: string | null;
12300
12793
  postal_code?: string | null;
12301
12794
  product_groups?: string[];
@@ -12306,6 +12799,7 @@ export declare const getLocalEffectivePrice: import("@tanstack/start-client-core
12306
12799
  sync_status?: string;
12307
12800
  trade_forms?: string[];
12308
12801
  updated_at?: string;
12802
+ vat_display?: string | null;
12309
12803
  vat_number?: string | null;
12310
12804
  website?: string | null;
12311
12805
  };
@@ -14252,6 +14746,54 @@ export declare const getLocalEffectivePrice: import("@tanstack/start-client-core
14252
14746
  referencedColumns: ["id"];
14253
14747
  }];
14254
14748
  };
14749
+ floriday_auto_fulfillment_log: {
14750
+ Row: {
14751
+ attempts: number;
14752
+ connection_id: string;
14753
+ created_at: string;
14754
+ error: string | null;
14755
+ fulfillment_order_id: string | null;
14756
+ id: string;
14757
+ last_attempt_at: string | null;
14758
+ reason: string | null;
14759
+ sales_order_id: string;
14760
+ status: string;
14761
+ updated_at: string;
14762
+ };
14763
+ Insert: {
14764
+ attempts?: number;
14765
+ connection_id: string;
14766
+ created_at?: string;
14767
+ error?: string | null;
14768
+ fulfillment_order_id?: string | null;
14769
+ id?: string;
14770
+ last_attempt_at?: string | null;
14771
+ reason?: string | null;
14772
+ sales_order_id: string;
14773
+ status?: string;
14774
+ updated_at?: string;
14775
+ };
14776
+ Update: {
14777
+ attempts?: number;
14778
+ connection_id?: string;
14779
+ created_at?: string;
14780
+ error?: string | null;
14781
+ fulfillment_order_id?: string | null;
14782
+ id?: string;
14783
+ last_attempt_at?: string | null;
14784
+ reason?: string | null;
14785
+ sales_order_id?: string;
14786
+ status?: string;
14787
+ updated_at?: string;
14788
+ };
14789
+ Relationships: [{
14790
+ foreignKeyName: "floriday_auto_fulfillment_log_connection_id_fkey";
14791
+ columns: ["connection_id"];
14792
+ isOneToOne: false;
14793
+ referencedRelation: "floriday_connections";
14794
+ referencedColumns: ["id"];
14795
+ }];
14796
+ };
14255
14797
  floriday_base_items_cache: {
14256
14798
  Row: {
14257
14799
  connection_id: string;
@@ -15356,6 +15898,24 @@ export declare const getLocalEffectivePrice: import("@tanstack/start-client-core
15356
15898
  referencedColumns: ["id"];
15357
15899
  }];
15358
15900
  };
15901
+ floriday_rate_limit_state: {
15902
+ Row: {
15903
+ bucket: string;
15904
+ last_refill_at: string;
15905
+ tokens: number;
15906
+ };
15907
+ Insert: {
15908
+ bucket: string;
15909
+ last_refill_at?: string;
15910
+ tokens: number;
15911
+ };
15912
+ Update: {
15913
+ bucket?: string;
15914
+ last_refill_at?: string;
15915
+ tokens?: number;
15916
+ };
15917
+ Relationships: [];
15918
+ };
15359
15919
  floriday_resource_schemas: {
15360
15920
  Row: {
15361
15921
  enums: import("../integrations/supabase/types").Json;
@@ -17790,6 +18350,8 @@ export declare const getLocalEffectivePrice: import("@tanstack/start-client-core
17790
18350
  order_date: string;
17791
18351
  order_number: string;
17792
18352
  order_source: string;
18353
+ plan_locked_at: string | null;
18354
+ plan_locked_ref: string | null;
17793
18355
  status: string;
17794
18356
  total: string;
17795
18357
  updated_at: string;
@@ -17806,6 +18368,8 @@ export declare const getLocalEffectivePrice: import("@tanstack/start-client-core
17806
18368
  order_date?: string;
17807
18369
  order_number: string;
17808
18370
  order_source?: string;
18371
+ plan_locked_at?: string | null;
18372
+ plan_locked_ref?: string | null;
17809
18373
  status?: string;
17810
18374
  total?: string;
17811
18375
  updated_at?: string;
@@ -17822,6 +18386,8 @@ export declare const getLocalEffectivePrice: import("@tanstack/start-client-core
17822
18386
  order_date?: string;
17823
18387
  order_number?: string;
17824
18388
  order_source?: string;
18389
+ plan_locked_at?: string | null;
18390
+ plan_locked_ref?: string | null;
17825
18391
  status?: string;
17826
18392
  total?: string;
17827
18393
  updated_at?: string;
@@ -18190,6 +18756,7 @@ export declare const getLocalEffectivePrice: import("@tanstack/start-client-core
18190
18756
  };
18191
18757
  profiles: {
18192
18758
  Row: {
18759
+ address: string | null;
18193
18760
  created_at: string;
18194
18761
  display_name: string | null;
18195
18762
  email: string | null;
@@ -18200,6 +18767,7 @@ export declare const getLocalEffectivePrice: import("@tanstack/start-client-core
18200
18767
  updated_at: string;
18201
18768
  };
18202
18769
  Insert: {
18770
+ address?: string | null;
18203
18771
  created_at?: string;
18204
18772
  display_name?: string | null;
18205
18773
  email?: string | null;
@@ -18210,6 +18778,7 @@ export declare const getLocalEffectivePrice: import("@tanstack/start-client-core
18210
18778
  updated_at?: string;
18211
18779
  };
18212
18780
  Update: {
18781
+ address?: string | null;
18213
18782
  created_at?: string;
18214
18783
  display_name?: string | null;
18215
18784
  email?: string | null;
@@ -19457,6 +20026,114 @@ export declare const getLocalEffectivePrice: import("@tanstack/start-client-core
19457
20026
  };
19458
20027
  Relationships: [];
19459
20028
  };
20029
+ trade_item_supply_lines: {
20030
+ Row: {
20031
+ available_quantity: number | null;
20032
+ connection_id: string;
20033
+ created_at: string;
20034
+ currency: string | null;
20035
+ endpoint_family: string | null;
20036
+ environment: string | null;
20037
+ id: string;
20038
+ last_error: string | null;
20039
+ last_status: number | null;
20040
+ packing_configuration_id: string | null;
20041
+ period_end: string | null;
20042
+ period_start: string | null;
20043
+ price_per_piece: number | null;
20044
+ sales_unit: string | null;
20045
+ supply_line_id: string | null;
20046
+ supply_type: string;
20047
+ trade_item_id: string;
20048
+ updated_at: string;
20049
+ user_id: string;
20050
+ week: number | null;
20051
+ year: number | null;
20052
+ };
20053
+ Insert: {
20054
+ available_quantity?: number | null;
20055
+ connection_id: string;
20056
+ created_at?: string;
20057
+ currency?: string | null;
20058
+ endpoint_family?: string | null;
20059
+ environment?: string | null;
20060
+ id?: string;
20061
+ last_error?: string | null;
20062
+ last_status?: number | null;
20063
+ packing_configuration_id?: string | null;
20064
+ period_end?: string | null;
20065
+ period_start?: string | null;
20066
+ price_per_piece?: number | null;
20067
+ sales_unit?: string | null;
20068
+ supply_line_id?: string | null;
20069
+ supply_type?: string;
20070
+ trade_item_id: string;
20071
+ updated_at?: string;
20072
+ user_id: string;
20073
+ week?: number | null;
20074
+ year?: number | null;
20075
+ };
20076
+ Update: {
20077
+ available_quantity?: number | null;
20078
+ connection_id?: string;
20079
+ created_at?: string;
20080
+ currency?: string | null;
20081
+ endpoint_family?: string | null;
20082
+ environment?: string | null;
20083
+ id?: string;
20084
+ last_error?: string | null;
20085
+ last_status?: number | null;
20086
+ packing_configuration_id?: string | null;
20087
+ period_end?: string | null;
20088
+ period_start?: string | null;
20089
+ price_per_piece?: number | null;
20090
+ sales_unit?: string | null;
20091
+ supply_line_id?: string | null;
20092
+ supply_type?: string;
20093
+ trade_item_id?: string;
20094
+ updated_at?: string;
20095
+ user_id?: string;
20096
+ week?: number | null;
20097
+ year?: number | null;
20098
+ };
20099
+ Relationships: [];
20100
+ };
20101
+ trade_item_warehouse_preferences: {
20102
+ Row: {
20103
+ connection_id: string;
20104
+ created_at: string;
20105
+ id: string;
20106
+ trade_item_id: string;
20107
+ updated_at: string;
20108
+ warehouse_id: string;
20109
+ warehouse_name: string | null;
20110
+ };
20111
+ Insert: {
20112
+ connection_id: string;
20113
+ created_at?: string;
20114
+ id?: string;
20115
+ trade_item_id: string;
20116
+ updated_at?: string;
20117
+ warehouse_id: string;
20118
+ warehouse_name?: string | null;
20119
+ };
20120
+ Update: {
20121
+ connection_id?: string;
20122
+ created_at?: string;
20123
+ id?: string;
20124
+ trade_item_id?: string;
20125
+ updated_at?: string;
20126
+ warehouse_id?: string;
20127
+ warehouse_name?: string | null;
20128
+ };
20129
+ Relationships: [{
20130
+ foreignKeyName: "trade_item_warehouse_preferences_connection_id_fkey";
20131
+ columns: ["connection_id"];
20132
+ isOneToOne: false;
20133
+ referencedRelation: "floriday_connections";
20134
+ referencedColumns: ["id"];
20135
+ }];
20136
+ };
19460
20137
  twinfield_connections: {
19461
20138
  Row: {
19462
20139
  access_token: string | null;
@@ -21142,7 +21819,19 @@ export declare const getLocalEffectivePrice: import("@tanstack/start-client-core
21142
21819
  };
21143
21820
  cleanup_old_bookings: {
21144
21821
  Args: never;
21145
- Returns: number;
21822
+ Returns: undefined;
21823
+ };
21824
+ consume_floriday_rate_limit: {
21825
+ Args: {
21826
+ p_bucket: string;
21827
+ p_capacity: number;
21828
+ p_cost?: number;
21829
+ p_refill_per_sec: number;
21830
+ };
21831
+ Returns: {
21832
+ granted: boolean;
21833
+ wait_ms: number;
21834
+ }[];
21146
21835
  };
21147
21836
  control_get_todays_carts: {
21148
21837
  Args: never;
@@ -21224,6 +21913,12 @@ export declare const getLocalEffectivePrice: import("@tanstack/start-client-core
21224
21913
  status: string;
21225
21914
  }[];
21226
21915
  };
21916
+ enqueue_cart_replan_if_unlocked: {
21917
+ Args: {
21918
+ p_order_id: string;
21919
+ };
21920
+ Returns: undefined;
21921
+ };
21227
21922
  ensure_trade_item_stock_row: {
21228
21923
  Args: {
21229
21924
  p_key: string;
@@ -21617,6 +22312,24 @@ export declare const getLocalEffectivePrice: import("@tanstack/start-client-core
21617
22312
  };
21618
22313
  Returns: undefined;
21619
22314
  };
22315
+ recompute_order_status: {
22316
+ Args: {
22317
+ p_order_id: string;
22318
+ };
22319
+ Returns: undefined;
22320
+ };
22321
+ recompute_reserved_for_order: {
22322
+ Args: {
22323
+ p_order_id: string;
22324
+ };
22325
+ Returns: undefined;
22326
+ };
22327
+ recompute_reserved_stock: {
22328
+ Args: {
22329
+ p_trade_item_key: string;
22330
+ };
22331
+ Returns: undefined;
22332
+ };
21620
22333
  refresh_external_customers_grouped: {
21621
22334
  Args: never;
21622
22335
  Returns: undefined;
@@ -21931,6 +22644,24 @@ export declare const getLocalEffectivePrice: import("@tanstack/start-client-core
21931
22644
  };
21932
22645
  Returns: string[];
21933
22646
  };
22647
+ sync_cached_packing_from_product: {
22648
+ Args: {
22649
+ p_product_id: string;
22650
+ };
22651
+ Returns: undefined;
22652
+ };
22653
+ sync_order_cart_item_packing_from_product: {
22654
+ Args: {
22655
+ p_product_id: string;
22656
+ };
22657
+ Returns: undefined;
22658
+ };
22659
+ sync_product_packing_from_floriday_cache: {
22660
+ Args: {
22661
+ p_floriday_id: string;
22662
+ };
22663
+ Returns: undefined;
22664
+ };
21934
22665
  twinfield_decrypt: {
21935
22666
  Args: {
21936
22667
  cipher: string;
@@ -21943,6 +22674,17 @@ export declare const getLocalEffectivePrice: import("@tanstack/start-client-core
21943
22674
  };
21944
22675
  Returns: string;
21945
22676
  };
22677
+ upsert_auto_fulfillment_log: {
22678
+ Args: {
22679
+ p_connection_id: string;
22680
+ p_error?: string;
22681
+ p_fulfillment_order_id?: string;
22682
+ p_reason?: string;
22683
+ p_sales_order_id: string;
22684
+ p_status: string;
22685
+ };
22686
+ Returns: undefined;
22687
+ };
21946
22688
  };
21947
22689
  Enums: {
21948
22690
  app_role: "admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie" | "monteur";
@@ -21974,6 +22716,8 @@ export declare const upsertLocalAgreement: import("@tanstack/start-client-core")
21974
22716
  Tables: {
21975
22717
  afhandeling_settings: {
21976
22718
  Row: {
22719
+ auto_print_delivery_note: boolean;
22720
+ auto_process_paused: boolean;
21977
22721
  created_at: string;
21978
22722
  extra_pick_days_with_stickers: number;
21979
22723
  id: string;
@@ -21989,6 +22733,8 @@ export declare const upsertLocalAgreement: import("@tanstack/start-client-core")
21989
22733
  user_id: string;
21990
22734
  };
21991
22735
  Insert: {
22736
+ auto_print_delivery_note?: boolean;
22737
+ auto_process_paused?: boolean;
21992
22738
  created_at?: string;
21993
22739
  extra_pick_days_with_stickers?: number;
21994
22740
  id?: string;
@@ -22004,6 +22750,8 @@ export declare const upsertLocalAgreement: import("@tanstack/start-client-core")
22004
22750
  user_id: string;
22005
22751
  };
22006
22752
  Update: {
22753
+ auto_print_delivery_note?: boolean;
22754
+ auto_process_paused?: boolean;
22007
22755
  created_at?: string;
22008
22756
  extra_pick_days_with_stickers?: number;
22009
22757
  id?: string;
@@ -22236,6 +22984,9 @@ export declare const upsertLocalAgreement: import("@tanstack/start-client-core")
22236
22984
  created_at: string;
22237
22985
  extra_id: string;
22238
22986
  id: string;
22987
+ original_unit_price: number | null;
22988
+ override_reason: string | null;
22989
+ override_unit_price: number | null;
22239
22990
  quantity: number;
22240
22991
  total_price: number;
22241
22992
  unit_price: number;
@@ -22245,6 +22996,9 @@ export declare const upsertLocalAgreement: import("@tanstack/start-client-core")
22245
22996
  created_at?: string;
22246
22997
  extra_id: string;
22247
22998
  id?: string;
22999
+ original_unit_price?: number | null;
23000
+ override_reason?: string | null;
23001
+ override_unit_price?: number | null;
22248
23002
  quantity?: number;
22249
23003
  total_price?: number;
22250
23004
  unit_price?: number;
@@ -22254,6 +23008,9 @@ export declare const upsertLocalAgreement: import("@tanstack/start-client-core")
22254
23008
  created_at?: string;
22255
23009
  extra_id?: string;
22256
23010
  id?: string;
23011
+ original_unit_price?: number | null;
23012
+ override_reason?: string | null;
23013
+ override_unit_price?: number | null;
22257
23014
  quantity?: number;
22258
23015
  total_price?: number;
22259
23016
  unit_price?: number;
@@ -22274,11 +23031,15 @@ export declare const upsertLocalAgreement: import("@tanstack/start-client-core")
22274
23031
  };
22275
23032
  bookings: {
22276
23033
  Row: {
23034
+ archive_reason: string | null;
23035
+ archived_at: string | null;
23036
+ archived_by: string | null;
22277
23037
  company_name: string | null;
22278
23038
  conflict_checked_at: string | null;
22279
23039
  conflict_reason: string | null;
22280
23040
  created_at: string;
22281
23041
  created_by_role: string | null;
23042
+ customer_address: string | null;
22282
23043
  customer_email: string | null;
22283
23044
  customer_name: string | null;
22284
23045
  end_time: string;
@@ -22290,7 +23051,12 @@ export declare const upsertLocalAgreement: import("@tanstack/start-client-core")
22290
23051
  invoiced_at: string | null;
22291
23052
  notes: string | null;
22292
23053
  number_of_people: number;
23054
+ overridden_at: string | null;
23055
+ overridden_by: string | null;
23056
+ override_reason: string | null;
23057
+ price_override: boolean;
22293
23058
  room_id: string;
23059
+ room_price_override: number | null;
22294
23060
  start_time: string;
22295
23061
  status: string;
22296
23062
  total_excl_vat: number | null;
@@ -22299,11 +23065,15 @@ export declare const upsertLocalAgreement: import("@tanstack/start-client-core")
22299
23065
  vat_amount: number | null;
22300
23066
  };
22301
23067
  Insert: {
23068
+ archive_reason?: string | null;
23069
+ archived_at?: string | null;
23070
+ archived_by?: string | null;
22302
23071
  company_name?: string | null;
22303
23072
  conflict_checked_at?: string | null;
22304
23073
  conflict_reason?: string | null;
22305
23074
  created_at?: string;
22306
23075
  created_by_role?: string | null;
23076
+ customer_address?: string | null;
22307
23077
  customer_email?: string | null;
22308
23078
  customer_name?: string | null;
22309
23079
  end_time: string;
@@ -22315,7 +23085,12 @@ export declare const upsertLocalAgreement: import("@tanstack/start-client-core")
22315
23085
  invoiced_at?: string | null;
22316
23086
  notes?: string | null;
22317
23087
  number_of_people?: number;
23088
+ overridden_at?: string | null;
23089
+ overridden_by?: string | null;
23090
+ override_reason?: string | null;
23091
+ price_override?: boolean;
22318
23092
  room_id: string;
23093
+ room_price_override?: number | null;
22319
23094
  start_time: string;
22320
23095
  status?: string;
22321
23096
  total_excl_vat?: number | null;
@@ -22324,11 +23099,15 @@ export declare const upsertLocalAgreement: import("@tanstack/start-client-core")
22324
23099
  vat_amount?: number | null;
22325
23100
  };
22326
23101
  Update: {
23102
+ archive_reason?: string | null;
23103
+ archived_at?: string | null;
23104
+ archived_by?: string | null;
22327
23105
  company_name?: string | null;
22328
23106
  conflict_checked_at?: string | null;
22329
23107
  conflict_reason?: string | null;
22330
23108
  created_at?: string;
22331
23109
  created_by_role?: string | null;
23110
+ customer_address?: string | null;
22332
23111
  customer_email?: string | null;
22333
23112
  customer_name?: string | null;
22334
23113
  end_time?: string;
@@ -22340,7 +23119,12 @@ export declare const upsertLocalAgreement: import("@tanstack/start-client-core")
22340
23119
  invoiced_at?: string | null;
22341
23120
  notes?: string | null;
22342
23121
  number_of_people?: number;
23122
+ overridden_at?: string | null;
23123
+ overridden_by?: string | null;
23124
+ override_reason?: string | null;
23125
+ price_override?: boolean;
22343
23126
  room_id?: string;
23127
+ room_price_override?: number | null;
22344
23128
  start_time?: string;
22345
23129
  status?: string;
22346
23130
  total_excl_vat?: number | null;
@@ -23169,8 +23953,27 @@ export declare const upsertLocalAgreement: import("@tanstack/start-client-core")
23169
23953
  customers: {
23170
23954
  Row: {
23171
23955
  address: string | null;
23956
+ address_line1: string | null;
23957
+ address_line2: string | null;
23958
+ address_type: string | null;
23959
+ attention_to: string | null;
23960
+ bank_account_holder: string | null;
23961
+ bank_account_number: string | null;
23962
+ bank_address_line1: string | null;
23963
+ bank_address_line2: string | null;
23964
+ bank_bic: string | null;
23965
+ bank_city: string | null;
23966
+ bank_country: string | null;
23967
+ bank_house_number: string | null;
23968
+ bank_iban: string | null;
23969
+ bank_name: string | null;
23970
+ bank_national_code: string | null;
23971
+ bank_postal_code: string | null;
23972
+ bank_state: string | null;
23973
+ billing_email: string | null;
23172
23974
  bio: string | null;
23173
23975
  city: string | null;
23976
+ coc_number: string | null;
23174
23977
  commercial_name: string | null;
23175
23978
  company_name: string;
23176
23979
  connection_status: string;
@@ -23179,21 +23982,28 @@ export declare const upsertLocalAgreement: import("@tanstack/start-client-core")
23179
23982
  created_at: string;
23180
23983
  custom_fields: import("../integrations/supabase/types").Json;
23181
23984
  customer_class: string | null;
23985
+ customer_number: string | null;
23986
+ discount_days: number | null;
23987
+ discount_percentage: number | null;
23182
23988
  email: string | null;
23183
23989
  external_id: string | null;
23990
+ fax: string | null;
23184
23991
  floriday_connection_id: string | null;
23185
23992
  floriday_organization_id: string | null;
23186
23993
  floriday_raw: import("../integrations/supabase/types").Json | null;
23187
23994
  gln: string | null;
23188
23995
  house_number: string | null;
23996
+ icp_country_code: string | null;
23189
23997
  id: string;
23190
23998
  is_active: boolean;
23999
+ language: string | null;
23191
24000
  last_synced_at: string | null;
23192
24001
  logo_url: string | null;
23193
24002
  markets: string[];
23194
24003
  notes: string | null;
23195
24004
  organization_type: string | null;
23196
24005
  payment_methods: string[];
24006
+ payment_term_days: number | null;
23197
24007
  phone: string | null;
23198
24008
  postal_code: string | null;
23199
24009
  product_groups: string[];
@@ -23204,13 +24014,33 @@ export declare const upsertLocalAgreement: import("@tanstack/start-client-core")
23204
24014
  sync_status: string;
23205
24015
  trade_forms: string[];
23206
24016
  updated_at: string;
24017
+ vat_display: string | null;
23207
24018
  vat_number: string | null;
23208
24019
  website: string | null;
23209
24020
  };
23210
24021
  Insert: {
23211
24022
  address?: string | null;
24023
+ address_line1?: string | null;
24024
+ address_line2?: string | null;
24025
+ address_type?: string | null;
24026
+ attention_to?: string | null;
24027
+ bank_account_holder?: string | null;
24028
+ bank_account_number?: string | null;
24029
+ bank_address_line1?: string | null;
24030
+ bank_address_line2?: string | null;
24031
+ bank_bic?: string | null;
24032
+ bank_city?: string | null;
24033
+ bank_country?: string | null;
24034
+ bank_house_number?: string | null;
24035
+ bank_iban?: string | null;
24036
+ bank_name?: string | null;
24037
+ bank_national_code?: string | null;
24038
+ bank_postal_code?: string | null;
24039
+ bank_state?: string | null;
24040
+ billing_email?: string | null;
23212
24041
  bio?: string | null;
23213
24042
  city?: string | null;
24043
+ coc_number?: string | null;
23214
24044
  commercial_name?: string | null;
23215
24045
  company_name: string;
23216
24046
  connection_status?: string;
@@ -23219,21 +24049,28 @@ export declare const upsertLocalAgreement: import("@tanstack/start-client-core")
23219
24049
  created_at?: string;
23220
24050
  custom_fields?: import("../integrations/supabase/types").Json;
23221
24051
  customer_class?: string | null;
24052
+ customer_number?: string | null;
24053
+ discount_days?: number | null;
24054
+ discount_percentage?: number | null;
23222
24055
  email?: string | null;
23223
24056
  external_id?: string | null;
24057
+ fax?: string | null;
23224
24058
  floriday_connection_id?: string | null;
23225
24059
  floriday_organization_id?: string | null;
23226
24060
  floriday_raw?: import("../integrations/supabase/types").Json | null;
23227
24061
  gln?: string | null;
23228
24062
  house_number?: string | null;
24063
+ icp_country_code?: string | null;
23229
24064
  id?: string;
23230
24065
  is_active?: boolean;
24066
+ language?: string | null;
23231
24067
  last_synced_at?: string | null;
23232
24068
  logo_url?: string | null;
23233
24069
  markets?: string[];
23234
24070
  notes?: string | null;
23235
24071
  organization_type?: string | null;
23236
24072
  payment_methods?: string[];
24073
+ payment_term_days?: number | null;
23237
24074
  phone?: string | null;
23238
24075
  postal_code?: string | null;
23239
24076
  product_groups?: string[];
@@ -23244,13 +24081,33 @@ export declare const upsertLocalAgreement: import("@tanstack/start-client-core")
23244
24081
  sync_status?: string;
23245
24082
  trade_forms?: string[];
23246
24083
  updated_at?: string;
24084
+ vat_display?: string | null;
23247
24085
  vat_number?: string | null;
23248
24086
  website?: string | null;
23249
24087
  };
23250
24088
  Update: {
23251
24089
  address?: string | null;
24090
+ address_line1?: string | null;
24091
+ address_line2?: string | null;
24092
+ address_type?: string | null;
24093
+ attention_to?: string | null;
24094
+ bank_account_holder?: string | null;
24095
+ bank_account_number?: string | null;
24096
+ bank_address_line1?: string | null;
24097
+ bank_address_line2?: string | null;
24098
+ bank_bic?: string | null;
24099
+ bank_city?: string | null;
24100
+ bank_country?: string | null;
24101
+ bank_house_number?: string | null;
24102
+ bank_iban?: string | null;
24103
+ bank_name?: string | null;
24104
+ bank_national_code?: string | null;
24105
+ bank_postal_code?: string | null;
24106
+ bank_state?: string | null;
24107
+ billing_email?: string | null;
23252
24108
  bio?: string | null;
23253
24109
  city?: string | null;
24110
+ coc_number?: string | null;
23254
24111
  commercial_name?: string | null;
23255
24112
  company_name?: string;
23256
24113
  connection_status?: string;
@@ -23259,21 +24116,28 @@ export declare const upsertLocalAgreement: import("@tanstack/start-client-core")
23259
24116
  created_at?: string;
23260
24117
  custom_fields?: import("../integrations/supabase/types").Json;
23261
24118
  customer_class?: string | null;
24119
+ customer_number?: string | null;
24120
+ discount_days?: number | null;
24121
+ discount_percentage?: number | null;
23262
24122
  email?: string | null;
23263
24123
  external_id?: string | null;
24124
+ fax?: string | null;
23264
24125
  floriday_connection_id?: string | null;
23265
24126
  floriday_organization_id?: string | null;
23266
24127
  floriday_raw?: import("../integrations/supabase/types").Json | null;
23267
24128
  gln?: string | null;
23268
24129
  house_number?: string | null;
24130
+ icp_country_code?: string | null;
23269
24131
  id?: string;
23270
24132
  is_active?: boolean;
24133
+ language?: string | null;
23271
24134
  last_synced_at?: string | null;
23272
24135
  logo_url?: string | null;
23273
24136
  markets?: string[];
23274
24137
  notes?: string | null;
23275
24138
  organization_type?: string | null;
23276
24139
  payment_methods?: string[];
24140
+ payment_term_days?: number | null;
23277
24141
  phone?: string | null;
23278
24142
  postal_code?: string | null;
23279
24143
  product_groups?: string[];
@@ -23284,6 +24148,7 @@ export declare const upsertLocalAgreement: import("@tanstack/start-client-core")
23284
24148
  sync_status?: string;
23285
24149
  trade_forms?: string[];
23286
24150
  updated_at?: string;
24151
+ vat_display?: string | null;
23287
24152
  vat_number?: string | null;
23288
24153
  website?: string | null;
23289
24154
  };
@@ -25230,6 +26095,54 @@ export declare const upsertLocalAgreement: import("@tanstack/start-client-core")
25230
26095
  referencedColumns: ["id"];
25231
26096
  }];
25232
26097
  };
26098
+ floriday_auto_fulfillment_log: {
26099
+ Row: {
26100
+ attempts: number;
26101
+ connection_id: string;
26102
+ created_at: string;
26103
+ error: string | null;
26104
+ fulfillment_order_id: string | null;
26105
+ id: string;
26106
+ last_attempt_at: string | null;
26107
+ reason: string | null;
26108
+ sales_order_id: string;
26109
+ status: string;
26110
+ updated_at: string;
26111
+ };
26112
+ Insert: {
26113
+ attempts?: number;
26114
+ connection_id: string;
26115
+ created_at?: string;
26116
+ error?: string | null;
26117
+ fulfillment_order_id?: string | null;
26118
+ id?: string;
26119
+ last_attempt_at?: string | null;
26120
+ reason?: string | null;
26121
+ sales_order_id: string;
26122
+ status?: string;
26123
+ updated_at?: string;
26124
+ };
26125
+ Update: {
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
+ Relationships: [{
26139
+ foreignKeyName: "floriday_auto_fulfillment_log_connection_id_fkey";
26140
+ columns: ["connection_id"];
26141
+ isOneToOne: false;
26142
+ referencedRelation: "floriday_connections";
26143
+ referencedColumns: ["id"];
26144
+ }];
26145
+ };
25233
26146
  floriday_base_items_cache: {
25234
26147
  Row: {
25235
26148
  connection_id: string;
@@ -26334,6 +27247,24 @@ export declare const upsertLocalAgreement: import("@tanstack/start-client-core")
26334
27247
  referencedColumns: ["id"];
26335
27248
  }];
26336
27249
  };
27250
+ floriday_rate_limit_state: {
27251
+ Row: {
27252
+ bucket: string;
27253
+ last_refill_at: string;
27254
+ tokens: number;
27255
+ };
27256
+ Insert: {
27257
+ bucket: string;
27258
+ last_refill_at?: string;
27259
+ tokens: number;
27260
+ };
27261
+ Update: {
27262
+ bucket?: string;
27263
+ last_refill_at?: string;
27264
+ tokens?: number;
27265
+ };
27266
+ Relationships: [];
27267
+ };
26337
27268
  floriday_resource_schemas: {
26338
27269
  Row: {
26339
27270
  enums: import("../integrations/supabase/types").Json;
@@ -28768,6 +29699,8 @@ export declare const upsertLocalAgreement: import("@tanstack/start-client-core")
28768
29699
  order_date: string;
28769
29700
  order_number: string;
28770
29701
  order_source: string;
29702
+ plan_locked_at: string | null;
29703
+ plan_locked_ref: string | null;
28771
29704
  status: string;
28772
29705
  total: string;
28773
29706
  updated_at: string;
@@ -28784,6 +29717,8 @@ export declare const upsertLocalAgreement: import("@tanstack/start-client-core")
28784
29717
  order_date?: string;
28785
29718
  order_number: string;
28786
29719
  order_source?: string;
29720
+ plan_locked_at?: string | null;
29721
+ plan_locked_ref?: string | null;
28787
29722
  status?: string;
28788
29723
  total?: string;
28789
29724
  updated_at?: string;
@@ -28800,6 +29735,8 @@ export declare const upsertLocalAgreement: import("@tanstack/start-client-core")
28800
29735
  order_date?: string;
28801
29736
  order_number?: string;
28802
29737
  order_source?: string;
29738
+ plan_locked_at?: string | null;
29739
+ plan_locked_ref?: string | null;
28803
29740
  status?: string;
28804
29741
  total?: string;
28805
29742
  updated_at?: string;
@@ -29168,6 +30105,7 @@ export declare const upsertLocalAgreement: import("@tanstack/start-client-core")
29168
30105
  };
29169
30106
  profiles: {
29170
30107
  Row: {
30108
+ address: string | null;
29171
30109
  created_at: string;
29172
30110
  display_name: string | null;
29173
30111
  email: string | null;
@@ -29178,6 +30116,7 @@ export declare const upsertLocalAgreement: import("@tanstack/start-client-core")
29178
30116
  updated_at: string;
29179
30117
  };
29180
30118
  Insert: {
30119
+ address?: string | null;
29181
30120
  created_at?: string;
29182
30121
  display_name?: string | null;
29183
30122
  email?: string | null;
@@ -29188,6 +30127,7 @@ export declare const upsertLocalAgreement: import("@tanstack/start-client-core")
29188
30127
  updated_at?: string;
29189
30128
  };
29190
30129
  Update: {
30130
+ address?: string | null;
29191
30131
  created_at?: string;
29192
30132
  display_name?: string | null;
29193
30133
  email?: string | null;
@@ -30435,6 +31375,114 @@ export declare const upsertLocalAgreement: import("@tanstack/start-client-core")
30435
31375
  };
30436
31376
  Relationships: [];
30437
31377
  };
31378
+ trade_item_supply_lines: {
31379
+ Row: {
31380
+ available_quantity: number | null;
31381
+ connection_id: string;
31382
+ created_at: string;
31383
+ currency: string | null;
31384
+ endpoint_family: string | null;
31385
+ environment: string | null;
31386
+ id: string;
31387
+ last_error: string | null;
31388
+ last_status: number | null;
31389
+ packing_configuration_id: string | null;
31390
+ period_end: string | null;
31391
+ period_start: string | null;
31392
+ price_per_piece: number | null;
31393
+ sales_unit: string | null;
31394
+ supply_line_id: string | null;
31395
+ supply_type: string;
31396
+ trade_item_id: string;
31397
+ updated_at: string;
31398
+ user_id: string;
31399
+ week: number | null;
31400
+ year: number | null;
31401
+ };
31402
+ Insert: {
31403
+ available_quantity?: number | null;
31404
+ connection_id: string;
31405
+ created_at?: string;
31406
+ currency?: string | null;
31407
+ endpoint_family?: string | null;
31408
+ environment?: string | null;
31409
+ id?: string;
31410
+ last_error?: string | null;
31411
+ last_status?: number | null;
31412
+ packing_configuration_id?: string | null;
31413
+ period_end?: string | null;
31414
+ period_start?: string | null;
31415
+ price_per_piece?: number | null;
31416
+ sales_unit?: string | null;
31417
+ supply_line_id?: string | null;
31418
+ supply_type?: string;
31419
+ trade_item_id: string;
31420
+ updated_at?: string;
31421
+ user_id: string;
31422
+ week?: number | null;
31423
+ year?: number | null;
31424
+ };
31425
+ Update: {
31426
+ available_quantity?: number | null;
31427
+ connection_id?: string;
31428
+ created_at?: string;
31429
+ currency?: string | null;
31430
+ endpoint_family?: string | null;
31431
+ environment?: string | null;
31432
+ id?: string;
31433
+ last_error?: string | null;
31434
+ last_status?: number | null;
31435
+ packing_configuration_id?: string | null;
31436
+ period_end?: string | null;
31437
+ period_start?: string | null;
31438
+ price_per_piece?: number | null;
31439
+ sales_unit?: string | null;
31440
+ supply_line_id?: string | null;
31441
+ supply_type?: string;
31442
+ trade_item_id?: string;
31443
+ updated_at?: string;
31444
+ user_id?: string;
31445
+ week?: number | null;
31446
+ year?: number | null;
31447
+ };
31448
+ Relationships: [];
31449
+ };
31450
+ trade_item_warehouse_preferences: {
31451
+ Row: {
31452
+ connection_id: string;
31453
+ created_at: string;
31454
+ id: string;
31455
+ trade_item_id: string;
31456
+ updated_at: string;
31457
+ warehouse_id: string;
31458
+ warehouse_name: string | null;
31459
+ };
31460
+ Insert: {
31461
+ connection_id: string;
31462
+ created_at?: string;
31463
+ id?: string;
31464
+ trade_item_id: string;
31465
+ updated_at?: string;
31466
+ warehouse_id: string;
31467
+ warehouse_name?: string | null;
31468
+ };
31469
+ Update: {
31470
+ connection_id?: string;
31471
+ created_at?: string;
31472
+ id?: string;
31473
+ trade_item_id?: string;
31474
+ updated_at?: string;
31475
+ warehouse_id?: string;
31476
+ warehouse_name?: string | null;
31477
+ };
31478
+ Relationships: [{
31479
+ foreignKeyName: "trade_item_warehouse_preferences_connection_id_fkey";
31480
+ columns: ["connection_id"];
31481
+ isOneToOne: false;
31482
+ referencedRelation: "floriday_connections";
31483
+ referencedColumns: ["id"];
31484
+ }];
31485
+ };
30438
31486
  twinfield_connections: {
30439
31487
  Row: {
30440
31488
  access_token: string | null;
@@ -32120,7 +33168,19 @@ export declare const upsertLocalAgreement: import("@tanstack/start-client-core")
32120
33168
  };
32121
33169
  cleanup_old_bookings: {
32122
33170
  Args: never;
32123
- Returns: number;
33171
+ Returns: undefined;
33172
+ };
33173
+ consume_floriday_rate_limit: {
33174
+ Args: {
33175
+ p_bucket: string;
33176
+ p_capacity: number;
33177
+ p_cost?: number;
33178
+ p_refill_per_sec: number;
33179
+ };
33180
+ Returns: {
33181
+ granted: boolean;
33182
+ wait_ms: number;
33183
+ }[];
32124
33184
  };
32125
33185
  control_get_todays_carts: {
32126
33186
  Args: never;
@@ -32202,6 +33262,12 @@ export declare const upsertLocalAgreement: import("@tanstack/start-client-core")
32202
33262
  status: string;
32203
33263
  }[];
32204
33264
  };
33265
+ enqueue_cart_replan_if_unlocked: {
33266
+ Args: {
33267
+ p_order_id: string;
33268
+ };
33269
+ Returns: undefined;
33270
+ };
32205
33271
  ensure_trade_item_stock_row: {
32206
33272
  Args: {
32207
33273
  p_key: string;
@@ -32595,6 +33661,24 @@ export declare const upsertLocalAgreement: import("@tanstack/start-client-core")
32595
33661
  };
32596
33662
  Returns: undefined;
32597
33663
  };
33664
+ recompute_order_status: {
33665
+ Args: {
33666
+ p_order_id: string;
33667
+ };
33668
+ Returns: undefined;
33669
+ };
33670
+ recompute_reserved_for_order: {
33671
+ Args: {
33672
+ p_order_id: string;
33673
+ };
33674
+ Returns: undefined;
33675
+ };
33676
+ recompute_reserved_stock: {
33677
+ Args: {
33678
+ p_trade_item_key: string;
33679
+ };
33680
+ Returns: undefined;
33681
+ };
32598
33682
  refresh_external_customers_grouped: {
32599
33683
  Args: never;
32600
33684
  Returns: undefined;
@@ -32909,6 +33993,24 @@ export declare const upsertLocalAgreement: import("@tanstack/start-client-core")
32909
33993
  };
32910
33994
  Returns: string[];
32911
33995
  };
33996
+ sync_cached_packing_from_product: {
33997
+ Args: {
33998
+ p_product_id: string;
33999
+ };
34000
+ Returns: undefined;
34001
+ };
34002
+ sync_order_cart_item_packing_from_product: {
34003
+ Args: {
34004
+ p_product_id: string;
34005
+ };
34006
+ Returns: undefined;
34007
+ };
34008
+ sync_product_packing_from_floriday_cache: {
34009
+ Args: {
34010
+ p_floriday_id: string;
34011
+ };
34012
+ Returns: undefined;
34013
+ };
32912
34014
  twinfield_decrypt: {
32913
34015
  Args: {
32914
34016
  cipher: string;
@@ -32921,6 +34023,17 @@ export declare const upsertLocalAgreement: import("@tanstack/start-client-core")
32921
34023
  };
32922
34024
  Returns: string;
32923
34025
  };
34026
+ upsert_auto_fulfillment_log: {
34027
+ Args: {
34028
+ p_connection_id: string;
34029
+ p_error?: string;
34030
+ p_fulfillment_order_id?: string;
34031
+ p_reason?: string;
34032
+ p_sales_order_id: string;
34033
+ p_status: string;
34034
+ };
34035
+ Returns: undefined;
34036
+ };
32924
34037
  };
32925
34038
  Enums: {
32926
34039
  app_role: "admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie" | "monteur";
@@ -32968,6 +34081,8 @@ export declare const upsertLocalSalesStrategy: import("@tanstack/start-client-co
32968
34081
  Tables: {
32969
34082
  afhandeling_settings: {
32970
34083
  Row: {
34084
+ auto_print_delivery_note: boolean;
34085
+ auto_process_paused: boolean;
32971
34086
  created_at: string;
32972
34087
  extra_pick_days_with_stickers: number;
32973
34088
  id: string;
@@ -32983,6 +34098,8 @@ export declare const upsertLocalSalesStrategy: import("@tanstack/start-client-co
32983
34098
  user_id: string;
32984
34099
  };
32985
34100
  Insert: {
34101
+ auto_print_delivery_note?: boolean;
34102
+ auto_process_paused?: boolean;
32986
34103
  created_at?: string;
32987
34104
  extra_pick_days_with_stickers?: number;
32988
34105
  id?: string;
@@ -32998,6 +34115,8 @@ export declare const upsertLocalSalesStrategy: import("@tanstack/start-client-co
32998
34115
  user_id: string;
32999
34116
  };
33000
34117
  Update: {
34118
+ auto_print_delivery_note?: boolean;
34119
+ auto_process_paused?: boolean;
33001
34120
  created_at?: string;
33002
34121
  extra_pick_days_with_stickers?: number;
33003
34122
  id?: string;
@@ -33230,6 +34349,9 @@ export declare const upsertLocalSalesStrategy: import("@tanstack/start-client-co
33230
34349
  created_at: string;
33231
34350
  extra_id: string;
33232
34351
  id: string;
34352
+ original_unit_price: number | null;
34353
+ override_reason: string | null;
34354
+ override_unit_price: number | null;
33233
34355
  quantity: number;
33234
34356
  total_price: number;
33235
34357
  unit_price: number;
@@ -33239,6 +34361,9 @@ export declare const upsertLocalSalesStrategy: import("@tanstack/start-client-co
33239
34361
  created_at?: string;
33240
34362
  extra_id: string;
33241
34363
  id?: string;
34364
+ original_unit_price?: number | null;
34365
+ override_reason?: string | null;
34366
+ override_unit_price?: number | null;
33242
34367
  quantity?: number;
33243
34368
  total_price?: number;
33244
34369
  unit_price?: number;
@@ -33248,6 +34373,9 @@ export declare const upsertLocalSalesStrategy: import("@tanstack/start-client-co
33248
34373
  created_at?: string;
33249
34374
  extra_id?: string;
33250
34375
  id?: string;
34376
+ original_unit_price?: number | null;
34377
+ override_reason?: string | null;
34378
+ override_unit_price?: number | null;
33251
34379
  quantity?: number;
33252
34380
  total_price?: number;
33253
34381
  unit_price?: number;
@@ -33268,11 +34396,15 @@ export declare const upsertLocalSalesStrategy: import("@tanstack/start-client-co
33268
34396
  };
33269
34397
  bookings: {
33270
34398
  Row: {
34399
+ archive_reason: string | null;
34400
+ archived_at: string | null;
34401
+ archived_by: string | null;
33271
34402
  company_name: string | null;
33272
34403
  conflict_checked_at: string | null;
33273
34404
  conflict_reason: string | null;
33274
34405
  created_at: string;
33275
34406
  created_by_role: string | null;
34407
+ customer_address: string | null;
33276
34408
  customer_email: string | null;
33277
34409
  customer_name: string | null;
33278
34410
  end_time: string;
@@ -33284,7 +34416,12 @@ export declare const upsertLocalSalesStrategy: import("@tanstack/start-client-co
33284
34416
  invoiced_at: string | null;
33285
34417
  notes: string | null;
33286
34418
  number_of_people: number;
34419
+ overridden_at: string | null;
34420
+ overridden_by: string | null;
34421
+ override_reason: string | null;
34422
+ price_override: boolean;
33287
34423
  room_id: string;
34424
+ room_price_override: number | null;
33288
34425
  start_time: string;
33289
34426
  status: string;
33290
34427
  total_excl_vat: number | null;
@@ -33293,11 +34430,15 @@ export declare const upsertLocalSalesStrategy: import("@tanstack/start-client-co
33293
34430
  vat_amount: number | null;
33294
34431
  };
33295
34432
  Insert: {
34433
+ archive_reason?: string | null;
34434
+ archived_at?: string | null;
34435
+ archived_by?: string | null;
33296
34436
  company_name?: string | null;
33297
34437
  conflict_checked_at?: string | null;
33298
34438
  conflict_reason?: string | null;
33299
34439
  created_at?: string;
33300
34440
  created_by_role?: string | null;
34441
+ customer_address?: string | null;
33301
34442
  customer_email?: string | null;
33302
34443
  customer_name?: string | null;
33303
34444
  end_time: string;
@@ -33309,7 +34450,12 @@ export declare const upsertLocalSalesStrategy: import("@tanstack/start-client-co
33309
34450
  invoiced_at?: string | null;
33310
34451
  notes?: string | null;
33311
34452
  number_of_people?: number;
34453
+ overridden_at?: string | null;
34454
+ overridden_by?: string | null;
34455
+ override_reason?: string | null;
34456
+ price_override?: boolean;
33312
34457
  room_id: string;
34458
+ room_price_override?: number | null;
33313
34459
  start_time: string;
33314
34460
  status?: string;
33315
34461
  total_excl_vat?: number | null;
@@ -33318,11 +34464,15 @@ export declare const upsertLocalSalesStrategy: import("@tanstack/start-client-co
33318
34464
  vat_amount?: number | null;
33319
34465
  };
33320
34466
  Update: {
34467
+ archive_reason?: string | null;
34468
+ archived_at?: string | null;
34469
+ archived_by?: string | null;
33321
34470
  company_name?: string | null;
33322
34471
  conflict_checked_at?: string | null;
33323
34472
  conflict_reason?: string | null;
33324
34473
  created_at?: string;
33325
34474
  created_by_role?: string | null;
34475
+ customer_address?: string | null;
33326
34476
  customer_email?: string | null;
33327
34477
  customer_name?: string | null;
33328
34478
  end_time?: string;
@@ -33334,7 +34484,12 @@ export declare const upsertLocalSalesStrategy: import("@tanstack/start-client-co
33334
34484
  invoiced_at?: string | null;
33335
34485
  notes?: string | null;
33336
34486
  number_of_people?: number;
34487
+ overridden_at?: string | null;
34488
+ overridden_by?: string | null;
34489
+ override_reason?: string | null;
34490
+ price_override?: boolean;
33337
34491
  room_id?: string;
34492
+ room_price_override?: number | null;
33338
34493
  start_time?: string;
33339
34494
  status?: string;
33340
34495
  total_excl_vat?: number | null;
@@ -34163,8 +35318,27 @@ export declare const upsertLocalSalesStrategy: import("@tanstack/start-client-co
34163
35318
  customers: {
34164
35319
  Row: {
34165
35320
  address: string | null;
35321
+ address_line1: string | null;
35322
+ address_line2: string | null;
35323
+ address_type: string | null;
35324
+ attention_to: string | null;
35325
+ bank_account_holder: string | null;
35326
+ bank_account_number: string | null;
35327
+ bank_address_line1: string | null;
35328
+ bank_address_line2: string | null;
35329
+ bank_bic: string | null;
35330
+ bank_city: string | null;
35331
+ bank_country: string | null;
35332
+ bank_house_number: string | null;
35333
+ bank_iban: string | null;
35334
+ bank_name: string | null;
35335
+ bank_national_code: string | null;
35336
+ bank_postal_code: string | null;
35337
+ bank_state: string | null;
35338
+ billing_email: string | null;
34166
35339
  bio: string | null;
34167
35340
  city: string | null;
35341
+ coc_number: string | null;
34168
35342
  commercial_name: string | null;
34169
35343
  company_name: string;
34170
35344
  connection_status: string;
@@ -34173,21 +35347,28 @@ export declare const upsertLocalSalesStrategy: import("@tanstack/start-client-co
34173
35347
  created_at: string;
34174
35348
  custom_fields: import("../integrations/supabase/types").Json;
34175
35349
  customer_class: string | null;
35350
+ customer_number: string | null;
35351
+ discount_days: number | null;
35352
+ discount_percentage: number | null;
34176
35353
  email: string | null;
34177
35354
  external_id: string | null;
35355
+ fax: string | null;
34178
35356
  floriday_connection_id: string | null;
34179
35357
  floriday_organization_id: string | null;
34180
35358
  floriday_raw: import("../integrations/supabase/types").Json | null;
34181
35359
  gln: string | null;
34182
35360
  house_number: string | null;
35361
+ icp_country_code: string | null;
34183
35362
  id: string;
34184
35363
  is_active: boolean;
35364
+ language: string | null;
34185
35365
  last_synced_at: string | null;
34186
35366
  logo_url: string | null;
34187
35367
  markets: string[];
34188
35368
  notes: string | null;
34189
35369
  organization_type: string | null;
34190
35370
  payment_methods: string[];
35371
+ payment_term_days: number | null;
34191
35372
  phone: string | null;
34192
35373
  postal_code: string | null;
34193
35374
  product_groups: string[];
@@ -34198,13 +35379,33 @@ export declare const upsertLocalSalesStrategy: import("@tanstack/start-client-co
34198
35379
  sync_status: string;
34199
35380
  trade_forms: string[];
34200
35381
  updated_at: string;
35382
+ vat_display: string | null;
34201
35383
  vat_number: string | null;
34202
35384
  website: string | null;
34203
35385
  };
34204
35386
  Insert: {
34205
35387
  address?: string | null;
35388
+ address_line1?: string | null;
35389
+ address_line2?: string | null;
35390
+ address_type?: string | null;
35391
+ attention_to?: string | null;
35392
+ bank_account_holder?: string | null;
35393
+ bank_account_number?: string | null;
35394
+ bank_address_line1?: string | null;
35395
+ bank_address_line2?: string | null;
35396
+ bank_bic?: string | null;
35397
+ bank_city?: string | null;
35398
+ bank_country?: string | null;
35399
+ bank_house_number?: string | null;
35400
+ bank_iban?: string | null;
35401
+ bank_name?: string | null;
35402
+ bank_national_code?: string | null;
35403
+ bank_postal_code?: string | null;
35404
+ bank_state?: string | null;
35405
+ billing_email?: string | null;
34206
35406
  bio?: string | null;
34207
35407
  city?: string | null;
35408
+ coc_number?: string | null;
34208
35409
  commercial_name?: string | null;
34209
35410
  company_name: string;
34210
35411
  connection_status?: string;
@@ -34213,21 +35414,28 @@ export declare const upsertLocalSalesStrategy: import("@tanstack/start-client-co
34213
35414
  created_at?: string;
34214
35415
  custom_fields?: import("../integrations/supabase/types").Json;
34215
35416
  customer_class?: string | null;
35417
+ customer_number?: string | null;
35418
+ discount_days?: number | null;
35419
+ discount_percentage?: number | null;
34216
35420
  email?: string | null;
34217
35421
  external_id?: string | null;
35422
+ fax?: string | null;
34218
35423
  floriday_connection_id?: string | null;
34219
35424
  floriday_organization_id?: string | null;
34220
35425
  floriday_raw?: import("../integrations/supabase/types").Json | null;
34221
35426
  gln?: string | null;
34222
35427
  house_number?: string | null;
35428
+ icp_country_code?: string | null;
34223
35429
  id?: string;
34224
35430
  is_active?: boolean;
35431
+ language?: string | null;
34225
35432
  last_synced_at?: string | null;
34226
35433
  logo_url?: string | null;
34227
35434
  markets?: string[];
34228
35435
  notes?: string | null;
34229
35436
  organization_type?: string | null;
34230
35437
  payment_methods?: string[];
35438
+ payment_term_days?: number | null;
34231
35439
  phone?: string | null;
34232
35440
  postal_code?: string | null;
34233
35441
  product_groups?: string[];
@@ -34238,13 +35446,33 @@ export declare const upsertLocalSalesStrategy: import("@tanstack/start-client-co
34238
35446
  sync_status?: string;
34239
35447
  trade_forms?: string[];
34240
35448
  updated_at?: string;
35449
+ vat_display?: string | null;
34241
35450
  vat_number?: string | null;
34242
35451
  website?: string | null;
34243
35452
  };
34244
35453
  Update: {
34245
35454
  address?: string | null;
35455
+ address_line1?: string | null;
35456
+ address_line2?: string | null;
35457
+ address_type?: string | null;
35458
+ attention_to?: string | null;
35459
+ bank_account_holder?: string | null;
35460
+ bank_account_number?: string | null;
35461
+ bank_address_line1?: string | null;
35462
+ bank_address_line2?: string | null;
35463
+ bank_bic?: string | null;
35464
+ bank_city?: string | null;
35465
+ bank_country?: string | null;
35466
+ bank_house_number?: string | null;
35467
+ bank_iban?: string | null;
35468
+ bank_name?: string | null;
35469
+ bank_national_code?: string | null;
35470
+ bank_postal_code?: string | null;
35471
+ bank_state?: string | null;
35472
+ billing_email?: string | null;
34246
35473
  bio?: string | null;
34247
35474
  city?: string | null;
35475
+ coc_number?: string | null;
34248
35476
  commercial_name?: string | null;
34249
35477
  company_name?: string;
34250
35478
  connection_status?: string;
@@ -34253,21 +35481,28 @@ export declare const upsertLocalSalesStrategy: import("@tanstack/start-client-co
34253
35481
  created_at?: string;
34254
35482
  custom_fields?: import("../integrations/supabase/types").Json;
34255
35483
  customer_class?: string | null;
35484
+ customer_number?: string | null;
35485
+ discount_days?: number | null;
35486
+ discount_percentage?: number | null;
34256
35487
  email?: string | null;
34257
35488
  external_id?: string | null;
35489
+ fax?: string | null;
34258
35490
  floriday_connection_id?: string | null;
34259
35491
  floriday_organization_id?: string | null;
34260
35492
  floriday_raw?: import("../integrations/supabase/types").Json | null;
34261
35493
  gln?: string | null;
34262
35494
  house_number?: string | null;
35495
+ icp_country_code?: string | null;
34263
35496
  id?: string;
34264
35497
  is_active?: boolean;
35498
+ language?: string | null;
34265
35499
  last_synced_at?: string | null;
34266
35500
  logo_url?: string | null;
34267
35501
  markets?: string[];
34268
35502
  notes?: string | null;
34269
35503
  organization_type?: string | null;
34270
35504
  payment_methods?: string[];
35505
+ payment_term_days?: number | null;
34271
35506
  phone?: string | null;
34272
35507
  postal_code?: string | null;
34273
35508
  product_groups?: string[];
@@ -34278,6 +35513,7 @@ export declare const upsertLocalSalesStrategy: import("@tanstack/start-client-co
34278
35513
  sync_status?: string;
34279
35514
  trade_forms?: string[];
34280
35515
  updated_at?: string;
35516
+ vat_display?: string | null;
34281
35517
  vat_number?: string | null;
34282
35518
  website?: string | null;
34283
35519
  };
@@ -36224,6 +37460,54 @@ export declare const upsertLocalSalesStrategy: import("@tanstack/start-client-co
36224
37460
  referencedColumns: ["id"];
36225
37461
  }];
36226
37462
  };
37463
+ floriday_auto_fulfillment_log: {
37464
+ Row: {
37465
+ attempts: number;
37466
+ connection_id: string;
37467
+ created_at: string;
37468
+ error: string | null;
37469
+ fulfillment_order_id: string | null;
37470
+ id: string;
37471
+ last_attempt_at: string | null;
37472
+ reason: string | null;
37473
+ sales_order_id: string;
37474
+ status: string;
37475
+ updated_at: string;
37476
+ };
37477
+ Insert: {
37478
+ attempts?: number;
37479
+ connection_id: string;
37480
+ created_at?: string;
37481
+ error?: string | null;
37482
+ fulfillment_order_id?: string | null;
37483
+ id?: string;
37484
+ last_attempt_at?: string | null;
37485
+ reason?: string | null;
37486
+ sales_order_id: string;
37487
+ status?: string;
37488
+ updated_at?: string;
37489
+ };
37490
+ Update: {
37491
+ attempts?: number;
37492
+ connection_id?: string;
37493
+ created_at?: string;
37494
+ error?: string | null;
37495
+ fulfillment_order_id?: string | null;
37496
+ id?: string;
37497
+ last_attempt_at?: string | null;
37498
+ reason?: string | null;
37499
+ sales_order_id?: string;
37500
+ status?: string;
37501
+ updated_at?: string;
37502
+ };
37503
+ Relationships: [{
37504
+ foreignKeyName: "floriday_auto_fulfillment_log_connection_id_fkey";
37505
+ columns: ["connection_id"];
37506
+ isOneToOne: false;
37507
+ referencedRelation: "floriday_connections";
37508
+ referencedColumns: ["id"];
37509
+ }];
37510
+ };
36227
37511
  floriday_base_items_cache: {
36228
37512
  Row: {
36229
37513
  connection_id: string;
@@ -37328,6 +38612,24 @@ export declare const upsertLocalSalesStrategy: import("@tanstack/start-client-co
37328
38612
  referencedColumns: ["id"];
37329
38613
  }];
37330
38614
  };
38615
+ floriday_rate_limit_state: {
38616
+ Row: {
38617
+ bucket: string;
38618
+ last_refill_at: string;
38619
+ tokens: number;
38620
+ };
38621
+ Insert: {
38622
+ bucket: string;
38623
+ last_refill_at?: string;
38624
+ tokens: number;
38625
+ };
38626
+ Update: {
38627
+ bucket?: string;
38628
+ last_refill_at?: string;
38629
+ tokens?: number;
38630
+ };
38631
+ Relationships: [];
38632
+ };
37331
38633
  floriday_resource_schemas: {
37332
38634
  Row: {
37333
38635
  enums: import("../integrations/supabase/types").Json;
@@ -39762,6 +41064,8 @@ export declare const upsertLocalSalesStrategy: import("@tanstack/start-client-co
39762
41064
  order_date: string;
39763
41065
  order_number: string;
39764
41066
  order_source: string;
41067
+ plan_locked_at: string | null;
41068
+ plan_locked_ref: string | null;
39765
41069
  status: string;
39766
41070
  total: string;
39767
41071
  updated_at: string;
@@ -39778,6 +41082,8 @@ export declare const upsertLocalSalesStrategy: import("@tanstack/start-client-co
39778
41082
  order_date?: string;
39779
41083
  order_number: string;
39780
41084
  order_source?: string;
41085
+ plan_locked_at?: string | null;
41086
+ plan_locked_ref?: string | null;
39781
41087
  status?: string;
39782
41088
  total?: string;
39783
41089
  updated_at?: string;
@@ -39794,6 +41100,8 @@ export declare const upsertLocalSalesStrategy: import("@tanstack/start-client-co
39794
41100
  order_date?: string;
39795
41101
  order_number?: string;
39796
41102
  order_source?: string;
41103
+ plan_locked_at?: string | null;
41104
+ plan_locked_ref?: string | null;
39797
41105
  status?: string;
39798
41106
  total?: string;
39799
41107
  updated_at?: string;
@@ -40162,6 +41470,7 @@ export declare const upsertLocalSalesStrategy: import("@tanstack/start-client-co
40162
41470
  };
40163
41471
  profiles: {
40164
41472
  Row: {
41473
+ address: string | null;
40165
41474
  created_at: string;
40166
41475
  display_name: string | null;
40167
41476
  email: string | null;
@@ -40172,6 +41481,7 @@ export declare const upsertLocalSalesStrategy: import("@tanstack/start-client-co
40172
41481
  updated_at: string;
40173
41482
  };
40174
41483
  Insert: {
41484
+ address?: string | null;
40175
41485
  created_at?: string;
40176
41486
  display_name?: string | null;
40177
41487
  email?: string | null;
@@ -40182,6 +41492,7 @@ export declare const upsertLocalSalesStrategy: import("@tanstack/start-client-co
40182
41492
  updated_at?: string;
40183
41493
  };
40184
41494
  Update: {
41495
+ address?: string | null;
40185
41496
  created_at?: string;
40186
41497
  display_name?: string | null;
40187
41498
  email?: string | null;
@@ -41429,6 +42740,114 @@ export declare const upsertLocalSalesStrategy: import("@tanstack/start-client-co
41429
42740
  };
41430
42741
  Relationships: [];
41431
42742
  };
42743
+ trade_item_supply_lines: {
42744
+ Row: {
42745
+ available_quantity: number | null;
42746
+ connection_id: string;
42747
+ created_at: string;
42748
+ currency: string | null;
42749
+ endpoint_family: string | null;
42750
+ environment: string | null;
42751
+ id: string;
42752
+ last_error: string | null;
42753
+ last_status: number | null;
42754
+ packing_configuration_id: string | null;
42755
+ period_end: string | null;
42756
+ period_start: string | null;
42757
+ price_per_piece: number | null;
42758
+ sales_unit: string | null;
42759
+ supply_line_id: string | null;
42760
+ supply_type: string;
42761
+ trade_item_id: string;
42762
+ updated_at: string;
42763
+ user_id: string;
42764
+ week: number | null;
42765
+ year: number | null;
42766
+ };
42767
+ Insert: {
42768
+ available_quantity?: number | null;
42769
+ connection_id: string;
42770
+ created_at?: string;
42771
+ currency?: string | null;
42772
+ endpoint_family?: string | null;
42773
+ environment?: string | null;
42774
+ id?: string;
42775
+ last_error?: string | null;
42776
+ last_status?: number | null;
42777
+ packing_configuration_id?: string | null;
42778
+ period_end?: string | null;
42779
+ period_start?: string | null;
42780
+ price_per_piece?: number | null;
42781
+ sales_unit?: string | null;
42782
+ supply_line_id?: string | null;
42783
+ supply_type?: string;
42784
+ trade_item_id: string;
42785
+ updated_at?: string;
42786
+ user_id: string;
42787
+ week?: number | null;
42788
+ year?: number | null;
42789
+ };
42790
+ Update: {
42791
+ available_quantity?: number | null;
42792
+ connection_id?: string;
42793
+ created_at?: string;
42794
+ currency?: string | null;
42795
+ endpoint_family?: string | null;
42796
+ environment?: string | null;
42797
+ id?: string;
42798
+ last_error?: string | null;
42799
+ last_status?: number | null;
42800
+ packing_configuration_id?: string | null;
42801
+ period_end?: string | null;
42802
+ period_start?: string | null;
42803
+ price_per_piece?: number | null;
42804
+ sales_unit?: string | null;
42805
+ supply_line_id?: string | null;
42806
+ supply_type?: string;
42807
+ trade_item_id?: string;
42808
+ updated_at?: string;
42809
+ user_id?: string;
42810
+ week?: number | null;
42811
+ year?: number | null;
42812
+ };
42813
+ Relationships: [];
42814
+ };
42815
+ trade_item_warehouse_preferences: {
42816
+ Row: {
42817
+ connection_id: string;
42818
+ created_at: string;
42819
+ id: string;
42820
+ trade_item_id: string;
42821
+ updated_at: string;
42822
+ warehouse_id: string;
42823
+ warehouse_name: string | null;
42824
+ };
42825
+ Insert: {
42826
+ connection_id: string;
42827
+ created_at?: string;
42828
+ id?: string;
42829
+ trade_item_id: string;
42830
+ updated_at?: string;
42831
+ warehouse_id: string;
42832
+ warehouse_name?: string | null;
42833
+ };
42834
+ Update: {
42835
+ connection_id?: string;
42836
+ created_at?: string;
42837
+ id?: string;
42838
+ trade_item_id?: string;
42839
+ updated_at?: string;
42840
+ warehouse_id?: string;
42841
+ warehouse_name?: string | null;
42842
+ };
42843
+ Relationships: [{
42844
+ foreignKeyName: "trade_item_warehouse_preferences_connection_id_fkey";
42845
+ columns: ["connection_id"];
42846
+ isOneToOne: false;
42847
+ referencedRelation: "floriday_connections";
42848
+ referencedColumns: ["id"];
42849
+ }];
42850
+ };
41432
42851
  twinfield_connections: {
41433
42852
  Row: {
41434
42853
  access_token: string | null;
@@ -43114,7 +44533,19 @@ export declare const upsertLocalSalesStrategy: import("@tanstack/start-client-co
43114
44533
  };
43115
44534
  cleanup_old_bookings: {
43116
44535
  Args: never;
43117
- Returns: number;
44536
+ Returns: undefined;
44537
+ };
44538
+ consume_floriday_rate_limit: {
44539
+ Args: {
44540
+ p_bucket: string;
44541
+ p_capacity: number;
44542
+ p_cost?: number;
44543
+ p_refill_per_sec: number;
44544
+ };
44545
+ Returns: {
44546
+ granted: boolean;
44547
+ wait_ms: number;
44548
+ }[];
43118
44549
  };
43119
44550
  control_get_todays_carts: {
43120
44551
  Args: never;
@@ -43196,6 +44627,12 @@ export declare const upsertLocalSalesStrategy: import("@tanstack/start-client-co
43196
44627
  status: string;
43197
44628
  }[];
43198
44629
  };
44630
+ enqueue_cart_replan_if_unlocked: {
44631
+ Args: {
44632
+ p_order_id: string;
44633
+ };
44634
+ Returns: undefined;
44635
+ };
43199
44636
  ensure_trade_item_stock_row: {
43200
44637
  Args: {
43201
44638
  p_key: string;
@@ -43589,6 +45026,24 @@ export declare const upsertLocalSalesStrategy: import("@tanstack/start-client-co
43589
45026
  };
43590
45027
  Returns: undefined;
43591
45028
  };
45029
+ recompute_order_status: {
45030
+ Args: {
45031
+ p_order_id: string;
45032
+ };
45033
+ Returns: undefined;
45034
+ };
45035
+ recompute_reserved_for_order: {
45036
+ Args: {
45037
+ p_order_id: string;
45038
+ };
45039
+ Returns: undefined;
45040
+ };
45041
+ recompute_reserved_stock: {
45042
+ Args: {
45043
+ p_trade_item_key: string;
45044
+ };
45045
+ Returns: undefined;
45046
+ };
43592
45047
  refresh_external_customers_grouped: {
43593
45048
  Args: never;
43594
45049
  Returns: undefined;
@@ -43903,6 +45358,24 @@ export declare const upsertLocalSalesStrategy: import("@tanstack/start-client-co
43903
45358
  };
43904
45359
  Returns: string[];
43905
45360
  };
45361
+ sync_cached_packing_from_product: {
45362
+ Args: {
45363
+ p_product_id: string;
45364
+ };
45365
+ Returns: undefined;
45366
+ };
45367
+ sync_order_cart_item_packing_from_product: {
45368
+ Args: {
45369
+ p_product_id: string;
45370
+ };
45371
+ Returns: undefined;
45372
+ };
45373
+ sync_product_packing_from_floriday_cache: {
45374
+ Args: {
45375
+ p_floriday_id: string;
45376
+ };
45377
+ Returns: undefined;
45378
+ };
43906
45379
  twinfield_decrypt: {
43907
45380
  Args: {
43908
45381
  cipher: string;
@@ -43915,6 +45388,17 @@ export declare const upsertLocalSalesStrategy: import("@tanstack/start-client-co
43915
45388
  };
43916
45389
  Returns: string;
43917
45390
  };
45391
+ upsert_auto_fulfillment_log: {
45392
+ Args: {
45393
+ p_connection_id: string;
45394
+ p_error?: string;
45395
+ p_fulfillment_order_id?: string;
45396
+ p_reason?: string;
45397
+ p_sales_order_id: string;
45398
+ p_status: string;
45399
+ };
45400
+ Returns: undefined;
45401
+ };
43918
45402
  };
43919
45403
  Enums: {
43920
45404
  app_role: "admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie" | "monteur";
@@ -43962,6 +45446,8 @@ export declare const upsertLocalPriceGroup: import("@tanstack/start-client-core"
43962
45446
  Tables: {
43963
45447
  afhandeling_settings: {
43964
45448
  Row: {
45449
+ auto_print_delivery_note: boolean;
45450
+ auto_process_paused: boolean;
43965
45451
  created_at: string;
43966
45452
  extra_pick_days_with_stickers: number;
43967
45453
  id: string;
@@ -43977,6 +45463,8 @@ export declare const upsertLocalPriceGroup: import("@tanstack/start-client-core"
43977
45463
  user_id: string;
43978
45464
  };
43979
45465
  Insert: {
45466
+ auto_print_delivery_note?: boolean;
45467
+ auto_process_paused?: boolean;
43980
45468
  created_at?: string;
43981
45469
  extra_pick_days_with_stickers?: number;
43982
45470
  id?: string;
@@ -43992,6 +45480,8 @@ export declare const upsertLocalPriceGroup: import("@tanstack/start-client-core"
43992
45480
  user_id: string;
43993
45481
  };
43994
45482
  Update: {
45483
+ auto_print_delivery_note?: boolean;
45484
+ auto_process_paused?: boolean;
43995
45485
  created_at?: string;
43996
45486
  extra_pick_days_with_stickers?: number;
43997
45487
  id?: string;
@@ -44224,6 +45714,9 @@ export declare const upsertLocalPriceGroup: import("@tanstack/start-client-core"
44224
45714
  created_at: string;
44225
45715
  extra_id: string;
44226
45716
  id: string;
45717
+ original_unit_price: number | null;
45718
+ override_reason: string | null;
45719
+ override_unit_price: number | null;
44227
45720
  quantity: number;
44228
45721
  total_price: number;
44229
45722
  unit_price: number;
@@ -44233,6 +45726,9 @@ export declare const upsertLocalPriceGroup: import("@tanstack/start-client-core"
44233
45726
  created_at?: string;
44234
45727
  extra_id: string;
44235
45728
  id?: string;
45729
+ original_unit_price?: number | null;
45730
+ override_reason?: string | null;
45731
+ override_unit_price?: number | null;
44236
45732
  quantity?: number;
44237
45733
  total_price?: number;
44238
45734
  unit_price?: number;
@@ -44242,6 +45738,9 @@ export declare const upsertLocalPriceGroup: import("@tanstack/start-client-core"
44242
45738
  created_at?: string;
44243
45739
  extra_id?: string;
44244
45740
  id?: string;
45741
+ original_unit_price?: number | null;
45742
+ override_reason?: string | null;
45743
+ override_unit_price?: number | null;
44245
45744
  quantity?: number;
44246
45745
  total_price?: number;
44247
45746
  unit_price?: number;
@@ -44262,11 +45761,15 @@ export declare const upsertLocalPriceGroup: import("@tanstack/start-client-core"
44262
45761
  };
44263
45762
  bookings: {
44264
45763
  Row: {
45764
+ archive_reason: string | null;
45765
+ archived_at: string | null;
45766
+ archived_by: string | null;
44265
45767
  company_name: string | null;
44266
45768
  conflict_checked_at: string | null;
44267
45769
  conflict_reason: string | null;
44268
45770
  created_at: string;
44269
45771
  created_by_role: string | null;
45772
+ customer_address: string | null;
44270
45773
  customer_email: string | null;
44271
45774
  customer_name: string | null;
44272
45775
  end_time: string;
@@ -44278,7 +45781,12 @@ export declare const upsertLocalPriceGroup: import("@tanstack/start-client-core"
44278
45781
  invoiced_at: string | null;
44279
45782
  notes: string | null;
44280
45783
  number_of_people: number;
45784
+ overridden_at: string | null;
45785
+ overridden_by: string | null;
45786
+ override_reason: string | null;
45787
+ price_override: boolean;
44281
45788
  room_id: string;
45789
+ room_price_override: number | null;
44282
45790
  start_time: string;
44283
45791
  status: string;
44284
45792
  total_excl_vat: number | null;
@@ -44287,11 +45795,15 @@ export declare const upsertLocalPriceGroup: import("@tanstack/start-client-core"
44287
45795
  vat_amount: number | null;
44288
45796
  };
44289
45797
  Insert: {
45798
+ archive_reason?: string | null;
45799
+ archived_at?: string | null;
45800
+ archived_by?: string | null;
44290
45801
  company_name?: string | null;
44291
45802
  conflict_checked_at?: string | null;
44292
45803
  conflict_reason?: string | null;
44293
45804
  created_at?: string;
44294
45805
  created_by_role?: string | null;
45806
+ customer_address?: string | null;
44295
45807
  customer_email?: string | null;
44296
45808
  customer_name?: string | null;
44297
45809
  end_time: string;
@@ -44303,7 +45815,12 @@ export declare const upsertLocalPriceGroup: import("@tanstack/start-client-core"
44303
45815
  invoiced_at?: string | null;
44304
45816
  notes?: string | null;
44305
45817
  number_of_people?: number;
45818
+ overridden_at?: string | null;
45819
+ overridden_by?: string | null;
45820
+ override_reason?: string | null;
45821
+ price_override?: boolean;
44306
45822
  room_id: string;
45823
+ room_price_override?: number | null;
44307
45824
  start_time: string;
44308
45825
  status?: string;
44309
45826
  total_excl_vat?: number | null;
@@ -44312,11 +45829,15 @@ export declare const upsertLocalPriceGroup: import("@tanstack/start-client-core"
44312
45829
  vat_amount?: number | null;
44313
45830
  };
44314
45831
  Update: {
45832
+ archive_reason?: string | null;
45833
+ archived_at?: string | null;
45834
+ archived_by?: string | null;
44315
45835
  company_name?: string | null;
44316
45836
  conflict_checked_at?: string | null;
44317
45837
  conflict_reason?: string | null;
44318
45838
  created_at?: string;
44319
45839
  created_by_role?: string | null;
45840
+ customer_address?: string | null;
44320
45841
  customer_email?: string | null;
44321
45842
  customer_name?: string | null;
44322
45843
  end_time?: string;
@@ -44328,7 +45849,12 @@ export declare const upsertLocalPriceGroup: import("@tanstack/start-client-core"
44328
45849
  invoiced_at?: string | null;
44329
45850
  notes?: string | null;
44330
45851
  number_of_people?: number;
45852
+ overridden_at?: string | null;
45853
+ overridden_by?: string | null;
45854
+ override_reason?: string | null;
45855
+ price_override?: boolean;
44331
45856
  room_id?: string;
45857
+ room_price_override?: number | null;
44332
45858
  start_time?: string;
44333
45859
  status?: string;
44334
45860
  total_excl_vat?: number | null;
@@ -45157,8 +46683,27 @@ export declare const upsertLocalPriceGroup: import("@tanstack/start-client-core"
45157
46683
  customers: {
45158
46684
  Row: {
45159
46685
  address: string | null;
46686
+ address_line1: string | null;
46687
+ address_line2: string | null;
46688
+ address_type: string | null;
46689
+ attention_to: string | null;
46690
+ bank_account_holder: string | null;
46691
+ bank_account_number: string | null;
46692
+ bank_address_line1: string | null;
46693
+ bank_address_line2: string | null;
46694
+ bank_bic: string | null;
46695
+ bank_city: string | null;
46696
+ bank_country: string | null;
46697
+ bank_house_number: string | null;
46698
+ bank_iban: string | null;
46699
+ bank_name: string | null;
46700
+ bank_national_code: string | null;
46701
+ bank_postal_code: string | null;
46702
+ bank_state: string | null;
46703
+ billing_email: string | null;
45160
46704
  bio: string | null;
45161
46705
  city: string | null;
46706
+ coc_number: string | null;
45162
46707
  commercial_name: string | null;
45163
46708
  company_name: string;
45164
46709
  connection_status: string;
@@ -45167,21 +46712,28 @@ export declare const upsertLocalPriceGroup: import("@tanstack/start-client-core"
45167
46712
  created_at: string;
45168
46713
  custom_fields: import("../integrations/supabase/types").Json;
45169
46714
  customer_class: string | null;
46715
+ customer_number: string | null;
46716
+ discount_days: number | null;
46717
+ discount_percentage: number | null;
45170
46718
  email: string | null;
45171
46719
  external_id: string | null;
46720
+ fax: string | null;
45172
46721
  floriday_connection_id: string | null;
45173
46722
  floriday_organization_id: string | null;
45174
46723
  floriday_raw: import("../integrations/supabase/types").Json | null;
45175
46724
  gln: string | null;
45176
46725
  house_number: string | null;
46726
+ icp_country_code: string | null;
45177
46727
  id: string;
45178
46728
  is_active: boolean;
46729
+ language: string | null;
45179
46730
  last_synced_at: string | null;
45180
46731
  logo_url: string | null;
45181
46732
  markets: string[];
45182
46733
  notes: string | null;
45183
46734
  organization_type: string | null;
45184
46735
  payment_methods: string[];
46736
+ payment_term_days: number | null;
45185
46737
  phone: string | null;
45186
46738
  postal_code: string | null;
45187
46739
  product_groups: string[];
@@ -45192,13 +46744,33 @@ export declare const upsertLocalPriceGroup: import("@tanstack/start-client-core"
45192
46744
  sync_status: string;
45193
46745
  trade_forms: string[];
45194
46746
  updated_at: string;
46747
+ vat_display: string | null;
45195
46748
  vat_number: string | null;
45196
46749
  website: string | null;
45197
46750
  };
45198
46751
  Insert: {
45199
46752
  address?: string | null;
46753
+ address_line1?: string | null;
46754
+ address_line2?: string | null;
46755
+ address_type?: string | null;
46756
+ attention_to?: string | null;
46757
+ bank_account_holder?: string | null;
46758
+ bank_account_number?: string | null;
46759
+ bank_address_line1?: string | null;
46760
+ bank_address_line2?: string | null;
46761
+ bank_bic?: string | null;
46762
+ bank_city?: string | null;
46763
+ bank_country?: string | null;
46764
+ bank_house_number?: string | null;
46765
+ bank_iban?: string | null;
46766
+ bank_name?: string | null;
46767
+ bank_national_code?: string | null;
46768
+ bank_postal_code?: string | null;
46769
+ bank_state?: string | null;
46770
+ billing_email?: string | null;
45200
46771
  bio?: string | null;
45201
46772
  city?: string | null;
46773
+ coc_number?: string | null;
45202
46774
  commercial_name?: string | null;
45203
46775
  company_name: string;
45204
46776
  connection_status?: string;
@@ -45207,21 +46779,28 @@ export declare const upsertLocalPriceGroup: import("@tanstack/start-client-core"
45207
46779
  created_at?: string;
45208
46780
  custom_fields?: import("../integrations/supabase/types").Json;
45209
46781
  customer_class?: string | null;
46782
+ customer_number?: string | null;
46783
+ discount_days?: number | null;
46784
+ discount_percentage?: number | null;
45210
46785
  email?: string | null;
45211
46786
  external_id?: string | null;
46787
+ fax?: string | null;
45212
46788
  floriday_connection_id?: string | null;
45213
46789
  floriday_organization_id?: string | null;
45214
46790
  floriday_raw?: import("../integrations/supabase/types").Json | null;
45215
46791
  gln?: string | null;
45216
46792
  house_number?: string | null;
46793
+ icp_country_code?: string | null;
45217
46794
  id?: string;
45218
46795
  is_active?: boolean;
46796
+ language?: string | null;
45219
46797
  last_synced_at?: string | null;
45220
46798
  logo_url?: string | null;
45221
46799
  markets?: string[];
45222
46800
  notes?: string | null;
45223
46801
  organization_type?: string | null;
45224
46802
  payment_methods?: string[];
46803
+ payment_term_days?: number | null;
45225
46804
  phone?: string | null;
45226
46805
  postal_code?: string | null;
45227
46806
  product_groups?: string[];
@@ -45232,13 +46811,33 @@ export declare const upsertLocalPriceGroup: import("@tanstack/start-client-core"
45232
46811
  sync_status?: string;
45233
46812
  trade_forms?: string[];
45234
46813
  updated_at?: string;
46814
+ vat_display?: string | null;
45235
46815
  vat_number?: string | null;
45236
46816
  website?: string | null;
45237
46817
  };
45238
46818
  Update: {
45239
46819
  address?: string | null;
46820
+ address_line1?: string | null;
46821
+ address_line2?: string | null;
46822
+ address_type?: string | null;
46823
+ attention_to?: string | null;
46824
+ bank_account_holder?: string | null;
46825
+ bank_account_number?: string | null;
46826
+ bank_address_line1?: string | null;
46827
+ bank_address_line2?: string | null;
46828
+ bank_bic?: string | null;
46829
+ bank_city?: string | null;
46830
+ bank_country?: string | null;
46831
+ bank_house_number?: string | null;
46832
+ bank_iban?: string | null;
46833
+ bank_name?: string | null;
46834
+ bank_national_code?: string | null;
46835
+ bank_postal_code?: string | null;
46836
+ bank_state?: string | null;
46837
+ billing_email?: string | null;
45240
46838
  bio?: string | null;
45241
46839
  city?: string | null;
46840
+ coc_number?: string | null;
45242
46841
  commercial_name?: string | null;
45243
46842
  company_name?: string;
45244
46843
  connection_status?: string;
@@ -45247,21 +46846,28 @@ export declare const upsertLocalPriceGroup: import("@tanstack/start-client-core"
45247
46846
  created_at?: string;
45248
46847
  custom_fields?: import("../integrations/supabase/types").Json;
45249
46848
  customer_class?: string | null;
46849
+ customer_number?: string | null;
46850
+ discount_days?: number | null;
46851
+ discount_percentage?: number | null;
45250
46852
  email?: string | null;
45251
46853
  external_id?: string | null;
46854
+ fax?: string | null;
45252
46855
  floriday_connection_id?: string | null;
45253
46856
  floriday_organization_id?: string | null;
45254
46857
  floriday_raw?: import("../integrations/supabase/types").Json | null;
45255
46858
  gln?: string | null;
45256
46859
  house_number?: string | null;
46860
+ icp_country_code?: string | null;
45257
46861
  id?: string;
45258
46862
  is_active?: boolean;
46863
+ language?: string | null;
45259
46864
  last_synced_at?: string | null;
45260
46865
  logo_url?: string | null;
45261
46866
  markets?: string[];
45262
46867
  notes?: string | null;
45263
46868
  organization_type?: string | null;
45264
46869
  payment_methods?: string[];
46870
+ payment_term_days?: number | null;
45265
46871
  phone?: string | null;
45266
46872
  postal_code?: string | null;
45267
46873
  product_groups?: string[];
@@ -45272,6 +46878,7 @@ export declare const upsertLocalPriceGroup: import("@tanstack/start-client-core"
45272
46878
  sync_status?: string;
45273
46879
  trade_forms?: string[];
45274
46880
  updated_at?: string;
46881
+ vat_display?: string | null;
45275
46882
  vat_number?: string | null;
45276
46883
  website?: string | null;
45277
46884
  };
@@ -47218,6 +48825,54 @@ export declare const upsertLocalPriceGroup: import("@tanstack/start-client-core"
47218
48825
  referencedColumns: ["id"];
47219
48826
  }];
47220
48827
  };
48828
+ floriday_auto_fulfillment_log: {
48829
+ Row: {
48830
+ attempts: number;
48831
+ connection_id: string;
48832
+ created_at: string;
48833
+ error: string | null;
48834
+ fulfillment_order_id: string | null;
48835
+ id: string;
48836
+ last_attempt_at: string | null;
48837
+ reason: string | null;
48838
+ sales_order_id: string;
48839
+ status: string;
48840
+ updated_at: string;
48841
+ };
48842
+ Insert: {
48843
+ attempts?: number;
48844
+ connection_id: string;
48845
+ created_at?: string;
48846
+ error?: string | null;
48847
+ fulfillment_order_id?: string | null;
48848
+ id?: string;
48849
+ last_attempt_at?: string | null;
48850
+ reason?: string | null;
48851
+ sales_order_id: string;
48852
+ status?: string;
48853
+ updated_at?: string;
48854
+ };
48855
+ Update: {
48856
+ attempts?: number;
48857
+ connection_id?: string;
48858
+ created_at?: string;
48859
+ error?: string | null;
48860
+ fulfillment_order_id?: string | null;
48861
+ id?: string;
48862
+ last_attempt_at?: string | null;
48863
+ reason?: string | null;
48864
+ sales_order_id?: string;
48865
+ status?: string;
48866
+ updated_at?: string;
48867
+ };
48868
+ Relationships: [{
48869
+ foreignKeyName: "floriday_auto_fulfillment_log_connection_id_fkey";
48870
+ columns: ["connection_id"];
48871
+ isOneToOne: false;
48872
+ referencedRelation: "floriday_connections";
48873
+ referencedColumns: ["id"];
48874
+ }];
48875
+ };
47221
48876
  floriday_base_items_cache: {
47222
48877
  Row: {
47223
48878
  connection_id: string;
@@ -48322,6 +49977,24 @@ export declare const upsertLocalPriceGroup: import("@tanstack/start-client-core"
48322
49977
  referencedColumns: ["id"];
48323
49978
  }];
48324
49979
  };
49980
+ floriday_rate_limit_state: {
49981
+ Row: {
49982
+ bucket: string;
49983
+ last_refill_at: string;
49984
+ tokens: number;
49985
+ };
49986
+ Insert: {
49987
+ bucket: string;
49988
+ last_refill_at?: string;
49989
+ tokens: number;
49990
+ };
49991
+ Update: {
49992
+ bucket?: string;
49993
+ last_refill_at?: string;
49994
+ tokens?: number;
49995
+ };
49996
+ Relationships: [];
49997
+ };
48325
49998
  floriday_resource_schemas: {
48326
49999
  Row: {
48327
50000
  enums: import("../integrations/supabase/types").Json;
@@ -50756,6 +52429,8 @@ export declare const upsertLocalPriceGroup: import("@tanstack/start-client-core"
50756
52429
  order_date: string;
50757
52430
  order_number: string;
50758
52431
  order_source: string;
52432
+ plan_locked_at: string | null;
52433
+ plan_locked_ref: string | null;
50759
52434
  status: string;
50760
52435
  total: string;
50761
52436
  updated_at: string;
@@ -50772,6 +52447,8 @@ export declare const upsertLocalPriceGroup: import("@tanstack/start-client-core"
50772
52447
  order_date?: string;
50773
52448
  order_number: string;
50774
52449
  order_source?: string;
52450
+ plan_locked_at?: string | null;
52451
+ plan_locked_ref?: string | null;
50775
52452
  status?: string;
50776
52453
  total?: string;
50777
52454
  updated_at?: string;
@@ -50788,6 +52465,8 @@ export declare const upsertLocalPriceGroup: import("@tanstack/start-client-core"
50788
52465
  order_date?: string;
50789
52466
  order_number?: string;
50790
52467
  order_source?: string;
52468
+ plan_locked_at?: string | null;
52469
+ plan_locked_ref?: string | null;
50791
52470
  status?: string;
50792
52471
  total?: string;
50793
52472
  updated_at?: string;
@@ -51156,6 +52835,7 @@ export declare const upsertLocalPriceGroup: import("@tanstack/start-client-core"
51156
52835
  };
51157
52836
  profiles: {
51158
52837
  Row: {
52838
+ address: string | null;
51159
52839
  created_at: string;
51160
52840
  display_name: string | null;
51161
52841
  email: string | null;
@@ -51166,6 +52846,7 @@ export declare const upsertLocalPriceGroup: import("@tanstack/start-client-core"
51166
52846
  updated_at: string;
51167
52847
  };
51168
52848
  Insert: {
52849
+ address?: string | null;
51169
52850
  created_at?: string;
51170
52851
  display_name?: string | null;
51171
52852
  email?: string | null;
@@ -51176,6 +52857,7 @@ export declare const upsertLocalPriceGroup: import("@tanstack/start-client-core"
51176
52857
  updated_at?: string;
51177
52858
  };
51178
52859
  Update: {
52860
+ address?: string | null;
51179
52861
  created_at?: string;
51180
52862
  display_name?: string | null;
51181
52863
  email?: string | null;
@@ -52423,6 +54105,114 @@ export declare const upsertLocalPriceGroup: import("@tanstack/start-client-core"
52423
54105
  };
52424
54106
  Relationships: [];
52425
54107
  };
54108
+ trade_item_supply_lines: {
54109
+ Row: {
54110
+ available_quantity: number | null;
54111
+ connection_id: string;
54112
+ created_at: string;
54113
+ currency: string | null;
54114
+ endpoint_family: string | null;
54115
+ environment: string | null;
54116
+ id: string;
54117
+ last_error: string | null;
54118
+ last_status: number | null;
54119
+ packing_configuration_id: string | null;
54120
+ period_end: string | null;
54121
+ period_start: string | null;
54122
+ price_per_piece: number | null;
54123
+ sales_unit: string | null;
54124
+ supply_line_id: string | null;
54125
+ supply_type: string;
54126
+ trade_item_id: string;
54127
+ updated_at: string;
54128
+ user_id: string;
54129
+ week: number | null;
54130
+ year: number | null;
54131
+ };
54132
+ Insert: {
54133
+ available_quantity?: number | null;
54134
+ connection_id: string;
54135
+ created_at?: string;
54136
+ currency?: string | null;
54137
+ endpoint_family?: string | null;
54138
+ environment?: string | null;
54139
+ id?: string;
54140
+ last_error?: string | null;
54141
+ last_status?: number | null;
54142
+ packing_configuration_id?: string | null;
54143
+ period_end?: string | null;
54144
+ period_start?: string | null;
54145
+ price_per_piece?: number | null;
54146
+ sales_unit?: string | null;
54147
+ supply_line_id?: string | null;
54148
+ supply_type?: string;
54149
+ trade_item_id: string;
54150
+ updated_at?: string;
54151
+ user_id: string;
54152
+ week?: number | null;
54153
+ year?: number | null;
54154
+ };
54155
+ Update: {
54156
+ available_quantity?: number | null;
54157
+ connection_id?: string;
54158
+ created_at?: string;
54159
+ currency?: string | null;
54160
+ endpoint_family?: string | null;
54161
+ environment?: string | null;
54162
+ id?: string;
54163
+ last_error?: string | null;
54164
+ last_status?: number | null;
54165
+ packing_configuration_id?: string | null;
54166
+ period_end?: string | null;
54167
+ period_start?: string | null;
54168
+ price_per_piece?: number | null;
54169
+ sales_unit?: string | null;
54170
+ supply_line_id?: string | null;
54171
+ supply_type?: string;
54172
+ trade_item_id?: string;
54173
+ updated_at?: string;
54174
+ user_id?: string;
54175
+ week?: number | null;
54176
+ year?: number | null;
54177
+ };
54178
+ Relationships: [];
54179
+ };
54180
+ trade_item_warehouse_preferences: {
54181
+ Row: {
54182
+ connection_id: string;
54183
+ created_at: string;
54184
+ id: string;
54185
+ trade_item_id: string;
54186
+ updated_at: string;
54187
+ warehouse_id: string;
54188
+ warehouse_name: string | null;
54189
+ };
54190
+ Insert: {
54191
+ connection_id: string;
54192
+ created_at?: string;
54193
+ id?: string;
54194
+ trade_item_id: string;
54195
+ updated_at?: string;
54196
+ warehouse_id: string;
54197
+ warehouse_name?: string | null;
54198
+ };
54199
+ Update: {
54200
+ connection_id?: string;
54201
+ created_at?: string;
54202
+ id?: string;
54203
+ trade_item_id?: string;
54204
+ updated_at?: string;
54205
+ warehouse_id?: string;
54206
+ warehouse_name?: string | null;
54207
+ };
54208
+ Relationships: [{
54209
+ foreignKeyName: "trade_item_warehouse_preferences_connection_id_fkey";
54210
+ columns: ["connection_id"];
54211
+ isOneToOne: false;
54212
+ referencedRelation: "floriday_connections";
54213
+ referencedColumns: ["id"];
54214
+ }];
54215
+ };
52426
54216
  twinfield_connections: {
52427
54217
  Row: {
52428
54218
  access_token: string | null;
@@ -54108,7 +55898,19 @@ export declare const upsertLocalPriceGroup: import("@tanstack/start-client-core"
54108
55898
  };
54109
55899
  cleanup_old_bookings: {
54110
55900
  Args: never;
54111
- Returns: number;
55901
+ Returns: undefined;
55902
+ };
55903
+ consume_floriday_rate_limit: {
55904
+ Args: {
55905
+ p_bucket: string;
55906
+ p_capacity: number;
55907
+ p_cost?: number;
55908
+ p_refill_per_sec: number;
55909
+ };
55910
+ Returns: {
55911
+ granted: boolean;
55912
+ wait_ms: number;
55913
+ }[];
54112
55914
  };
54113
55915
  control_get_todays_carts: {
54114
55916
  Args: never;
@@ -54190,6 +55992,12 @@ export declare const upsertLocalPriceGroup: import("@tanstack/start-client-core"
54190
55992
  status: string;
54191
55993
  }[];
54192
55994
  };
55995
+ enqueue_cart_replan_if_unlocked: {
55996
+ Args: {
55997
+ p_order_id: string;
55998
+ };
55999
+ Returns: undefined;
56000
+ };
54193
56001
  ensure_trade_item_stock_row: {
54194
56002
  Args: {
54195
56003
  p_key: string;
@@ -54583,6 +56391,24 @@ export declare const upsertLocalPriceGroup: import("@tanstack/start-client-core"
54583
56391
  };
54584
56392
  Returns: undefined;
54585
56393
  };
56394
+ recompute_order_status: {
56395
+ Args: {
56396
+ p_order_id: string;
56397
+ };
56398
+ Returns: undefined;
56399
+ };
56400
+ recompute_reserved_for_order: {
56401
+ Args: {
56402
+ p_order_id: string;
56403
+ };
56404
+ Returns: undefined;
56405
+ };
56406
+ recompute_reserved_stock: {
56407
+ Args: {
56408
+ p_trade_item_key: string;
56409
+ };
56410
+ Returns: undefined;
56411
+ };
54586
56412
  refresh_external_customers_grouped: {
54587
56413
  Args: never;
54588
56414
  Returns: undefined;
@@ -54897,6 +56723,24 @@ export declare const upsertLocalPriceGroup: import("@tanstack/start-client-core"
54897
56723
  };
54898
56724
  Returns: string[];
54899
56725
  };
56726
+ sync_cached_packing_from_product: {
56727
+ Args: {
56728
+ p_product_id: string;
56729
+ };
56730
+ Returns: undefined;
56731
+ };
56732
+ sync_order_cart_item_packing_from_product: {
56733
+ Args: {
56734
+ p_product_id: string;
56735
+ };
56736
+ Returns: undefined;
56737
+ };
56738
+ sync_product_packing_from_floriday_cache: {
56739
+ Args: {
56740
+ p_floriday_id: string;
56741
+ };
56742
+ Returns: undefined;
56743
+ };
54900
56744
  twinfield_decrypt: {
54901
56745
  Args: {
54902
56746
  cipher: string;
@@ -54909,6 +56753,17 @@ export declare const upsertLocalPriceGroup: import("@tanstack/start-client-core"
54909
56753
  };
54910
56754
  Returns: string;
54911
56755
  };
56756
+ upsert_auto_fulfillment_log: {
56757
+ Args: {
56758
+ p_connection_id: string;
56759
+ p_error?: string;
56760
+ p_fulfillment_order_id?: string;
56761
+ p_reason?: string;
56762
+ p_sales_order_id: string;
56763
+ p_status: string;
56764
+ };
56765
+ Returns: undefined;
56766
+ };
54912
56767
  };
54913
56768
  Enums: {
54914
56769
  app_role: "admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie" | "monteur";
@@ -54956,6 +56811,8 @@ export declare const deleteLocalDiscount: import("@tanstack/start-client-core").
54956
56811
  Tables: {
54957
56812
  afhandeling_settings: {
54958
56813
  Row: {
56814
+ auto_print_delivery_note: boolean;
56815
+ auto_process_paused: boolean;
54959
56816
  created_at: string;
54960
56817
  extra_pick_days_with_stickers: number;
54961
56818
  id: string;
@@ -54971,6 +56828,8 @@ export declare const deleteLocalDiscount: import("@tanstack/start-client-core").
54971
56828
  user_id: string;
54972
56829
  };
54973
56830
  Insert: {
56831
+ auto_print_delivery_note?: boolean;
56832
+ auto_process_paused?: boolean;
54974
56833
  created_at?: string;
54975
56834
  extra_pick_days_with_stickers?: number;
54976
56835
  id?: string;
@@ -54986,6 +56845,8 @@ export declare const deleteLocalDiscount: import("@tanstack/start-client-core").
54986
56845
  user_id: string;
54987
56846
  };
54988
56847
  Update: {
56848
+ auto_print_delivery_note?: boolean;
56849
+ auto_process_paused?: boolean;
54989
56850
  created_at?: string;
54990
56851
  extra_pick_days_with_stickers?: number;
54991
56852
  id?: string;
@@ -55218,6 +57079,9 @@ export declare const deleteLocalDiscount: import("@tanstack/start-client-core").
55218
57079
  created_at: string;
55219
57080
  extra_id: string;
55220
57081
  id: string;
57082
+ original_unit_price: number | null;
57083
+ override_reason: string | null;
57084
+ override_unit_price: number | null;
55221
57085
  quantity: number;
55222
57086
  total_price: number;
55223
57087
  unit_price: number;
@@ -55227,6 +57091,9 @@ export declare const deleteLocalDiscount: import("@tanstack/start-client-core").
55227
57091
  created_at?: string;
55228
57092
  extra_id: string;
55229
57093
  id?: string;
57094
+ original_unit_price?: number | null;
57095
+ override_reason?: string | null;
57096
+ override_unit_price?: number | null;
55230
57097
  quantity?: number;
55231
57098
  total_price?: number;
55232
57099
  unit_price?: number;
@@ -55236,6 +57103,9 @@ export declare const deleteLocalDiscount: import("@tanstack/start-client-core").
55236
57103
  created_at?: string;
55237
57104
  extra_id?: string;
55238
57105
  id?: string;
57106
+ original_unit_price?: number | null;
57107
+ override_reason?: string | null;
57108
+ override_unit_price?: number | null;
55239
57109
  quantity?: number;
55240
57110
  total_price?: number;
55241
57111
  unit_price?: number;
@@ -55256,11 +57126,15 @@ export declare const deleteLocalDiscount: import("@tanstack/start-client-core").
55256
57126
  };
55257
57127
  bookings: {
55258
57128
  Row: {
57129
+ archive_reason: string | null;
57130
+ archived_at: string | null;
57131
+ archived_by: string | null;
55259
57132
  company_name: string | null;
55260
57133
  conflict_checked_at: string | null;
55261
57134
  conflict_reason: string | null;
55262
57135
  created_at: string;
55263
57136
  created_by_role: string | null;
57137
+ customer_address: string | null;
55264
57138
  customer_email: string | null;
55265
57139
  customer_name: string | null;
55266
57140
  end_time: string;
@@ -55272,7 +57146,12 @@ export declare const deleteLocalDiscount: import("@tanstack/start-client-core").
55272
57146
  invoiced_at: string | null;
55273
57147
  notes: string | null;
55274
57148
  number_of_people: number;
57149
+ overridden_at: string | null;
57150
+ overridden_by: string | null;
57151
+ override_reason: string | null;
57152
+ price_override: boolean;
55275
57153
  room_id: string;
57154
+ room_price_override: number | null;
55276
57155
  start_time: string;
55277
57156
  status: string;
55278
57157
  total_excl_vat: number | null;
@@ -55281,11 +57160,15 @@ export declare const deleteLocalDiscount: import("@tanstack/start-client-core").
55281
57160
  vat_amount: number | null;
55282
57161
  };
55283
57162
  Insert: {
57163
+ archive_reason?: string | null;
57164
+ archived_at?: string | null;
57165
+ archived_by?: string | null;
55284
57166
  company_name?: string | null;
55285
57167
  conflict_checked_at?: string | null;
55286
57168
  conflict_reason?: string | null;
55287
57169
  created_at?: string;
55288
57170
  created_by_role?: string | null;
57171
+ customer_address?: string | null;
55289
57172
  customer_email?: string | null;
55290
57173
  customer_name?: string | null;
55291
57174
  end_time: string;
@@ -55297,7 +57180,12 @@ export declare const deleteLocalDiscount: import("@tanstack/start-client-core").
55297
57180
  invoiced_at?: string | null;
55298
57181
  notes?: string | null;
55299
57182
  number_of_people?: number;
57183
+ overridden_at?: string | null;
57184
+ overridden_by?: string | null;
57185
+ override_reason?: string | null;
57186
+ price_override?: boolean;
55300
57187
  room_id: string;
57188
+ room_price_override?: number | null;
55301
57189
  start_time: string;
55302
57190
  status?: string;
55303
57191
  total_excl_vat?: number | null;
@@ -55306,11 +57194,15 @@ export declare const deleteLocalDiscount: import("@tanstack/start-client-core").
55306
57194
  vat_amount?: number | null;
55307
57195
  };
55308
57196
  Update: {
57197
+ archive_reason?: string | null;
57198
+ archived_at?: string | null;
57199
+ archived_by?: string | null;
55309
57200
  company_name?: string | null;
55310
57201
  conflict_checked_at?: string | null;
55311
57202
  conflict_reason?: string | null;
55312
57203
  created_at?: string;
55313
57204
  created_by_role?: string | null;
57205
+ customer_address?: string | null;
55314
57206
  customer_email?: string | null;
55315
57207
  customer_name?: string | null;
55316
57208
  end_time?: string;
@@ -55322,7 +57214,12 @@ export declare const deleteLocalDiscount: import("@tanstack/start-client-core").
55322
57214
  invoiced_at?: string | null;
55323
57215
  notes?: string | null;
55324
57216
  number_of_people?: number;
57217
+ overridden_at?: string | null;
57218
+ overridden_by?: string | null;
57219
+ override_reason?: string | null;
57220
+ price_override?: boolean;
55325
57221
  room_id?: string;
57222
+ room_price_override?: number | null;
55326
57223
  start_time?: string;
55327
57224
  status?: string;
55328
57225
  total_excl_vat?: number | null;
@@ -56151,8 +58048,27 @@ export declare const deleteLocalDiscount: import("@tanstack/start-client-core").
56151
58048
  customers: {
56152
58049
  Row: {
56153
58050
  address: string | null;
58051
+ address_line1: string | null;
58052
+ address_line2: string | null;
58053
+ address_type: string | null;
58054
+ attention_to: string | null;
58055
+ bank_account_holder: string | null;
58056
+ bank_account_number: string | null;
58057
+ bank_address_line1: string | null;
58058
+ bank_address_line2: string | null;
58059
+ bank_bic: string | null;
58060
+ bank_city: string | null;
58061
+ bank_country: string | null;
58062
+ bank_house_number: string | null;
58063
+ bank_iban: string | null;
58064
+ bank_name: string | null;
58065
+ bank_national_code: string | null;
58066
+ bank_postal_code: string | null;
58067
+ bank_state: string | null;
58068
+ billing_email: string | null;
56154
58069
  bio: string | null;
56155
58070
  city: string | null;
58071
+ coc_number: string | null;
56156
58072
  commercial_name: string | null;
56157
58073
  company_name: string;
56158
58074
  connection_status: string;
@@ -56161,21 +58077,28 @@ export declare const deleteLocalDiscount: import("@tanstack/start-client-core").
56161
58077
  created_at: string;
56162
58078
  custom_fields: import("../integrations/supabase/types").Json;
56163
58079
  customer_class: string | null;
58080
+ customer_number: string | null;
58081
+ discount_days: number | null;
58082
+ discount_percentage: number | null;
56164
58083
  email: string | null;
56165
58084
  external_id: string | null;
58085
+ fax: string | null;
56166
58086
  floriday_connection_id: string | null;
56167
58087
  floriday_organization_id: string | null;
56168
58088
  floriday_raw: import("../integrations/supabase/types").Json | null;
56169
58089
  gln: string | null;
56170
58090
  house_number: string | null;
58091
+ icp_country_code: string | null;
56171
58092
  id: string;
56172
58093
  is_active: boolean;
58094
+ language: string | null;
56173
58095
  last_synced_at: string | null;
56174
58096
  logo_url: string | null;
56175
58097
  markets: string[];
56176
58098
  notes: string | null;
56177
58099
  organization_type: string | null;
56178
58100
  payment_methods: string[];
58101
+ payment_term_days: number | null;
56179
58102
  phone: string | null;
56180
58103
  postal_code: string | null;
56181
58104
  product_groups: string[];
@@ -56186,13 +58109,33 @@ export declare const deleteLocalDiscount: import("@tanstack/start-client-core").
56186
58109
  sync_status: string;
56187
58110
  trade_forms: string[];
56188
58111
  updated_at: string;
58112
+ vat_display: string | null;
56189
58113
  vat_number: string | null;
56190
58114
  website: string | null;
56191
58115
  };
56192
58116
  Insert: {
56193
58117
  address?: string | null;
58118
+ address_line1?: string | null;
58119
+ address_line2?: string | null;
58120
+ address_type?: string | null;
58121
+ attention_to?: string | null;
58122
+ bank_account_holder?: string | null;
58123
+ bank_account_number?: string | null;
58124
+ bank_address_line1?: string | null;
58125
+ bank_address_line2?: string | null;
58126
+ bank_bic?: string | null;
58127
+ bank_city?: string | null;
58128
+ bank_country?: string | null;
58129
+ bank_house_number?: string | null;
58130
+ bank_iban?: string | null;
58131
+ bank_name?: string | null;
58132
+ bank_national_code?: string | null;
58133
+ bank_postal_code?: string | null;
58134
+ bank_state?: string | null;
58135
+ billing_email?: string | null;
56194
58136
  bio?: string | null;
56195
58137
  city?: string | null;
58138
+ coc_number?: string | null;
56196
58139
  commercial_name?: string | null;
56197
58140
  company_name: string;
56198
58141
  connection_status?: string;
@@ -56201,21 +58144,28 @@ export declare const deleteLocalDiscount: import("@tanstack/start-client-core").
56201
58144
  created_at?: string;
56202
58145
  custom_fields?: import("../integrations/supabase/types").Json;
56203
58146
  customer_class?: string | null;
58147
+ customer_number?: string | null;
58148
+ discount_days?: number | null;
58149
+ discount_percentage?: number | null;
56204
58150
  email?: string | null;
56205
58151
  external_id?: string | null;
58152
+ fax?: string | null;
56206
58153
  floriday_connection_id?: string | null;
56207
58154
  floriday_organization_id?: string | null;
56208
58155
  floriday_raw?: import("../integrations/supabase/types").Json | null;
56209
58156
  gln?: string | null;
56210
58157
  house_number?: string | null;
58158
+ icp_country_code?: string | null;
56211
58159
  id?: string;
56212
58160
  is_active?: boolean;
58161
+ language?: string | null;
56213
58162
  last_synced_at?: string | null;
56214
58163
  logo_url?: string | null;
56215
58164
  markets?: string[];
56216
58165
  notes?: string | null;
56217
58166
  organization_type?: string | null;
56218
58167
  payment_methods?: string[];
58168
+ payment_term_days?: number | null;
56219
58169
  phone?: string | null;
56220
58170
  postal_code?: string | null;
56221
58171
  product_groups?: string[];
@@ -56226,13 +58176,33 @@ export declare const deleteLocalDiscount: import("@tanstack/start-client-core").
56226
58176
  sync_status?: string;
56227
58177
  trade_forms?: string[];
56228
58178
  updated_at?: string;
58179
+ vat_display?: string | null;
56229
58180
  vat_number?: string | null;
56230
58181
  website?: string | null;
56231
58182
  };
56232
58183
  Update: {
56233
58184
  address?: string | null;
58185
+ address_line1?: string | null;
58186
+ address_line2?: string | null;
58187
+ address_type?: string | null;
58188
+ attention_to?: string | null;
58189
+ bank_account_holder?: string | null;
58190
+ bank_account_number?: string | null;
58191
+ bank_address_line1?: string | null;
58192
+ bank_address_line2?: string | null;
58193
+ bank_bic?: string | null;
58194
+ bank_city?: string | null;
58195
+ bank_country?: string | null;
58196
+ bank_house_number?: string | null;
58197
+ bank_iban?: string | null;
58198
+ bank_name?: string | null;
58199
+ bank_national_code?: string | null;
58200
+ bank_postal_code?: string | null;
58201
+ bank_state?: string | null;
58202
+ billing_email?: string | null;
56234
58203
  bio?: string | null;
56235
58204
  city?: string | null;
58205
+ coc_number?: string | null;
56236
58206
  commercial_name?: string | null;
56237
58207
  company_name?: string;
56238
58208
  connection_status?: string;
@@ -56241,21 +58211,28 @@ export declare const deleteLocalDiscount: import("@tanstack/start-client-core").
56241
58211
  created_at?: string;
56242
58212
  custom_fields?: import("../integrations/supabase/types").Json;
56243
58213
  customer_class?: string | null;
58214
+ customer_number?: string | null;
58215
+ discount_days?: number | null;
58216
+ discount_percentage?: number | null;
56244
58217
  email?: string | null;
56245
58218
  external_id?: string | null;
58219
+ fax?: string | null;
56246
58220
  floriday_connection_id?: string | null;
56247
58221
  floriday_organization_id?: string | null;
56248
58222
  floriday_raw?: import("../integrations/supabase/types").Json | null;
56249
58223
  gln?: string | null;
56250
58224
  house_number?: string | null;
58225
+ icp_country_code?: string | null;
56251
58226
  id?: string;
56252
58227
  is_active?: boolean;
58228
+ language?: string | null;
56253
58229
  last_synced_at?: string | null;
56254
58230
  logo_url?: string | null;
56255
58231
  markets?: string[];
56256
58232
  notes?: string | null;
56257
58233
  organization_type?: string | null;
56258
58234
  payment_methods?: string[];
58235
+ payment_term_days?: number | null;
56259
58236
  phone?: string | null;
56260
58237
  postal_code?: string | null;
56261
58238
  product_groups?: string[];
@@ -56266,6 +58243,7 @@ export declare const deleteLocalDiscount: import("@tanstack/start-client-core").
56266
58243
  sync_status?: string;
56267
58244
  trade_forms?: string[];
56268
58245
  updated_at?: string;
58246
+ vat_display?: string | null;
56269
58247
  vat_number?: string | null;
56270
58248
  website?: string | null;
56271
58249
  };
@@ -58212,6 +60190,54 @@ export declare const deleteLocalDiscount: import("@tanstack/start-client-core").
58212
60190
  referencedColumns: ["id"];
58213
60191
  }];
58214
60192
  };
60193
+ floriday_auto_fulfillment_log: {
60194
+ Row: {
60195
+ attempts: number;
60196
+ connection_id: string;
60197
+ created_at: string;
60198
+ error: string | null;
60199
+ fulfillment_order_id: string | null;
60200
+ id: string;
60201
+ last_attempt_at: string | null;
60202
+ reason: string | null;
60203
+ sales_order_id: string;
60204
+ status: string;
60205
+ updated_at: string;
60206
+ };
60207
+ Insert: {
60208
+ attempts?: number;
60209
+ connection_id: string;
60210
+ created_at?: string;
60211
+ error?: string | null;
60212
+ fulfillment_order_id?: string | null;
60213
+ id?: string;
60214
+ last_attempt_at?: string | null;
60215
+ reason?: string | null;
60216
+ sales_order_id: string;
60217
+ status?: string;
60218
+ updated_at?: string;
60219
+ };
60220
+ Update: {
60221
+ attempts?: number;
60222
+ connection_id?: string;
60223
+ created_at?: string;
60224
+ error?: string | null;
60225
+ fulfillment_order_id?: string | null;
60226
+ id?: string;
60227
+ last_attempt_at?: string | null;
60228
+ reason?: string | null;
60229
+ sales_order_id?: string;
60230
+ status?: string;
60231
+ updated_at?: string;
60232
+ };
60233
+ Relationships: [{
60234
+ foreignKeyName: "floriday_auto_fulfillment_log_connection_id_fkey";
60235
+ columns: ["connection_id"];
60236
+ isOneToOne: false;
60237
+ referencedRelation: "floriday_connections";
60238
+ referencedColumns: ["id"];
60239
+ }];
60240
+ };
58215
60241
  floriday_base_items_cache: {
58216
60242
  Row: {
58217
60243
  connection_id: string;
@@ -59316,6 +61342,24 @@ export declare const deleteLocalDiscount: import("@tanstack/start-client-core").
59316
61342
  referencedColumns: ["id"];
59317
61343
  }];
59318
61344
  };
61345
+ floriday_rate_limit_state: {
61346
+ Row: {
61347
+ bucket: string;
61348
+ last_refill_at: string;
61349
+ tokens: number;
61350
+ };
61351
+ Insert: {
61352
+ bucket: string;
61353
+ last_refill_at?: string;
61354
+ tokens: number;
61355
+ };
61356
+ Update: {
61357
+ bucket?: string;
61358
+ last_refill_at?: string;
61359
+ tokens?: number;
61360
+ };
61361
+ Relationships: [];
61362
+ };
59319
61363
  floriday_resource_schemas: {
59320
61364
  Row: {
59321
61365
  enums: import("../integrations/supabase/types").Json;
@@ -61750,6 +63794,8 @@ export declare const deleteLocalDiscount: import("@tanstack/start-client-core").
61750
63794
  order_date: string;
61751
63795
  order_number: string;
61752
63796
  order_source: string;
63797
+ plan_locked_at: string | null;
63798
+ plan_locked_ref: string | null;
61753
63799
  status: string;
61754
63800
  total: string;
61755
63801
  updated_at: string;
@@ -61766,6 +63812,8 @@ export declare const deleteLocalDiscount: import("@tanstack/start-client-core").
61766
63812
  order_date?: string;
61767
63813
  order_number: string;
61768
63814
  order_source?: string;
63815
+ plan_locked_at?: string | null;
63816
+ plan_locked_ref?: string | null;
61769
63817
  status?: string;
61770
63818
  total?: string;
61771
63819
  updated_at?: string;
@@ -61782,6 +63830,8 @@ export declare const deleteLocalDiscount: import("@tanstack/start-client-core").
61782
63830
  order_date?: string;
61783
63831
  order_number?: string;
61784
63832
  order_source?: string;
63833
+ plan_locked_at?: string | null;
63834
+ plan_locked_ref?: string | null;
61785
63835
  status?: string;
61786
63836
  total?: string;
61787
63837
  updated_at?: string;
@@ -62150,6 +64200,7 @@ export declare const deleteLocalDiscount: import("@tanstack/start-client-core").
62150
64200
  };
62151
64201
  profiles: {
62152
64202
  Row: {
64203
+ address: string | null;
62153
64204
  created_at: string;
62154
64205
  display_name: string | null;
62155
64206
  email: string | null;
@@ -62160,6 +64211,7 @@ export declare const deleteLocalDiscount: import("@tanstack/start-client-core").
62160
64211
  updated_at: string;
62161
64212
  };
62162
64213
  Insert: {
64214
+ address?: string | null;
62163
64215
  created_at?: string;
62164
64216
  display_name?: string | null;
62165
64217
  email?: string | null;
@@ -62170,6 +64222,7 @@ export declare const deleteLocalDiscount: import("@tanstack/start-client-core").
62170
64222
  updated_at?: string;
62171
64223
  };
62172
64224
  Update: {
64225
+ address?: string | null;
62173
64226
  created_at?: string;
62174
64227
  display_name?: string | null;
62175
64228
  email?: string | null;
@@ -63417,6 +65470,114 @@ export declare const deleteLocalDiscount: import("@tanstack/start-client-core").
63417
65470
  };
63418
65471
  Relationships: [];
63419
65472
  };
65473
+ trade_item_supply_lines: {
65474
+ Row: {
65475
+ available_quantity: number | null;
65476
+ connection_id: string;
65477
+ created_at: string;
65478
+ currency: string | null;
65479
+ endpoint_family: string | null;
65480
+ environment: string | null;
65481
+ id: string;
65482
+ last_error: string | null;
65483
+ last_status: number | null;
65484
+ packing_configuration_id: string | null;
65485
+ period_end: string | null;
65486
+ period_start: string | null;
65487
+ price_per_piece: number | null;
65488
+ sales_unit: string | null;
65489
+ supply_line_id: string | null;
65490
+ supply_type: string;
65491
+ trade_item_id: string;
65492
+ updated_at: string;
65493
+ user_id: string;
65494
+ week: number | null;
65495
+ year: number | null;
65496
+ };
65497
+ Insert: {
65498
+ available_quantity?: number | null;
65499
+ connection_id: string;
65500
+ created_at?: string;
65501
+ currency?: string | null;
65502
+ endpoint_family?: string | null;
65503
+ environment?: string | null;
65504
+ id?: string;
65505
+ last_error?: string | null;
65506
+ last_status?: number | null;
65507
+ packing_configuration_id?: string | null;
65508
+ period_end?: string | null;
65509
+ period_start?: string | null;
65510
+ price_per_piece?: number | null;
65511
+ sales_unit?: string | null;
65512
+ supply_line_id?: string | null;
65513
+ supply_type?: string;
65514
+ trade_item_id: string;
65515
+ updated_at?: string;
65516
+ user_id: string;
65517
+ week?: number | null;
65518
+ year?: number | null;
65519
+ };
65520
+ Update: {
65521
+ available_quantity?: number | null;
65522
+ connection_id?: string;
65523
+ created_at?: string;
65524
+ currency?: string | null;
65525
+ endpoint_family?: string | null;
65526
+ environment?: string | null;
65527
+ id?: string;
65528
+ last_error?: string | null;
65529
+ last_status?: number | null;
65530
+ packing_configuration_id?: string | null;
65531
+ period_end?: string | null;
65532
+ period_start?: string | null;
65533
+ price_per_piece?: number | null;
65534
+ sales_unit?: string | null;
65535
+ supply_line_id?: string | null;
65536
+ supply_type?: string;
65537
+ trade_item_id?: string;
65538
+ updated_at?: string;
65539
+ user_id?: string;
65540
+ week?: number | null;
65541
+ year?: number | null;
65542
+ };
65543
+ Relationships: [];
65544
+ };
65545
+ trade_item_warehouse_preferences: {
65546
+ Row: {
65547
+ connection_id: string;
65548
+ created_at: string;
65549
+ id: string;
65550
+ trade_item_id: string;
65551
+ updated_at: string;
65552
+ warehouse_id: string;
65553
+ warehouse_name: string | null;
65554
+ };
65555
+ Insert: {
65556
+ connection_id: string;
65557
+ created_at?: string;
65558
+ id?: string;
65559
+ trade_item_id: string;
65560
+ updated_at?: string;
65561
+ warehouse_id: string;
65562
+ warehouse_name?: string | null;
65563
+ };
65564
+ Update: {
65565
+ connection_id?: string;
65566
+ created_at?: string;
65567
+ id?: string;
65568
+ trade_item_id?: string;
65569
+ updated_at?: string;
65570
+ warehouse_id?: string;
65571
+ warehouse_name?: string | null;
65572
+ };
65573
+ Relationships: [{
65574
+ foreignKeyName: "trade_item_warehouse_preferences_connection_id_fkey";
65575
+ columns: ["connection_id"];
65576
+ isOneToOne: false;
65577
+ referencedRelation: "floriday_connections";
65578
+ referencedColumns: ["id"];
65579
+ }];
65580
+ };
63420
65581
  twinfield_connections: {
63421
65582
  Row: {
63422
65583
  access_token: string | null;
@@ -65102,7 +67263,19 @@ export declare const deleteLocalDiscount: import("@tanstack/start-client-core").
65102
67263
  };
65103
67264
  cleanup_old_bookings: {
65104
67265
  Args: never;
65105
- Returns: number;
67266
+ Returns: undefined;
67267
+ };
67268
+ consume_floriday_rate_limit: {
67269
+ Args: {
67270
+ p_bucket: string;
67271
+ p_capacity: number;
67272
+ p_cost?: number;
67273
+ p_refill_per_sec: number;
67274
+ };
67275
+ Returns: {
67276
+ granted: boolean;
67277
+ wait_ms: number;
67278
+ }[];
65106
67279
  };
65107
67280
  control_get_todays_carts: {
65108
67281
  Args: never;
@@ -65184,6 +67357,12 @@ export declare const deleteLocalDiscount: import("@tanstack/start-client-core").
65184
67357
  status: string;
65185
67358
  }[];
65186
67359
  };
67360
+ enqueue_cart_replan_if_unlocked: {
67361
+ Args: {
67362
+ p_order_id: string;
67363
+ };
67364
+ Returns: undefined;
67365
+ };
65187
67366
  ensure_trade_item_stock_row: {
65188
67367
  Args: {
65189
67368
  p_key: string;
@@ -65577,6 +67756,24 @@ export declare const deleteLocalDiscount: import("@tanstack/start-client-core").
65577
67756
  };
65578
67757
  Returns: undefined;
65579
67758
  };
67759
+ recompute_order_status: {
67760
+ Args: {
67761
+ p_order_id: string;
67762
+ };
67763
+ Returns: undefined;
67764
+ };
67765
+ recompute_reserved_for_order: {
67766
+ Args: {
67767
+ p_order_id: string;
67768
+ };
67769
+ Returns: undefined;
67770
+ };
67771
+ recompute_reserved_stock: {
67772
+ Args: {
67773
+ p_trade_item_key: string;
67774
+ };
67775
+ Returns: undefined;
67776
+ };
65580
67777
  refresh_external_customers_grouped: {
65581
67778
  Args: never;
65582
67779
  Returns: undefined;
@@ -65891,6 +68088,24 @@ export declare const deleteLocalDiscount: import("@tanstack/start-client-core").
65891
68088
  };
65892
68089
  Returns: string[];
65893
68090
  };
68091
+ sync_cached_packing_from_product: {
68092
+ Args: {
68093
+ p_product_id: string;
68094
+ };
68095
+ Returns: undefined;
68096
+ };
68097
+ sync_order_cart_item_packing_from_product: {
68098
+ Args: {
68099
+ p_product_id: string;
68100
+ };
68101
+ Returns: undefined;
68102
+ };
68103
+ sync_product_packing_from_floriday_cache: {
68104
+ Args: {
68105
+ p_floriday_id: string;
68106
+ };
68107
+ Returns: undefined;
68108
+ };
65894
68109
  twinfield_decrypt: {
65895
68110
  Args: {
65896
68111
  cipher: string;
@@ -65903,6 +68118,17 @@ export declare const deleteLocalDiscount: import("@tanstack/start-client-core").
65903
68118
  };
65904
68119
  Returns: string;
65905
68120
  };
68121
+ upsert_auto_fulfillment_log: {
68122
+ Args: {
68123
+ p_connection_id: string;
68124
+ p_error?: string;
68125
+ p_fulfillment_order_id?: string;
68126
+ p_reason?: string;
68127
+ p_sales_order_id: string;
68128
+ p_status: string;
68129
+ };
68130
+ Returns: undefined;
68131
+ };
65906
68132
  };
65907
68133
  Enums: {
65908
68134
  app_role: "admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie" | "monteur";
@@ -65927,6 +68153,8 @@ export declare const listLocalProducts: import("@tanstack/start-client-core").Op
65927
68153
  Tables: {
65928
68154
  afhandeling_settings: {
65929
68155
  Row: {
68156
+ auto_print_delivery_note: boolean;
68157
+ auto_process_paused: boolean;
65930
68158
  created_at: string;
65931
68159
  extra_pick_days_with_stickers: number;
65932
68160
  id: string;
@@ -65942,6 +68170,8 @@ export declare const listLocalProducts: import("@tanstack/start-client-core").Op
65942
68170
  user_id: string;
65943
68171
  };
65944
68172
  Insert: {
68173
+ auto_print_delivery_note?: boolean;
68174
+ auto_process_paused?: boolean;
65945
68175
  created_at?: string;
65946
68176
  extra_pick_days_with_stickers?: number;
65947
68177
  id?: string;
@@ -65957,6 +68187,8 @@ export declare const listLocalProducts: import("@tanstack/start-client-core").Op
65957
68187
  user_id: string;
65958
68188
  };
65959
68189
  Update: {
68190
+ auto_print_delivery_note?: boolean;
68191
+ auto_process_paused?: boolean;
65960
68192
  created_at?: string;
65961
68193
  extra_pick_days_with_stickers?: number;
65962
68194
  id?: string;
@@ -66189,6 +68421,9 @@ export declare const listLocalProducts: import("@tanstack/start-client-core").Op
66189
68421
  created_at: string;
66190
68422
  extra_id: string;
66191
68423
  id: string;
68424
+ original_unit_price: number | null;
68425
+ override_reason: string | null;
68426
+ override_unit_price: number | null;
66192
68427
  quantity: number;
66193
68428
  total_price: number;
66194
68429
  unit_price: number;
@@ -66198,6 +68433,9 @@ export declare const listLocalProducts: import("@tanstack/start-client-core").Op
66198
68433
  created_at?: string;
66199
68434
  extra_id: string;
66200
68435
  id?: string;
68436
+ original_unit_price?: number | null;
68437
+ override_reason?: string | null;
68438
+ override_unit_price?: number | null;
66201
68439
  quantity?: number;
66202
68440
  total_price?: number;
66203
68441
  unit_price?: number;
@@ -66207,6 +68445,9 @@ export declare const listLocalProducts: import("@tanstack/start-client-core").Op
66207
68445
  created_at?: string;
66208
68446
  extra_id?: string;
66209
68447
  id?: string;
68448
+ original_unit_price?: number | null;
68449
+ override_reason?: string | null;
68450
+ override_unit_price?: number | null;
66210
68451
  quantity?: number;
66211
68452
  total_price?: number;
66212
68453
  unit_price?: number;
@@ -66227,11 +68468,15 @@ export declare const listLocalProducts: import("@tanstack/start-client-core").Op
66227
68468
  };
66228
68469
  bookings: {
66229
68470
  Row: {
68471
+ archive_reason: string | null;
68472
+ archived_at: string | null;
68473
+ archived_by: string | null;
66230
68474
  company_name: string | null;
66231
68475
  conflict_checked_at: string | null;
66232
68476
  conflict_reason: string | null;
66233
68477
  created_at: string;
66234
68478
  created_by_role: string | null;
68479
+ customer_address: string | null;
66235
68480
  customer_email: string | null;
66236
68481
  customer_name: string | null;
66237
68482
  end_time: string;
@@ -66243,7 +68488,12 @@ export declare const listLocalProducts: import("@tanstack/start-client-core").Op
66243
68488
  invoiced_at: string | null;
66244
68489
  notes: string | null;
66245
68490
  number_of_people: number;
68491
+ overridden_at: string | null;
68492
+ overridden_by: string | null;
68493
+ override_reason: string | null;
68494
+ price_override: boolean;
66246
68495
  room_id: string;
68496
+ room_price_override: number | null;
66247
68497
  start_time: string;
66248
68498
  status: string;
66249
68499
  total_excl_vat: number | null;
@@ -66252,11 +68502,15 @@ export declare const listLocalProducts: import("@tanstack/start-client-core").Op
66252
68502
  vat_amount: number | null;
66253
68503
  };
66254
68504
  Insert: {
68505
+ archive_reason?: string | null;
68506
+ archived_at?: string | null;
68507
+ archived_by?: string | null;
66255
68508
  company_name?: string | null;
66256
68509
  conflict_checked_at?: string | null;
66257
68510
  conflict_reason?: string | null;
66258
68511
  created_at?: string;
66259
68512
  created_by_role?: string | null;
68513
+ customer_address?: string | null;
66260
68514
  customer_email?: string | null;
66261
68515
  customer_name?: string | null;
66262
68516
  end_time: string;
@@ -66268,7 +68522,12 @@ export declare const listLocalProducts: import("@tanstack/start-client-core").Op
66268
68522
  invoiced_at?: string | null;
66269
68523
  notes?: string | null;
66270
68524
  number_of_people?: number;
68525
+ overridden_at?: string | null;
68526
+ overridden_by?: string | null;
68527
+ override_reason?: string | null;
68528
+ price_override?: boolean;
66271
68529
  room_id: string;
68530
+ room_price_override?: number | null;
66272
68531
  start_time: string;
66273
68532
  status?: string;
66274
68533
  total_excl_vat?: number | null;
@@ -66277,11 +68536,15 @@ export declare const listLocalProducts: import("@tanstack/start-client-core").Op
66277
68536
  vat_amount?: number | null;
66278
68537
  };
66279
68538
  Update: {
68539
+ archive_reason?: string | null;
68540
+ archived_at?: string | null;
68541
+ archived_by?: string | null;
66280
68542
  company_name?: string | null;
66281
68543
  conflict_checked_at?: string | null;
66282
68544
  conflict_reason?: string | null;
66283
68545
  created_at?: string;
66284
68546
  created_by_role?: string | null;
68547
+ customer_address?: string | null;
66285
68548
  customer_email?: string | null;
66286
68549
  customer_name?: string | null;
66287
68550
  end_time?: string;
@@ -66293,7 +68556,12 @@ export declare const listLocalProducts: import("@tanstack/start-client-core").Op
66293
68556
  invoiced_at?: string | null;
66294
68557
  notes?: string | null;
66295
68558
  number_of_people?: number;
68559
+ overridden_at?: string | null;
68560
+ overridden_by?: string | null;
68561
+ override_reason?: string | null;
68562
+ price_override?: boolean;
66296
68563
  room_id?: string;
68564
+ room_price_override?: number | null;
66297
68565
  start_time?: string;
66298
68566
  status?: string;
66299
68567
  total_excl_vat?: number | null;
@@ -67122,8 +69390,27 @@ export declare const listLocalProducts: import("@tanstack/start-client-core").Op
67122
69390
  customers: {
67123
69391
  Row: {
67124
69392
  address: string | null;
69393
+ address_line1: string | null;
69394
+ address_line2: string | null;
69395
+ address_type: string | null;
69396
+ attention_to: string | null;
69397
+ bank_account_holder: string | null;
69398
+ bank_account_number: string | null;
69399
+ bank_address_line1: string | null;
69400
+ bank_address_line2: string | null;
69401
+ bank_bic: string | null;
69402
+ bank_city: string | null;
69403
+ bank_country: string | null;
69404
+ bank_house_number: string | null;
69405
+ bank_iban: string | null;
69406
+ bank_name: string | null;
69407
+ bank_national_code: string | null;
69408
+ bank_postal_code: string | null;
69409
+ bank_state: string | null;
69410
+ billing_email: string | null;
67125
69411
  bio: string | null;
67126
69412
  city: string | null;
69413
+ coc_number: string | null;
67127
69414
  commercial_name: string | null;
67128
69415
  company_name: string;
67129
69416
  connection_status: string;
@@ -67132,21 +69419,28 @@ export declare const listLocalProducts: import("@tanstack/start-client-core").Op
67132
69419
  created_at: string;
67133
69420
  custom_fields: import("../integrations/supabase/types").Json;
67134
69421
  customer_class: string | null;
69422
+ customer_number: string | null;
69423
+ discount_days: number | null;
69424
+ discount_percentage: number | null;
67135
69425
  email: string | null;
67136
69426
  external_id: string | null;
69427
+ fax: string | null;
67137
69428
  floriday_connection_id: string | null;
67138
69429
  floriday_organization_id: string | null;
67139
69430
  floriday_raw: import("../integrations/supabase/types").Json | null;
67140
69431
  gln: string | null;
67141
69432
  house_number: string | null;
69433
+ icp_country_code: string | null;
67142
69434
  id: string;
67143
69435
  is_active: boolean;
69436
+ language: string | null;
67144
69437
  last_synced_at: string | null;
67145
69438
  logo_url: string | null;
67146
69439
  markets: string[];
67147
69440
  notes: string | null;
67148
69441
  organization_type: string | null;
67149
69442
  payment_methods: string[];
69443
+ payment_term_days: number | null;
67150
69444
  phone: string | null;
67151
69445
  postal_code: string | null;
67152
69446
  product_groups: string[];
@@ -67157,13 +69451,33 @@ export declare const listLocalProducts: import("@tanstack/start-client-core").Op
67157
69451
  sync_status: string;
67158
69452
  trade_forms: string[];
67159
69453
  updated_at: string;
69454
+ vat_display: string | null;
67160
69455
  vat_number: string | null;
67161
69456
  website: string | null;
67162
69457
  };
67163
69458
  Insert: {
67164
69459
  address?: string | null;
69460
+ address_line1?: string | null;
69461
+ address_line2?: string | null;
69462
+ address_type?: string | null;
69463
+ attention_to?: string | null;
69464
+ bank_account_holder?: string | null;
69465
+ bank_account_number?: string | null;
69466
+ bank_address_line1?: string | null;
69467
+ bank_address_line2?: string | null;
69468
+ bank_bic?: string | null;
69469
+ bank_city?: string | null;
69470
+ bank_country?: string | null;
69471
+ bank_house_number?: string | null;
69472
+ bank_iban?: string | null;
69473
+ bank_name?: string | null;
69474
+ bank_national_code?: string | null;
69475
+ bank_postal_code?: string | null;
69476
+ bank_state?: string | null;
69477
+ billing_email?: string | null;
67165
69478
  bio?: string | null;
67166
69479
  city?: string | null;
69480
+ coc_number?: string | null;
67167
69481
  commercial_name?: string | null;
67168
69482
  company_name: string;
67169
69483
  connection_status?: string;
@@ -67172,21 +69486,28 @@ export declare const listLocalProducts: import("@tanstack/start-client-core").Op
67172
69486
  created_at?: string;
67173
69487
  custom_fields?: import("../integrations/supabase/types").Json;
67174
69488
  customer_class?: string | null;
69489
+ customer_number?: string | null;
69490
+ discount_days?: number | null;
69491
+ discount_percentage?: number | null;
67175
69492
  email?: string | null;
67176
69493
  external_id?: string | null;
69494
+ fax?: string | null;
67177
69495
  floriday_connection_id?: string | null;
67178
69496
  floriday_organization_id?: string | null;
67179
69497
  floriday_raw?: import("../integrations/supabase/types").Json | null;
67180
69498
  gln?: string | null;
67181
69499
  house_number?: string | null;
69500
+ icp_country_code?: string | null;
67182
69501
  id?: string;
67183
69502
  is_active?: boolean;
69503
+ language?: string | null;
67184
69504
  last_synced_at?: string | null;
67185
69505
  logo_url?: string | null;
67186
69506
  markets?: string[];
67187
69507
  notes?: string | null;
67188
69508
  organization_type?: string | null;
67189
69509
  payment_methods?: string[];
69510
+ payment_term_days?: number | null;
67190
69511
  phone?: string | null;
67191
69512
  postal_code?: string | null;
67192
69513
  product_groups?: string[];
@@ -67197,13 +69518,33 @@ export declare const listLocalProducts: import("@tanstack/start-client-core").Op
67197
69518
  sync_status?: string;
67198
69519
  trade_forms?: string[];
67199
69520
  updated_at?: string;
69521
+ vat_display?: string | null;
67200
69522
  vat_number?: string | null;
67201
69523
  website?: string | null;
67202
69524
  };
67203
69525
  Update: {
67204
69526
  address?: string | null;
69527
+ address_line1?: string | null;
69528
+ address_line2?: string | null;
69529
+ address_type?: string | null;
69530
+ attention_to?: string | null;
69531
+ bank_account_holder?: string | null;
69532
+ bank_account_number?: string | null;
69533
+ bank_address_line1?: string | null;
69534
+ bank_address_line2?: string | null;
69535
+ bank_bic?: string | null;
69536
+ bank_city?: string | null;
69537
+ bank_country?: string | null;
69538
+ bank_house_number?: string | null;
69539
+ bank_iban?: string | null;
69540
+ bank_name?: string | null;
69541
+ bank_national_code?: string | null;
69542
+ bank_postal_code?: string | null;
69543
+ bank_state?: string | null;
69544
+ billing_email?: string | null;
67205
69545
  bio?: string | null;
67206
69546
  city?: string | null;
69547
+ coc_number?: string | null;
67207
69548
  commercial_name?: string | null;
67208
69549
  company_name?: string;
67209
69550
  connection_status?: string;
@@ -67212,21 +69553,28 @@ export declare const listLocalProducts: import("@tanstack/start-client-core").Op
67212
69553
  created_at?: string;
67213
69554
  custom_fields?: import("../integrations/supabase/types").Json;
67214
69555
  customer_class?: string | null;
69556
+ customer_number?: string | null;
69557
+ discount_days?: number | null;
69558
+ discount_percentage?: number | null;
67215
69559
  email?: string | null;
67216
69560
  external_id?: string | null;
69561
+ fax?: string | null;
67217
69562
  floriday_connection_id?: string | null;
67218
69563
  floriday_organization_id?: string | null;
67219
69564
  floriday_raw?: import("../integrations/supabase/types").Json | null;
67220
69565
  gln?: string | null;
67221
69566
  house_number?: string | null;
69567
+ icp_country_code?: string | null;
67222
69568
  id?: string;
67223
69569
  is_active?: boolean;
69570
+ language?: string | null;
67224
69571
  last_synced_at?: string | null;
67225
69572
  logo_url?: string | null;
67226
69573
  markets?: string[];
67227
69574
  notes?: string | null;
67228
69575
  organization_type?: string | null;
67229
69576
  payment_methods?: string[];
69577
+ payment_term_days?: number | null;
67230
69578
  phone?: string | null;
67231
69579
  postal_code?: string | null;
67232
69580
  product_groups?: string[];
@@ -67237,6 +69585,7 @@ export declare const listLocalProducts: import("@tanstack/start-client-core").Op
67237
69585
  sync_status?: string;
67238
69586
  trade_forms?: string[];
67239
69587
  updated_at?: string;
69588
+ vat_display?: string | null;
67240
69589
  vat_number?: string | null;
67241
69590
  website?: string | null;
67242
69591
  };
@@ -69183,6 +71532,54 @@ export declare const listLocalProducts: import("@tanstack/start-client-core").Op
69183
71532
  referencedColumns: ["id"];
69184
71533
  }];
69185
71534
  };
71535
+ floriday_auto_fulfillment_log: {
71536
+ Row: {
71537
+ attempts: number;
71538
+ connection_id: string;
71539
+ created_at: string;
71540
+ error: string | null;
71541
+ fulfillment_order_id: string | null;
71542
+ id: string;
71543
+ last_attempt_at: string | null;
71544
+ reason: string | null;
71545
+ sales_order_id: string;
71546
+ status: string;
71547
+ updated_at: string;
71548
+ };
71549
+ Insert: {
71550
+ attempts?: number;
71551
+ connection_id: string;
71552
+ created_at?: string;
71553
+ error?: string | null;
71554
+ fulfillment_order_id?: string | null;
71555
+ id?: string;
71556
+ last_attempt_at?: string | null;
71557
+ reason?: string | null;
71558
+ sales_order_id: string;
71559
+ status?: string;
71560
+ updated_at?: string;
71561
+ };
71562
+ Update: {
71563
+ attempts?: number;
71564
+ connection_id?: string;
71565
+ created_at?: string;
71566
+ error?: string | null;
71567
+ fulfillment_order_id?: string | null;
71568
+ id?: string;
71569
+ last_attempt_at?: string | null;
71570
+ reason?: string | null;
71571
+ sales_order_id?: string;
71572
+ status?: string;
71573
+ updated_at?: string;
71574
+ };
71575
+ Relationships: [{
71576
+ foreignKeyName: "floriday_auto_fulfillment_log_connection_id_fkey";
71577
+ columns: ["connection_id"];
71578
+ isOneToOne: false;
71579
+ referencedRelation: "floriday_connections";
71580
+ referencedColumns: ["id"];
71581
+ }];
71582
+ };
69186
71583
  floriday_base_items_cache: {
69187
71584
  Row: {
69188
71585
  connection_id: string;
@@ -70287,6 +72684,24 @@ export declare const listLocalProducts: import("@tanstack/start-client-core").Op
70287
72684
  referencedColumns: ["id"];
70288
72685
  }];
70289
72686
  };
72687
+ floriday_rate_limit_state: {
72688
+ Row: {
72689
+ bucket: string;
72690
+ last_refill_at: string;
72691
+ tokens: number;
72692
+ };
72693
+ Insert: {
72694
+ bucket: string;
72695
+ last_refill_at?: string;
72696
+ tokens: number;
72697
+ };
72698
+ Update: {
72699
+ bucket?: string;
72700
+ last_refill_at?: string;
72701
+ tokens?: number;
72702
+ };
72703
+ Relationships: [];
72704
+ };
70290
72705
  floriday_resource_schemas: {
70291
72706
  Row: {
70292
72707
  enums: import("../integrations/supabase/types").Json;
@@ -72721,6 +75136,8 @@ export declare const listLocalProducts: import("@tanstack/start-client-core").Op
72721
75136
  order_date: string;
72722
75137
  order_number: string;
72723
75138
  order_source: string;
75139
+ plan_locked_at: string | null;
75140
+ plan_locked_ref: string | null;
72724
75141
  status: string;
72725
75142
  total: string;
72726
75143
  updated_at: string;
@@ -72737,6 +75154,8 @@ export declare const listLocalProducts: import("@tanstack/start-client-core").Op
72737
75154
  order_date?: string;
72738
75155
  order_number: string;
72739
75156
  order_source?: string;
75157
+ plan_locked_at?: string | null;
75158
+ plan_locked_ref?: string | null;
72740
75159
  status?: string;
72741
75160
  total?: string;
72742
75161
  updated_at?: string;
@@ -72753,6 +75172,8 @@ export declare const listLocalProducts: import("@tanstack/start-client-core").Op
72753
75172
  order_date?: string;
72754
75173
  order_number?: string;
72755
75174
  order_source?: string;
75175
+ plan_locked_at?: string | null;
75176
+ plan_locked_ref?: string | null;
72756
75177
  status?: string;
72757
75178
  total?: string;
72758
75179
  updated_at?: string;
@@ -73121,6 +75542,7 @@ export declare const listLocalProducts: import("@tanstack/start-client-core").Op
73121
75542
  };
73122
75543
  profiles: {
73123
75544
  Row: {
75545
+ address: string | null;
73124
75546
  created_at: string;
73125
75547
  display_name: string | null;
73126
75548
  email: string | null;
@@ -73131,6 +75553,7 @@ export declare const listLocalProducts: import("@tanstack/start-client-core").Op
73131
75553
  updated_at: string;
73132
75554
  };
73133
75555
  Insert: {
75556
+ address?: string | null;
73134
75557
  created_at?: string;
73135
75558
  display_name?: string | null;
73136
75559
  email?: string | null;
@@ -73141,6 +75564,7 @@ export declare const listLocalProducts: import("@tanstack/start-client-core").Op
73141
75564
  updated_at?: string;
73142
75565
  };
73143
75566
  Update: {
75567
+ address?: string | null;
73144
75568
  created_at?: string;
73145
75569
  display_name?: string | null;
73146
75570
  email?: string | null;
@@ -74388,6 +76812,114 @@ export declare const listLocalProducts: import("@tanstack/start-client-core").Op
74388
76812
  };
74389
76813
  Relationships: [];
74390
76814
  };
76815
+ trade_item_supply_lines: {
76816
+ Row: {
76817
+ available_quantity: number | null;
76818
+ connection_id: string;
76819
+ created_at: string;
76820
+ currency: string | null;
76821
+ endpoint_family: string | null;
76822
+ environment: string | null;
76823
+ id: string;
76824
+ last_error: string | null;
76825
+ last_status: number | null;
76826
+ packing_configuration_id: string | null;
76827
+ period_end: string | null;
76828
+ period_start: string | null;
76829
+ price_per_piece: number | null;
76830
+ sales_unit: string | null;
76831
+ supply_line_id: string | null;
76832
+ supply_type: string;
76833
+ trade_item_id: string;
76834
+ updated_at: string;
76835
+ user_id: string;
76836
+ week: number | null;
76837
+ year: number | null;
76838
+ };
76839
+ Insert: {
76840
+ available_quantity?: number | null;
76841
+ connection_id: string;
76842
+ created_at?: string;
76843
+ currency?: string | null;
76844
+ endpoint_family?: string | null;
76845
+ environment?: string | null;
76846
+ id?: string;
76847
+ last_error?: string | null;
76848
+ last_status?: number | null;
76849
+ packing_configuration_id?: string | null;
76850
+ period_end?: string | null;
76851
+ period_start?: string | null;
76852
+ price_per_piece?: number | null;
76853
+ sales_unit?: string | null;
76854
+ supply_line_id?: string | null;
76855
+ supply_type?: string;
76856
+ trade_item_id: string;
76857
+ updated_at?: string;
76858
+ user_id: string;
76859
+ week?: number | null;
76860
+ year?: number | null;
76861
+ };
76862
+ Update: {
76863
+ available_quantity?: number | null;
76864
+ connection_id?: string;
76865
+ created_at?: string;
76866
+ currency?: string | null;
76867
+ endpoint_family?: string | null;
76868
+ environment?: string | null;
76869
+ id?: string;
76870
+ last_error?: string | null;
76871
+ last_status?: number | null;
76872
+ packing_configuration_id?: string | null;
76873
+ period_end?: string | null;
76874
+ period_start?: string | null;
76875
+ price_per_piece?: number | null;
76876
+ sales_unit?: string | null;
76877
+ supply_line_id?: string | null;
76878
+ supply_type?: string;
76879
+ trade_item_id?: string;
76880
+ updated_at?: string;
76881
+ user_id?: string;
76882
+ week?: number | null;
76883
+ year?: number | null;
76884
+ };
76885
+ Relationships: [];
76886
+ };
76887
+ trade_item_warehouse_preferences: {
76888
+ Row: {
76889
+ connection_id: string;
76890
+ created_at: string;
76891
+ id: string;
76892
+ trade_item_id: string;
76893
+ updated_at: string;
76894
+ warehouse_id: string;
76895
+ warehouse_name: string | null;
76896
+ };
76897
+ Insert: {
76898
+ connection_id: string;
76899
+ created_at?: string;
76900
+ id?: string;
76901
+ trade_item_id: string;
76902
+ updated_at?: string;
76903
+ warehouse_id: string;
76904
+ warehouse_name?: string | null;
76905
+ };
76906
+ Update: {
76907
+ connection_id?: string;
76908
+ created_at?: string;
76909
+ id?: string;
76910
+ trade_item_id?: string;
76911
+ updated_at?: string;
76912
+ warehouse_id?: string;
76913
+ warehouse_name?: string | null;
76914
+ };
76915
+ Relationships: [{
76916
+ foreignKeyName: "trade_item_warehouse_preferences_connection_id_fkey";
76917
+ columns: ["connection_id"];
76918
+ isOneToOne: false;
76919
+ referencedRelation: "floriday_connections";
76920
+ referencedColumns: ["id"];
76921
+ }];
76922
+ };
74391
76923
  twinfield_connections: {
74392
76924
  Row: {
74393
76925
  access_token: string | null;
@@ -76073,7 +78605,19 @@ export declare const listLocalProducts: import("@tanstack/start-client-core").Op
76073
78605
  };
76074
78606
  cleanup_old_bookings: {
76075
78607
  Args: never;
76076
- Returns: number;
78608
+ Returns: undefined;
78609
+ };
78610
+ consume_floriday_rate_limit: {
78611
+ Args: {
78612
+ p_bucket: string;
78613
+ p_capacity: number;
78614
+ p_cost?: number;
78615
+ p_refill_per_sec: number;
78616
+ };
78617
+ Returns: {
78618
+ granted: boolean;
78619
+ wait_ms: number;
78620
+ }[];
76077
78621
  };
76078
78622
  control_get_todays_carts: {
76079
78623
  Args: never;
@@ -76155,6 +78699,12 @@ export declare const listLocalProducts: import("@tanstack/start-client-core").Op
76155
78699
  status: string;
76156
78700
  }[];
76157
78701
  };
78702
+ enqueue_cart_replan_if_unlocked: {
78703
+ Args: {
78704
+ p_order_id: string;
78705
+ };
78706
+ Returns: undefined;
78707
+ };
76158
78708
  ensure_trade_item_stock_row: {
76159
78709
  Args: {
76160
78710
  p_key: string;
@@ -76548,6 +79098,24 @@ export declare const listLocalProducts: import("@tanstack/start-client-core").Op
76548
79098
  };
76549
79099
  Returns: undefined;
76550
79100
  };
79101
+ recompute_order_status: {
79102
+ Args: {
79103
+ p_order_id: string;
79104
+ };
79105
+ Returns: undefined;
79106
+ };
79107
+ recompute_reserved_for_order: {
79108
+ Args: {
79109
+ p_order_id: string;
79110
+ };
79111
+ Returns: undefined;
79112
+ };
79113
+ recompute_reserved_stock: {
79114
+ Args: {
79115
+ p_trade_item_key: string;
79116
+ };
79117
+ Returns: undefined;
79118
+ };
76551
79119
  refresh_external_customers_grouped: {
76552
79120
  Args: never;
76553
79121
  Returns: undefined;
@@ -76862,6 +79430,24 @@ export declare const listLocalProducts: import("@tanstack/start-client-core").Op
76862
79430
  };
76863
79431
  Returns: string[];
76864
79432
  };
79433
+ sync_cached_packing_from_product: {
79434
+ Args: {
79435
+ p_product_id: string;
79436
+ };
79437
+ Returns: undefined;
79438
+ };
79439
+ sync_order_cart_item_packing_from_product: {
79440
+ Args: {
79441
+ p_product_id: string;
79442
+ };
79443
+ Returns: undefined;
79444
+ };
79445
+ sync_product_packing_from_floriday_cache: {
79446
+ Args: {
79447
+ p_floriday_id: string;
79448
+ };
79449
+ Returns: undefined;
79450
+ };
76865
79451
  twinfield_decrypt: {
76866
79452
  Args: {
76867
79453
  cipher: string;
@@ -76874,6 +79460,17 @@ export declare const listLocalProducts: import("@tanstack/start-client-core").Op
76874
79460
  };
76875
79461
  Returns: string;
76876
79462
  };
79463
+ upsert_auto_fulfillment_log: {
79464
+ Args: {
79465
+ p_connection_id: string;
79466
+ p_error?: string;
79467
+ p_fulfillment_order_id?: string;
79468
+ p_reason?: string;
79469
+ p_sales_order_id: string;
79470
+ p_status: string;
79471
+ };
79472
+ Returns: undefined;
79473
+ };
76877
79474
  };
76878
79475
  Enums: {
76879
79476
  app_role: "admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie" | "monteur";