@flowselections/floriday-verkoop-module 1.0.12 → 1.0.14

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 (65) hide show
  1. package/dist-lib/components/verkoop/AutoFulfillmentStatusCard.d.ts +4 -0
  2. package/dist-lib/components/verkoop/AutoFulfillmentStatusCard.d.ts.map +1 -0
  3. package/dist-lib/components/verkoop/AutoFulfillmentStatusCard.js +95 -0
  4. package/dist-lib/components/verkoop/CartAssignmentWizard.d.ts +6 -0
  5. package/dist-lib/components/verkoop/CartAssignmentWizard.d.ts.map +1 -0
  6. package/dist-lib/components/verkoop/CartAssignmentWizard.js +194 -0
  7. package/dist-lib/components/verkoop/CreateOrderPage.d.ts.map +1 -1
  8. package/dist-lib/components/verkoop/CreateOrderPage.js +14 -4
  9. package/dist-lib/components/verkoop/OrderAfleverbrievenCard.d.ts +4 -0
  10. package/dist-lib/components/verkoop/OrderAfleverbrievenCard.d.ts.map +1 -0
  11. package/dist-lib/components/verkoop/OrderAfleverbrievenCard.js +44 -0
  12. package/dist-lib/components/verkoop/OrderKarindelingCard.d.ts +5 -0
  13. package/dist-lib/components/verkoop/OrderKarindelingCard.d.ts.map +1 -0
  14. package/dist-lib/components/verkoop/OrderKarindelingCard.js +160 -0
  15. package/dist-lib/components/verkoop/SalesOrderDetailView.d.ts.map +1 -1
  16. package/dist-lib/components/verkoop/SalesOrderDetailView.js +6 -3
  17. package/dist-lib/components/verkoop/VerkoopOrdersPage.d.ts.map +1 -1
  18. package/dist-lib/components/verkoop/VerkoopOrdersPage.js +39 -3
  19. package/dist-lib/integrations/supabase/auth-middleware.d.ts +605 -4
  20. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
  21. package/dist-lib/integrations/supabase/client.d.ts +605 -4
  22. package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
  23. package/dist-lib/integrations/supabase/client.server.d.ts +605 -4
  24. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
  25. package/dist-lib/integrations/supabase/client.server.js +4 -4
  26. package/dist-lib/integrations/supabase/types.d.ts +613 -4
  27. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  28. package/dist-lib/lib/cart-lock.functions.d.ts +11356 -0
  29. package/dist-lib/lib/cart-lock.functions.d.ts.map +1 -0
  30. package/dist-lib/lib/cart-lock.functions.js +47 -0
  31. package/dist-lib/lib/cart-planner.d.ts +38 -0
  32. package/dist-lib/lib/cart-planner.d.ts.map +1 -0
  33. package/dist-lib/lib/cart-planner.js +217 -0
  34. package/dist-lib/lib/cart-replan.functions.d.ts +22729 -0
  35. package/dist-lib/lib/cart-replan.functions.d.ts.map +1 -0
  36. package/dist-lib/lib/cart-replan.functions.js +203 -0
  37. package/dist-lib/lib/create-order.functions.d.ts +26999 -76
  38. package/dist-lib/lib/create-order.functions.d.ts.map +1 -1
  39. package/dist-lib/lib/create-order.functions.js +158 -3
  40. package/dist-lib/lib/floriday-auto-fulfillment.functions.d.ts +34033 -0
  41. package/dist-lib/lib/floriday-auto-fulfillment.functions.d.ts.map +1 -0
  42. package/dist-lib/lib/floriday-auto-fulfillment.functions.js +65 -0
  43. package/dist-lib/lib/floriday-auto-fulfillment.server.d.ts +21 -0
  44. package/dist-lib/lib/floriday-auto-fulfillment.server.d.ts.map +1 -0
  45. package/dist-lib/lib/floriday-auto-fulfillment.server.js +352 -0
  46. package/dist-lib/lib/floriday-logistic-labels.functions.d.ts +11351 -0
  47. package/dist-lib/lib/floriday-logistic-labels.functions.d.ts.map +1 -0
  48. package/dist-lib/lib/floriday-logistic-labels.functions.js +171 -0
  49. package/dist-lib/lib/floriday-public.functions.d.ts +4237 -44
  50. package/dist-lib/lib/floriday-public.functions.d.ts.map +1 -1
  51. package/dist-lib/lib/floriday-public.functions.js +45 -47
  52. package/dist-lib/lib/floriday-writes.functions.d.ts +3025 -20
  53. package/dist-lib/lib/floriday-writes.functions.d.ts.map +1 -1
  54. package/dist-lib/lib/salesorders-mapping.d.ts +2 -0
  55. package/dist-lib/lib/salesorders-mapping.d.ts.map +1 -1
  56. package/dist-lib/lib/salesorders-mapping.js +46 -20
  57. package/dist-lib/lib/salesorders.functions.d.ts +1831 -28
  58. package/dist-lib/lib/salesorders.functions.d.ts.map +1 -1
  59. package/dist-lib/lib/salesorders.functions.js +8 -0
  60. package/dist-lib/lib/tradeitems.functions.d.ts +605 -4
  61. package/dist-lib/lib/tradeitems.functions.d.ts.map +1 -1
  62. package/dist-lib/lib/useSalesOrdersQuery.d.ts +1 -0
  63. package/dist-lib/lib/useSalesOrdersQuery.d.ts.map +1 -1
  64. package/dist-lib/lib/useSalesOrdersQuery.js +121 -39
  65. package/package.json +1 -1
@@ -8,7 +8,10 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
8
8
  Tables: {
9
9
  afhandeling_settings: {
10
10
  Row: {
11
+ auto_print_delivery_note: boolean;
12
+ auto_process_paused: boolean;
11
13
  created_at: string;
14
+ extra_pick_days_with_stickers: number;
12
15
  id: string;
13
16
  max_workdays_earlier_pick: number;
14
17
  pick_days_before_transport: number;
@@ -22,7 +25,10 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
22
25
  user_id: string;
23
26
  };
24
27
  Insert: {
28
+ auto_print_delivery_note?: boolean;
29
+ auto_process_paused?: boolean;
25
30
  created_at?: string;
31
+ extra_pick_days_with_stickers?: number;
26
32
  id?: string;
27
33
  max_workdays_earlier_pick?: number;
28
34
  pick_days_before_transport?: number;
@@ -36,7 +42,10 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
36
42
  user_id: string;
37
43
  };
38
44
  Update: {
45
+ auto_print_delivery_note?: boolean;
46
+ auto_process_paused?: boolean;
39
47
  created_at?: string;
48
+ extra_pick_days_with_stickers?: number;
40
49
  id?: string;
41
50
  max_workdays_earlier_pick?: number;
42
51
  pick_days_before_transport?: number;
@@ -267,6 +276,9 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
267
276
  created_at: string;
268
277
  extra_id: string;
269
278
  id: string;
279
+ original_unit_price: number | null;
280
+ override_reason: string | null;
281
+ override_unit_price: number | null;
270
282
  quantity: number;
271
283
  total_price: number;
272
284
  unit_price: number;
@@ -276,6 +288,9 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
276
288
  created_at?: string;
277
289
  extra_id: string;
278
290
  id?: string;
291
+ original_unit_price?: number | null;
292
+ override_reason?: string | null;
293
+ override_unit_price?: number | null;
279
294
  quantity?: number;
280
295
  total_price?: number;
281
296
  unit_price?: number;
@@ -285,6 +300,9 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
285
300
  created_at?: string;
286
301
  extra_id?: string;
287
302
  id?: string;
303
+ original_unit_price?: number | null;
304
+ override_reason?: string | null;
305
+ override_unit_price?: number | null;
288
306
  quantity?: number;
289
307
  total_price?: number;
290
308
  unit_price?: number;
@@ -305,11 +323,15 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
305
323
  };
306
324
  bookings: {
307
325
  Row: {
326
+ archive_reason: string | null;
327
+ archived_at: string | null;
328
+ archived_by: string | null;
308
329
  company_name: string | null;
309
330
  conflict_checked_at: string | null;
310
331
  conflict_reason: string | null;
311
332
  created_at: string;
312
333
  created_by_role: string | null;
334
+ customer_address: string | null;
313
335
  customer_email: string | null;
314
336
  customer_name: string | null;
315
337
  end_time: string;
@@ -321,7 +343,12 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
321
343
  invoiced_at: string | null;
322
344
  notes: string | null;
323
345
  number_of_people: number;
346
+ overridden_at: string | null;
347
+ overridden_by: string | null;
348
+ override_reason: string | null;
349
+ price_override: boolean;
324
350
  room_id: string;
351
+ room_price_override: number | null;
325
352
  start_time: string;
326
353
  status: string;
327
354
  total_excl_vat: number | null;
@@ -330,11 +357,15 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
330
357
  vat_amount: number | null;
331
358
  };
332
359
  Insert: {
360
+ archive_reason?: string | null;
361
+ archived_at?: string | null;
362
+ archived_by?: string | null;
333
363
  company_name?: string | null;
334
364
  conflict_checked_at?: string | null;
335
365
  conflict_reason?: string | null;
336
366
  created_at?: string;
337
367
  created_by_role?: string | null;
368
+ customer_address?: string | null;
338
369
  customer_email?: string | null;
339
370
  customer_name?: string | null;
340
371
  end_time: string;
@@ -346,7 +377,12 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
346
377
  invoiced_at?: string | null;
347
378
  notes?: string | null;
348
379
  number_of_people?: number;
380
+ overridden_at?: string | null;
381
+ overridden_by?: string | null;
382
+ override_reason?: string | null;
383
+ price_override?: boolean;
349
384
  room_id: string;
385
+ room_price_override?: number | null;
350
386
  start_time: string;
351
387
  status?: string;
352
388
  total_excl_vat?: number | null;
@@ -355,11 +391,15 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
355
391
  vat_amount?: number | null;
356
392
  };
357
393
  Update: {
394
+ archive_reason?: string | null;
395
+ archived_at?: string | null;
396
+ archived_by?: string | null;
358
397
  company_name?: string | null;
359
398
  conflict_checked_at?: string | null;
360
399
  conflict_reason?: string | null;
361
400
  created_at?: string;
362
401
  created_by_role?: string | null;
402
+ customer_address?: string | null;
363
403
  customer_email?: string | null;
364
404
  customer_name?: string | null;
365
405
  end_time?: string;
@@ -371,7 +411,12 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
371
411
  invoiced_at?: string | null;
372
412
  notes?: string | null;
373
413
  number_of_people?: number;
414
+ overridden_at?: string | null;
415
+ overridden_by?: string | null;
416
+ override_reason?: string | null;
417
+ price_override?: boolean;
374
418
  room_id?: string;
419
+ room_price_override?: number | null;
375
420
  start_time?: string;
376
421
  status?: string;
377
422
  total_excl_vat?: number | null;
@@ -828,6 +873,36 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
828
873
  };
829
874
  Relationships: [];
830
875
  };
876
+ cart_replan_queue: {
877
+ Row: {
878
+ attempts: number;
879
+ last_error: string | null;
880
+ order_id: string;
881
+ processed_at: string | null;
882
+ requested_at: string;
883
+ };
884
+ Insert: {
885
+ attempts?: number;
886
+ last_error?: string | null;
887
+ order_id: string;
888
+ processed_at?: string | null;
889
+ requested_at?: string;
890
+ };
891
+ Update: {
892
+ attempts?: number;
893
+ last_error?: string | null;
894
+ order_id?: string;
895
+ processed_at?: string | null;
896
+ requested_at?: string;
897
+ };
898
+ Relationships: [{
899
+ foreignKeyName: "cart_replan_queue_order_id_fkey";
900
+ columns: ["order_id"];
901
+ isOneToOne: true;
902
+ referencedRelation: "orders";
903
+ referencedColumns: ["id"];
904
+ }];
905
+ };
831
906
  collections: {
832
907
  Row: {
833
908
  created_at: string;
@@ -1170,8 +1245,27 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
1170
1245
  customers: {
1171
1246
  Row: {
1172
1247
  address: string | null;
1248
+ address_line1: string | null;
1249
+ address_line2: string | null;
1250
+ address_type: string | null;
1251
+ attention_to: string | null;
1252
+ bank_account_holder: string | null;
1253
+ bank_account_number: string | null;
1254
+ bank_address_line1: string | null;
1255
+ bank_address_line2: string | null;
1256
+ bank_bic: string | null;
1257
+ bank_city: string | null;
1258
+ bank_country: string | null;
1259
+ bank_house_number: string | null;
1260
+ bank_iban: string | null;
1261
+ bank_name: string | null;
1262
+ bank_national_code: string | null;
1263
+ bank_postal_code: string | null;
1264
+ bank_state: string | null;
1265
+ billing_email: string | null;
1173
1266
  bio: string | null;
1174
1267
  city: string | null;
1268
+ coc_number: string | null;
1175
1269
  commercial_name: string | null;
1176
1270
  company_name: string;
1177
1271
  connection_status: string;
@@ -1180,21 +1274,28 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
1180
1274
  created_at: string;
1181
1275
  custom_fields: import("../integrations/supabase/types").Json;
1182
1276
  customer_class: string | null;
1277
+ customer_number: string | null;
1278
+ discount_days: number | null;
1279
+ discount_percentage: number | null;
1183
1280
  email: string | null;
1184
1281
  external_id: string | null;
1282
+ fax: string | null;
1185
1283
  floriday_connection_id: string | null;
1186
1284
  floriday_organization_id: string | null;
1187
1285
  floriday_raw: import("../integrations/supabase/types").Json | null;
1188
1286
  gln: string | null;
1189
1287
  house_number: string | null;
1288
+ icp_country_code: string | null;
1190
1289
  id: string;
1191
1290
  is_active: boolean;
1291
+ language: string | null;
1192
1292
  last_synced_at: string | null;
1193
1293
  logo_url: string | null;
1194
1294
  markets: string[];
1195
1295
  notes: string | null;
1196
1296
  organization_type: string | null;
1197
1297
  payment_methods: string[];
1298
+ payment_term_days: number | null;
1198
1299
  phone: string | null;
1199
1300
  postal_code: string | null;
1200
1301
  product_groups: string[];
@@ -1205,13 +1306,33 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
1205
1306
  sync_status: string;
1206
1307
  trade_forms: string[];
1207
1308
  updated_at: string;
1309
+ vat_display: string | null;
1208
1310
  vat_number: string | null;
1209
1311
  website: string | null;
1210
1312
  };
1211
1313
  Insert: {
1212
1314
  address?: string | null;
1315
+ address_line1?: string | null;
1316
+ address_line2?: string | null;
1317
+ address_type?: string | null;
1318
+ attention_to?: string | null;
1319
+ bank_account_holder?: string | null;
1320
+ bank_account_number?: string | null;
1321
+ bank_address_line1?: string | null;
1322
+ bank_address_line2?: string | null;
1323
+ bank_bic?: string | null;
1324
+ bank_city?: string | null;
1325
+ bank_country?: string | null;
1326
+ bank_house_number?: string | null;
1327
+ bank_iban?: string | null;
1328
+ bank_name?: string | null;
1329
+ bank_national_code?: string | null;
1330
+ bank_postal_code?: string | null;
1331
+ bank_state?: string | null;
1332
+ billing_email?: string | null;
1213
1333
  bio?: string | null;
1214
1334
  city?: string | null;
1335
+ coc_number?: string | null;
1215
1336
  commercial_name?: string | null;
1216
1337
  company_name: string;
1217
1338
  connection_status?: string;
@@ -1220,21 +1341,28 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
1220
1341
  created_at?: string;
1221
1342
  custom_fields?: import("../integrations/supabase/types").Json;
1222
1343
  customer_class?: string | null;
1344
+ customer_number?: string | null;
1345
+ discount_days?: number | null;
1346
+ discount_percentage?: number | null;
1223
1347
  email?: string | null;
1224
1348
  external_id?: string | null;
1349
+ fax?: string | null;
1225
1350
  floriday_connection_id?: string | null;
1226
1351
  floriday_organization_id?: string | null;
1227
1352
  floriday_raw?: import("../integrations/supabase/types").Json | null;
1228
1353
  gln?: string | null;
1229
1354
  house_number?: string | null;
1355
+ icp_country_code?: string | null;
1230
1356
  id?: string;
1231
1357
  is_active?: boolean;
1358
+ language?: string | null;
1232
1359
  last_synced_at?: string | null;
1233
1360
  logo_url?: string | null;
1234
1361
  markets?: string[];
1235
1362
  notes?: string | null;
1236
1363
  organization_type?: string | null;
1237
1364
  payment_methods?: string[];
1365
+ payment_term_days?: number | null;
1238
1366
  phone?: string | null;
1239
1367
  postal_code?: string | null;
1240
1368
  product_groups?: string[];
@@ -1245,13 +1373,33 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
1245
1373
  sync_status?: string;
1246
1374
  trade_forms?: string[];
1247
1375
  updated_at?: string;
1376
+ vat_display?: string | null;
1248
1377
  vat_number?: string | null;
1249
1378
  website?: string | null;
1250
1379
  };
1251
1380
  Update: {
1252
1381
  address?: string | null;
1382
+ address_line1?: string | null;
1383
+ address_line2?: string | null;
1384
+ address_type?: string | null;
1385
+ attention_to?: string | null;
1386
+ bank_account_holder?: string | null;
1387
+ bank_account_number?: string | null;
1388
+ bank_address_line1?: string | null;
1389
+ bank_address_line2?: string | null;
1390
+ bank_bic?: string | null;
1391
+ bank_city?: string | null;
1392
+ bank_country?: string | null;
1393
+ bank_house_number?: string | null;
1394
+ bank_iban?: string | null;
1395
+ bank_name?: string | null;
1396
+ bank_national_code?: string | null;
1397
+ bank_postal_code?: string | null;
1398
+ bank_state?: string | null;
1399
+ billing_email?: string | null;
1253
1400
  bio?: string | null;
1254
1401
  city?: string | null;
1402
+ coc_number?: string | null;
1255
1403
  commercial_name?: string | null;
1256
1404
  company_name?: string;
1257
1405
  connection_status?: string;
@@ -1260,21 +1408,28 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
1260
1408
  created_at?: string;
1261
1409
  custom_fields?: import("../integrations/supabase/types").Json;
1262
1410
  customer_class?: string | null;
1411
+ customer_number?: string | null;
1412
+ discount_days?: number | null;
1413
+ discount_percentage?: number | null;
1263
1414
  email?: string | null;
1264
1415
  external_id?: string | null;
1416
+ fax?: string | null;
1265
1417
  floriday_connection_id?: string | null;
1266
1418
  floriday_organization_id?: string | null;
1267
1419
  floriday_raw?: import("../integrations/supabase/types").Json | null;
1268
1420
  gln?: string | null;
1269
1421
  house_number?: string | null;
1422
+ icp_country_code?: string | null;
1270
1423
  id?: string;
1271
1424
  is_active?: boolean;
1425
+ language?: string | null;
1272
1426
  last_synced_at?: string | null;
1273
1427
  logo_url?: string | null;
1274
1428
  markets?: string[];
1275
1429
  notes?: string | null;
1276
1430
  organization_type?: string | null;
1277
1431
  payment_methods?: string[];
1432
+ payment_term_days?: number | null;
1278
1433
  phone?: string | null;
1279
1434
  postal_code?: string | null;
1280
1435
  product_groups?: string[];
@@ -1285,6 +1440,7 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
1285
1440
  sync_status?: string;
1286
1441
  trade_forms?: string[];
1287
1442
  updated_at?: string;
1443
+ vat_display?: string | null;
1288
1444
  vat_number?: string | null;
1289
1445
  website?: string | null;
1290
1446
  };
@@ -2953,34 +3109,52 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
2953
3109
  Row: {
2954
3110
  catalog_key: string | null;
2955
3111
  catalog_url: string;
3112
+ client_id: string | null;
3113
+ client_secret_ciphertext: string | null;
3114
+ client_secret_last4: string | null;
2956
3115
  created_at: string;
2957
3116
  id: number;
2958
3117
  last_meta: import("../integrations/supabase/types").Json | null;
2959
3118
  last_test_at: string | null;
2960
3119
  last_test_error: string | null;
2961
3120
  last_test_ok: boolean | null;
3121
+ last_token_test_at: string | null;
3122
+ last_token_test_error: string | null;
3123
+ last_token_test_ok: boolean | null;
2962
3124
  updated_at: string;
2963
3125
  };
2964
3126
  Insert: {
2965
3127
  catalog_key?: string | null;
2966
3128
  catalog_url?: string;
3129
+ client_id?: string | null;
3130
+ client_secret_ciphertext?: string | null;
3131
+ client_secret_last4?: string | null;
2967
3132
  created_at?: string;
2968
3133
  id?: number;
2969
3134
  last_meta?: import("../integrations/supabase/types").Json | null;
2970
3135
  last_test_at?: string | null;
2971
3136
  last_test_error?: string | null;
2972
3137
  last_test_ok?: boolean | null;
3138
+ last_token_test_at?: string | null;
3139
+ last_token_test_error?: string | null;
3140
+ last_token_test_ok?: boolean | null;
2973
3141
  updated_at?: string;
2974
3142
  };
2975
3143
  Update: {
2976
3144
  catalog_key?: string | null;
2977
3145
  catalog_url?: string;
3146
+ client_id?: string | null;
3147
+ client_secret_ciphertext?: string | null;
3148
+ client_secret_last4?: string | null;
2978
3149
  created_at?: string;
2979
3150
  id?: number;
2980
3151
  last_meta?: import("../integrations/supabase/types").Json | null;
2981
3152
  last_test_at?: string | null;
2982
3153
  last_test_error?: string | null;
2983
3154
  last_test_ok?: boolean | null;
3155
+ last_token_test_at?: string | null;
3156
+ last_token_test_error?: string | null;
3157
+ last_token_test_ok?: boolean | null;
2984
3158
  updated_at?: string;
2985
3159
  };
2986
3160
  Relationships: [];
@@ -3213,6 +3387,54 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
3213
3387
  referencedColumns: ["id"];
3214
3388
  }];
3215
3389
  };
3390
+ floriday_auto_fulfillment_log: {
3391
+ Row: {
3392
+ attempts: number;
3393
+ connection_id: string;
3394
+ created_at: string;
3395
+ error: string | null;
3396
+ fulfillment_order_id: string | null;
3397
+ id: string;
3398
+ last_attempt_at: string | null;
3399
+ reason: string | null;
3400
+ sales_order_id: string;
3401
+ status: string;
3402
+ updated_at: string;
3403
+ };
3404
+ Insert: {
3405
+ attempts?: number;
3406
+ connection_id: string;
3407
+ created_at?: string;
3408
+ error?: string | null;
3409
+ fulfillment_order_id?: string | null;
3410
+ id?: string;
3411
+ last_attempt_at?: string | null;
3412
+ reason?: string | null;
3413
+ sales_order_id: string;
3414
+ status?: string;
3415
+ updated_at?: string;
3416
+ };
3417
+ Update: {
3418
+ attempts?: number;
3419
+ connection_id?: string;
3420
+ created_at?: string;
3421
+ error?: string | null;
3422
+ fulfillment_order_id?: string | null;
3423
+ id?: string;
3424
+ last_attempt_at?: string | null;
3425
+ reason?: string | null;
3426
+ sales_order_id?: string;
3427
+ status?: string;
3428
+ updated_at?: string;
3429
+ };
3430
+ Relationships: [{
3431
+ foreignKeyName: "floriday_auto_fulfillment_log_connection_id_fkey";
3432
+ columns: ["connection_id"];
3433
+ isOneToOne: false;
3434
+ referencedRelation: "floriday_connections";
3435
+ referencedColumns: ["id"];
3436
+ }];
3437
+ };
3216
3438
  floriday_base_items_cache: {
3217
3439
  Row: {
3218
3440
  connection_id: string;
@@ -4317,6 +4539,24 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
4317
4539
  referencedColumns: ["id"];
4318
4540
  }];
4319
4541
  };
4542
+ floriday_rate_limit_state: {
4543
+ Row: {
4544
+ bucket: string;
4545
+ last_refill_at: string;
4546
+ tokens: number;
4547
+ };
4548
+ Insert: {
4549
+ bucket: string;
4550
+ last_refill_at?: string;
4551
+ tokens: number;
4552
+ };
4553
+ Update: {
4554
+ bucket?: string;
4555
+ last_refill_at?: string;
4556
+ tokens?: number;
4557
+ };
4558
+ Relationships: [];
4559
+ };
4320
4560
  floriday_resource_schemas: {
4321
4561
  Row: {
4322
4562
  enums: import("../integrations/supabase/types").Json;
@@ -4740,6 +4980,60 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
4740
4980
  referencedColumns: ["id"];
4741
4981
  }];
4742
4982
  };
4983
+ flow_role_assignments: {
4984
+ Row: {
4985
+ created_at: string;
4986
+ id: string;
4987
+ role_id: string;
4988
+ user_id: string;
4989
+ };
4990
+ Insert: {
4991
+ created_at?: string;
4992
+ id?: string;
4993
+ role_id: string;
4994
+ user_id: string;
4995
+ };
4996
+ Update: {
4997
+ created_at?: string;
4998
+ id?: string;
4999
+ role_id?: string;
5000
+ user_id?: string;
5001
+ };
5002
+ Relationships: [{
5003
+ foreignKeyName: "flow_role_assignments_role_id_fkey";
5004
+ columns: ["role_id"];
5005
+ isOneToOne: false;
5006
+ referencedRelation: "flow_roles";
5007
+ referencedColumns: ["id"];
5008
+ }];
5009
+ };
5010
+ flow_roles: {
5011
+ Row: {
5012
+ created_at: string;
5013
+ description: string | null;
5014
+ id: string;
5015
+ module_access: string[];
5016
+ name: string;
5017
+ updated_at: string;
5018
+ };
5019
+ Insert: {
5020
+ created_at?: string;
5021
+ description?: string | null;
5022
+ id?: string;
5023
+ module_access?: string[];
5024
+ name: string;
5025
+ updated_at?: string;
5026
+ };
5027
+ Update: {
5028
+ created_at?: string;
5029
+ description?: string | null;
5030
+ id?: string;
5031
+ module_access?: string[];
5032
+ name?: string;
5033
+ updated_at?: string;
5034
+ };
5035
+ Relationships: [];
5036
+ };
4743
5037
  imap_accounts: {
4744
5038
  Row: {
4745
5039
  created_at: string;
@@ -5371,6 +5665,7 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
5371
5665
  matched_customer_id: string | null;
5372
5666
  message_id: string;
5373
5667
  notes: string | null;
5668
+ order_number: string | null;
5374
5669
  parsed_payload: import("../integrations/supabase/types").Json | null;
5375
5670
  reviewed_at: string | null;
5376
5671
  reviewed_by: string | null;
@@ -5386,6 +5681,7 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
5386
5681
  matched_customer_id?: string | null;
5387
5682
  message_id: string;
5388
5683
  notes?: string | null;
5684
+ order_number?: string | null;
5389
5685
  parsed_payload?: import("../integrations/supabase/types").Json | null;
5390
5686
  reviewed_at?: string | null;
5391
5687
  reviewed_by?: string | null;
@@ -5401,6 +5697,7 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
5401
5697
  matched_customer_id?: string | null;
5402
5698
  message_id?: string;
5403
5699
  notes?: string | null;
5700
+ order_number?: string | null;
5404
5701
  parsed_payload?: import("../integrations/supabase/types").Json | null;
5405
5702
  reviewed_at?: string | null;
5406
5703
  reviewed_by?: string | null;
@@ -6257,6 +6554,7 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
6257
6554
  id: string;
6258
6555
  items: import("../integrations/supabase/types").Json;
6259
6556
  notes: string | null;
6557
+ order_number: string | null;
6260
6558
  recipient_id: string;
6261
6559
  total_amount: number;
6262
6560
  };
@@ -6270,6 +6568,7 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
6270
6568
  id?: string;
6271
6569
  items?: import("../integrations/supabase/types").Json;
6272
6570
  notes?: string | null;
6571
+ order_number?: string | null;
6273
6572
  recipient_id: string;
6274
6573
  total_amount?: number;
6275
6574
  };
@@ -6283,6 +6582,7 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
6283
6582
  id?: string;
6284
6583
  items?: import("../integrations/supabase/types").Json;
6285
6584
  notes?: string | null;
6585
+ order_number?: string | null;
6286
6586
  recipient_id?: string;
6287
6587
  total_amount?: number;
6288
6588
  };
@@ -6442,6 +6742,9 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
6442
6742
  crates_per_layer: number;
6443
6743
  created_at: string;
6444
6744
  id: string;
6745
+ layer_fraction: number;
6746
+ layer_share_pct: number;
6747
+ layers_per_cart: number;
6445
6748
  order_item_id: string | null;
6446
6749
  plants_per_crate: number;
6447
6750
  product_id: string | null;
@@ -6453,6 +6756,9 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
6453
6756
  crates_per_layer?: number;
6454
6757
  created_at?: string;
6455
6758
  id?: string;
6759
+ layer_fraction?: number;
6760
+ layer_share_pct?: number;
6761
+ layers_per_cart?: number;
6456
6762
  order_item_id?: string | null;
6457
6763
  plants_per_crate?: number;
6458
6764
  product_id?: string | null;
@@ -6464,6 +6770,9 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
6464
6770
  crates_per_layer?: number;
6465
6771
  created_at?: string;
6466
6772
  id?: string;
6773
+ layer_fraction?: number;
6774
+ layer_share_pct?: number;
6775
+ layers_per_cart?: number;
6467
6776
  order_item_id?: string | null;
6468
6777
  plants_per_crate?: number;
6469
6778
  product_id?: string | null;
@@ -6491,33 +6800,45 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
6491
6800
  };
6492
6801
  order_carts: {
6493
6802
  Row: {
6803
+ algorithm_version: number;
6494
6804
  cart_number: number;
6495
6805
  created_at: string;
6496
6806
  id: string;
6497
6807
  is_auto: boolean;
6498
6808
  is_complete: boolean;
6499
6809
  notes: string | null;
6810
+ occupancy_pct: number;
6500
6811
  order_id: string;
6812
+ source: string;
6813
+ total_layers_used: number;
6501
6814
  updated_at: string;
6502
6815
  };
6503
6816
  Insert: {
6817
+ algorithm_version?: number;
6504
6818
  cart_number: number;
6505
6819
  created_at?: string;
6506
6820
  id?: string;
6507
6821
  is_auto?: boolean;
6508
6822
  is_complete?: boolean;
6509
6823
  notes?: string | null;
6824
+ occupancy_pct?: number;
6510
6825
  order_id: string;
6826
+ source?: string;
6827
+ total_layers_used?: number;
6511
6828
  updated_at?: string;
6512
6829
  };
6513
6830
  Update: {
6831
+ algorithm_version?: number;
6514
6832
  cart_number?: number;
6515
6833
  created_at?: string;
6516
6834
  id?: string;
6517
6835
  is_auto?: boolean;
6518
6836
  is_complete?: boolean;
6519
6837
  notes?: string | null;
6838
+ occupancy_pct?: number;
6520
6839
  order_id?: string;
6840
+ source?: string;
6841
+ total_layers_used?: number;
6521
6842
  updated_at?: string;
6522
6843
  };
6523
6844
  Relationships: [{
@@ -6670,6 +6991,8 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
6670
6991
  order_date: string;
6671
6992
  order_number: string;
6672
6993
  order_source: string;
6994
+ plan_locked_at: string | null;
6995
+ plan_locked_ref: string | null;
6673
6996
  status: string;
6674
6997
  total: string;
6675
6998
  updated_at: string;
@@ -6686,6 +7009,8 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
6686
7009
  order_date?: string;
6687
7010
  order_number: string;
6688
7011
  order_source?: string;
7012
+ plan_locked_at?: string | null;
7013
+ plan_locked_ref?: string | null;
6689
7014
  status?: string;
6690
7015
  total?: string;
6691
7016
  updated_at?: string;
@@ -6702,6 +7027,8 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
6702
7027
  order_date?: string;
6703
7028
  order_number?: string;
6704
7029
  order_source?: string;
7030
+ plan_locked_at?: string | null;
7031
+ plan_locked_ref?: string | null;
6705
7032
  status?: string;
6706
7033
  total?: string;
6707
7034
  updated_at?: string;
@@ -7070,28 +7397,34 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
7070
7397
  };
7071
7398
  profiles: {
7072
7399
  Row: {
7400
+ address: string | null;
7073
7401
  created_at: string;
7074
7402
  display_name: string | null;
7075
7403
  email: string | null;
7076
7404
  id: string;
7405
+ is_superadmin: boolean;
7077
7406
  notification_preferences: import("../integrations/supabase/types").Json;
7078
7407
  tenant_id: string | null;
7079
7408
  updated_at: string;
7080
7409
  };
7081
7410
  Insert: {
7411
+ address?: string | null;
7082
7412
  created_at?: string;
7083
7413
  display_name?: string | null;
7084
7414
  email?: string | null;
7085
7415
  id: string;
7416
+ is_superadmin?: boolean;
7086
7417
  notification_preferences?: import("../integrations/supabase/types").Json;
7087
7418
  tenant_id?: string | null;
7088
7419
  updated_at?: string;
7089
7420
  };
7090
7421
  Update: {
7422
+ address?: string | null;
7091
7423
  created_at?: string;
7092
7424
  display_name?: string | null;
7093
7425
  email?: string | null;
7094
7426
  id?: string;
7427
+ is_superadmin?: boolean;
7095
7428
  notification_preferences?: import("../integrations/supabase/types").Json;
7096
7429
  tenant_id?: string | null;
7097
7430
  updated_at?: string;
@@ -7881,6 +8214,24 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
7881
8214
  };
7882
8215
  Relationships: [];
7883
8216
  };
8217
+ sidebar_config: {
8218
+ Row: {
8219
+ id: string;
8220
+ module_order: string[];
8221
+ updated_at: string;
8222
+ };
8223
+ Insert: {
8224
+ id?: string;
8225
+ module_order?: string[];
8226
+ updated_at?: string;
8227
+ };
8228
+ Update: {
8229
+ id?: string;
8230
+ module_order?: string[];
8231
+ updated_at?: string;
8232
+ };
8233
+ Relationships: [];
8234
+ };
7884
8235
  stock_import_runs: {
7885
8236
  Row: {
7886
8237
  connection_id: string | null;
@@ -7939,7 +8290,7 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
7939
8290
  reason: string | null;
7940
8291
  reserved_after: number | null;
7941
8292
  reserved_before: number | null;
7942
- trade_item_key: string;
8293
+ trade_item_key: string | null;
7943
8294
  };
7944
8295
  Insert: {
7945
8296
  connection_id?: string | null;
@@ -7956,7 +8307,7 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
7956
8307
  reason?: string | null;
7957
8308
  reserved_after?: number | null;
7958
8309
  reserved_before?: number | null;
7959
- trade_item_key: string;
8310
+ trade_item_key?: string | null;
7960
8311
  };
7961
8312
  Update: {
7962
8313
  connection_id?: string | null;
@@ -7973,7 +8324,7 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
7973
8324
  reason?: string | null;
7974
8325
  reserved_after?: number | null;
7975
8326
  reserved_before?: number | null;
7976
- trade_item_key?: string;
8327
+ trade_item_key?: string | null;
7977
8328
  };
7978
8329
  Relationships: [];
7979
8330
  };
@@ -8316,6 +8667,114 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
8316
8667
  };
8317
8668
  Relationships: [];
8318
8669
  };
8670
+ trade_item_supply_lines: {
8671
+ Row: {
8672
+ available_quantity: number | null;
8673
+ connection_id: string;
8674
+ created_at: string;
8675
+ currency: string | null;
8676
+ endpoint_family: string | null;
8677
+ environment: string | null;
8678
+ id: string;
8679
+ last_error: string | null;
8680
+ last_status: number | null;
8681
+ packing_configuration_id: string | null;
8682
+ period_end: string | null;
8683
+ period_start: string | null;
8684
+ price_per_piece: number | null;
8685
+ sales_unit: string | null;
8686
+ supply_line_id: string | null;
8687
+ supply_type: string;
8688
+ trade_item_id: string;
8689
+ updated_at: string;
8690
+ user_id: string;
8691
+ week: number | null;
8692
+ year: number | null;
8693
+ };
8694
+ Insert: {
8695
+ available_quantity?: number | null;
8696
+ connection_id: string;
8697
+ created_at?: string;
8698
+ currency?: string | null;
8699
+ endpoint_family?: string | null;
8700
+ environment?: string | null;
8701
+ id?: string;
8702
+ last_error?: string | null;
8703
+ last_status?: number | null;
8704
+ packing_configuration_id?: string | null;
8705
+ period_end?: string | null;
8706
+ period_start?: string | null;
8707
+ price_per_piece?: number | null;
8708
+ sales_unit?: string | null;
8709
+ supply_line_id?: string | null;
8710
+ supply_type?: string;
8711
+ trade_item_id: string;
8712
+ updated_at?: string;
8713
+ user_id: string;
8714
+ week?: number | null;
8715
+ year?: number | null;
8716
+ };
8717
+ Update: {
8718
+ available_quantity?: number | null;
8719
+ connection_id?: string;
8720
+ created_at?: string;
8721
+ currency?: string | null;
8722
+ endpoint_family?: string | null;
8723
+ environment?: string | null;
8724
+ id?: string;
8725
+ last_error?: string | null;
8726
+ last_status?: number | null;
8727
+ packing_configuration_id?: string | null;
8728
+ period_end?: string | null;
8729
+ period_start?: string | null;
8730
+ price_per_piece?: number | null;
8731
+ sales_unit?: string | null;
8732
+ supply_line_id?: string | null;
8733
+ supply_type?: string;
8734
+ trade_item_id?: string;
8735
+ updated_at?: string;
8736
+ user_id?: string;
8737
+ week?: number | null;
8738
+ year?: number | null;
8739
+ };
8740
+ Relationships: [];
8741
+ };
8742
+ trade_item_warehouse_preferences: {
8743
+ Row: {
8744
+ connection_id: string;
8745
+ created_at: string;
8746
+ id: string;
8747
+ trade_item_id: string;
8748
+ updated_at: string;
8749
+ warehouse_id: string;
8750
+ warehouse_name: string | null;
8751
+ };
8752
+ Insert: {
8753
+ connection_id: string;
8754
+ created_at?: string;
8755
+ id?: string;
8756
+ trade_item_id: string;
8757
+ updated_at?: string;
8758
+ warehouse_id: string;
8759
+ warehouse_name?: string | null;
8760
+ };
8761
+ Update: {
8762
+ connection_id?: string;
8763
+ created_at?: string;
8764
+ id?: string;
8765
+ trade_item_id?: string;
8766
+ updated_at?: string;
8767
+ warehouse_id?: string;
8768
+ warehouse_name?: string | null;
8769
+ };
8770
+ Relationships: [{
8771
+ foreignKeyName: "trade_item_warehouse_preferences_connection_id_fkey";
8772
+ columns: ["connection_id"];
8773
+ isOneToOne: false;
8774
+ referencedRelation: "floriday_connections";
8775
+ referencedColumns: ["id"];
8776
+ }];
8777
+ };
8319
8778
  twinfield_connections: {
8320
8779
  Row: {
8321
8780
  access_token: string | null;
@@ -8635,6 +9094,10 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
8635
9094
  default_invoice_type: string;
8636
9095
  default_payment_term_days: number;
8637
9096
  default_vat_code: string;
9097
+ invoice_enabled_ao: boolean;
9098
+ invoice_enabled_fo: boolean;
9099
+ invoice_enabled_ho: boolean;
9100
+ invoice_enabled_mo: boolean;
8638
9101
  updated_at: string;
8639
9102
  user_id: string;
8640
9103
  };
@@ -8644,6 +9107,10 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
8644
9107
  default_invoice_type?: string;
8645
9108
  default_payment_term_days?: number;
8646
9109
  default_vat_code?: string;
9110
+ invoice_enabled_ao?: boolean;
9111
+ invoice_enabled_fo?: boolean;
9112
+ invoice_enabled_ho?: boolean;
9113
+ invoice_enabled_mo?: boolean;
8647
9114
  updated_at?: string;
8648
9115
  user_id: string;
8649
9116
  };
@@ -8653,6 +9120,10 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
8653
9120
  default_invoice_type?: string;
8654
9121
  default_payment_term_days?: number;
8655
9122
  default_vat_code?: string;
9123
+ invoice_enabled_ao?: boolean;
9124
+ invoice_enabled_fo?: boolean;
9125
+ invoice_enabled_ho?: boolean;
9126
+ invoice_enabled_mo?: boolean;
8656
9127
  updated_at?: string;
8657
9128
  user_id?: string;
8658
9129
  };
@@ -9947,6 +10418,12 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
9947
10418
  order_number: string;
9948
10419
  }[];
9949
10420
  };
10421
+ autolink_product_to_floriday: {
10422
+ Args: {
10423
+ p_product_id: string;
10424
+ };
10425
+ Returns: string;
10426
+ };
9950
10427
  backfill_open_order_reservations: {
9951
10428
  Args: never;
9952
10429
  Returns: {
@@ -9983,7 +10460,19 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
9983
10460
  };
9984
10461
  cleanup_old_bookings: {
9985
10462
  Args: never;
9986
- Returns: number;
10463
+ Returns: undefined;
10464
+ };
10465
+ consume_floriday_rate_limit: {
10466
+ Args: {
10467
+ p_bucket: string;
10468
+ p_capacity: number;
10469
+ p_cost?: number;
10470
+ p_refill_per_sec: number;
10471
+ };
10472
+ Returns: {
10473
+ granted: boolean;
10474
+ wait_ms: number;
10475
+ }[];
9987
10476
  };
9988
10477
  control_get_todays_carts: {
9989
10478
  Args: never;
@@ -10065,6 +10554,12 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
10065
10554
  status: string;
10066
10555
  }[];
10067
10556
  };
10557
+ enqueue_cart_replan_if_unlocked: {
10558
+ Args: {
10559
+ p_order_id: string;
10560
+ };
10561
+ Returns: undefined;
10562
+ };
10068
10563
  ensure_trade_item_stock_row: {
10069
10564
  Args: {
10070
10565
  p_key: string;
@@ -10171,6 +10666,13 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
10171
10666
  office_code: string;
10172
10667
  }[];
10173
10668
  };
10669
+ get_floricode_record_counts: {
10670
+ Args: never;
10671
+ Returns: {
10672
+ count: number;
10673
+ resource: string;
10674
+ }[];
10675
+ };
10174
10676
  get_floriday_agreements_active: {
10175
10677
  Args: {
10176
10678
  p_on_date?: string;
@@ -10262,6 +10764,12 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
10262
10764
  };
10263
10765
  Returns: import("../integrations/supabase/types").Json;
10264
10766
  };
10767
+ get_offer_delivery_options: {
10768
+ Args: {
10769
+ p_code: string;
10770
+ };
10771
+ Returns: import("../integrations/supabase/types").Json;
10772
+ };
10265
10773
  get_offer_recipient_by_code: {
10266
10774
  Args: {
10267
10775
  p_code: string;
@@ -10326,6 +10834,12 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
10326
10834
  Args: never;
10327
10835
  Returns: boolean;
10328
10836
  };
10837
+ is_superadmin: {
10838
+ Args: {
10839
+ _user_id: string;
10840
+ };
10841
+ Returns: boolean;
10842
+ };
10329
10843
  local_effective_price: {
10330
10844
  Args: {
10331
10845
  _customer_id: string;
@@ -10360,6 +10874,13 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
10360
10874
  };
10361
10875
  Returns: string;
10362
10876
  };
10877
+ next_order_number_for_date: {
10878
+ Args: {
10879
+ p_created_at?: string;
10880
+ p_prefix: string;
10881
+ };
10882
+ Returns: string;
10883
+ };
10363
10884
  next_work_order_number: {
10364
10885
  Args: {
10365
10886
  p_parent_work_order_id?: string;
@@ -10367,6 +10888,12 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
10367
10888
  };
10368
10889
  Returns: string;
10369
10890
  };
10891
+ normalize_order_source: {
10892
+ Args: {
10893
+ p_src: string;
10894
+ };
10895
+ Returns: string;
10896
+ };
10370
10897
  normalize_vat: {
10371
10898
  Args: {
10372
10899
  v: string;
@@ -10381,10 +10908,21 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
10381
10908
  };
10382
10909
  Returns: boolean;
10383
10910
  };
10911
+ order_number_prefix: {
10912
+ Args: {
10913
+ p_custom_fields?: import("../integrations/supabase/types").Json;
10914
+ p_order_source: string;
10915
+ };
10916
+ Returns: string;
10917
+ };
10384
10918
  pickstation_get_orders_raw: {
10385
10919
  Args: never;
10386
10920
  Returns: import("../integrations/supabase/types").Json;
10387
10921
  };
10922
+ pickstation_get_planning_context: {
10923
+ Args: never;
10924
+ Returns: import("../integrations/supabase/types").Json;
10925
+ };
10388
10926
  pickstation_get_settings: {
10389
10927
  Args: never;
10390
10928
  Returns: import("../integrations/supabase/types").Json;
@@ -10415,6 +10953,28 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
10415
10953
  };
10416
10954
  Returns: undefined;
10417
10955
  };
10956
+ recompute_order_status: {
10957
+ Args: {
10958
+ p_order_id: string;
10959
+ };
10960
+ Returns: undefined;
10961
+ };
10962
+ recompute_reserved_for_order: {
10963
+ Args: {
10964
+ p_order_id: string;
10965
+ };
10966
+ Returns: undefined;
10967
+ };
10968
+ recompute_reserved_stock: {
10969
+ Args: {
10970
+ p_trade_item_key: string;
10971
+ };
10972
+ Returns: undefined;
10973
+ };
10974
+ refresh_external_customers_grouped: {
10975
+ Args: never;
10976
+ Returns: undefined;
10977
+ };
10418
10978
  refresh_floricode_derived_code_lists: {
10419
10979
  Args: never;
10420
10980
  Returns: {
@@ -10429,6 +10989,12 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
10429
10989
  };
10430
10990
  Returns: number;
10431
10991
  };
10992
+ refresh_floricode_derived_for_products: {
10993
+ Args: {
10994
+ _product_ids: string[];
10995
+ };
10996
+ Returns: number;
10997
+ };
10432
10998
  reset_floriday_sync_cursor: {
10433
10999
  Args: {
10434
11000
  p_connection_id: string;
@@ -10436,6 +11002,12 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
10436
11002
  };
10437
11003
  Returns: undefined;
10438
11004
  };
11005
+ resolve_product_id_for_item: {
11006
+ Args: {
11007
+ p_product_name: string;
11008
+ };
11009
+ Returns: string;
11010
+ };
10439
11011
  schedule_floriday_additional_services_sync: {
10440
11012
  Args: {
10441
11013
  p_apikey: string;
@@ -10713,6 +11285,24 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
10713
11285
  };
10714
11286
  Returns: string[];
10715
11287
  };
11288
+ sync_cached_packing_from_product: {
11289
+ Args: {
11290
+ p_product_id: string;
11291
+ };
11292
+ Returns: undefined;
11293
+ };
11294
+ sync_order_cart_item_packing_from_product: {
11295
+ Args: {
11296
+ p_product_id: string;
11297
+ };
11298
+ Returns: undefined;
11299
+ };
11300
+ sync_product_packing_from_floriday_cache: {
11301
+ Args: {
11302
+ p_floriday_id: string;
11303
+ };
11304
+ Returns: undefined;
11305
+ };
10716
11306
  twinfield_decrypt: {
10717
11307
  Args: {
10718
11308
  cipher: string;
@@ -10725,6 +11315,17 @@ export declare const runSalesOrdersSync: import("@tanstack/start-client-core").O
10725
11315
  };
10726
11316
  Returns: string;
10727
11317
  };
11318
+ upsert_auto_fulfillment_log: {
11319
+ Args: {
11320
+ p_connection_id: string;
11321
+ p_error?: string;
11322
+ p_fulfillment_order_id?: string;
11323
+ p_reason?: string;
11324
+ p_sales_order_id: string;
11325
+ p_status: string;
11326
+ };
11327
+ Returns: undefined;
11328
+ };
10728
11329
  };
10729
11330
  Enums: {
10730
11331
  app_role: "admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie" | "monteur";
@@ -10747,7 +11348,10 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
10747
11348
  Tables: {
10748
11349
  afhandeling_settings: {
10749
11350
  Row: {
11351
+ auto_print_delivery_note: boolean;
11352
+ auto_process_paused: boolean;
10750
11353
  created_at: string;
11354
+ extra_pick_days_with_stickers: number;
10751
11355
  id: string;
10752
11356
  max_workdays_earlier_pick: number;
10753
11357
  pick_days_before_transport: number;
@@ -10761,7 +11365,10 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
10761
11365
  user_id: string;
10762
11366
  };
10763
11367
  Insert: {
11368
+ auto_print_delivery_note?: boolean;
11369
+ auto_process_paused?: boolean;
10764
11370
  created_at?: string;
11371
+ extra_pick_days_with_stickers?: number;
10765
11372
  id?: string;
10766
11373
  max_workdays_earlier_pick?: number;
10767
11374
  pick_days_before_transport?: number;
@@ -10775,7 +11382,10 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
10775
11382
  user_id: string;
10776
11383
  };
10777
11384
  Update: {
11385
+ auto_print_delivery_note?: boolean;
11386
+ auto_process_paused?: boolean;
10778
11387
  created_at?: string;
11388
+ extra_pick_days_with_stickers?: number;
10779
11389
  id?: string;
10780
11390
  max_workdays_earlier_pick?: number;
10781
11391
  pick_days_before_transport?: number;
@@ -11006,6 +11616,9 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
11006
11616
  created_at: string;
11007
11617
  extra_id: string;
11008
11618
  id: string;
11619
+ original_unit_price: number | null;
11620
+ override_reason: string | null;
11621
+ override_unit_price: number | null;
11009
11622
  quantity: number;
11010
11623
  total_price: number;
11011
11624
  unit_price: number;
@@ -11015,6 +11628,9 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
11015
11628
  created_at?: string;
11016
11629
  extra_id: string;
11017
11630
  id?: string;
11631
+ original_unit_price?: number | null;
11632
+ override_reason?: string | null;
11633
+ override_unit_price?: number | null;
11018
11634
  quantity?: number;
11019
11635
  total_price?: number;
11020
11636
  unit_price?: number;
@@ -11024,6 +11640,9 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
11024
11640
  created_at?: string;
11025
11641
  extra_id?: string;
11026
11642
  id?: string;
11643
+ original_unit_price?: number | null;
11644
+ override_reason?: string | null;
11645
+ override_unit_price?: number | null;
11027
11646
  quantity?: number;
11028
11647
  total_price?: number;
11029
11648
  unit_price?: number;
@@ -11044,11 +11663,15 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
11044
11663
  };
11045
11664
  bookings: {
11046
11665
  Row: {
11666
+ archive_reason: string | null;
11667
+ archived_at: string | null;
11668
+ archived_by: string | null;
11047
11669
  company_name: string | null;
11048
11670
  conflict_checked_at: string | null;
11049
11671
  conflict_reason: string | null;
11050
11672
  created_at: string;
11051
11673
  created_by_role: string | null;
11674
+ customer_address: string | null;
11052
11675
  customer_email: string | null;
11053
11676
  customer_name: string | null;
11054
11677
  end_time: string;
@@ -11060,7 +11683,12 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
11060
11683
  invoiced_at: string | null;
11061
11684
  notes: string | null;
11062
11685
  number_of_people: number;
11686
+ overridden_at: string | null;
11687
+ overridden_by: string | null;
11688
+ override_reason: string | null;
11689
+ price_override: boolean;
11063
11690
  room_id: string;
11691
+ room_price_override: number | null;
11064
11692
  start_time: string;
11065
11693
  status: string;
11066
11694
  total_excl_vat: number | null;
@@ -11069,11 +11697,15 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
11069
11697
  vat_amount: number | null;
11070
11698
  };
11071
11699
  Insert: {
11700
+ archive_reason?: string | null;
11701
+ archived_at?: string | null;
11702
+ archived_by?: string | null;
11072
11703
  company_name?: string | null;
11073
11704
  conflict_checked_at?: string | null;
11074
11705
  conflict_reason?: string | null;
11075
11706
  created_at?: string;
11076
11707
  created_by_role?: string | null;
11708
+ customer_address?: string | null;
11077
11709
  customer_email?: string | null;
11078
11710
  customer_name?: string | null;
11079
11711
  end_time: string;
@@ -11085,7 +11717,12 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
11085
11717
  invoiced_at?: string | null;
11086
11718
  notes?: string | null;
11087
11719
  number_of_people?: number;
11720
+ overridden_at?: string | null;
11721
+ overridden_by?: string | null;
11722
+ override_reason?: string | null;
11723
+ price_override?: boolean;
11088
11724
  room_id: string;
11725
+ room_price_override?: number | null;
11089
11726
  start_time: string;
11090
11727
  status?: string;
11091
11728
  total_excl_vat?: number | null;
@@ -11094,11 +11731,15 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
11094
11731
  vat_amount?: number | null;
11095
11732
  };
11096
11733
  Update: {
11734
+ archive_reason?: string | null;
11735
+ archived_at?: string | null;
11736
+ archived_by?: string | null;
11097
11737
  company_name?: string | null;
11098
11738
  conflict_checked_at?: string | null;
11099
11739
  conflict_reason?: string | null;
11100
11740
  created_at?: string;
11101
11741
  created_by_role?: string | null;
11742
+ customer_address?: string | null;
11102
11743
  customer_email?: string | null;
11103
11744
  customer_name?: string | null;
11104
11745
  end_time?: string;
@@ -11110,7 +11751,12 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
11110
11751
  invoiced_at?: string | null;
11111
11752
  notes?: string | null;
11112
11753
  number_of_people?: number;
11754
+ overridden_at?: string | null;
11755
+ overridden_by?: string | null;
11756
+ override_reason?: string | null;
11757
+ price_override?: boolean;
11113
11758
  room_id?: string;
11759
+ room_price_override?: number | null;
11114
11760
  start_time?: string;
11115
11761
  status?: string;
11116
11762
  total_excl_vat?: number | null;
@@ -11567,6 +12213,36 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
11567
12213
  };
11568
12214
  Relationships: [];
11569
12215
  };
12216
+ cart_replan_queue: {
12217
+ Row: {
12218
+ attempts: number;
12219
+ last_error: string | null;
12220
+ order_id: string;
12221
+ processed_at: string | null;
12222
+ requested_at: string;
12223
+ };
12224
+ Insert: {
12225
+ attempts?: number;
12226
+ last_error?: string | null;
12227
+ order_id: string;
12228
+ processed_at?: string | null;
12229
+ requested_at?: string;
12230
+ };
12231
+ Update: {
12232
+ attempts?: number;
12233
+ last_error?: string | null;
12234
+ order_id?: string;
12235
+ processed_at?: string | null;
12236
+ requested_at?: string;
12237
+ };
12238
+ Relationships: [{
12239
+ foreignKeyName: "cart_replan_queue_order_id_fkey";
12240
+ columns: ["order_id"];
12241
+ isOneToOne: true;
12242
+ referencedRelation: "orders";
12243
+ referencedColumns: ["id"];
12244
+ }];
12245
+ };
11570
12246
  collections: {
11571
12247
  Row: {
11572
12248
  created_at: string;
@@ -11909,8 +12585,27 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
11909
12585
  customers: {
11910
12586
  Row: {
11911
12587
  address: string | null;
12588
+ address_line1: string | null;
12589
+ address_line2: string | null;
12590
+ address_type: string | null;
12591
+ attention_to: string | null;
12592
+ bank_account_holder: string | null;
12593
+ bank_account_number: string | null;
12594
+ bank_address_line1: string | null;
12595
+ bank_address_line2: string | null;
12596
+ bank_bic: string | null;
12597
+ bank_city: string | null;
12598
+ bank_country: string | null;
12599
+ bank_house_number: string | null;
12600
+ bank_iban: string | null;
12601
+ bank_name: string | null;
12602
+ bank_national_code: string | null;
12603
+ bank_postal_code: string | null;
12604
+ bank_state: string | null;
12605
+ billing_email: string | null;
11912
12606
  bio: string | null;
11913
12607
  city: string | null;
12608
+ coc_number: string | null;
11914
12609
  commercial_name: string | null;
11915
12610
  company_name: string;
11916
12611
  connection_status: string;
@@ -11919,21 +12614,28 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
11919
12614
  created_at: string;
11920
12615
  custom_fields: import("../integrations/supabase/types").Json;
11921
12616
  customer_class: string | null;
12617
+ customer_number: string | null;
12618
+ discount_days: number | null;
12619
+ discount_percentage: number | null;
11922
12620
  email: string | null;
11923
12621
  external_id: string | null;
12622
+ fax: string | null;
11924
12623
  floriday_connection_id: string | null;
11925
12624
  floriday_organization_id: string | null;
11926
12625
  floriday_raw: import("../integrations/supabase/types").Json | null;
11927
12626
  gln: string | null;
11928
12627
  house_number: string | null;
12628
+ icp_country_code: string | null;
11929
12629
  id: string;
11930
12630
  is_active: boolean;
12631
+ language: string | null;
11931
12632
  last_synced_at: string | null;
11932
12633
  logo_url: string | null;
11933
12634
  markets: string[];
11934
12635
  notes: string | null;
11935
12636
  organization_type: string | null;
11936
12637
  payment_methods: string[];
12638
+ payment_term_days: number | null;
11937
12639
  phone: string | null;
11938
12640
  postal_code: string | null;
11939
12641
  product_groups: string[];
@@ -11944,13 +12646,33 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
11944
12646
  sync_status: string;
11945
12647
  trade_forms: string[];
11946
12648
  updated_at: string;
12649
+ vat_display: string | null;
11947
12650
  vat_number: string | null;
11948
12651
  website: string | null;
11949
12652
  };
11950
12653
  Insert: {
11951
12654
  address?: string | null;
12655
+ address_line1?: string | null;
12656
+ address_line2?: string | null;
12657
+ address_type?: string | null;
12658
+ attention_to?: string | null;
12659
+ bank_account_holder?: string | null;
12660
+ bank_account_number?: string | null;
12661
+ bank_address_line1?: string | null;
12662
+ bank_address_line2?: string | null;
12663
+ bank_bic?: string | null;
12664
+ bank_city?: string | null;
12665
+ bank_country?: string | null;
12666
+ bank_house_number?: string | null;
12667
+ bank_iban?: string | null;
12668
+ bank_name?: string | null;
12669
+ bank_national_code?: string | null;
12670
+ bank_postal_code?: string | null;
12671
+ bank_state?: string | null;
12672
+ billing_email?: string | null;
11952
12673
  bio?: string | null;
11953
12674
  city?: string | null;
12675
+ coc_number?: string | null;
11954
12676
  commercial_name?: string | null;
11955
12677
  company_name: string;
11956
12678
  connection_status?: string;
@@ -11959,21 +12681,28 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
11959
12681
  created_at?: string;
11960
12682
  custom_fields?: import("../integrations/supabase/types").Json;
11961
12683
  customer_class?: string | null;
12684
+ customer_number?: string | null;
12685
+ discount_days?: number | null;
12686
+ discount_percentage?: number | null;
11962
12687
  email?: string | null;
11963
12688
  external_id?: string | null;
12689
+ fax?: string | null;
11964
12690
  floriday_connection_id?: string | null;
11965
12691
  floriday_organization_id?: string | null;
11966
12692
  floriday_raw?: import("../integrations/supabase/types").Json | null;
11967
12693
  gln?: string | null;
11968
12694
  house_number?: string | null;
12695
+ icp_country_code?: string | null;
11969
12696
  id?: string;
11970
12697
  is_active?: boolean;
12698
+ language?: string | null;
11971
12699
  last_synced_at?: string | null;
11972
12700
  logo_url?: string | null;
11973
12701
  markets?: string[];
11974
12702
  notes?: string | null;
11975
12703
  organization_type?: string | null;
11976
12704
  payment_methods?: string[];
12705
+ payment_term_days?: number | null;
11977
12706
  phone?: string | null;
11978
12707
  postal_code?: string | null;
11979
12708
  product_groups?: string[];
@@ -11984,13 +12713,33 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
11984
12713
  sync_status?: string;
11985
12714
  trade_forms?: string[];
11986
12715
  updated_at?: string;
12716
+ vat_display?: string | null;
11987
12717
  vat_number?: string | null;
11988
12718
  website?: string | null;
11989
12719
  };
11990
12720
  Update: {
11991
12721
  address?: string | null;
12722
+ address_line1?: string | null;
12723
+ address_line2?: string | null;
12724
+ address_type?: string | null;
12725
+ attention_to?: string | null;
12726
+ bank_account_holder?: string | null;
12727
+ bank_account_number?: string | null;
12728
+ bank_address_line1?: string | null;
12729
+ bank_address_line2?: string | null;
12730
+ bank_bic?: string | null;
12731
+ bank_city?: string | null;
12732
+ bank_country?: string | null;
12733
+ bank_house_number?: string | null;
12734
+ bank_iban?: string | null;
12735
+ bank_name?: string | null;
12736
+ bank_national_code?: string | null;
12737
+ bank_postal_code?: string | null;
12738
+ bank_state?: string | null;
12739
+ billing_email?: string | null;
11992
12740
  bio?: string | null;
11993
12741
  city?: string | null;
12742
+ coc_number?: string | null;
11994
12743
  commercial_name?: string | null;
11995
12744
  company_name?: string;
11996
12745
  connection_status?: string;
@@ -11999,21 +12748,28 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
11999
12748
  created_at?: string;
12000
12749
  custom_fields?: import("../integrations/supabase/types").Json;
12001
12750
  customer_class?: string | null;
12751
+ customer_number?: string | null;
12752
+ discount_days?: number | null;
12753
+ discount_percentage?: number | null;
12002
12754
  email?: string | null;
12003
12755
  external_id?: string | null;
12756
+ fax?: string | null;
12004
12757
  floriday_connection_id?: string | null;
12005
12758
  floriday_organization_id?: string | null;
12006
12759
  floriday_raw?: import("../integrations/supabase/types").Json | null;
12007
12760
  gln?: string | null;
12008
12761
  house_number?: string | null;
12762
+ icp_country_code?: string | null;
12009
12763
  id?: string;
12010
12764
  is_active?: boolean;
12765
+ language?: string | null;
12011
12766
  last_synced_at?: string | null;
12012
12767
  logo_url?: string | null;
12013
12768
  markets?: string[];
12014
12769
  notes?: string | null;
12015
12770
  organization_type?: string | null;
12016
12771
  payment_methods?: string[];
12772
+ payment_term_days?: number | null;
12017
12773
  phone?: string | null;
12018
12774
  postal_code?: string | null;
12019
12775
  product_groups?: string[];
@@ -12024,6 +12780,7 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
12024
12780
  sync_status?: string;
12025
12781
  trade_forms?: string[];
12026
12782
  updated_at?: string;
12783
+ vat_display?: string | null;
12027
12784
  vat_number?: string | null;
12028
12785
  website?: string | null;
12029
12786
  };
@@ -13692,34 +14449,52 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
13692
14449
  Row: {
13693
14450
  catalog_key: string | null;
13694
14451
  catalog_url: string;
14452
+ client_id: string | null;
14453
+ client_secret_ciphertext: string | null;
14454
+ client_secret_last4: string | null;
13695
14455
  created_at: string;
13696
14456
  id: number;
13697
14457
  last_meta: import("../integrations/supabase/types").Json | null;
13698
14458
  last_test_at: string | null;
13699
14459
  last_test_error: string | null;
13700
14460
  last_test_ok: boolean | null;
14461
+ last_token_test_at: string | null;
14462
+ last_token_test_error: string | null;
14463
+ last_token_test_ok: boolean | null;
13701
14464
  updated_at: string;
13702
14465
  };
13703
14466
  Insert: {
13704
14467
  catalog_key?: string | null;
13705
14468
  catalog_url?: string;
14469
+ client_id?: string | null;
14470
+ client_secret_ciphertext?: string | null;
14471
+ client_secret_last4?: string | null;
13706
14472
  created_at?: string;
13707
14473
  id?: number;
13708
14474
  last_meta?: import("../integrations/supabase/types").Json | null;
13709
14475
  last_test_at?: string | null;
13710
14476
  last_test_error?: string | null;
13711
14477
  last_test_ok?: boolean | null;
14478
+ last_token_test_at?: string | null;
14479
+ last_token_test_error?: string | null;
14480
+ last_token_test_ok?: boolean | null;
13712
14481
  updated_at?: string;
13713
14482
  };
13714
14483
  Update: {
13715
14484
  catalog_key?: string | null;
13716
14485
  catalog_url?: string;
14486
+ client_id?: string | null;
14487
+ client_secret_ciphertext?: string | null;
14488
+ client_secret_last4?: string | null;
13717
14489
  created_at?: string;
13718
14490
  id?: number;
13719
14491
  last_meta?: import("../integrations/supabase/types").Json | null;
13720
14492
  last_test_at?: string | null;
13721
14493
  last_test_error?: string | null;
13722
14494
  last_test_ok?: boolean | null;
14495
+ last_token_test_at?: string | null;
14496
+ last_token_test_error?: string | null;
14497
+ last_token_test_ok?: boolean | null;
13723
14498
  updated_at?: string;
13724
14499
  };
13725
14500
  Relationships: [];
@@ -13952,6 +14727,54 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
13952
14727
  referencedColumns: ["id"];
13953
14728
  }];
13954
14729
  };
14730
+ floriday_auto_fulfillment_log: {
14731
+ Row: {
14732
+ attempts: number;
14733
+ connection_id: string;
14734
+ created_at: string;
14735
+ error: string | null;
14736
+ fulfillment_order_id: string | null;
14737
+ id: string;
14738
+ last_attempt_at: string | null;
14739
+ reason: string | null;
14740
+ sales_order_id: string;
14741
+ status: string;
14742
+ updated_at: string;
14743
+ };
14744
+ Insert: {
14745
+ attempts?: number;
14746
+ connection_id: string;
14747
+ created_at?: string;
14748
+ error?: string | null;
14749
+ fulfillment_order_id?: string | null;
14750
+ id?: string;
14751
+ last_attempt_at?: string | null;
14752
+ reason?: string | null;
14753
+ sales_order_id: string;
14754
+ status?: string;
14755
+ updated_at?: string;
14756
+ };
14757
+ Update: {
14758
+ attempts?: number;
14759
+ connection_id?: string;
14760
+ created_at?: string;
14761
+ error?: string | null;
14762
+ fulfillment_order_id?: string | null;
14763
+ id?: string;
14764
+ last_attempt_at?: string | null;
14765
+ reason?: string | null;
14766
+ sales_order_id?: string;
14767
+ status?: string;
14768
+ updated_at?: string;
14769
+ };
14770
+ Relationships: [{
14771
+ foreignKeyName: "floriday_auto_fulfillment_log_connection_id_fkey";
14772
+ columns: ["connection_id"];
14773
+ isOneToOne: false;
14774
+ referencedRelation: "floriday_connections";
14775
+ referencedColumns: ["id"];
14776
+ }];
14777
+ };
13955
14778
  floriday_base_items_cache: {
13956
14779
  Row: {
13957
14780
  connection_id: string;
@@ -15056,6 +15879,24 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
15056
15879
  referencedColumns: ["id"];
15057
15880
  }];
15058
15881
  };
15882
+ floriday_rate_limit_state: {
15883
+ Row: {
15884
+ bucket: string;
15885
+ last_refill_at: string;
15886
+ tokens: number;
15887
+ };
15888
+ Insert: {
15889
+ bucket: string;
15890
+ last_refill_at?: string;
15891
+ tokens: number;
15892
+ };
15893
+ Update: {
15894
+ bucket?: string;
15895
+ last_refill_at?: string;
15896
+ tokens?: number;
15897
+ };
15898
+ Relationships: [];
15899
+ };
15059
15900
  floriday_resource_schemas: {
15060
15901
  Row: {
15061
15902
  enums: import("../integrations/supabase/types").Json;
@@ -15479,6 +16320,60 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
15479
16320
  referencedColumns: ["id"];
15480
16321
  }];
15481
16322
  };
16323
+ flow_role_assignments: {
16324
+ Row: {
16325
+ created_at: string;
16326
+ id: string;
16327
+ role_id: string;
16328
+ user_id: string;
16329
+ };
16330
+ Insert: {
16331
+ created_at?: string;
16332
+ id?: string;
16333
+ role_id: string;
16334
+ user_id: string;
16335
+ };
16336
+ Update: {
16337
+ created_at?: string;
16338
+ id?: string;
16339
+ role_id?: string;
16340
+ user_id?: string;
16341
+ };
16342
+ Relationships: [{
16343
+ foreignKeyName: "flow_role_assignments_role_id_fkey";
16344
+ columns: ["role_id"];
16345
+ isOneToOne: false;
16346
+ referencedRelation: "flow_roles";
16347
+ referencedColumns: ["id"];
16348
+ }];
16349
+ };
16350
+ flow_roles: {
16351
+ Row: {
16352
+ created_at: string;
16353
+ description: string | null;
16354
+ id: string;
16355
+ module_access: string[];
16356
+ name: string;
16357
+ updated_at: string;
16358
+ };
16359
+ Insert: {
16360
+ created_at?: string;
16361
+ description?: string | null;
16362
+ id?: string;
16363
+ module_access?: string[];
16364
+ name: string;
16365
+ updated_at?: string;
16366
+ };
16367
+ Update: {
16368
+ created_at?: string;
16369
+ description?: string | null;
16370
+ id?: string;
16371
+ module_access?: string[];
16372
+ name?: string;
16373
+ updated_at?: string;
16374
+ };
16375
+ Relationships: [];
16376
+ };
15482
16377
  imap_accounts: {
15483
16378
  Row: {
15484
16379
  created_at: string;
@@ -16110,6 +17005,7 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
16110
17005
  matched_customer_id: string | null;
16111
17006
  message_id: string;
16112
17007
  notes: string | null;
17008
+ order_number: string | null;
16113
17009
  parsed_payload: import("../integrations/supabase/types").Json | null;
16114
17010
  reviewed_at: string | null;
16115
17011
  reviewed_by: string | null;
@@ -16125,6 +17021,7 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
16125
17021
  matched_customer_id?: string | null;
16126
17022
  message_id: string;
16127
17023
  notes?: string | null;
17024
+ order_number?: string | null;
16128
17025
  parsed_payload?: import("../integrations/supabase/types").Json | null;
16129
17026
  reviewed_at?: string | null;
16130
17027
  reviewed_by?: string | null;
@@ -16140,6 +17037,7 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
16140
17037
  matched_customer_id?: string | null;
16141
17038
  message_id?: string;
16142
17039
  notes?: string | null;
17040
+ order_number?: string | null;
16143
17041
  parsed_payload?: import("../integrations/supabase/types").Json | null;
16144
17042
  reviewed_at?: string | null;
16145
17043
  reviewed_by?: string | null;
@@ -16996,6 +17894,7 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
16996
17894
  id: string;
16997
17895
  items: import("../integrations/supabase/types").Json;
16998
17896
  notes: string | null;
17897
+ order_number: string | null;
16999
17898
  recipient_id: string;
17000
17899
  total_amount: number;
17001
17900
  };
@@ -17009,6 +17908,7 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
17009
17908
  id?: string;
17010
17909
  items?: import("../integrations/supabase/types").Json;
17011
17910
  notes?: string | null;
17911
+ order_number?: string | null;
17012
17912
  recipient_id: string;
17013
17913
  total_amount?: number;
17014
17914
  };
@@ -17022,6 +17922,7 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
17022
17922
  id?: string;
17023
17923
  items?: import("../integrations/supabase/types").Json;
17024
17924
  notes?: string | null;
17925
+ order_number?: string | null;
17025
17926
  recipient_id?: string;
17026
17927
  total_amount?: number;
17027
17928
  };
@@ -17181,6 +18082,9 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
17181
18082
  crates_per_layer: number;
17182
18083
  created_at: string;
17183
18084
  id: string;
18085
+ layer_fraction: number;
18086
+ layer_share_pct: number;
18087
+ layers_per_cart: number;
17184
18088
  order_item_id: string | null;
17185
18089
  plants_per_crate: number;
17186
18090
  product_id: string | null;
@@ -17192,6 +18096,9 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
17192
18096
  crates_per_layer?: number;
17193
18097
  created_at?: string;
17194
18098
  id?: string;
18099
+ layer_fraction?: number;
18100
+ layer_share_pct?: number;
18101
+ layers_per_cart?: number;
17195
18102
  order_item_id?: string | null;
17196
18103
  plants_per_crate?: number;
17197
18104
  product_id?: string | null;
@@ -17203,6 +18110,9 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
17203
18110
  crates_per_layer?: number;
17204
18111
  created_at?: string;
17205
18112
  id?: string;
18113
+ layer_fraction?: number;
18114
+ layer_share_pct?: number;
18115
+ layers_per_cart?: number;
17206
18116
  order_item_id?: string | null;
17207
18117
  plants_per_crate?: number;
17208
18118
  product_id?: string | null;
@@ -17230,33 +18140,45 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
17230
18140
  };
17231
18141
  order_carts: {
17232
18142
  Row: {
18143
+ algorithm_version: number;
17233
18144
  cart_number: number;
17234
18145
  created_at: string;
17235
18146
  id: string;
17236
18147
  is_auto: boolean;
17237
18148
  is_complete: boolean;
17238
18149
  notes: string | null;
18150
+ occupancy_pct: number;
17239
18151
  order_id: string;
18152
+ source: string;
18153
+ total_layers_used: number;
17240
18154
  updated_at: string;
17241
18155
  };
17242
18156
  Insert: {
18157
+ algorithm_version?: number;
17243
18158
  cart_number: number;
17244
18159
  created_at?: string;
17245
18160
  id?: string;
17246
18161
  is_auto?: boolean;
17247
18162
  is_complete?: boolean;
17248
18163
  notes?: string | null;
18164
+ occupancy_pct?: number;
17249
18165
  order_id: string;
18166
+ source?: string;
18167
+ total_layers_used?: number;
17250
18168
  updated_at?: string;
17251
18169
  };
17252
18170
  Update: {
18171
+ algorithm_version?: number;
17253
18172
  cart_number?: number;
17254
18173
  created_at?: string;
17255
18174
  id?: string;
17256
18175
  is_auto?: boolean;
17257
18176
  is_complete?: boolean;
17258
18177
  notes?: string | null;
18178
+ occupancy_pct?: number;
17259
18179
  order_id?: string;
18180
+ source?: string;
18181
+ total_layers_used?: number;
17260
18182
  updated_at?: string;
17261
18183
  };
17262
18184
  Relationships: [{
@@ -17409,6 +18331,8 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
17409
18331
  order_date: string;
17410
18332
  order_number: string;
17411
18333
  order_source: string;
18334
+ plan_locked_at: string | null;
18335
+ plan_locked_ref: string | null;
17412
18336
  status: string;
17413
18337
  total: string;
17414
18338
  updated_at: string;
@@ -17425,6 +18349,8 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
17425
18349
  order_date?: string;
17426
18350
  order_number: string;
17427
18351
  order_source?: string;
18352
+ plan_locked_at?: string | null;
18353
+ plan_locked_ref?: string | null;
17428
18354
  status?: string;
17429
18355
  total?: string;
17430
18356
  updated_at?: string;
@@ -17441,6 +18367,8 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
17441
18367
  order_date?: string;
17442
18368
  order_number?: string;
17443
18369
  order_source?: string;
18370
+ plan_locked_at?: string | null;
18371
+ plan_locked_ref?: string | null;
17444
18372
  status?: string;
17445
18373
  total?: string;
17446
18374
  updated_at?: string;
@@ -17809,28 +18737,34 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
17809
18737
  };
17810
18738
  profiles: {
17811
18739
  Row: {
18740
+ address: string | null;
17812
18741
  created_at: string;
17813
18742
  display_name: string | null;
17814
18743
  email: string | null;
17815
18744
  id: string;
18745
+ is_superadmin: boolean;
17816
18746
  notification_preferences: import("../integrations/supabase/types").Json;
17817
18747
  tenant_id: string | null;
17818
18748
  updated_at: string;
17819
18749
  };
17820
18750
  Insert: {
18751
+ address?: string | null;
17821
18752
  created_at?: string;
17822
18753
  display_name?: string | null;
17823
18754
  email?: string | null;
17824
18755
  id: string;
18756
+ is_superadmin?: boolean;
17825
18757
  notification_preferences?: import("../integrations/supabase/types").Json;
17826
18758
  tenant_id?: string | null;
17827
18759
  updated_at?: string;
17828
18760
  };
17829
18761
  Update: {
18762
+ address?: string | null;
17830
18763
  created_at?: string;
17831
18764
  display_name?: string | null;
17832
18765
  email?: string | null;
17833
18766
  id?: string;
18767
+ is_superadmin?: boolean;
17834
18768
  notification_preferences?: import("../integrations/supabase/types").Json;
17835
18769
  tenant_id?: string | null;
17836
18770
  updated_at?: string;
@@ -18620,6 +19554,24 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
18620
19554
  };
18621
19555
  Relationships: [];
18622
19556
  };
19557
+ sidebar_config: {
19558
+ Row: {
19559
+ id: string;
19560
+ module_order: string[];
19561
+ updated_at: string;
19562
+ };
19563
+ Insert: {
19564
+ id?: string;
19565
+ module_order?: string[];
19566
+ updated_at?: string;
19567
+ };
19568
+ Update: {
19569
+ id?: string;
19570
+ module_order?: string[];
19571
+ updated_at?: string;
19572
+ };
19573
+ Relationships: [];
19574
+ };
18623
19575
  stock_import_runs: {
18624
19576
  Row: {
18625
19577
  connection_id: string | null;
@@ -18678,7 +19630,7 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
18678
19630
  reason: string | null;
18679
19631
  reserved_after: number | null;
18680
19632
  reserved_before: number | null;
18681
- trade_item_key: string;
19633
+ trade_item_key: string | null;
18682
19634
  };
18683
19635
  Insert: {
18684
19636
  connection_id?: string | null;
@@ -18695,7 +19647,7 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
18695
19647
  reason?: string | null;
18696
19648
  reserved_after?: number | null;
18697
19649
  reserved_before?: number | null;
18698
- trade_item_key: string;
19650
+ trade_item_key?: string | null;
18699
19651
  };
18700
19652
  Update: {
18701
19653
  connection_id?: string | null;
@@ -18712,7 +19664,7 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
18712
19664
  reason?: string | null;
18713
19665
  reserved_after?: number | null;
18714
19666
  reserved_before?: number | null;
18715
- trade_item_key?: string;
19667
+ trade_item_key?: string | null;
18716
19668
  };
18717
19669
  Relationships: [];
18718
19670
  };
@@ -19055,29 +20007,137 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
19055
20007
  };
19056
20008
  Relationships: [];
19057
20009
  };
19058
- twinfield_connections: {
20010
+ trade_item_supply_lines: {
19059
20011
  Row: {
19060
- access_token: string | null;
19061
- client_id: string;
19062
- client_secret: string | null;
19063
- cluster_uri: string | null;
19064
- company_code: string | null;
19065
- company_name: string | null;
19066
- connected_at: string | null;
20012
+ available_quantity: number | null;
20013
+ connection_id: string;
19067
20014
  created_at: string;
19068
- environment: string;
20015
+ currency: string | null;
20016
+ endpoint_family: string | null;
20017
+ environment: string | null;
19069
20018
  id: string;
19070
- is_active: boolean;
19071
- label: string | null;
19072
- office_code: string | null;
19073
- redirect_uri: string;
19074
- refresh_token: string | null;
19075
- token_expires_at: string | null;
20019
+ last_error: string | null;
20020
+ last_status: number | null;
20021
+ packing_configuration_id: string | null;
20022
+ period_end: string | null;
20023
+ period_start: string | null;
20024
+ price_per_piece: number | null;
20025
+ sales_unit: string | null;
20026
+ supply_line_id: string | null;
20027
+ supply_type: string;
20028
+ trade_item_id: string;
19076
20029
  updated_at: string;
19077
20030
  user_id: string;
20031
+ week: number | null;
20032
+ year: number | null;
19078
20033
  };
19079
20034
  Insert: {
19080
- access_token?: string | null;
20035
+ available_quantity?: number | null;
20036
+ connection_id: string;
20037
+ created_at?: string;
20038
+ currency?: string | null;
20039
+ endpoint_family?: string | null;
20040
+ environment?: string | null;
20041
+ id?: string;
20042
+ last_error?: string | null;
20043
+ last_status?: number | null;
20044
+ packing_configuration_id?: string | null;
20045
+ period_end?: string | null;
20046
+ period_start?: string | null;
20047
+ price_per_piece?: number | null;
20048
+ sales_unit?: string | null;
20049
+ supply_line_id?: string | null;
20050
+ supply_type?: string;
20051
+ trade_item_id: string;
20052
+ updated_at?: string;
20053
+ user_id: string;
20054
+ week?: number | null;
20055
+ year?: number | null;
20056
+ };
20057
+ Update: {
20058
+ available_quantity?: number | null;
20059
+ connection_id?: string;
20060
+ created_at?: string;
20061
+ currency?: string | null;
20062
+ endpoint_family?: string | null;
20063
+ environment?: string | null;
20064
+ id?: string;
20065
+ last_error?: string | null;
20066
+ last_status?: number | null;
20067
+ packing_configuration_id?: string | null;
20068
+ period_end?: string | null;
20069
+ period_start?: string | null;
20070
+ price_per_piece?: number | null;
20071
+ sales_unit?: string | null;
20072
+ supply_line_id?: string | null;
20073
+ supply_type?: string;
20074
+ trade_item_id?: string;
20075
+ updated_at?: string;
20076
+ user_id?: string;
20077
+ week?: number | null;
20078
+ year?: number | null;
20079
+ };
20080
+ Relationships: [];
20081
+ };
20082
+ trade_item_warehouse_preferences: {
20083
+ Row: {
20084
+ connection_id: string;
20085
+ created_at: string;
20086
+ id: string;
20087
+ trade_item_id: string;
20088
+ updated_at: string;
20089
+ warehouse_id: string;
20090
+ warehouse_name: string | null;
20091
+ };
20092
+ Insert: {
20093
+ connection_id: string;
20094
+ created_at?: string;
20095
+ id?: string;
20096
+ trade_item_id: string;
20097
+ updated_at?: string;
20098
+ warehouse_id: string;
20099
+ warehouse_name?: string | null;
20100
+ };
20101
+ Update: {
20102
+ connection_id?: string;
20103
+ created_at?: string;
20104
+ id?: string;
20105
+ trade_item_id?: string;
20106
+ updated_at?: string;
20107
+ warehouse_id?: string;
20108
+ warehouse_name?: string | null;
20109
+ };
20110
+ Relationships: [{
20111
+ foreignKeyName: "trade_item_warehouse_preferences_connection_id_fkey";
20112
+ columns: ["connection_id"];
20113
+ isOneToOne: false;
20114
+ referencedRelation: "floriday_connections";
20115
+ referencedColumns: ["id"];
20116
+ }];
20117
+ };
20118
+ twinfield_connections: {
20119
+ Row: {
20120
+ access_token: string | null;
20121
+ client_id: string;
20122
+ client_secret: string | null;
20123
+ cluster_uri: string | null;
20124
+ company_code: string | null;
20125
+ company_name: string | null;
20126
+ connected_at: string | null;
20127
+ created_at: string;
20128
+ environment: string;
20129
+ id: string;
20130
+ is_active: boolean;
20131
+ label: string | null;
20132
+ office_code: string | null;
20133
+ redirect_uri: string;
20134
+ refresh_token: string | null;
20135
+ token_expires_at: string | null;
20136
+ updated_at: string;
20137
+ user_id: string;
20138
+ };
20139
+ Insert: {
20140
+ access_token?: string | null;
19081
20141
  client_id: string;
19082
20142
  client_secret?: string | null;
19083
20143
  cluster_uri?: string | null;
@@ -19374,6 +20434,10 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
19374
20434
  default_invoice_type: string;
19375
20435
  default_payment_term_days: number;
19376
20436
  default_vat_code: string;
20437
+ invoice_enabled_ao: boolean;
20438
+ invoice_enabled_fo: boolean;
20439
+ invoice_enabled_ho: boolean;
20440
+ invoice_enabled_mo: boolean;
19377
20441
  updated_at: string;
19378
20442
  user_id: string;
19379
20443
  };
@@ -19383,6 +20447,10 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
19383
20447
  default_invoice_type?: string;
19384
20448
  default_payment_term_days?: number;
19385
20449
  default_vat_code?: string;
20450
+ invoice_enabled_ao?: boolean;
20451
+ invoice_enabled_fo?: boolean;
20452
+ invoice_enabled_ho?: boolean;
20453
+ invoice_enabled_mo?: boolean;
19386
20454
  updated_at?: string;
19387
20455
  user_id: string;
19388
20456
  };
@@ -19392,6 +20460,10 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
19392
20460
  default_invoice_type?: string;
19393
20461
  default_payment_term_days?: number;
19394
20462
  default_vat_code?: string;
20463
+ invoice_enabled_ao?: boolean;
20464
+ invoice_enabled_fo?: boolean;
20465
+ invoice_enabled_ho?: boolean;
20466
+ invoice_enabled_mo?: boolean;
19395
20467
  updated_at?: string;
19396
20468
  user_id?: string;
19397
20469
  };
@@ -20686,6 +21758,12 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
20686
21758
  order_number: string;
20687
21759
  }[];
20688
21760
  };
21761
+ autolink_product_to_floriday: {
21762
+ Args: {
21763
+ p_product_id: string;
21764
+ };
21765
+ Returns: string;
21766
+ };
20689
21767
  backfill_open_order_reservations: {
20690
21768
  Args: never;
20691
21769
  Returns: {
@@ -20722,7 +21800,19 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
20722
21800
  };
20723
21801
  cleanup_old_bookings: {
20724
21802
  Args: never;
20725
- Returns: number;
21803
+ Returns: undefined;
21804
+ };
21805
+ consume_floriday_rate_limit: {
21806
+ Args: {
21807
+ p_bucket: string;
21808
+ p_capacity: number;
21809
+ p_cost?: number;
21810
+ p_refill_per_sec: number;
21811
+ };
21812
+ Returns: {
21813
+ granted: boolean;
21814
+ wait_ms: number;
21815
+ }[];
20726
21816
  };
20727
21817
  control_get_todays_carts: {
20728
21818
  Args: never;
@@ -20804,6 +21894,12 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
20804
21894
  status: string;
20805
21895
  }[];
20806
21896
  };
21897
+ enqueue_cart_replan_if_unlocked: {
21898
+ Args: {
21899
+ p_order_id: string;
21900
+ };
21901
+ Returns: undefined;
21902
+ };
20807
21903
  ensure_trade_item_stock_row: {
20808
21904
  Args: {
20809
21905
  p_key: string;
@@ -20910,6 +22006,13 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
20910
22006
  office_code: string;
20911
22007
  }[];
20912
22008
  };
22009
+ get_floricode_record_counts: {
22010
+ Args: never;
22011
+ Returns: {
22012
+ count: number;
22013
+ resource: string;
22014
+ }[];
22015
+ };
20913
22016
  get_floriday_agreements_active: {
20914
22017
  Args: {
20915
22018
  p_on_date?: string;
@@ -21001,6 +22104,12 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
21001
22104
  };
21002
22105
  Returns: import("../integrations/supabase/types").Json;
21003
22106
  };
22107
+ get_offer_delivery_options: {
22108
+ Args: {
22109
+ p_code: string;
22110
+ };
22111
+ Returns: import("../integrations/supabase/types").Json;
22112
+ };
21004
22113
  get_offer_recipient_by_code: {
21005
22114
  Args: {
21006
22115
  p_code: string;
@@ -21065,6 +22174,12 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
21065
22174
  Args: never;
21066
22175
  Returns: boolean;
21067
22176
  };
22177
+ is_superadmin: {
22178
+ Args: {
22179
+ _user_id: string;
22180
+ };
22181
+ Returns: boolean;
22182
+ };
21068
22183
  local_effective_price: {
21069
22184
  Args: {
21070
22185
  _customer_id: string;
@@ -21099,6 +22214,13 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
21099
22214
  };
21100
22215
  Returns: string;
21101
22216
  };
22217
+ next_order_number_for_date: {
22218
+ Args: {
22219
+ p_created_at?: string;
22220
+ p_prefix: string;
22221
+ };
22222
+ Returns: string;
22223
+ };
21102
22224
  next_work_order_number: {
21103
22225
  Args: {
21104
22226
  p_parent_work_order_id?: string;
@@ -21106,6 +22228,12 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
21106
22228
  };
21107
22229
  Returns: string;
21108
22230
  };
22231
+ normalize_order_source: {
22232
+ Args: {
22233
+ p_src: string;
22234
+ };
22235
+ Returns: string;
22236
+ };
21109
22237
  normalize_vat: {
21110
22238
  Args: {
21111
22239
  v: string;
@@ -21120,10 +22248,21 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
21120
22248
  };
21121
22249
  Returns: boolean;
21122
22250
  };
22251
+ order_number_prefix: {
22252
+ Args: {
22253
+ p_custom_fields?: import("../integrations/supabase/types").Json;
22254
+ p_order_source: string;
22255
+ };
22256
+ Returns: string;
22257
+ };
21123
22258
  pickstation_get_orders_raw: {
21124
22259
  Args: never;
21125
22260
  Returns: import("../integrations/supabase/types").Json;
21126
22261
  };
22262
+ pickstation_get_planning_context: {
22263
+ Args: never;
22264
+ Returns: import("../integrations/supabase/types").Json;
22265
+ };
21127
22266
  pickstation_get_settings: {
21128
22267
  Args: never;
21129
22268
  Returns: import("../integrations/supabase/types").Json;
@@ -21154,6 +22293,28 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
21154
22293
  };
21155
22294
  Returns: undefined;
21156
22295
  };
22296
+ recompute_order_status: {
22297
+ Args: {
22298
+ p_order_id: string;
22299
+ };
22300
+ Returns: undefined;
22301
+ };
22302
+ recompute_reserved_for_order: {
22303
+ Args: {
22304
+ p_order_id: string;
22305
+ };
22306
+ Returns: undefined;
22307
+ };
22308
+ recompute_reserved_stock: {
22309
+ Args: {
22310
+ p_trade_item_key: string;
22311
+ };
22312
+ Returns: undefined;
22313
+ };
22314
+ refresh_external_customers_grouped: {
22315
+ Args: never;
22316
+ Returns: undefined;
22317
+ };
21157
22318
  refresh_floricode_derived_code_lists: {
21158
22319
  Args: never;
21159
22320
  Returns: {
@@ -21168,6 +22329,12 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
21168
22329
  };
21169
22330
  Returns: number;
21170
22331
  };
22332
+ refresh_floricode_derived_for_products: {
22333
+ Args: {
22334
+ _product_ids: string[];
22335
+ };
22336
+ Returns: number;
22337
+ };
21171
22338
  reset_floriday_sync_cursor: {
21172
22339
  Args: {
21173
22340
  p_connection_id: string;
@@ -21175,6 +22342,12 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
21175
22342
  };
21176
22343
  Returns: undefined;
21177
22344
  };
22345
+ resolve_product_id_for_item: {
22346
+ Args: {
22347
+ p_product_name: string;
22348
+ };
22349
+ Returns: string;
22350
+ };
21178
22351
  schedule_floriday_additional_services_sync: {
21179
22352
  Args: {
21180
22353
  p_apikey: string;
@@ -21452,6 +22625,24 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
21452
22625
  };
21453
22626
  Returns: string[];
21454
22627
  };
22628
+ sync_cached_packing_from_product: {
22629
+ Args: {
22630
+ p_product_id: string;
22631
+ };
22632
+ Returns: undefined;
22633
+ };
22634
+ sync_order_cart_item_packing_from_product: {
22635
+ Args: {
22636
+ p_product_id: string;
22637
+ };
22638
+ Returns: undefined;
22639
+ };
22640
+ sync_product_packing_from_floriday_cache: {
22641
+ Args: {
22642
+ p_floriday_id: string;
22643
+ };
22644
+ Returns: undefined;
22645
+ };
21455
22646
  twinfield_decrypt: {
21456
22647
  Args: {
21457
22648
  cipher: string;
@@ -21464,6 +22655,17 @@ export declare const createSalesOrder: import("@tanstack/start-client-core").Opt
21464
22655
  };
21465
22656
  Returns: string;
21466
22657
  };
22658
+ upsert_auto_fulfillment_log: {
22659
+ Args: {
22660
+ p_connection_id: string;
22661
+ p_error?: string;
22662
+ p_fulfillment_order_id?: string;
22663
+ p_reason?: string;
22664
+ p_sales_order_id: string;
22665
+ p_status: string;
22666
+ };
22667
+ Returns: undefined;
22668
+ };
21467
22669
  };
21468
22670
  Enums: {
21469
22671
  app_role: "admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie" | "monteur";
@@ -21496,7 +22698,10 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
21496
22698
  Tables: {
21497
22699
  afhandeling_settings: {
21498
22700
  Row: {
22701
+ auto_print_delivery_note: boolean;
22702
+ auto_process_paused: boolean;
21499
22703
  created_at: string;
22704
+ extra_pick_days_with_stickers: number;
21500
22705
  id: string;
21501
22706
  max_workdays_earlier_pick: number;
21502
22707
  pick_days_before_transport: number;
@@ -21510,7 +22715,10 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
21510
22715
  user_id: string;
21511
22716
  };
21512
22717
  Insert: {
22718
+ auto_print_delivery_note?: boolean;
22719
+ auto_process_paused?: boolean;
21513
22720
  created_at?: string;
22721
+ extra_pick_days_with_stickers?: number;
21514
22722
  id?: string;
21515
22723
  max_workdays_earlier_pick?: number;
21516
22724
  pick_days_before_transport?: number;
@@ -21524,7 +22732,10 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
21524
22732
  user_id: string;
21525
22733
  };
21526
22734
  Update: {
22735
+ auto_print_delivery_note?: boolean;
22736
+ auto_process_paused?: boolean;
21527
22737
  created_at?: string;
22738
+ extra_pick_days_with_stickers?: number;
21528
22739
  id?: string;
21529
22740
  max_workdays_earlier_pick?: number;
21530
22741
  pick_days_before_transport?: number;
@@ -21755,6 +22966,9 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
21755
22966
  created_at: string;
21756
22967
  extra_id: string;
21757
22968
  id: string;
22969
+ original_unit_price: number | null;
22970
+ override_reason: string | null;
22971
+ override_unit_price: number | null;
21758
22972
  quantity: number;
21759
22973
  total_price: number;
21760
22974
  unit_price: number;
@@ -21764,6 +22978,9 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
21764
22978
  created_at?: string;
21765
22979
  extra_id: string;
21766
22980
  id?: string;
22981
+ original_unit_price?: number | null;
22982
+ override_reason?: string | null;
22983
+ override_unit_price?: number | null;
21767
22984
  quantity?: number;
21768
22985
  total_price?: number;
21769
22986
  unit_price?: number;
@@ -21773,6 +22990,9 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
21773
22990
  created_at?: string;
21774
22991
  extra_id?: string;
21775
22992
  id?: string;
22993
+ original_unit_price?: number | null;
22994
+ override_reason?: string | null;
22995
+ override_unit_price?: number | null;
21776
22996
  quantity?: number;
21777
22997
  total_price?: number;
21778
22998
  unit_price?: number;
@@ -21793,11 +23013,15 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
21793
23013
  };
21794
23014
  bookings: {
21795
23015
  Row: {
23016
+ archive_reason: string | null;
23017
+ archived_at: string | null;
23018
+ archived_by: string | null;
21796
23019
  company_name: string | null;
21797
23020
  conflict_checked_at: string | null;
21798
23021
  conflict_reason: string | null;
21799
23022
  created_at: string;
21800
23023
  created_by_role: string | null;
23024
+ customer_address: string | null;
21801
23025
  customer_email: string | null;
21802
23026
  customer_name: string | null;
21803
23027
  end_time: string;
@@ -21809,7 +23033,12 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
21809
23033
  invoiced_at: string | null;
21810
23034
  notes: string | null;
21811
23035
  number_of_people: number;
23036
+ overridden_at: string | null;
23037
+ overridden_by: string | null;
23038
+ override_reason: string | null;
23039
+ price_override: boolean;
21812
23040
  room_id: string;
23041
+ room_price_override: number | null;
21813
23042
  start_time: string;
21814
23043
  status: string;
21815
23044
  total_excl_vat: number | null;
@@ -21818,11 +23047,15 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
21818
23047
  vat_amount: number | null;
21819
23048
  };
21820
23049
  Insert: {
23050
+ archive_reason?: string | null;
23051
+ archived_at?: string | null;
23052
+ archived_by?: string | null;
21821
23053
  company_name?: string | null;
21822
23054
  conflict_checked_at?: string | null;
21823
23055
  conflict_reason?: string | null;
21824
23056
  created_at?: string;
21825
23057
  created_by_role?: string | null;
23058
+ customer_address?: string | null;
21826
23059
  customer_email?: string | null;
21827
23060
  customer_name?: string | null;
21828
23061
  end_time: string;
@@ -21834,7 +23067,12 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
21834
23067
  invoiced_at?: string | null;
21835
23068
  notes?: string | null;
21836
23069
  number_of_people?: number;
23070
+ overridden_at?: string | null;
23071
+ overridden_by?: string | null;
23072
+ override_reason?: string | null;
23073
+ price_override?: boolean;
21837
23074
  room_id: string;
23075
+ room_price_override?: number | null;
21838
23076
  start_time: string;
21839
23077
  status?: string;
21840
23078
  total_excl_vat?: number | null;
@@ -21843,11 +23081,15 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
21843
23081
  vat_amount?: number | null;
21844
23082
  };
21845
23083
  Update: {
23084
+ archive_reason?: string | null;
23085
+ archived_at?: string | null;
23086
+ archived_by?: string | null;
21846
23087
  company_name?: string | null;
21847
23088
  conflict_checked_at?: string | null;
21848
23089
  conflict_reason?: string | null;
21849
23090
  created_at?: string;
21850
23091
  created_by_role?: string | null;
23092
+ customer_address?: string | null;
21851
23093
  customer_email?: string | null;
21852
23094
  customer_name?: string | null;
21853
23095
  end_time?: string;
@@ -21859,7 +23101,12 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
21859
23101
  invoiced_at?: string | null;
21860
23102
  notes?: string | null;
21861
23103
  number_of_people?: number;
23104
+ overridden_at?: string | null;
23105
+ overridden_by?: string | null;
23106
+ override_reason?: string | null;
23107
+ price_override?: boolean;
21862
23108
  room_id?: string;
23109
+ room_price_override?: number | null;
21863
23110
  start_time?: string;
21864
23111
  status?: string;
21865
23112
  total_excl_vat?: number | null;
@@ -22316,6 +23563,36 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
22316
23563
  };
22317
23564
  Relationships: [];
22318
23565
  };
23566
+ cart_replan_queue: {
23567
+ Row: {
23568
+ attempts: number;
23569
+ last_error: string | null;
23570
+ order_id: string;
23571
+ processed_at: string | null;
23572
+ requested_at: string;
23573
+ };
23574
+ Insert: {
23575
+ attempts?: number;
23576
+ last_error?: string | null;
23577
+ order_id: string;
23578
+ processed_at?: string | null;
23579
+ requested_at?: string;
23580
+ };
23581
+ Update: {
23582
+ attempts?: number;
23583
+ last_error?: string | null;
23584
+ order_id?: string;
23585
+ processed_at?: string | null;
23586
+ requested_at?: string;
23587
+ };
23588
+ Relationships: [{
23589
+ foreignKeyName: "cart_replan_queue_order_id_fkey";
23590
+ columns: ["order_id"];
23591
+ isOneToOne: true;
23592
+ referencedRelation: "orders";
23593
+ referencedColumns: ["id"];
23594
+ }];
23595
+ };
22319
23596
  collections: {
22320
23597
  Row: {
22321
23598
  created_at: string;
@@ -22658,8 +23935,27 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
22658
23935
  customers: {
22659
23936
  Row: {
22660
23937
  address: string | null;
23938
+ address_line1: string | null;
23939
+ address_line2: string | null;
23940
+ address_type: string | null;
23941
+ attention_to: string | null;
23942
+ bank_account_holder: string | null;
23943
+ bank_account_number: string | null;
23944
+ bank_address_line1: string | null;
23945
+ bank_address_line2: string | null;
23946
+ bank_bic: string | null;
23947
+ bank_city: string | null;
23948
+ bank_country: string | null;
23949
+ bank_house_number: string | null;
23950
+ bank_iban: string | null;
23951
+ bank_name: string | null;
23952
+ bank_national_code: string | null;
23953
+ bank_postal_code: string | null;
23954
+ bank_state: string | null;
23955
+ billing_email: string | null;
22661
23956
  bio: string | null;
22662
23957
  city: string | null;
23958
+ coc_number: string | null;
22663
23959
  commercial_name: string | null;
22664
23960
  company_name: string;
22665
23961
  connection_status: string;
@@ -22668,21 +23964,28 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
22668
23964
  created_at: string;
22669
23965
  custom_fields: import("../integrations/supabase/types").Json;
22670
23966
  customer_class: string | null;
23967
+ customer_number: string | null;
23968
+ discount_days: number | null;
23969
+ discount_percentage: number | null;
22671
23970
  email: string | null;
22672
23971
  external_id: string | null;
23972
+ fax: string | null;
22673
23973
  floriday_connection_id: string | null;
22674
23974
  floriday_organization_id: string | null;
22675
23975
  floriday_raw: import("../integrations/supabase/types").Json | null;
22676
23976
  gln: string | null;
22677
23977
  house_number: string | null;
23978
+ icp_country_code: string | null;
22678
23979
  id: string;
22679
23980
  is_active: boolean;
23981
+ language: string | null;
22680
23982
  last_synced_at: string | null;
22681
23983
  logo_url: string | null;
22682
23984
  markets: string[];
22683
23985
  notes: string | null;
22684
23986
  organization_type: string | null;
22685
23987
  payment_methods: string[];
23988
+ payment_term_days: number | null;
22686
23989
  phone: string | null;
22687
23990
  postal_code: string | null;
22688
23991
  product_groups: string[];
@@ -22693,13 +23996,33 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
22693
23996
  sync_status: string;
22694
23997
  trade_forms: string[];
22695
23998
  updated_at: string;
23999
+ vat_display: string | null;
22696
24000
  vat_number: string | null;
22697
24001
  website: string | null;
22698
24002
  };
22699
24003
  Insert: {
22700
24004
  address?: string | null;
24005
+ address_line1?: string | null;
24006
+ address_line2?: string | null;
24007
+ address_type?: string | null;
24008
+ attention_to?: string | null;
24009
+ bank_account_holder?: string | null;
24010
+ bank_account_number?: string | null;
24011
+ bank_address_line1?: string | null;
24012
+ bank_address_line2?: string | null;
24013
+ bank_bic?: string | null;
24014
+ bank_city?: string | null;
24015
+ bank_country?: string | null;
24016
+ bank_house_number?: string | null;
24017
+ bank_iban?: string | null;
24018
+ bank_name?: string | null;
24019
+ bank_national_code?: string | null;
24020
+ bank_postal_code?: string | null;
24021
+ bank_state?: string | null;
24022
+ billing_email?: string | null;
22701
24023
  bio?: string | null;
22702
24024
  city?: string | null;
24025
+ coc_number?: string | null;
22703
24026
  commercial_name?: string | null;
22704
24027
  company_name: string;
22705
24028
  connection_status?: string;
@@ -22708,21 +24031,28 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
22708
24031
  created_at?: string;
22709
24032
  custom_fields?: import("../integrations/supabase/types").Json;
22710
24033
  customer_class?: string | null;
24034
+ customer_number?: string | null;
24035
+ discount_days?: number | null;
24036
+ discount_percentage?: number | null;
22711
24037
  email?: string | null;
22712
24038
  external_id?: string | null;
24039
+ fax?: string | null;
22713
24040
  floriday_connection_id?: string | null;
22714
24041
  floriday_organization_id?: string | null;
22715
24042
  floriday_raw?: import("../integrations/supabase/types").Json | null;
22716
24043
  gln?: string | null;
22717
24044
  house_number?: string | null;
24045
+ icp_country_code?: string | null;
22718
24046
  id?: string;
22719
24047
  is_active?: boolean;
24048
+ language?: string | null;
22720
24049
  last_synced_at?: string | null;
22721
24050
  logo_url?: string | null;
22722
24051
  markets?: string[];
22723
24052
  notes?: string | null;
22724
24053
  organization_type?: string | null;
22725
24054
  payment_methods?: string[];
24055
+ payment_term_days?: number | null;
22726
24056
  phone?: string | null;
22727
24057
  postal_code?: string | null;
22728
24058
  product_groups?: string[];
@@ -22733,13 +24063,33 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
22733
24063
  sync_status?: string;
22734
24064
  trade_forms?: string[];
22735
24065
  updated_at?: string;
24066
+ vat_display?: string | null;
22736
24067
  vat_number?: string | null;
22737
24068
  website?: string | null;
22738
24069
  };
22739
24070
  Update: {
22740
24071
  address?: string | null;
24072
+ address_line1?: string | null;
24073
+ address_line2?: string | null;
24074
+ address_type?: string | null;
24075
+ attention_to?: string | null;
24076
+ bank_account_holder?: string | null;
24077
+ bank_account_number?: string | null;
24078
+ bank_address_line1?: string | null;
24079
+ bank_address_line2?: string | null;
24080
+ bank_bic?: string | null;
24081
+ bank_city?: string | null;
24082
+ bank_country?: string | null;
24083
+ bank_house_number?: string | null;
24084
+ bank_iban?: string | null;
24085
+ bank_name?: string | null;
24086
+ bank_national_code?: string | null;
24087
+ bank_postal_code?: string | null;
24088
+ bank_state?: string | null;
24089
+ billing_email?: string | null;
22741
24090
  bio?: string | null;
22742
24091
  city?: string | null;
24092
+ coc_number?: string | null;
22743
24093
  commercial_name?: string | null;
22744
24094
  company_name?: string;
22745
24095
  connection_status?: string;
@@ -22748,21 +24098,28 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
22748
24098
  created_at?: string;
22749
24099
  custom_fields?: import("../integrations/supabase/types").Json;
22750
24100
  customer_class?: string | null;
24101
+ customer_number?: string | null;
24102
+ discount_days?: number | null;
24103
+ discount_percentage?: number | null;
22751
24104
  email?: string | null;
22752
24105
  external_id?: string | null;
24106
+ fax?: string | null;
22753
24107
  floriday_connection_id?: string | null;
22754
24108
  floriday_organization_id?: string | null;
22755
24109
  floriday_raw?: import("../integrations/supabase/types").Json | null;
22756
24110
  gln?: string | null;
22757
24111
  house_number?: string | null;
24112
+ icp_country_code?: string | null;
22758
24113
  id?: string;
22759
24114
  is_active?: boolean;
24115
+ language?: string | null;
22760
24116
  last_synced_at?: string | null;
22761
24117
  logo_url?: string | null;
22762
24118
  markets?: string[];
22763
24119
  notes?: string | null;
22764
24120
  organization_type?: string | null;
22765
24121
  payment_methods?: string[];
24122
+ payment_term_days?: number | null;
22766
24123
  phone?: string | null;
22767
24124
  postal_code?: string | null;
22768
24125
  product_groups?: string[];
@@ -22773,6 +24130,7 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
22773
24130
  sync_status?: string;
22774
24131
  trade_forms?: string[];
22775
24132
  updated_at?: string;
24133
+ vat_display?: string | null;
22776
24134
  vat_number?: string | null;
22777
24135
  website?: string | null;
22778
24136
  };
@@ -24441,34 +25799,52 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
24441
25799
  Row: {
24442
25800
  catalog_key: string | null;
24443
25801
  catalog_url: string;
25802
+ client_id: string | null;
25803
+ client_secret_ciphertext: string | null;
25804
+ client_secret_last4: string | null;
24444
25805
  created_at: string;
24445
25806
  id: number;
24446
25807
  last_meta: import("../integrations/supabase/types").Json | null;
24447
25808
  last_test_at: string | null;
24448
25809
  last_test_error: string | null;
24449
25810
  last_test_ok: boolean | null;
25811
+ last_token_test_at: string | null;
25812
+ last_token_test_error: string | null;
25813
+ last_token_test_ok: boolean | null;
24450
25814
  updated_at: string;
24451
25815
  };
24452
25816
  Insert: {
24453
25817
  catalog_key?: string | null;
24454
25818
  catalog_url?: string;
25819
+ client_id?: string | null;
25820
+ client_secret_ciphertext?: string | null;
25821
+ client_secret_last4?: string | null;
24455
25822
  created_at?: string;
24456
25823
  id?: number;
24457
25824
  last_meta?: import("../integrations/supabase/types").Json | null;
24458
25825
  last_test_at?: string | null;
24459
25826
  last_test_error?: string | null;
24460
25827
  last_test_ok?: boolean | null;
25828
+ last_token_test_at?: string | null;
25829
+ last_token_test_error?: string | null;
25830
+ last_token_test_ok?: boolean | null;
24461
25831
  updated_at?: string;
24462
25832
  };
24463
25833
  Update: {
24464
25834
  catalog_key?: string | null;
24465
25835
  catalog_url?: string;
25836
+ client_id?: string | null;
25837
+ client_secret_ciphertext?: string | null;
25838
+ client_secret_last4?: string | null;
24466
25839
  created_at?: string;
24467
25840
  id?: number;
24468
25841
  last_meta?: import("../integrations/supabase/types").Json | null;
24469
25842
  last_test_at?: string | null;
24470
25843
  last_test_error?: string | null;
24471
25844
  last_test_ok?: boolean | null;
25845
+ last_token_test_at?: string | null;
25846
+ last_token_test_error?: string | null;
25847
+ last_token_test_ok?: boolean | null;
24472
25848
  updated_at?: string;
24473
25849
  };
24474
25850
  Relationships: [];
@@ -24701,6 +26077,54 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
24701
26077
  referencedColumns: ["id"];
24702
26078
  }];
24703
26079
  };
26080
+ floriday_auto_fulfillment_log: {
26081
+ Row: {
26082
+ attempts: number;
26083
+ connection_id: string;
26084
+ created_at: string;
26085
+ error: string | null;
26086
+ fulfillment_order_id: string | null;
26087
+ id: string;
26088
+ last_attempt_at: string | null;
26089
+ reason: string | null;
26090
+ sales_order_id: string;
26091
+ status: string;
26092
+ updated_at: string;
26093
+ };
26094
+ Insert: {
26095
+ attempts?: number;
26096
+ connection_id: string;
26097
+ created_at?: string;
26098
+ error?: string | null;
26099
+ fulfillment_order_id?: string | null;
26100
+ id?: string;
26101
+ last_attempt_at?: string | null;
26102
+ reason?: string | null;
26103
+ sales_order_id: string;
26104
+ status?: string;
26105
+ updated_at?: string;
26106
+ };
26107
+ Update: {
26108
+ attempts?: number;
26109
+ connection_id?: string;
26110
+ created_at?: string;
26111
+ error?: string | null;
26112
+ fulfillment_order_id?: string | null;
26113
+ id?: string;
26114
+ last_attempt_at?: string | null;
26115
+ reason?: string | null;
26116
+ sales_order_id?: string;
26117
+ status?: string;
26118
+ updated_at?: string;
26119
+ };
26120
+ Relationships: [{
26121
+ foreignKeyName: "floriday_auto_fulfillment_log_connection_id_fkey";
26122
+ columns: ["connection_id"];
26123
+ isOneToOne: false;
26124
+ referencedRelation: "floriday_connections";
26125
+ referencedColumns: ["id"];
26126
+ }];
26127
+ };
24704
26128
  floriday_base_items_cache: {
24705
26129
  Row: {
24706
26130
  connection_id: string;
@@ -25805,6 +27229,24 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
25805
27229
  referencedColumns: ["id"];
25806
27230
  }];
25807
27231
  };
27232
+ floriday_rate_limit_state: {
27233
+ Row: {
27234
+ bucket: string;
27235
+ last_refill_at: string;
27236
+ tokens: number;
27237
+ };
27238
+ Insert: {
27239
+ bucket: string;
27240
+ last_refill_at?: string;
27241
+ tokens: number;
27242
+ };
27243
+ Update: {
27244
+ bucket?: string;
27245
+ last_refill_at?: string;
27246
+ tokens?: number;
27247
+ };
27248
+ Relationships: [];
27249
+ };
25808
27250
  floriday_resource_schemas: {
25809
27251
  Row: {
25810
27252
  enums: import("../integrations/supabase/types").Json;
@@ -26228,6 +27670,60 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
26228
27670
  referencedColumns: ["id"];
26229
27671
  }];
26230
27672
  };
27673
+ flow_role_assignments: {
27674
+ Row: {
27675
+ created_at: string;
27676
+ id: string;
27677
+ role_id: string;
27678
+ user_id: string;
27679
+ };
27680
+ Insert: {
27681
+ created_at?: string;
27682
+ id?: string;
27683
+ role_id: string;
27684
+ user_id: string;
27685
+ };
27686
+ Update: {
27687
+ created_at?: string;
27688
+ id?: string;
27689
+ role_id?: string;
27690
+ user_id?: string;
27691
+ };
27692
+ Relationships: [{
27693
+ foreignKeyName: "flow_role_assignments_role_id_fkey";
27694
+ columns: ["role_id"];
27695
+ isOneToOne: false;
27696
+ referencedRelation: "flow_roles";
27697
+ referencedColumns: ["id"];
27698
+ }];
27699
+ };
27700
+ flow_roles: {
27701
+ Row: {
27702
+ created_at: string;
27703
+ description: string | null;
27704
+ id: string;
27705
+ module_access: string[];
27706
+ name: string;
27707
+ updated_at: string;
27708
+ };
27709
+ Insert: {
27710
+ created_at?: string;
27711
+ description?: string | null;
27712
+ id?: string;
27713
+ module_access?: string[];
27714
+ name: string;
27715
+ updated_at?: string;
27716
+ };
27717
+ Update: {
27718
+ created_at?: string;
27719
+ description?: string | null;
27720
+ id?: string;
27721
+ module_access?: string[];
27722
+ name?: string;
27723
+ updated_at?: string;
27724
+ };
27725
+ Relationships: [];
27726
+ };
26231
27727
  imap_accounts: {
26232
27728
  Row: {
26233
27729
  created_at: string;
@@ -26859,6 +28355,7 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
26859
28355
  matched_customer_id: string | null;
26860
28356
  message_id: string;
26861
28357
  notes: string | null;
28358
+ order_number: string | null;
26862
28359
  parsed_payload: import("../integrations/supabase/types").Json | null;
26863
28360
  reviewed_at: string | null;
26864
28361
  reviewed_by: string | null;
@@ -26874,6 +28371,7 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
26874
28371
  matched_customer_id?: string | null;
26875
28372
  message_id: string;
26876
28373
  notes?: string | null;
28374
+ order_number?: string | null;
26877
28375
  parsed_payload?: import("../integrations/supabase/types").Json | null;
26878
28376
  reviewed_at?: string | null;
26879
28377
  reviewed_by?: string | null;
@@ -26889,6 +28387,7 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
26889
28387
  matched_customer_id?: string | null;
26890
28388
  message_id?: string;
26891
28389
  notes?: string | null;
28390
+ order_number?: string | null;
26892
28391
  parsed_payload?: import("../integrations/supabase/types").Json | null;
26893
28392
  reviewed_at?: string | null;
26894
28393
  reviewed_by?: string | null;
@@ -27745,6 +29244,7 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
27745
29244
  id: string;
27746
29245
  items: import("../integrations/supabase/types").Json;
27747
29246
  notes: string | null;
29247
+ order_number: string | null;
27748
29248
  recipient_id: string;
27749
29249
  total_amount: number;
27750
29250
  };
@@ -27758,6 +29258,7 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
27758
29258
  id?: string;
27759
29259
  items?: import("../integrations/supabase/types").Json;
27760
29260
  notes?: string | null;
29261
+ order_number?: string | null;
27761
29262
  recipient_id: string;
27762
29263
  total_amount?: number;
27763
29264
  };
@@ -27771,6 +29272,7 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
27771
29272
  id?: string;
27772
29273
  items?: import("../integrations/supabase/types").Json;
27773
29274
  notes?: string | null;
29275
+ order_number?: string | null;
27774
29276
  recipient_id?: string;
27775
29277
  total_amount?: number;
27776
29278
  };
@@ -27930,6 +29432,9 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
27930
29432
  crates_per_layer: number;
27931
29433
  created_at: string;
27932
29434
  id: string;
29435
+ layer_fraction: number;
29436
+ layer_share_pct: number;
29437
+ layers_per_cart: number;
27933
29438
  order_item_id: string | null;
27934
29439
  plants_per_crate: number;
27935
29440
  product_id: string | null;
@@ -27941,6 +29446,9 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
27941
29446
  crates_per_layer?: number;
27942
29447
  created_at?: string;
27943
29448
  id?: string;
29449
+ layer_fraction?: number;
29450
+ layer_share_pct?: number;
29451
+ layers_per_cart?: number;
27944
29452
  order_item_id?: string | null;
27945
29453
  plants_per_crate?: number;
27946
29454
  product_id?: string | null;
@@ -27952,6 +29460,9 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
27952
29460
  crates_per_layer?: number;
27953
29461
  created_at?: string;
27954
29462
  id?: string;
29463
+ layer_fraction?: number;
29464
+ layer_share_pct?: number;
29465
+ layers_per_cart?: number;
27955
29466
  order_item_id?: string | null;
27956
29467
  plants_per_crate?: number;
27957
29468
  product_id?: string | null;
@@ -27979,33 +29490,45 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
27979
29490
  };
27980
29491
  order_carts: {
27981
29492
  Row: {
29493
+ algorithm_version: number;
27982
29494
  cart_number: number;
27983
29495
  created_at: string;
27984
29496
  id: string;
27985
29497
  is_auto: boolean;
27986
29498
  is_complete: boolean;
27987
29499
  notes: string | null;
29500
+ occupancy_pct: number;
27988
29501
  order_id: string;
29502
+ source: string;
29503
+ total_layers_used: number;
27989
29504
  updated_at: string;
27990
29505
  };
27991
29506
  Insert: {
29507
+ algorithm_version?: number;
27992
29508
  cart_number: number;
27993
29509
  created_at?: string;
27994
29510
  id?: string;
27995
29511
  is_auto?: boolean;
27996
29512
  is_complete?: boolean;
27997
29513
  notes?: string | null;
29514
+ occupancy_pct?: number;
27998
29515
  order_id: string;
29516
+ source?: string;
29517
+ total_layers_used?: number;
27999
29518
  updated_at?: string;
28000
29519
  };
28001
29520
  Update: {
29521
+ algorithm_version?: number;
28002
29522
  cart_number?: number;
28003
29523
  created_at?: string;
28004
29524
  id?: string;
28005
29525
  is_auto?: boolean;
28006
29526
  is_complete?: boolean;
28007
29527
  notes?: string | null;
29528
+ occupancy_pct?: number;
28008
29529
  order_id?: string;
29530
+ source?: string;
29531
+ total_layers_used?: number;
28009
29532
  updated_at?: string;
28010
29533
  };
28011
29534
  Relationships: [{
@@ -28158,6 +29681,8 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
28158
29681
  order_date: string;
28159
29682
  order_number: string;
28160
29683
  order_source: string;
29684
+ plan_locked_at: string | null;
29685
+ plan_locked_ref: string | null;
28161
29686
  status: string;
28162
29687
  total: string;
28163
29688
  updated_at: string;
@@ -28174,6 +29699,8 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
28174
29699
  order_date?: string;
28175
29700
  order_number: string;
28176
29701
  order_source?: string;
29702
+ plan_locked_at?: string | null;
29703
+ plan_locked_ref?: string | null;
28177
29704
  status?: string;
28178
29705
  total?: string;
28179
29706
  updated_at?: string;
@@ -28190,6 +29717,8 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
28190
29717
  order_date?: string;
28191
29718
  order_number?: string;
28192
29719
  order_source?: string;
29720
+ plan_locked_at?: string | null;
29721
+ plan_locked_ref?: string | null;
28193
29722
  status?: string;
28194
29723
  total?: string;
28195
29724
  updated_at?: string;
@@ -28558,28 +30087,34 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
28558
30087
  };
28559
30088
  profiles: {
28560
30089
  Row: {
30090
+ address: string | null;
28561
30091
  created_at: string;
28562
30092
  display_name: string | null;
28563
30093
  email: string | null;
28564
30094
  id: string;
30095
+ is_superadmin: boolean;
28565
30096
  notification_preferences: import("../integrations/supabase/types").Json;
28566
30097
  tenant_id: string | null;
28567
30098
  updated_at: string;
28568
30099
  };
28569
30100
  Insert: {
30101
+ address?: string | null;
28570
30102
  created_at?: string;
28571
30103
  display_name?: string | null;
28572
30104
  email?: string | null;
28573
30105
  id: string;
30106
+ is_superadmin?: boolean;
28574
30107
  notification_preferences?: import("../integrations/supabase/types").Json;
28575
30108
  tenant_id?: string | null;
28576
30109
  updated_at?: string;
28577
30110
  };
28578
30111
  Update: {
30112
+ address?: string | null;
28579
30113
  created_at?: string;
28580
30114
  display_name?: string | null;
28581
30115
  email?: string | null;
28582
30116
  id?: string;
30117
+ is_superadmin?: boolean;
28583
30118
  notification_preferences?: import("../integrations/supabase/types").Json;
28584
30119
  tenant_id?: string | null;
28585
30120
  updated_at?: string;
@@ -29369,6 +30904,24 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
29369
30904
  };
29370
30905
  Relationships: [];
29371
30906
  };
30907
+ sidebar_config: {
30908
+ Row: {
30909
+ id: string;
30910
+ module_order: string[];
30911
+ updated_at: string;
30912
+ };
30913
+ Insert: {
30914
+ id?: string;
30915
+ module_order?: string[];
30916
+ updated_at?: string;
30917
+ };
30918
+ Update: {
30919
+ id?: string;
30920
+ module_order?: string[];
30921
+ updated_at?: string;
30922
+ };
30923
+ Relationships: [];
30924
+ };
29372
30925
  stock_import_runs: {
29373
30926
  Row: {
29374
30927
  connection_id: string | null;
@@ -29427,7 +30980,7 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
29427
30980
  reason: string | null;
29428
30981
  reserved_after: number | null;
29429
30982
  reserved_before: number | null;
29430
- trade_item_key: string;
30983
+ trade_item_key: string | null;
29431
30984
  };
29432
30985
  Insert: {
29433
30986
  connection_id?: string | null;
@@ -29444,7 +30997,7 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
29444
30997
  reason?: string | null;
29445
30998
  reserved_after?: number | null;
29446
30999
  reserved_before?: number | null;
29447
- trade_item_key: string;
31000
+ trade_item_key?: string | null;
29448
31001
  };
29449
31002
  Update: {
29450
31003
  connection_id?: string | null;
@@ -29461,7 +31014,7 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
29461
31014
  reason?: string | null;
29462
31015
  reserved_after?: number | null;
29463
31016
  reserved_before?: number | null;
29464
- trade_item_key?: string;
31017
+ trade_item_key?: string | null;
29465
31018
  };
29466
31019
  Relationships: [];
29467
31020
  };
@@ -29804,6 +31357,114 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
29804
31357
  };
29805
31358
  Relationships: [];
29806
31359
  };
31360
+ trade_item_supply_lines: {
31361
+ Row: {
31362
+ available_quantity: number | null;
31363
+ connection_id: string;
31364
+ created_at: string;
31365
+ currency: string | null;
31366
+ endpoint_family: string | null;
31367
+ environment: string | null;
31368
+ id: string;
31369
+ last_error: string | null;
31370
+ last_status: number | null;
31371
+ packing_configuration_id: string | null;
31372
+ period_end: string | null;
31373
+ period_start: string | null;
31374
+ price_per_piece: number | null;
31375
+ sales_unit: string | null;
31376
+ supply_line_id: string | null;
31377
+ supply_type: string;
31378
+ trade_item_id: string;
31379
+ updated_at: string;
31380
+ user_id: string;
31381
+ week: number | null;
31382
+ year: number | null;
31383
+ };
31384
+ Insert: {
31385
+ available_quantity?: number | null;
31386
+ connection_id: string;
31387
+ created_at?: string;
31388
+ currency?: string | null;
31389
+ endpoint_family?: string | null;
31390
+ environment?: string | null;
31391
+ id?: string;
31392
+ last_error?: string | null;
31393
+ last_status?: number | null;
31394
+ packing_configuration_id?: string | null;
31395
+ period_end?: string | null;
31396
+ period_start?: string | null;
31397
+ price_per_piece?: number | null;
31398
+ sales_unit?: string | null;
31399
+ supply_line_id?: string | null;
31400
+ supply_type?: string;
31401
+ trade_item_id: string;
31402
+ updated_at?: string;
31403
+ user_id: string;
31404
+ week?: number | null;
31405
+ year?: number | null;
31406
+ };
31407
+ Update: {
31408
+ available_quantity?: number | null;
31409
+ connection_id?: string;
31410
+ created_at?: string;
31411
+ currency?: string | null;
31412
+ endpoint_family?: string | null;
31413
+ environment?: string | null;
31414
+ id?: string;
31415
+ last_error?: string | null;
31416
+ last_status?: number | null;
31417
+ packing_configuration_id?: string | null;
31418
+ period_end?: string | null;
31419
+ period_start?: string | null;
31420
+ price_per_piece?: number | null;
31421
+ sales_unit?: string | null;
31422
+ supply_line_id?: string | null;
31423
+ supply_type?: string;
31424
+ trade_item_id?: string;
31425
+ updated_at?: string;
31426
+ user_id?: string;
31427
+ week?: number | null;
31428
+ year?: number | null;
31429
+ };
31430
+ Relationships: [];
31431
+ };
31432
+ trade_item_warehouse_preferences: {
31433
+ Row: {
31434
+ connection_id: string;
31435
+ created_at: string;
31436
+ id: string;
31437
+ trade_item_id: string;
31438
+ updated_at: string;
31439
+ warehouse_id: string;
31440
+ warehouse_name: string | null;
31441
+ };
31442
+ Insert: {
31443
+ connection_id: string;
31444
+ created_at?: string;
31445
+ id?: string;
31446
+ trade_item_id: string;
31447
+ updated_at?: string;
31448
+ warehouse_id: string;
31449
+ warehouse_name?: string | null;
31450
+ };
31451
+ Update: {
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
+ Relationships: [{
31461
+ foreignKeyName: "trade_item_warehouse_preferences_connection_id_fkey";
31462
+ columns: ["connection_id"];
31463
+ isOneToOne: false;
31464
+ referencedRelation: "floriday_connections";
31465
+ referencedColumns: ["id"];
31466
+ }];
31467
+ };
29807
31468
  twinfield_connections: {
29808
31469
  Row: {
29809
31470
  access_token: string | null;
@@ -30123,6 +31784,10 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
30123
31784
  default_invoice_type: string;
30124
31785
  default_payment_term_days: number;
30125
31786
  default_vat_code: string;
31787
+ invoice_enabled_ao: boolean;
31788
+ invoice_enabled_fo: boolean;
31789
+ invoice_enabled_ho: boolean;
31790
+ invoice_enabled_mo: boolean;
30126
31791
  updated_at: string;
30127
31792
  user_id: string;
30128
31793
  };
@@ -30132,6 +31797,10 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
30132
31797
  default_invoice_type?: string;
30133
31798
  default_payment_term_days?: number;
30134
31799
  default_vat_code?: string;
31800
+ invoice_enabled_ao?: boolean;
31801
+ invoice_enabled_fo?: boolean;
31802
+ invoice_enabled_ho?: boolean;
31803
+ invoice_enabled_mo?: boolean;
30135
31804
  updated_at?: string;
30136
31805
  user_id: string;
30137
31806
  };
@@ -30141,6 +31810,10 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
30141
31810
  default_invoice_type?: string;
30142
31811
  default_payment_term_days?: number;
30143
31812
  default_vat_code?: string;
31813
+ invoice_enabled_ao?: boolean;
31814
+ invoice_enabled_fo?: boolean;
31815
+ invoice_enabled_ho?: boolean;
31816
+ invoice_enabled_mo?: boolean;
30144
31817
  updated_at?: string;
30145
31818
  user_id?: string;
30146
31819
  };
@@ -31435,6 +33108,12 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
31435
33108
  order_number: string;
31436
33109
  }[];
31437
33110
  };
33111
+ autolink_product_to_floriday: {
33112
+ Args: {
33113
+ p_product_id: string;
33114
+ };
33115
+ Returns: string;
33116
+ };
31438
33117
  backfill_open_order_reservations: {
31439
33118
  Args: never;
31440
33119
  Returns: {
@@ -31471,7 +33150,19 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
31471
33150
  };
31472
33151
  cleanup_old_bookings: {
31473
33152
  Args: never;
31474
- Returns: number;
33153
+ Returns: undefined;
33154
+ };
33155
+ consume_floriday_rate_limit: {
33156
+ Args: {
33157
+ p_bucket: string;
33158
+ p_capacity: number;
33159
+ p_cost?: number;
33160
+ p_refill_per_sec: number;
33161
+ };
33162
+ Returns: {
33163
+ granted: boolean;
33164
+ wait_ms: number;
33165
+ }[];
31475
33166
  };
31476
33167
  control_get_todays_carts: {
31477
33168
  Args: never;
@@ -31553,6 +33244,12 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
31553
33244
  status: string;
31554
33245
  }[];
31555
33246
  };
33247
+ enqueue_cart_replan_if_unlocked: {
33248
+ Args: {
33249
+ p_order_id: string;
33250
+ };
33251
+ Returns: undefined;
33252
+ };
31556
33253
  ensure_trade_item_stock_row: {
31557
33254
  Args: {
31558
33255
  p_key: string;
@@ -31659,6 +33356,13 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
31659
33356
  office_code: string;
31660
33357
  }[];
31661
33358
  };
33359
+ get_floricode_record_counts: {
33360
+ Args: never;
33361
+ Returns: {
33362
+ count: number;
33363
+ resource: string;
33364
+ }[];
33365
+ };
31662
33366
  get_floriday_agreements_active: {
31663
33367
  Args: {
31664
33368
  p_on_date?: string;
@@ -31750,6 +33454,12 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
31750
33454
  };
31751
33455
  Returns: import("../integrations/supabase/types").Json;
31752
33456
  };
33457
+ get_offer_delivery_options: {
33458
+ Args: {
33459
+ p_code: string;
33460
+ };
33461
+ Returns: import("../integrations/supabase/types").Json;
33462
+ };
31753
33463
  get_offer_recipient_by_code: {
31754
33464
  Args: {
31755
33465
  p_code: string;
@@ -31814,6 +33524,12 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
31814
33524
  Args: never;
31815
33525
  Returns: boolean;
31816
33526
  };
33527
+ is_superadmin: {
33528
+ Args: {
33529
+ _user_id: string;
33530
+ };
33531
+ Returns: boolean;
33532
+ };
31817
33533
  local_effective_price: {
31818
33534
  Args: {
31819
33535
  _customer_id: string;
@@ -31848,6 +33564,13 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
31848
33564
  };
31849
33565
  Returns: string;
31850
33566
  };
33567
+ next_order_number_for_date: {
33568
+ Args: {
33569
+ p_created_at?: string;
33570
+ p_prefix: string;
33571
+ };
33572
+ Returns: string;
33573
+ };
31851
33574
  next_work_order_number: {
31852
33575
  Args: {
31853
33576
  p_parent_work_order_id?: string;
@@ -31855,6 +33578,12 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
31855
33578
  };
31856
33579
  Returns: string;
31857
33580
  };
33581
+ normalize_order_source: {
33582
+ Args: {
33583
+ p_src: string;
33584
+ };
33585
+ Returns: string;
33586
+ };
31858
33587
  normalize_vat: {
31859
33588
  Args: {
31860
33589
  v: string;
@@ -31869,10 +33598,21 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
31869
33598
  };
31870
33599
  Returns: boolean;
31871
33600
  };
33601
+ order_number_prefix: {
33602
+ Args: {
33603
+ p_custom_fields?: import("../integrations/supabase/types").Json;
33604
+ p_order_source: string;
33605
+ };
33606
+ Returns: string;
33607
+ };
31872
33608
  pickstation_get_orders_raw: {
31873
33609
  Args: never;
31874
33610
  Returns: import("../integrations/supabase/types").Json;
31875
33611
  };
33612
+ pickstation_get_planning_context: {
33613
+ Args: never;
33614
+ Returns: import("../integrations/supabase/types").Json;
33615
+ };
31876
33616
  pickstation_get_settings: {
31877
33617
  Args: never;
31878
33618
  Returns: import("../integrations/supabase/types").Json;
@@ -31903,6 +33643,28 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
31903
33643
  };
31904
33644
  Returns: undefined;
31905
33645
  };
33646
+ recompute_order_status: {
33647
+ Args: {
33648
+ p_order_id: string;
33649
+ };
33650
+ Returns: undefined;
33651
+ };
33652
+ recompute_reserved_for_order: {
33653
+ Args: {
33654
+ p_order_id: string;
33655
+ };
33656
+ Returns: undefined;
33657
+ };
33658
+ recompute_reserved_stock: {
33659
+ Args: {
33660
+ p_trade_item_key: string;
33661
+ };
33662
+ Returns: undefined;
33663
+ };
33664
+ refresh_external_customers_grouped: {
33665
+ Args: never;
33666
+ Returns: undefined;
33667
+ };
31906
33668
  refresh_floricode_derived_code_lists: {
31907
33669
  Args: never;
31908
33670
  Returns: {
@@ -31917,6 +33679,12 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
31917
33679
  };
31918
33680
  Returns: number;
31919
33681
  };
33682
+ refresh_floricode_derived_for_products: {
33683
+ Args: {
33684
+ _product_ids: string[];
33685
+ };
33686
+ Returns: number;
33687
+ };
31920
33688
  reset_floriday_sync_cursor: {
31921
33689
  Args: {
31922
33690
  p_connection_id: string;
@@ -31924,6 +33692,12 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
31924
33692
  };
31925
33693
  Returns: undefined;
31926
33694
  };
33695
+ resolve_product_id_for_item: {
33696
+ Args: {
33697
+ p_product_name: string;
33698
+ };
33699
+ Returns: string;
33700
+ };
31927
33701
  schedule_floriday_additional_services_sync: {
31928
33702
  Args: {
31929
33703
  p_apikey: string;
@@ -32201,6 +33975,24 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
32201
33975
  };
32202
33976
  Returns: string[];
32203
33977
  };
33978
+ sync_cached_packing_from_product: {
33979
+ Args: {
33980
+ p_product_id: string;
33981
+ };
33982
+ Returns: undefined;
33983
+ };
33984
+ sync_order_cart_item_packing_from_product: {
33985
+ Args: {
33986
+ p_product_id: string;
33987
+ };
33988
+ Returns: undefined;
33989
+ };
33990
+ sync_product_packing_from_floriday_cache: {
33991
+ Args: {
33992
+ p_floriday_id: string;
33993
+ };
33994
+ Returns: undefined;
33995
+ };
32204
33996
  twinfield_decrypt: {
32205
33997
  Args: {
32206
33998
  cipher: string;
@@ -32213,6 +34005,17 @@ export declare const diagnoseFloridayConnection: import("@tanstack/start-client-
32213
34005
  };
32214
34006
  Returns: string;
32215
34007
  };
34008
+ upsert_auto_fulfillment_log: {
34009
+ Args: {
34010
+ p_connection_id: string;
34011
+ p_error?: string;
34012
+ p_fulfillment_order_id?: string;
34013
+ p_reason?: string;
34014
+ p_sales_order_id: string;
34015
+ p_status: string;
34016
+ };
34017
+ Returns: undefined;
34018
+ };
32216
34019
  };
32217
34020
  Enums: {
32218
34021
  app_role: "admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie" | "monteur";