@flowselections/floriday-klanten-module 1.0.16 → 1.0.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/dist-lib/components/klanten/FloridayDeeplinkButton.d.ts.map +1 -1
  2. package/dist-lib/components/klanten/FloridayDeeplinkButton.js +2 -2
  3. package/dist-lib/components/klanten/KlantenOverzicht.js +3 -3
  4. package/dist-lib/integrations/supabase/auth-middleware.d.ts +886 -54
  5. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
  6. package/dist-lib/integrations/supabase/client.d.ts +886 -54
  7. package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
  8. package/dist-lib/integrations/supabase/client.server.d.ts +886 -54
  9. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
  10. package/dist-lib/integrations/supabase/types.d.ts +904 -45
  11. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  12. package/dist-lib/integrations/supabase/types.js +3 -9
  13. package/dist-lib/lib/accounting/twinfield/mapping.d.ts.map +1 -1
  14. package/dist-lib/lib/accounting/twinfield/mapping.js +14 -2
  15. package/dist-lib/lib/accounting/twinfield/worker.functions.d.ts +2538 -42
  16. package/dist-lib/lib/accounting/twinfield/worker.functions.d.ts.map +1 -1
  17. package/dist-lib/lib/accounting.functions.d.ts +2538 -42
  18. package/dist-lib/lib/accounting.functions.d.ts.map +1 -1
  19. package/dist-lib/lib/customer-analytics.functions.d.ts +886 -54
  20. package/dist-lib/lib/customer-analytics.functions.d.ts.map +1 -1
  21. package/dist-lib/lib/customers.functions.d.ts +7614 -126
  22. package/dist-lib/lib/customers.functions.d.ts.map +1 -1
  23. package/dist-lib/lib/delivery-locations.functions.d.ts +3384 -56
  24. package/dist-lib/lib/delivery-locations.functions.d.ts.map +1 -1
  25. package/dist-lib/lib/external-customers.functions.d.ts +3384 -56
  26. package/dist-lib/lib/external-customers.functions.d.ts.map +1 -1
  27. package/dist-lib/lib/floriday-assortment.functions.d.ts +886 -54
  28. package/dist-lib/lib/floriday-assortment.functions.d.ts.map +1 -1
  29. package/dist-lib/lib/floriday-discounts.functions.d.ts +1834 -170
  30. package/dist-lib/lib/floriday-discounts.functions.d.ts.map +1 -1
  31. package/dist-lib/lib/floriday-trade-items.functions.d.ts +886 -54
  32. package/dist-lib/lib/floriday-trade-items.functions.d.ts.map +1 -1
  33. package/dist-lib/lib/local-discounts.functions.d.ts +5922 -98
  34. package/dist-lib/lib/local-discounts.functions.d.ts.map +1 -1
  35. package/dist-lib/lib/overdue-invoices.functions.d.ts +886 -54
  36. package/dist-lib/lib/overdue-invoices.functions.d.ts.map +1 -1
  37. package/dist-lib/lib/price-groups-local.functions.d.ts +5922 -98
  38. package/dist-lib/lib/price-groups-local.functions.d.ts.map +1 -1
  39. package/dist-lib/lib/price-groups.functions.d.ts +886 -54
  40. package/dist-lib/lib/price-groups.functions.d.ts.map +1 -1
  41. package/package.json +3 -2
  42. package/public/flowselections-assets/Klanten/floriday-logo.png +0 -0
@@ -316,6 +316,57 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
316
316
  referencedColumns: ["id"];
317
317
  }];
318
318
  };
319
+ ai_call_log: {
320
+ Row: {
321
+ consumer_module_id: string;
322
+ cost_usd: number | null;
323
+ created_at: string;
324
+ created_by: string | null;
325
+ duration_ms: number | null;
326
+ error_code: string | null;
327
+ error_message: string | null;
328
+ id: string;
329
+ input_tokens: number;
330
+ model_slug: string | null;
331
+ output_tokens: number;
332
+ provider_slug: string | null;
333
+ status: string;
334
+ total_tokens: number;
335
+ };
336
+ Insert: {
337
+ consumer_module_id: string;
338
+ cost_usd?: number | null;
339
+ created_at?: string;
340
+ created_by?: string | null;
341
+ duration_ms?: number | null;
342
+ error_code?: string | null;
343
+ error_message?: string | null;
344
+ id?: string;
345
+ input_tokens?: number;
346
+ model_slug?: string | null;
347
+ output_tokens?: number;
348
+ provider_slug?: string | null;
349
+ status: string;
350
+ total_tokens?: number;
351
+ };
352
+ Update: {
353
+ consumer_module_id?: string;
354
+ cost_usd?: number | null;
355
+ created_at?: string;
356
+ created_by?: string | null;
357
+ duration_ms?: number | null;
358
+ error_code?: string | null;
359
+ error_message?: string | null;
360
+ id?: string;
361
+ input_tokens?: number;
362
+ model_slug?: string | null;
363
+ output_tokens?: number;
364
+ provider_slug?: string | null;
365
+ status?: string;
366
+ total_tokens?: number;
367
+ };
368
+ Relationships: [];
369
+ };
319
370
  ai_credentials: {
320
371
  Row: {
321
372
  active: boolean;
@@ -352,6 +403,36 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
352
403
  referencedColumns: ["id"];
353
404
  }];
354
405
  };
406
+ ai_goals: {
407
+ Row: {
408
+ active: boolean;
409
+ created_at: string;
410
+ description: string | null;
411
+ key: string;
412
+ label: string;
413
+ sort_order: number;
414
+ updated_at: string;
415
+ };
416
+ Insert: {
417
+ active?: boolean;
418
+ created_at?: string;
419
+ description?: string | null;
420
+ key: string;
421
+ label: string;
422
+ sort_order?: number;
423
+ updated_at?: string;
424
+ };
425
+ Update: {
426
+ active?: boolean;
427
+ created_at?: string;
428
+ description?: string | null;
429
+ key?: string;
430
+ label?: string;
431
+ sort_order?: number;
432
+ updated_at?: string;
433
+ };
434
+ Relationships: [];
435
+ };
355
436
  ai_model_pricing: {
356
437
  Row: {
357
438
  created_at: string;
@@ -1138,6 +1219,141 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
1138
1219
  };
1139
1220
  Relationships: [];
1140
1221
  };
1222
+ cart_planning_pick_times: {
1223
+ Row: {
1224
+ created_at: string;
1225
+ id: string;
1226
+ pot_size: string;
1227
+ seconds_per_cart: number;
1228
+ updated_at: string;
1229
+ };
1230
+ Insert: {
1231
+ created_at?: string;
1232
+ id?: string;
1233
+ pot_size: string;
1234
+ seconds_per_cart: number;
1235
+ updated_at?: string;
1236
+ };
1237
+ Update: {
1238
+ created_at?: string;
1239
+ id?: string;
1240
+ pot_size?: string;
1241
+ seconds_per_cart?: number;
1242
+ updated_at?: string;
1243
+ };
1244
+ Relationships: [];
1245
+ };
1246
+ cart_planning_product_overrides: {
1247
+ Row: {
1248
+ created_at: string;
1249
+ id: string;
1250
+ max_party_share_per_layer_pct_override: number | null;
1251
+ never_mix: boolean;
1252
+ notes: string | null;
1253
+ product_id: string;
1254
+ updated_at: string;
1255
+ };
1256
+ Insert: {
1257
+ created_at?: string;
1258
+ id?: string;
1259
+ max_party_share_per_layer_pct_override?: number | null;
1260
+ never_mix?: boolean;
1261
+ notes?: string | null;
1262
+ product_id: string;
1263
+ updated_at?: string;
1264
+ };
1265
+ Update: {
1266
+ created_at?: string;
1267
+ id?: string;
1268
+ max_party_share_per_layer_pct_override?: number | null;
1269
+ never_mix?: boolean;
1270
+ notes?: string | null;
1271
+ product_id?: string;
1272
+ updated_at?: string;
1273
+ };
1274
+ Relationships: [{
1275
+ foreignKeyName: "cart_planning_product_overrides_product_id_fkey";
1276
+ columns: ["product_id"];
1277
+ isOneToOne: true;
1278
+ referencedRelation: "products";
1279
+ referencedColumns: ["id"];
1280
+ }];
1281
+ };
1282
+ cart_planning_settings: {
1283
+ Row: {
1284
+ allow_editing_after_pickstation_send: boolean;
1285
+ buffer_grouping_mode: string;
1286
+ combine_floriday_orders: boolean;
1287
+ combine_floriday_orders_window: string;
1288
+ combine_orders_scope: string;
1289
+ default_workers: number;
1290
+ id: number;
1291
+ max_beladingen_per_layer: number;
1292
+ max_customers_per_cart: number;
1293
+ max_one_customer_per_layer: boolean;
1294
+ max_party_share_per_layer_pct: number;
1295
+ optimization_strategy: string;
1296
+ own_cart_from_layers: number;
1297
+ pick_time_mode: string;
1298
+ plants_per_day: number;
1299
+ plants_per_hour: number;
1300
+ require_same_carrier: boolean;
1301
+ require_same_crate_type: boolean;
1302
+ require_same_delivery_date: boolean;
1303
+ require_same_delivery_location: boolean;
1304
+ updated_at: string;
1305
+ updated_by: string | null;
1306
+ };
1307
+ Insert: {
1308
+ allow_editing_after_pickstation_send?: boolean;
1309
+ buffer_grouping_mode?: string;
1310
+ combine_floriday_orders?: boolean;
1311
+ combine_floriday_orders_window?: string;
1312
+ combine_orders_scope?: string;
1313
+ default_workers?: number;
1314
+ id?: number;
1315
+ max_beladingen_per_layer?: number;
1316
+ max_customers_per_cart?: number;
1317
+ max_one_customer_per_layer?: boolean;
1318
+ max_party_share_per_layer_pct?: number;
1319
+ optimization_strategy?: string;
1320
+ own_cart_from_layers?: number;
1321
+ pick_time_mode?: string;
1322
+ plants_per_day?: number;
1323
+ plants_per_hour?: number;
1324
+ require_same_carrier?: boolean;
1325
+ require_same_crate_type?: boolean;
1326
+ require_same_delivery_date?: boolean;
1327
+ require_same_delivery_location?: boolean;
1328
+ updated_at?: string;
1329
+ updated_by?: string | null;
1330
+ };
1331
+ Update: {
1332
+ allow_editing_after_pickstation_send?: boolean;
1333
+ buffer_grouping_mode?: string;
1334
+ combine_floriday_orders?: boolean;
1335
+ combine_floriday_orders_window?: string;
1336
+ combine_orders_scope?: string;
1337
+ default_workers?: number;
1338
+ id?: number;
1339
+ max_beladingen_per_layer?: number;
1340
+ max_customers_per_cart?: number;
1341
+ max_one_customer_per_layer?: boolean;
1342
+ max_party_share_per_layer_pct?: number;
1343
+ optimization_strategy?: string;
1344
+ own_cart_from_layers?: number;
1345
+ pick_time_mode?: string;
1346
+ plants_per_day?: number;
1347
+ plants_per_hour?: number;
1348
+ require_same_carrier?: boolean;
1349
+ require_same_crate_type?: boolean;
1350
+ require_same_delivery_date?: boolean;
1351
+ require_same_delivery_location?: boolean;
1352
+ updated_at?: string;
1353
+ updated_by?: string | null;
1354
+ };
1355
+ Relationships: [];
1356
+ };
1141
1357
  cart_replan_queue: {
1142
1358
  Row: {
1143
1359
  attempts: number;
@@ -1168,6 +1384,39 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
1168
1384
  referencedColumns: ["id"];
1169
1385
  }];
1170
1386
  };
1387
+ cart_types: {
1388
+ Row: {
1389
+ created_at: string;
1390
+ id: string;
1391
+ is_default: boolean;
1392
+ layer_length_cm: number;
1393
+ layer_width_cm: number;
1394
+ layers_per_cart: number;
1395
+ name: string;
1396
+ updated_at: string;
1397
+ };
1398
+ Insert: {
1399
+ created_at?: string;
1400
+ id?: string;
1401
+ is_default?: boolean;
1402
+ layer_length_cm: number;
1403
+ layer_width_cm: number;
1404
+ layers_per_cart?: number;
1405
+ name: string;
1406
+ updated_at?: string;
1407
+ };
1408
+ Update: {
1409
+ created_at?: string;
1410
+ id?: string;
1411
+ is_default?: boolean;
1412
+ layer_length_cm?: number;
1413
+ layer_width_cm?: number;
1414
+ layers_per_cart?: number;
1415
+ name?: string;
1416
+ updated_at?: string;
1417
+ };
1418
+ Relationships: [];
1419
+ };
1171
1420
  catalog_articles_cache: {
1172
1421
  Row: {
1173
1422
  created_at: string;
@@ -1255,6 +1504,36 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
1255
1504
  };
1256
1505
  Relationships: [];
1257
1506
  };
1507
+ crate_types: {
1508
+ Row: {
1509
+ created_at: string;
1510
+ id: string;
1511
+ length_cm: number;
1512
+ name: string;
1513
+ plants_per_crate: number;
1514
+ updated_at: string;
1515
+ width_cm: number;
1516
+ };
1517
+ Insert: {
1518
+ created_at?: string;
1519
+ id?: string;
1520
+ length_cm: number;
1521
+ name: string;
1522
+ plants_per_crate?: number;
1523
+ updated_at?: string;
1524
+ width_cm: number;
1525
+ };
1526
+ Update: {
1527
+ created_at?: string;
1528
+ id?: string;
1529
+ length_cm?: number;
1530
+ name?: string;
1531
+ plants_per_crate?: number;
1532
+ updated_at?: string;
1533
+ width_cm?: number;
1534
+ };
1535
+ Relationships: [];
1536
+ };
1258
1537
  customer_audit_log: {
1259
1538
  Row: {
1260
1539
  action: string;
@@ -5794,6 +6073,288 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
5794
6073
  };
5795
6074
  Relationships: [];
5796
6075
  };
6076
+ itk_contact_persons: {
6077
+ Row: {
6078
+ created_at: string;
6079
+ customer_id: string;
6080
+ email: string | null;
6081
+ id: string;
6082
+ name: string;
6083
+ phone: string | null;
6084
+ role: string | null;
6085
+ updated_at: string;
6086
+ };
6087
+ Insert: {
6088
+ created_at?: string;
6089
+ customer_id: string;
6090
+ email?: string | null;
6091
+ id?: string;
6092
+ name: string;
6093
+ phone?: string | null;
6094
+ role?: string | null;
6095
+ updated_at?: string;
6096
+ };
6097
+ Update: {
6098
+ created_at?: string;
6099
+ customer_id?: string;
6100
+ email?: string | null;
6101
+ id?: string;
6102
+ name?: string;
6103
+ phone?: string | null;
6104
+ role?: string | null;
6105
+ updated_at?: string;
6106
+ };
6107
+ Relationships: [{
6108
+ foreignKeyName: "itk_contact_persons_customer_id_fkey";
6109
+ columns: ["customer_id"];
6110
+ isOneToOne: false;
6111
+ referencedRelation: "itk_customers";
6112
+ referencedColumns: ["id"];
6113
+ }];
6114
+ };
6115
+ itk_customer_dynamic_values: {
6116
+ Row: {
6117
+ created_at: string;
6118
+ customer_id: string;
6119
+ field_id: string;
6120
+ id: string;
6121
+ updated_at: string;
6122
+ value: string | null;
6123
+ };
6124
+ Insert: {
6125
+ created_at?: string;
6126
+ customer_id: string;
6127
+ field_id: string;
6128
+ id?: string;
6129
+ updated_at?: string;
6130
+ value?: string | null;
6131
+ };
6132
+ Update: {
6133
+ created_at?: string;
6134
+ customer_id?: string;
6135
+ field_id?: string;
6136
+ id?: string;
6137
+ updated_at?: string;
6138
+ value?: string | null;
6139
+ };
6140
+ Relationships: [{
6141
+ foreignKeyName: "itk_customer_dynamic_values_customer_id_fkey";
6142
+ columns: ["customer_id"];
6143
+ isOneToOne: false;
6144
+ referencedRelation: "itk_customers";
6145
+ referencedColumns: ["id"];
6146
+ }, {
6147
+ foreignKeyName: "itk_customer_dynamic_values_field_id_fkey";
6148
+ columns: ["field_id"];
6149
+ isOneToOne: false;
6150
+ referencedRelation: "itk_dynamic_fields";
6151
+ referencedColumns: ["id"];
6152
+ }];
6153
+ };
6154
+ itk_customer_notes: {
6155
+ Row: {
6156
+ body: string;
6157
+ created_at: string;
6158
+ created_by: string | null;
6159
+ customer_id: string;
6160
+ id: string;
6161
+ note_type: string;
6162
+ updated_at: string;
6163
+ };
6164
+ Insert: {
6165
+ body: string;
6166
+ created_at?: string;
6167
+ created_by?: string | null;
6168
+ customer_id: string;
6169
+ id?: string;
6170
+ note_type?: string;
6171
+ updated_at?: string;
6172
+ };
6173
+ Update: {
6174
+ body?: string;
6175
+ created_at?: string;
6176
+ created_by?: string | null;
6177
+ customer_id?: string;
6178
+ id?: string;
6179
+ note_type?: string;
6180
+ updated_at?: string;
6181
+ };
6182
+ Relationships: [{
6183
+ foreignKeyName: "itk_customer_notes_customer_id_fkey";
6184
+ columns: ["customer_id"];
6185
+ isOneToOne: false;
6186
+ referencedRelation: "itk_customers";
6187
+ referencedColumns: ["id"];
6188
+ }];
6189
+ };
6190
+ itk_customers: {
6191
+ Row: {
6192
+ billing_city: string | null;
6193
+ billing_postcode: string | null;
6194
+ billing_street: string | null;
6195
+ created_at: string;
6196
+ general_email: string | null;
6197
+ general_phone: string | null;
6198
+ id: string;
6199
+ legacy_customer_id: string | null;
6200
+ name: string;
6201
+ segment: import("../integrations/supabase/types").Database["public"]["Enums"]["itk_customer_segment"];
6202
+ updated_at: string;
6203
+ };
6204
+ Insert: {
6205
+ billing_city?: string | null;
6206
+ billing_postcode?: string | null;
6207
+ billing_street?: string | null;
6208
+ created_at?: string;
6209
+ general_email?: string | null;
6210
+ general_phone?: string | null;
6211
+ id?: string;
6212
+ legacy_customer_id?: string | null;
6213
+ name: string;
6214
+ segment?: import("../integrations/supabase/types").Database["public"]["Enums"]["itk_customer_segment"];
6215
+ updated_at?: string;
6216
+ };
6217
+ Update: {
6218
+ billing_city?: string | null;
6219
+ billing_postcode?: string | null;
6220
+ billing_street?: string | null;
6221
+ created_at?: string;
6222
+ general_email?: string | null;
6223
+ general_phone?: string | null;
6224
+ id?: string;
6225
+ legacy_customer_id?: string | null;
6226
+ name?: string;
6227
+ segment?: import("../integrations/supabase/types").Database["public"]["Enums"]["itk_customer_segment"];
6228
+ updated_at?: string;
6229
+ };
6230
+ Relationships: [{
6231
+ foreignKeyName: "itk_customers_legacy_customer_id_fkey";
6232
+ columns: ["legacy_customer_id"];
6233
+ isOneToOne: false;
6234
+ referencedRelation: "customers";
6235
+ referencedColumns: ["id"];
6236
+ }];
6237
+ };
6238
+ itk_dynamic_fields: {
6239
+ Row: {
6240
+ created_at: string;
6241
+ field_name: string;
6242
+ field_type: import("../integrations/supabase/types").Database["public"]["Enums"]["itk_dynamic_field_type"];
6243
+ id: string;
6244
+ options: import("../integrations/supabase/types").Json;
6245
+ sort_order: number;
6246
+ updated_at: string;
6247
+ };
6248
+ Insert: {
6249
+ created_at?: string;
6250
+ field_name: string;
6251
+ field_type?: import("../integrations/supabase/types").Database["public"]["Enums"]["itk_dynamic_field_type"];
6252
+ id?: string;
6253
+ options?: import("../integrations/supabase/types").Json;
6254
+ sort_order?: number;
6255
+ updated_at?: string;
6256
+ };
6257
+ Update: {
6258
+ created_at?: string;
6259
+ field_name?: string;
6260
+ field_type?: import("../integrations/supabase/types").Database["public"]["Enums"]["itk_dynamic_field_type"];
6261
+ id?: string;
6262
+ options?: import("../integrations/supabase/types").Json;
6263
+ sort_order?: number;
6264
+ updated_at?: string;
6265
+ };
6266
+ Relationships: [];
6267
+ };
6268
+ itk_work_locations: {
6269
+ Row: {
6270
+ city: string | null;
6271
+ created_at: string;
6272
+ customer_id: string;
6273
+ id: string;
6274
+ instructions: string | null;
6275
+ label: string;
6276
+ latitude: number | null;
6277
+ longitude: number | null;
6278
+ postcode: string | null;
6279
+ street: string | null;
6280
+ updated_at: string;
6281
+ };
6282
+ Insert: {
6283
+ city?: string | null;
6284
+ created_at?: string;
6285
+ customer_id: string;
6286
+ id?: string;
6287
+ instructions?: string | null;
6288
+ label: string;
6289
+ latitude?: number | null;
6290
+ longitude?: number | null;
6291
+ postcode?: string | null;
6292
+ street?: string | null;
6293
+ updated_at?: string;
6294
+ };
6295
+ Update: {
6296
+ city?: string | null;
6297
+ created_at?: string;
6298
+ customer_id?: string;
6299
+ id?: string;
6300
+ instructions?: string | null;
6301
+ label?: string;
6302
+ latitude?: number | null;
6303
+ longitude?: number | null;
6304
+ postcode?: string | null;
6305
+ street?: string | null;
6306
+ updated_at?: string;
6307
+ };
6308
+ Relationships: [{
6309
+ foreignKeyName: "itk_work_locations_customer_id_fkey";
6310
+ columns: ["customer_id"];
6311
+ isOneToOne: false;
6312
+ referencedRelation: "itk_customers";
6313
+ referencedColumns: ["id"];
6314
+ }];
6315
+ };
6316
+ leave_requests: {
6317
+ Row: {
6318
+ created_at: string;
6319
+ end_date: string;
6320
+ id: string;
6321
+ reason: string | null;
6322
+ start_date: string;
6323
+ status: string;
6324
+ tenant_id: string;
6325
+ updated_at: string;
6326
+ user_id: string;
6327
+ };
6328
+ Insert: {
6329
+ created_at?: string;
6330
+ end_date: string;
6331
+ id?: string;
6332
+ reason?: string | null;
6333
+ start_date: string;
6334
+ status?: string;
6335
+ tenant_id?: string;
6336
+ updated_at?: string;
6337
+ user_id: string;
6338
+ };
6339
+ Update: {
6340
+ created_at?: string;
6341
+ end_date?: string;
6342
+ id?: string;
6343
+ reason?: string | null;
6344
+ start_date?: string;
6345
+ status?: string;
6346
+ tenant_id?: string;
6347
+ updated_at?: string;
6348
+ user_id?: string;
6349
+ };
6350
+ Relationships: [{
6351
+ foreignKeyName: "leave_requests_user_id_fkey";
6352
+ columns: ["user_id"];
6353
+ isOneToOne: false;
6354
+ referencedRelation: "monteurs";
6355
+ referencedColumns: ["id"];
6356
+ }];
6357
+ };
5797
6358
  local_customer_agreements: {
5798
6359
  Row: {
5799
6360
  base_price: number | null;
@@ -6445,6 +7006,33 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
6445
7006
  };
6446
7007
  Relationships: [];
6447
7008
  };
7009
+ module_permissions: {
7010
+ Row: {
7011
+ created_at: string;
7012
+ id: string;
7013
+ module_id: string;
7014
+ permission: string;
7015
+ role: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
7016
+ updated_at: string;
7017
+ };
7018
+ Insert: {
7019
+ created_at?: string;
7020
+ id?: string;
7021
+ module_id: string;
7022
+ permission: string;
7023
+ role: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
7024
+ updated_at?: string;
7025
+ };
7026
+ Update: {
7027
+ created_at?: string;
7028
+ id?: string;
7029
+ module_id?: string;
7030
+ permission?: string;
7031
+ role?: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
7032
+ updated_at?: string;
7033
+ };
7034
+ Relationships: [];
7035
+ };
6448
7036
  monteurs: {
6449
7037
  Row: {
6450
7038
  avatar_url: string | null;
@@ -7174,6 +7762,42 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
7174
7762
  };
7175
7763
  Relationships: [];
7176
7764
  };
7765
+ order_buffers: {
7766
+ Row: {
7767
+ buffer_key: string;
7768
+ created_at: string;
7769
+ customer_id: string | null;
7770
+ grouping_mode: string;
7771
+ id: string;
7772
+ pickup_date: string | null;
7773
+ pickup_location: string | null;
7774
+ plan_locked_at: string | null;
7775
+ updated_at: string;
7776
+ };
7777
+ Insert: {
7778
+ buffer_key: string;
7779
+ created_at?: string;
7780
+ customer_id?: string | null;
7781
+ grouping_mode: string;
7782
+ id?: string;
7783
+ pickup_date?: string | null;
7784
+ pickup_location?: string | null;
7785
+ plan_locked_at?: string | null;
7786
+ updated_at?: string;
7787
+ };
7788
+ Update: {
7789
+ buffer_key?: string;
7790
+ created_at?: string;
7791
+ customer_id?: string | null;
7792
+ grouping_mode?: string;
7793
+ id?: string;
7794
+ pickup_date?: string | null;
7795
+ pickup_location?: string | null;
7796
+ plan_locked_at?: string | null;
7797
+ updated_at?: string;
7798
+ };
7799
+ Relationships: [];
7800
+ };
7177
7801
  order_cart_items: {
7178
7802
  Row: {
7179
7803
  cart_id: string;
@@ -7240,6 +7864,7 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
7240
7864
  order_carts: {
7241
7865
  Row: {
7242
7866
  algorithm_version: number;
7867
+ buffer_id: string | null;
7243
7868
  cart_number: number;
7244
7869
  created_at: string;
7245
7870
  id: string;
@@ -7247,13 +7872,14 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
7247
7872
  is_complete: boolean;
7248
7873
  notes: string | null;
7249
7874
  occupancy_pct: number;
7250
- order_id: string;
7875
+ order_id: string | null;
7251
7876
  source: string;
7252
7877
  total_layers_used: number;
7253
7878
  updated_at: string;
7254
7879
  };
7255
7880
  Insert: {
7256
7881
  algorithm_version?: number;
7882
+ buffer_id?: string | null;
7257
7883
  cart_number: number;
7258
7884
  created_at?: string;
7259
7885
  id?: string;
@@ -7261,13 +7887,14 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
7261
7887
  is_complete?: boolean;
7262
7888
  notes?: string | null;
7263
7889
  occupancy_pct?: number;
7264
- order_id: string;
7890
+ order_id?: string | null;
7265
7891
  source?: string;
7266
7892
  total_layers_used?: number;
7267
7893
  updated_at?: string;
7268
7894
  };
7269
7895
  Update: {
7270
7896
  algorithm_version?: number;
7897
+ buffer_id?: string | null;
7271
7898
  cart_number?: number;
7272
7899
  created_at?: string;
7273
7900
  id?: string;
@@ -7275,12 +7902,18 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
7275
7902
  is_complete?: boolean;
7276
7903
  notes?: string | null;
7277
7904
  occupancy_pct?: number;
7278
- order_id?: string;
7905
+ order_id?: string | null;
7279
7906
  source?: string;
7280
7907
  total_layers_used?: number;
7281
7908
  updated_at?: string;
7282
7909
  };
7283
7910
  Relationships: [{
7911
+ foreignKeyName: "order_carts_buffer_id_fkey";
7912
+ columns: ["buffer_id"];
7913
+ isOneToOne: false;
7914
+ referencedRelation: "order_buffers";
7915
+ referencedColumns: ["id"];
7916
+ }, {
7284
7917
  foreignKeyName: "order_carts_order_id_fkey";
7285
7918
  columns: ["order_id"];
7286
7919
  isOneToOne: false;
@@ -7417,15 +8050,117 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
7417
8050
  };
7418
8051
  Relationships: [];
7419
8052
  };
8053
+ order_shipment_items: {
8054
+ Row: {
8055
+ created_at: string;
8056
+ id: string;
8057
+ order_item_id: string;
8058
+ product_id: string | null;
8059
+ product_name: string;
8060
+ quantity: number;
8061
+ shipment_id: string;
8062
+ updated_at: string;
8063
+ };
8064
+ Insert: {
8065
+ created_at?: string;
8066
+ id?: string;
8067
+ order_item_id: string;
8068
+ product_id?: string | null;
8069
+ product_name: string;
8070
+ quantity: number;
8071
+ shipment_id: string;
8072
+ updated_at?: string;
8073
+ };
8074
+ Update: {
8075
+ created_at?: string;
8076
+ id?: string;
8077
+ order_item_id?: string;
8078
+ product_id?: string | null;
8079
+ product_name?: string;
8080
+ quantity?: number;
8081
+ shipment_id?: string;
8082
+ updated_at?: string;
8083
+ };
8084
+ Relationships: [{
8085
+ foreignKeyName: "order_shipment_items_order_item_id_fkey";
8086
+ columns: ["order_item_id"];
8087
+ isOneToOne: false;
8088
+ referencedRelation: "order_items";
8089
+ referencedColumns: ["id"];
8090
+ }, {
8091
+ foreignKeyName: "order_shipment_items_shipment_id_fkey";
8092
+ columns: ["shipment_id"];
8093
+ isOneToOne: false;
8094
+ referencedRelation: "order_shipments";
8095
+ referencedColumns: ["id"];
8096
+ }];
8097
+ };
8098
+ order_shipments: {
8099
+ Row: {
8100
+ carrier_id: string | null;
8101
+ created_at: string;
8102
+ delivery_date: string | null;
8103
+ delivery_location_id: string | null;
8104
+ id: string;
8105
+ notes: string | null;
8106
+ order_id: string;
8107
+ shipment_number: number;
8108
+ shipped_at: string | null;
8109
+ status: string;
8110
+ updated_at: string;
8111
+ };
8112
+ Insert: {
8113
+ carrier_id?: string | null;
8114
+ created_at?: string;
8115
+ delivery_date?: string | null;
8116
+ delivery_location_id?: string | null;
8117
+ id?: string;
8118
+ notes?: string | null;
8119
+ order_id: string;
8120
+ shipment_number: number;
8121
+ shipped_at?: string | null;
8122
+ status?: string;
8123
+ updated_at?: string;
8124
+ };
8125
+ Update: {
8126
+ carrier_id?: string | null;
8127
+ created_at?: string;
8128
+ delivery_date?: string | null;
8129
+ delivery_location_id?: string | null;
8130
+ id?: string;
8131
+ notes?: string | null;
8132
+ order_id?: string;
8133
+ shipment_number?: number;
8134
+ shipped_at?: string | null;
8135
+ status?: string;
8136
+ updated_at?: string;
8137
+ };
8138
+ Relationships: [{
8139
+ foreignKeyName: "order_shipments_carrier_id_fkey";
8140
+ columns: ["carrier_id"];
8141
+ isOneToOne: false;
8142
+ referencedRelation: "carriers";
8143
+ referencedColumns: ["id"];
8144
+ }, {
8145
+ foreignKeyName: "order_shipments_order_id_fkey";
8146
+ columns: ["order_id"];
8147
+ isOneToOne: false;
8148
+ referencedRelation: "orders";
8149
+ referencedColumns: ["id"];
8150
+ }];
8151
+ };
7420
8152
  orders: {
7421
8153
  Row: {
8154
+ buffer_id: string | null;
7422
8155
  created_at: string;
7423
8156
  custom_fields: import("../integrations/supabase/types").Json;
7424
8157
  customer_id: string | null;
7425
8158
  customer_name: string;
7426
8159
  deleted_at: string | null;
7427
- delivery_date: string;
8160
+ delivery_date: string | null;
8161
+ floriday_sales_order_id: string | null;
7428
8162
  id: string;
8163
+ is_reservation: boolean;
7429
8164
  notes: string | null;
7430
8165
  order_date: string;
7431
8166
  order_number: string;
@@ -7437,13 +8172,16 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
7437
8172
  updated_at: string;
7438
8173
  };
7439
8174
  Insert: {
8175
+ buffer_id?: string | null;
7440
8176
  created_at?: string;
7441
8177
  custom_fields?: import("../integrations/supabase/types").Json;
7442
8178
  customer_id?: string | null;
7443
8179
  customer_name?: string;
7444
8180
  deleted_at?: string | null;
7445
- delivery_date: string;
8181
+ delivery_date?: string | null;
8182
+ floriday_sales_order_id?: string | null;
7446
8183
  id?: string;
8184
+ is_reservation?: boolean;
7447
8185
  notes?: string | null;
7448
8186
  order_date?: string;
7449
8187
  order_number: string;
@@ -7455,13 +8193,16 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
7455
8193
  updated_at?: string;
7456
8194
  };
7457
8195
  Update: {
8196
+ buffer_id?: string | null;
7458
8197
  created_at?: string;
7459
8198
  custom_fields?: import("../integrations/supabase/types").Json;
7460
8199
  customer_id?: string | null;
7461
8200
  customer_name?: string;
7462
8201
  deleted_at?: string | null;
7463
- delivery_date?: string;
8202
+ delivery_date?: string | null;
8203
+ floriday_sales_order_id?: string | null;
7464
8204
  id?: string;
8205
+ is_reservation?: boolean;
7465
8206
  notes?: string | null;
7466
8207
  order_date?: string;
7467
8208
  order_number?: string;
@@ -7473,6 +8214,12 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
7473
8214
  updated_at?: string;
7474
8215
  };
7475
8216
  Relationships: [{
8217
+ foreignKeyName: "orders_buffer_id_fkey";
8218
+ columns: ["buffer_id"];
8219
+ isOneToOne: false;
8220
+ referencedRelation: "order_buffers";
8221
+ referencedColumns: ["id"];
8222
+ }, {
7476
8223
  foreignKeyName: "orders_customer_id_fkey";
7477
8224
  columns: ["customer_id"];
7478
8225
  isOneToOne: false;
@@ -7736,6 +8483,8 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
7736
8483
  Row: {
7737
8484
  created_at: string;
7738
8485
  description: string | null;
8486
+ head_product_id: string | null;
8487
+ head_trade_item_floriday_id: string | null;
7739
8488
  id: string;
7740
8489
  is_active: boolean;
7741
8490
  name: string;
@@ -7745,6 +8494,8 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
7745
8494
  Insert: {
7746
8495
  created_at?: string;
7747
8496
  description?: string | null;
8497
+ head_product_id?: string | null;
8498
+ head_trade_item_floriday_id?: string | null;
7748
8499
  id?: string;
7749
8500
  is_active?: boolean;
7750
8501
  name: string;
@@ -7754,13 +8505,21 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
7754
8505
  Update: {
7755
8506
  created_at?: string;
7756
8507
  description?: string | null;
8508
+ head_product_id?: string | null;
8509
+ head_trade_item_floriday_id?: string | null;
7757
8510
  id?: string;
7758
8511
  is_active?: boolean;
7759
8512
  name?: string;
7760
8513
  tenant_id?: string;
7761
8514
  updated_at?: string;
7762
8515
  };
7763
- Relationships: [];
8516
+ Relationships: [{
8517
+ foreignKeyName: "product_groups_head_product_id_fkey";
8518
+ columns: ["head_product_id"];
8519
+ isOneToOne: false;
8520
+ referencedRelation: "products";
8521
+ referencedColumns: ["id"];
8522
+ }];
7764
8523
  };
7765
8524
  products: {
7766
8525
  Row: {
@@ -10311,6 +11070,7 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
10311
11070
  internal_notes: string | null;
10312
11071
  parent_werkbon_id: string | null;
10313
11072
  parsed_payload: import("../integrations/supabase/types").Json | null;
11073
+ planning_status: string;
10314
11074
  project_number: string | null;
10315
11075
  room_number: string | null;
10316
11076
  scheduled_end_time: string | null;
@@ -10318,6 +11078,7 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
10318
11078
  sequence_number: number;
10319
11079
  source_pdf_path: string | null;
10320
11080
  status: string;
11081
+ technician_id: string | null;
10321
11082
  technician_notes: string | null;
10322
11083
  technician_notes_raw: string | null;
10323
11084
  technician_task_description: string | null;
@@ -10338,6 +11099,7 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
10338
11099
  internal_notes?: string | null;
10339
11100
  parent_werkbon_id?: string | null;
10340
11101
  parsed_payload?: import("../integrations/supabase/types").Json | null;
11102
+ planning_status?: string;
10341
11103
  project_number?: string | null;
10342
11104
  room_number?: string | null;
10343
11105
  scheduled_end_time?: string | null;
@@ -10345,6 +11107,7 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
10345
11107
  sequence_number: number;
10346
11108
  source_pdf_path?: string | null;
10347
11109
  status?: string;
11110
+ technician_id?: string | null;
10348
11111
  technician_notes?: string | null;
10349
11112
  technician_notes_raw?: string | null;
10350
11113
  technician_task_description?: string | null;
@@ -10365,6 +11128,7 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
10365
11128
  internal_notes?: string | null;
10366
11129
  parent_werkbon_id?: string | null;
10367
11130
  parsed_payload?: import("../integrations/supabase/types").Json | null;
11131
+ planning_status?: string;
10368
11132
  project_number?: string | null;
10369
11133
  room_number?: string | null;
10370
11134
  scheduled_end_time?: string | null;
@@ -10372,6 +11136,7 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
10372
11136
  sequence_number?: number;
10373
11137
  source_pdf_path?: string | null;
10374
11138
  status?: string;
11139
+ technician_id?: string | null;
10375
11140
  technician_notes?: string | null;
10376
11141
  technician_notes_raw?: string | null;
10377
11142
  technician_task_description?: string | null;
@@ -10380,17 +11145,17 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
10380
11145
  work_address?: string | null;
10381
11146
  };
10382
11147
  Relationships: [{
10383
- foreignKeyName: "werkbonnen_customer_id_fkey";
10384
- columns: ["customer_id"];
10385
- isOneToOne: false;
10386
- referencedRelation: "customers";
10387
- referencedColumns: ["id"];
10388
- }, {
10389
11148
  foreignKeyName: "werkbonnen_parent_werkbon_id_fkey";
10390
11149
  columns: ["parent_werkbon_id"];
10391
11150
  isOneToOne: false;
10392
11151
  referencedRelation: "werkbonnen";
10393
11152
  referencedColumns: ["id"];
11153
+ }, {
11154
+ foreignKeyName: "werkbonnen_technician_id_fkey";
11155
+ columns: ["technician_id"];
11156
+ isOneToOne: false;
11157
+ referencedRelation: "monteurs";
11158
+ referencedColumns: ["id"];
10394
11159
  }];
10395
11160
  };
10396
11161
  work_order_monteurs: {
@@ -11109,6 +11874,21 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
11109
11874
  };
11110
11875
  Returns: string;
11111
11876
  };
11877
+ ai_usage_by_module: {
11878
+ Args: {
11879
+ _from: string;
11880
+ _to: string;
11881
+ };
11882
+ Returns: {
11883
+ calls: number;
11884
+ consumer_module_id: string;
11885
+ cost_usd: number;
11886
+ errors: number;
11887
+ input_tokens: number;
11888
+ output_tokens: number;
11889
+ total_tokens: number;
11890
+ }[];
11891
+ };
11112
11892
  apply_stock_consumption: {
11113
11893
  Args: {
11114
11894
  p_order_id: string;
@@ -11257,6 +12037,12 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
11257
12037
  Args: never;
11258
12038
  Returns: string;
11259
12039
  };
12040
+ custom_access_token_hook: {
12041
+ Args: {
12042
+ event: import("../integrations/supabase/types").Json;
12043
+ };
12044
+ Returns: import("../integrations/supabase/types").Json;
12045
+ };
11260
12046
  dashboard_alert_counts: {
11261
12047
  Args: never;
11262
12048
  Returns: import("../integrations/supabase/types").Json;
@@ -11592,6 +12378,14 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
11592
12378
  };
11593
12379
  Returns: string;
11594
12380
  };
12381
+ has_module_permission: {
12382
+ Args: {
12383
+ _min: string;
12384
+ _module_id: string;
12385
+ _user_id: string;
12386
+ };
12387
+ Returns: boolean;
12388
+ };
11595
12389
  has_role: {
11596
12390
  Args: {
11597
12391
  _role: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
@@ -11617,6 +12411,20 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
11617
12411
  };
11618
12412
  Returns: boolean;
11619
12413
  };
12414
+ jwt_has_role: {
12415
+ Args: {
12416
+ _role: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
12417
+ };
12418
+ Returns: boolean;
12419
+ };
12420
+ list_monteurs: {
12421
+ Args: never;
12422
+ Returns: {
12423
+ display_name: string;
12424
+ email: string;
12425
+ user_id: string;
12426
+ }[];
12427
+ };
11620
12428
  local_effective_price: {
11621
12429
  Args: {
11622
12430
  _customer_id: string;
@@ -11633,6 +12441,22 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
11633
12441
  source_id: string;
11634
12442
  }[];
11635
12443
  };
12444
+ log_ai_call: {
12445
+ Args: {
12446
+ _consumer_module_id: string;
12447
+ _cost_usd: number;
12448
+ _duration_ms: number;
12449
+ _error_code: string;
12450
+ _error_message: string;
12451
+ _input_tokens: number;
12452
+ _model_slug: string;
12453
+ _output_tokens: number;
12454
+ _provider_slug: string;
12455
+ _status: string;
12456
+ _total_tokens: number;
12457
+ };
12458
+ Returns: string;
12459
+ };
11636
12460
  mark_offer_clicked: {
11637
12461
  Args: {
11638
12462
  p_code: string;
@@ -11645,6 +12469,12 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
11645
12469
  };
11646
12470
  Returns: undefined;
11647
12471
  };
12472
+ mark_shipment_shipped: {
12473
+ Args: {
12474
+ p_shipment_id: string;
12475
+ };
12476
+ Returns: undefined;
12477
+ };
11648
12478
  next_order_number: {
11649
12479
  Args: {
11650
12480
  p_prefix: string;
@@ -12121,9 +12951,11 @@ export declare const listCarriers: import("@tanstack/start-client-core").Optiona
12121
12951
  };
12122
12952
  };
12123
12953
  Enums: {
12124
- app_role: "admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie" | "monteur";
12954
+ app_role: "admin" | "planner" | "monteur" | "administratie" | "ai_admin";
12125
12955
  exact_env: "staging" | "live";
12126
12956
  exact_push_status: "pending" | "sent" | "error";
12957
+ itk_customer_segment: "Business" | "Private";
12958
+ itk_dynamic_field_type: "text" | "select" | "date" | "checkbox";
12127
12959
  quote_status: "concept" | "verzonden" | "bekeken" | "in_behandeling" | "geaccepteerd" | "afgewezen" | "verlopen" | "gearchiveerd";
12128
12960
  };
12129
12961
  CompositeTypes: { [_ in never]: never; };
@@ -12421,6 +13253,57 @@ export declare const listDeliveryLocations: import("@tanstack/start-client-core"
12421
13253
  referencedColumns: ["id"];
12422
13254
  }];
12423
13255
  };
13256
+ ai_call_log: {
13257
+ Row: {
13258
+ consumer_module_id: string;
13259
+ cost_usd: number | null;
13260
+ created_at: string;
13261
+ created_by: string | null;
13262
+ duration_ms: number | null;
13263
+ error_code: string | null;
13264
+ error_message: string | null;
13265
+ id: string;
13266
+ input_tokens: number;
13267
+ model_slug: string | null;
13268
+ output_tokens: number;
13269
+ provider_slug: string | null;
13270
+ status: string;
13271
+ total_tokens: number;
13272
+ };
13273
+ Insert: {
13274
+ consumer_module_id: string;
13275
+ cost_usd?: number | null;
13276
+ created_at?: string;
13277
+ created_by?: string | null;
13278
+ duration_ms?: number | null;
13279
+ error_code?: string | null;
13280
+ error_message?: string | null;
13281
+ id?: string;
13282
+ input_tokens?: number;
13283
+ model_slug?: string | null;
13284
+ output_tokens?: number;
13285
+ provider_slug?: string | null;
13286
+ status: string;
13287
+ total_tokens?: number;
13288
+ };
13289
+ Update: {
13290
+ consumer_module_id?: string;
13291
+ cost_usd?: number | null;
13292
+ created_at?: string;
13293
+ created_by?: string | null;
13294
+ duration_ms?: number | null;
13295
+ error_code?: string | null;
13296
+ error_message?: string | null;
13297
+ id?: string;
13298
+ input_tokens?: number;
13299
+ model_slug?: string | null;
13300
+ output_tokens?: number;
13301
+ provider_slug?: string | null;
13302
+ status?: string;
13303
+ total_tokens?: number;
13304
+ };
13305
+ Relationships: [];
13306
+ };
12424
13307
  ai_credentials: {
12425
13308
  Row: {
12426
13309
  active: boolean;
@@ -12457,6 +13340,36 @@ export declare const listDeliveryLocations: import("@tanstack/start-client-core"
12457
13340
  referencedColumns: ["id"];
12458
13341
  }];
12459
13342
  };
13343
+ ai_goals: {
13344
+ Row: {
13345
+ active: boolean;
13346
+ created_at: string;
13347
+ description: string | null;
13348
+ key: string;
13349
+ label: string;
13350
+ sort_order: number;
13351
+ updated_at: string;
13352
+ };
13353
+ Insert: {
13354
+ active?: boolean;
13355
+ created_at?: string;
13356
+ description?: string | null;
13357
+ key: string;
13358
+ label: string;
13359
+ sort_order?: number;
13360
+ updated_at?: string;
13361
+ };
13362
+ Update: {
13363
+ active?: boolean;
13364
+ created_at?: string;
13365
+ description?: string | null;
13366
+ key?: string;
13367
+ label?: string;
13368
+ sort_order?: number;
13369
+ updated_at?: string;
13370
+ };
13371
+ Relationships: [];
13372
+ };
12460
13373
  ai_model_pricing: {
12461
13374
  Row: {
12462
13375
  created_at: string;
@@ -13243,6 +14156,141 @@ export declare const listDeliveryLocations: import("@tanstack/start-client-core"
13243
14156
  };
13244
14157
  Relationships: [];
13245
14158
  };
14159
+ cart_planning_pick_times: {
14160
+ Row: {
14161
+ created_at: string;
14162
+ id: string;
14163
+ pot_size: string;
14164
+ seconds_per_cart: number;
14165
+ updated_at: string;
14166
+ };
14167
+ Insert: {
14168
+ created_at?: string;
14169
+ id?: string;
14170
+ pot_size: string;
14171
+ seconds_per_cart: number;
14172
+ updated_at?: string;
14173
+ };
14174
+ Update: {
14175
+ created_at?: string;
14176
+ id?: string;
14177
+ pot_size?: string;
14178
+ seconds_per_cart?: number;
14179
+ updated_at?: string;
14180
+ };
14181
+ Relationships: [];
14182
+ };
14183
+ cart_planning_product_overrides: {
14184
+ Row: {
14185
+ created_at: string;
14186
+ id: string;
14187
+ max_party_share_per_layer_pct_override: number | null;
14188
+ never_mix: boolean;
14189
+ notes: string | null;
14190
+ product_id: string;
14191
+ updated_at: string;
14192
+ };
14193
+ Insert: {
14194
+ created_at?: string;
14195
+ id?: string;
14196
+ max_party_share_per_layer_pct_override?: number | null;
14197
+ never_mix?: boolean;
14198
+ notes?: string | null;
14199
+ product_id: string;
14200
+ updated_at?: string;
14201
+ };
14202
+ Update: {
14203
+ created_at?: string;
14204
+ id?: string;
14205
+ max_party_share_per_layer_pct_override?: number | null;
14206
+ never_mix?: boolean;
14207
+ notes?: string | null;
14208
+ product_id?: string;
14209
+ updated_at?: string;
14210
+ };
14211
+ Relationships: [{
14212
+ foreignKeyName: "cart_planning_product_overrides_product_id_fkey";
14213
+ columns: ["product_id"];
14214
+ isOneToOne: true;
14215
+ referencedRelation: "products";
14216
+ referencedColumns: ["id"];
14217
+ }];
14218
+ };
14219
+ cart_planning_settings: {
14220
+ Row: {
14221
+ allow_editing_after_pickstation_send: boolean;
14222
+ buffer_grouping_mode: string;
14223
+ combine_floriday_orders: boolean;
14224
+ combine_floriday_orders_window: string;
14225
+ combine_orders_scope: string;
14226
+ default_workers: number;
14227
+ id: number;
14228
+ max_beladingen_per_layer: number;
14229
+ max_customers_per_cart: number;
14230
+ max_one_customer_per_layer: boolean;
14231
+ max_party_share_per_layer_pct: number;
14232
+ optimization_strategy: string;
14233
+ own_cart_from_layers: number;
14234
+ pick_time_mode: string;
14235
+ plants_per_day: number;
14236
+ plants_per_hour: number;
14237
+ require_same_carrier: boolean;
14238
+ require_same_crate_type: boolean;
14239
+ require_same_delivery_date: boolean;
14240
+ require_same_delivery_location: boolean;
14241
+ updated_at: string;
14242
+ updated_by: string | null;
14243
+ };
14244
+ Insert: {
14245
+ allow_editing_after_pickstation_send?: boolean;
14246
+ buffer_grouping_mode?: string;
14247
+ combine_floriday_orders?: boolean;
14248
+ combine_floriday_orders_window?: string;
14249
+ combine_orders_scope?: string;
14250
+ default_workers?: number;
14251
+ id?: number;
14252
+ max_beladingen_per_layer?: number;
14253
+ max_customers_per_cart?: number;
14254
+ max_one_customer_per_layer?: boolean;
14255
+ max_party_share_per_layer_pct?: number;
14256
+ optimization_strategy?: string;
14257
+ own_cart_from_layers?: number;
14258
+ pick_time_mode?: string;
14259
+ plants_per_day?: number;
14260
+ plants_per_hour?: number;
14261
+ require_same_carrier?: boolean;
14262
+ require_same_crate_type?: boolean;
14263
+ require_same_delivery_date?: boolean;
14264
+ require_same_delivery_location?: boolean;
14265
+ updated_at?: string;
14266
+ updated_by?: string | null;
14267
+ };
14268
+ Update: {
14269
+ allow_editing_after_pickstation_send?: boolean;
14270
+ buffer_grouping_mode?: string;
14271
+ combine_floriday_orders?: boolean;
14272
+ combine_floriday_orders_window?: string;
14273
+ combine_orders_scope?: string;
14274
+ default_workers?: number;
14275
+ id?: number;
14276
+ max_beladingen_per_layer?: number;
14277
+ max_customers_per_cart?: number;
14278
+ max_one_customer_per_layer?: boolean;
14279
+ max_party_share_per_layer_pct?: number;
14280
+ optimization_strategy?: string;
14281
+ own_cart_from_layers?: number;
14282
+ pick_time_mode?: string;
14283
+ plants_per_day?: number;
14284
+ plants_per_hour?: number;
14285
+ require_same_carrier?: boolean;
14286
+ require_same_crate_type?: boolean;
14287
+ require_same_delivery_date?: boolean;
14288
+ require_same_delivery_location?: boolean;
14289
+ updated_at?: string;
14290
+ updated_by?: string | null;
14291
+ };
14292
+ Relationships: [];
14293
+ };
13246
14294
  cart_replan_queue: {
13247
14295
  Row: {
13248
14296
  attempts: number;
@@ -13273,6 +14321,39 @@ export declare const listDeliveryLocations: import("@tanstack/start-client-core"
13273
14321
  referencedColumns: ["id"];
13274
14322
  }];
13275
14323
  };
14324
+ cart_types: {
14325
+ Row: {
14326
+ created_at: string;
14327
+ id: string;
14328
+ is_default: boolean;
14329
+ layer_length_cm: number;
14330
+ layer_width_cm: number;
14331
+ layers_per_cart: number;
14332
+ name: string;
14333
+ updated_at: string;
14334
+ };
14335
+ Insert: {
14336
+ created_at?: string;
14337
+ id?: string;
14338
+ is_default?: boolean;
14339
+ layer_length_cm: number;
14340
+ layer_width_cm: number;
14341
+ layers_per_cart?: number;
14342
+ name: string;
14343
+ updated_at?: string;
14344
+ };
14345
+ Update: {
14346
+ created_at?: string;
14347
+ id?: string;
14348
+ is_default?: boolean;
14349
+ layer_length_cm?: number;
14350
+ layer_width_cm?: number;
14351
+ layers_per_cart?: number;
14352
+ name?: string;
14353
+ updated_at?: string;
14354
+ };
14355
+ Relationships: [];
14356
+ };
13276
14357
  catalog_articles_cache: {
13277
14358
  Row: {
13278
14359
  created_at: string;
@@ -13360,6 +14441,36 @@ export declare const listDeliveryLocations: import("@tanstack/start-client-core"
13360
14441
  };
13361
14442
  Relationships: [];
13362
14443
  };
14444
+ crate_types: {
14445
+ Row: {
14446
+ created_at: string;
14447
+ id: string;
14448
+ length_cm: number;
14449
+ name: string;
14450
+ plants_per_crate: number;
14451
+ updated_at: string;
14452
+ width_cm: number;
14453
+ };
14454
+ Insert: {
14455
+ created_at?: string;
14456
+ id?: string;
14457
+ length_cm: number;
14458
+ name: string;
14459
+ plants_per_crate?: number;
14460
+ updated_at?: string;
14461
+ width_cm: number;
14462
+ };
14463
+ Update: {
14464
+ created_at?: string;
14465
+ id?: string;
14466
+ length_cm?: number;
14467
+ name?: string;
14468
+ plants_per_crate?: number;
14469
+ updated_at?: string;
14470
+ width_cm?: number;
14471
+ };
14472
+ Relationships: [];
14473
+ };
13363
14474
  customer_audit_log: {
13364
14475
  Row: {
13365
14476
  action: string;
@@ -17899,6 +19010,288 @@ export declare const listDeliveryLocations: import("@tanstack/start-client-core"
17899
19010
  };
17900
19011
  Relationships: [];
17901
19012
  };
19013
+ itk_contact_persons: {
19014
+ Row: {
19015
+ created_at: string;
19016
+ customer_id: string;
19017
+ email: string | null;
19018
+ id: string;
19019
+ name: string;
19020
+ phone: string | null;
19021
+ role: string | null;
19022
+ updated_at: string;
19023
+ };
19024
+ Insert: {
19025
+ created_at?: string;
19026
+ customer_id: string;
19027
+ email?: string | null;
19028
+ id?: string;
19029
+ name: string;
19030
+ phone?: string | null;
19031
+ role?: string | null;
19032
+ updated_at?: string;
19033
+ };
19034
+ Update: {
19035
+ created_at?: string;
19036
+ customer_id?: string;
19037
+ email?: string | null;
19038
+ id?: string;
19039
+ name?: string;
19040
+ phone?: string | null;
19041
+ role?: string | null;
19042
+ updated_at?: string;
19043
+ };
19044
+ Relationships: [{
19045
+ foreignKeyName: "itk_contact_persons_customer_id_fkey";
19046
+ columns: ["customer_id"];
19047
+ isOneToOne: false;
19048
+ referencedRelation: "itk_customers";
19049
+ referencedColumns: ["id"];
19050
+ }];
19051
+ };
19052
+ itk_customer_dynamic_values: {
19053
+ Row: {
19054
+ created_at: string;
19055
+ customer_id: string;
19056
+ field_id: string;
19057
+ id: string;
19058
+ updated_at: string;
19059
+ value: string | null;
19060
+ };
19061
+ Insert: {
19062
+ created_at?: string;
19063
+ customer_id: string;
19064
+ field_id: string;
19065
+ id?: string;
19066
+ updated_at?: string;
19067
+ value?: string | null;
19068
+ };
19069
+ Update: {
19070
+ created_at?: string;
19071
+ customer_id?: string;
19072
+ field_id?: string;
19073
+ id?: string;
19074
+ updated_at?: string;
19075
+ value?: string | null;
19076
+ };
19077
+ Relationships: [{
19078
+ foreignKeyName: "itk_customer_dynamic_values_customer_id_fkey";
19079
+ columns: ["customer_id"];
19080
+ isOneToOne: false;
19081
+ referencedRelation: "itk_customers";
19082
+ referencedColumns: ["id"];
19083
+ }, {
19084
+ foreignKeyName: "itk_customer_dynamic_values_field_id_fkey";
19085
+ columns: ["field_id"];
19086
+ isOneToOne: false;
19087
+ referencedRelation: "itk_dynamic_fields";
19088
+ referencedColumns: ["id"];
19089
+ }];
19090
+ };
19091
+ itk_customer_notes: {
19092
+ Row: {
19093
+ body: string;
19094
+ created_at: string;
19095
+ created_by: string | null;
19096
+ customer_id: string;
19097
+ id: string;
19098
+ note_type: string;
19099
+ updated_at: string;
19100
+ };
19101
+ Insert: {
19102
+ body: string;
19103
+ created_at?: string;
19104
+ created_by?: string | null;
19105
+ customer_id: string;
19106
+ id?: string;
19107
+ note_type?: string;
19108
+ updated_at?: string;
19109
+ };
19110
+ Update: {
19111
+ body?: string;
19112
+ created_at?: string;
19113
+ created_by?: string | null;
19114
+ customer_id?: string;
19115
+ id?: string;
19116
+ note_type?: string;
19117
+ updated_at?: string;
19118
+ };
19119
+ Relationships: [{
19120
+ foreignKeyName: "itk_customer_notes_customer_id_fkey";
19121
+ columns: ["customer_id"];
19122
+ isOneToOne: false;
19123
+ referencedRelation: "itk_customers";
19124
+ referencedColumns: ["id"];
19125
+ }];
19126
+ };
19127
+ itk_customers: {
19128
+ Row: {
19129
+ billing_city: string | null;
19130
+ billing_postcode: string | null;
19131
+ billing_street: string | null;
19132
+ created_at: string;
19133
+ general_email: string | null;
19134
+ general_phone: string | null;
19135
+ id: string;
19136
+ legacy_customer_id: string | null;
19137
+ name: string;
19138
+ segment: import("../integrations/supabase/types").Database["public"]["Enums"]["itk_customer_segment"];
19139
+ updated_at: string;
19140
+ };
19141
+ Insert: {
19142
+ billing_city?: string | null;
19143
+ billing_postcode?: string | null;
19144
+ billing_street?: string | null;
19145
+ created_at?: string;
19146
+ general_email?: string | null;
19147
+ general_phone?: string | null;
19148
+ id?: string;
19149
+ legacy_customer_id?: string | null;
19150
+ name: string;
19151
+ segment?: import("../integrations/supabase/types").Database["public"]["Enums"]["itk_customer_segment"];
19152
+ updated_at?: string;
19153
+ };
19154
+ Update: {
19155
+ billing_city?: string | null;
19156
+ billing_postcode?: string | null;
19157
+ billing_street?: string | null;
19158
+ created_at?: string;
19159
+ general_email?: string | null;
19160
+ general_phone?: string | null;
19161
+ id?: string;
19162
+ legacy_customer_id?: string | null;
19163
+ name?: string;
19164
+ segment?: import("../integrations/supabase/types").Database["public"]["Enums"]["itk_customer_segment"];
19165
+ updated_at?: string;
19166
+ };
19167
+ Relationships: [{
19168
+ foreignKeyName: "itk_customers_legacy_customer_id_fkey";
19169
+ columns: ["legacy_customer_id"];
19170
+ isOneToOne: false;
19171
+ referencedRelation: "customers";
19172
+ referencedColumns: ["id"];
19173
+ }];
19174
+ };
19175
+ itk_dynamic_fields: {
19176
+ Row: {
19177
+ created_at: string;
19178
+ field_name: string;
19179
+ field_type: import("../integrations/supabase/types").Database["public"]["Enums"]["itk_dynamic_field_type"];
19180
+ id: string;
19181
+ options: import("../integrations/supabase/types").Json;
19182
+ sort_order: number;
19183
+ updated_at: string;
19184
+ };
19185
+ Insert: {
19186
+ created_at?: string;
19187
+ field_name: string;
19188
+ field_type?: import("../integrations/supabase/types").Database["public"]["Enums"]["itk_dynamic_field_type"];
19189
+ id?: string;
19190
+ options?: import("../integrations/supabase/types").Json;
19191
+ sort_order?: number;
19192
+ updated_at?: string;
19193
+ };
19194
+ Update: {
19195
+ created_at?: string;
19196
+ field_name?: string;
19197
+ field_type?: import("../integrations/supabase/types").Database["public"]["Enums"]["itk_dynamic_field_type"];
19198
+ id?: string;
19199
+ options?: import("../integrations/supabase/types").Json;
19200
+ sort_order?: number;
19201
+ updated_at?: string;
19202
+ };
19203
+ Relationships: [];
19204
+ };
19205
+ itk_work_locations: {
19206
+ Row: {
19207
+ city: string | null;
19208
+ created_at: string;
19209
+ customer_id: string;
19210
+ id: string;
19211
+ instructions: string | null;
19212
+ label: string;
19213
+ latitude: number | null;
19214
+ longitude: number | null;
19215
+ postcode: string | null;
19216
+ street: string | null;
19217
+ updated_at: string;
19218
+ };
19219
+ Insert: {
19220
+ city?: string | null;
19221
+ created_at?: string;
19222
+ customer_id: string;
19223
+ id?: string;
19224
+ instructions?: string | null;
19225
+ label: string;
19226
+ latitude?: number | null;
19227
+ longitude?: number | null;
19228
+ postcode?: string | null;
19229
+ street?: string | null;
19230
+ updated_at?: string;
19231
+ };
19232
+ Update: {
19233
+ city?: string | null;
19234
+ created_at?: string;
19235
+ customer_id?: string;
19236
+ id?: string;
19237
+ instructions?: string | null;
19238
+ label?: string;
19239
+ latitude?: number | null;
19240
+ longitude?: number | null;
19241
+ postcode?: string | null;
19242
+ street?: string | null;
19243
+ updated_at?: string;
19244
+ };
19245
+ Relationships: [{
19246
+ foreignKeyName: "itk_work_locations_customer_id_fkey";
19247
+ columns: ["customer_id"];
19248
+ isOneToOne: false;
19249
+ referencedRelation: "itk_customers";
19250
+ referencedColumns: ["id"];
19251
+ }];
19252
+ };
19253
+ leave_requests: {
19254
+ Row: {
19255
+ created_at: string;
19256
+ end_date: string;
19257
+ id: string;
19258
+ reason: string | null;
19259
+ start_date: string;
19260
+ status: string;
19261
+ tenant_id: string;
19262
+ updated_at: string;
19263
+ user_id: string;
19264
+ };
19265
+ Insert: {
19266
+ created_at?: string;
19267
+ end_date: string;
19268
+ id?: string;
19269
+ reason?: string | null;
19270
+ start_date: string;
19271
+ status?: string;
19272
+ tenant_id?: string;
19273
+ updated_at?: string;
19274
+ user_id: string;
19275
+ };
19276
+ Update: {
19277
+ created_at?: string;
19278
+ end_date?: string;
19279
+ id?: string;
19280
+ reason?: string | null;
19281
+ start_date?: string;
19282
+ status?: string;
19283
+ tenant_id?: string;
19284
+ updated_at?: string;
19285
+ user_id?: string;
19286
+ };
19287
+ Relationships: [{
19288
+ foreignKeyName: "leave_requests_user_id_fkey";
19289
+ columns: ["user_id"];
19290
+ isOneToOne: false;
19291
+ referencedRelation: "monteurs";
19292
+ referencedColumns: ["id"];
19293
+ }];
19294
+ };
17902
19295
  local_customer_agreements: {
17903
19296
  Row: {
17904
19297
  base_price: number | null;
@@ -18550,6 +19943,33 @@ export declare const listDeliveryLocations: import("@tanstack/start-client-core"
18550
19943
  };
18551
19944
  Relationships: [];
18552
19945
  };
19946
+ module_permissions: {
19947
+ Row: {
19948
+ created_at: string;
19949
+ id: string;
19950
+ module_id: string;
19951
+ permission: string;
19952
+ role: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
19953
+ updated_at: string;
19954
+ };
19955
+ Insert: {
19956
+ created_at?: string;
19957
+ id?: string;
19958
+ module_id: string;
19959
+ permission: string;
19960
+ role: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
19961
+ updated_at?: string;
19962
+ };
19963
+ Update: {
19964
+ created_at?: string;
19965
+ id?: string;
19966
+ module_id?: string;
19967
+ permission?: string;
19968
+ role?: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
19969
+ updated_at?: string;
19970
+ };
19971
+ Relationships: [];
19972
+ };
18553
19973
  monteurs: {
18554
19974
  Row: {
18555
19975
  avatar_url: string | null;
@@ -19279,6 +20699,42 @@ export declare const listDeliveryLocations: import("@tanstack/start-client-core"
19279
20699
  };
19280
20700
  Relationships: [];
19281
20701
  };
20702
+ order_buffers: {
20703
+ Row: {
20704
+ buffer_key: string;
20705
+ created_at: string;
20706
+ customer_id: string | null;
20707
+ grouping_mode: string;
20708
+ id: string;
20709
+ pickup_date: string | null;
20710
+ pickup_location: string | null;
20711
+ plan_locked_at: string | null;
20712
+ updated_at: string;
20713
+ };
20714
+ Insert: {
20715
+ buffer_key: string;
20716
+ created_at?: string;
20717
+ customer_id?: string | null;
20718
+ grouping_mode: string;
20719
+ id?: string;
20720
+ pickup_date?: string | null;
20721
+ pickup_location?: string | null;
20722
+ plan_locked_at?: string | null;
20723
+ updated_at?: string;
20724
+ };
20725
+ Update: {
20726
+ buffer_key?: string;
20727
+ created_at?: string;
20728
+ customer_id?: string | null;
20729
+ grouping_mode?: string;
20730
+ id?: string;
20731
+ pickup_date?: string | null;
20732
+ pickup_location?: string | null;
20733
+ plan_locked_at?: string | null;
20734
+ updated_at?: string;
20735
+ };
20736
+ Relationships: [];
20737
+ };
19282
20738
  order_cart_items: {
19283
20739
  Row: {
19284
20740
  cart_id: string;
@@ -19345,6 +20801,7 @@ export declare const listDeliveryLocations: import("@tanstack/start-client-core"
19345
20801
  order_carts: {
19346
20802
  Row: {
19347
20803
  algorithm_version: number;
20804
+ buffer_id: string | null;
19348
20805
  cart_number: number;
19349
20806
  created_at: string;
19350
20807
  id: string;
@@ -19352,13 +20809,14 @@ export declare const listDeliveryLocations: import("@tanstack/start-client-core"
19352
20809
  is_complete: boolean;
19353
20810
  notes: string | null;
19354
20811
  occupancy_pct: number;
19355
- order_id: string;
20812
+ order_id: string | null;
19356
20813
  source: string;
19357
20814
  total_layers_used: number;
19358
20815
  updated_at: string;
19359
20816
  };
19360
20817
  Insert: {
19361
20818
  algorithm_version?: number;
20819
+ buffer_id?: string | null;
19362
20820
  cart_number: number;
19363
20821
  created_at?: string;
19364
20822
  id?: string;
@@ -19366,13 +20824,14 @@ export declare const listDeliveryLocations: import("@tanstack/start-client-core"
19366
20824
  is_complete?: boolean;
19367
20825
  notes?: string | null;
19368
20826
  occupancy_pct?: number;
19369
- order_id: string;
20827
+ order_id?: string | null;
19370
20828
  source?: string;
19371
20829
  total_layers_used?: number;
19372
20830
  updated_at?: string;
19373
20831
  };
19374
20832
  Update: {
19375
20833
  algorithm_version?: number;
20834
+ buffer_id?: string | null;
19376
20835
  cart_number?: number;
19377
20836
  created_at?: string;
19378
20837
  id?: string;
@@ -19380,12 +20839,18 @@ export declare const listDeliveryLocations: import("@tanstack/start-client-core"
19380
20839
  is_complete?: boolean;
19381
20840
  notes?: string | null;
19382
20841
  occupancy_pct?: number;
19383
- order_id?: string;
20842
+ order_id?: string | null;
19384
20843
  source?: string;
19385
20844
  total_layers_used?: number;
19386
20845
  updated_at?: string;
19387
20846
  };
19388
20847
  Relationships: [{
20848
+ foreignKeyName: "order_carts_buffer_id_fkey";
20849
+ columns: ["buffer_id"];
20850
+ isOneToOne: false;
20851
+ referencedRelation: "order_buffers";
20852
+ referencedColumns: ["id"];
20853
+ }, {
19389
20854
  foreignKeyName: "order_carts_order_id_fkey";
19390
20855
  columns: ["order_id"];
19391
20856
  isOneToOne: false;
@@ -19522,15 +20987,117 @@ export declare const listDeliveryLocations: import("@tanstack/start-client-core"
19522
20987
  };
19523
20988
  Relationships: [];
19524
20989
  };
20990
+ order_shipment_items: {
20991
+ Row: {
20992
+ created_at: string;
20993
+ id: string;
20994
+ order_item_id: string;
20995
+ product_id: string | null;
20996
+ product_name: string;
20997
+ quantity: number;
20998
+ shipment_id: string;
20999
+ updated_at: string;
21000
+ };
21001
+ Insert: {
21002
+ created_at?: string;
21003
+ id?: string;
21004
+ order_item_id: string;
21005
+ product_id?: string | null;
21006
+ product_name: string;
21007
+ quantity: number;
21008
+ shipment_id: string;
21009
+ updated_at?: string;
21010
+ };
21011
+ Update: {
21012
+ created_at?: string;
21013
+ id?: string;
21014
+ order_item_id?: string;
21015
+ product_id?: string | null;
21016
+ product_name?: string;
21017
+ quantity?: number;
21018
+ shipment_id?: string;
21019
+ updated_at?: string;
21020
+ };
21021
+ Relationships: [{
21022
+ foreignKeyName: "order_shipment_items_order_item_id_fkey";
21023
+ columns: ["order_item_id"];
21024
+ isOneToOne: false;
21025
+ referencedRelation: "order_items";
21026
+ referencedColumns: ["id"];
21027
+ }, {
21028
+ foreignKeyName: "order_shipment_items_shipment_id_fkey";
21029
+ columns: ["shipment_id"];
21030
+ isOneToOne: false;
21031
+ referencedRelation: "order_shipments";
21032
+ referencedColumns: ["id"];
21033
+ }];
21034
+ };
21035
+ order_shipments: {
21036
+ Row: {
21037
+ carrier_id: string | null;
21038
+ created_at: string;
21039
+ delivery_date: string | null;
21040
+ delivery_location_id: string | null;
21041
+ id: string;
21042
+ notes: string | null;
21043
+ order_id: string;
21044
+ shipment_number: number;
21045
+ shipped_at: string | null;
21046
+ status: string;
21047
+ updated_at: string;
21048
+ };
21049
+ Insert: {
21050
+ carrier_id?: string | null;
21051
+ created_at?: string;
21052
+ delivery_date?: string | null;
21053
+ delivery_location_id?: string | null;
21054
+ id?: string;
21055
+ notes?: string | null;
21056
+ order_id: string;
21057
+ shipment_number: number;
21058
+ shipped_at?: string | null;
21059
+ status?: string;
21060
+ updated_at?: string;
21061
+ };
21062
+ Update: {
21063
+ carrier_id?: string | null;
21064
+ created_at?: string;
21065
+ delivery_date?: string | null;
21066
+ delivery_location_id?: string | null;
21067
+ id?: string;
21068
+ notes?: string | null;
21069
+ order_id?: string;
21070
+ shipment_number?: number;
21071
+ shipped_at?: string | null;
21072
+ status?: string;
21073
+ updated_at?: string;
21074
+ };
21075
+ Relationships: [{
21076
+ foreignKeyName: "order_shipments_carrier_id_fkey";
21077
+ columns: ["carrier_id"];
21078
+ isOneToOne: false;
21079
+ referencedRelation: "carriers";
21080
+ referencedColumns: ["id"];
21081
+ }, {
21082
+ foreignKeyName: "order_shipments_order_id_fkey";
21083
+ columns: ["order_id"];
21084
+ isOneToOne: false;
21085
+ referencedRelation: "orders";
21086
+ referencedColumns: ["id"];
21087
+ }];
21088
+ };
19525
21089
  orders: {
19526
21090
  Row: {
21091
+ buffer_id: string | null;
19527
21092
  created_at: string;
19528
21093
  custom_fields: import("../integrations/supabase/types").Json;
19529
21094
  customer_id: string | null;
19530
21095
  customer_name: string;
19531
21096
  deleted_at: string | null;
19532
- delivery_date: string;
21097
+ delivery_date: string | null;
21098
+ floriday_sales_order_id: string | null;
19533
21099
  id: string;
21100
+ is_reservation: boolean;
19534
21101
  notes: string | null;
19535
21102
  order_date: string;
19536
21103
  order_number: string;
@@ -19542,13 +21109,16 @@ export declare const listDeliveryLocations: import("@tanstack/start-client-core"
19542
21109
  updated_at: string;
19543
21110
  };
19544
21111
  Insert: {
21112
+ buffer_id?: string | null;
19545
21113
  created_at?: string;
19546
21114
  custom_fields?: import("../integrations/supabase/types").Json;
19547
21115
  customer_id?: string | null;
19548
21116
  customer_name?: string;
19549
21117
  deleted_at?: string | null;
19550
- delivery_date: string;
21118
+ delivery_date?: string | null;
21119
+ floriday_sales_order_id?: string | null;
19551
21120
  id?: string;
21121
+ is_reservation?: boolean;
19552
21122
  notes?: string | null;
19553
21123
  order_date?: string;
19554
21124
  order_number: string;
@@ -19560,13 +21130,16 @@ export declare const listDeliveryLocations: import("@tanstack/start-client-core"
19560
21130
  updated_at?: string;
19561
21131
  };
19562
21132
  Update: {
21133
+ buffer_id?: string | null;
19563
21134
  created_at?: string;
19564
21135
  custom_fields?: import("../integrations/supabase/types").Json;
19565
21136
  customer_id?: string | null;
19566
21137
  customer_name?: string;
19567
21138
  deleted_at?: string | null;
19568
- delivery_date?: string;
21139
+ delivery_date?: string | null;
21140
+ floriday_sales_order_id?: string | null;
19569
21141
  id?: string;
21142
+ is_reservation?: boolean;
19570
21143
  notes?: string | null;
19571
21144
  order_date?: string;
19572
21145
  order_number?: string;
@@ -19578,6 +21151,12 @@ export declare const listDeliveryLocations: import("@tanstack/start-client-core"
19578
21151
  updated_at?: string;
19579
21152
  };
19580
21153
  Relationships: [{
21154
+ foreignKeyName: "orders_buffer_id_fkey";
21155
+ columns: ["buffer_id"];
21156
+ isOneToOne: false;
21157
+ referencedRelation: "order_buffers";
21158
+ referencedColumns: ["id"];
21159
+ }, {
19581
21160
  foreignKeyName: "orders_customer_id_fkey";
19582
21161
  columns: ["customer_id"];
19583
21162
  isOneToOne: false;
@@ -19841,6 +21420,8 @@ export declare const listDeliveryLocations: import("@tanstack/start-client-core"
19841
21420
  Row: {
19842
21421
  created_at: string;
19843
21422
  description: string | null;
21423
+ head_product_id: string | null;
21424
+ head_trade_item_floriday_id: string | null;
19844
21425
  id: string;
19845
21426
  is_active: boolean;
19846
21427
  name: string;
@@ -19850,6 +21431,8 @@ export declare const listDeliveryLocations: import("@tanstack/start-client-core"
19850
21431
  Insert: {
19851
21432
  created_at?: string;
19852
21433
  description?: string | null;
21434
+ head_product_id?: string | null;
21435
+ head_trade_item_floriday_id?: string | null;
19853
21436
  id?: string;
19854
21437
  is_active?: boolean;
19855
21438
  name: string;
@@ -19859,13 +21442,21 @@ export declare const listDeliveryLocations: import("@tanstack/start-client-core"
19859
21442
  Update: {
19860
21443
  created_at?: string;
19861
21444
  description?: string | null;
21445
+ head_product_id?: string | null;
21446
+ head_trade_item_floriday_id?: string | null;
19862
21447
  id?: string;
19863
21448
  is_active?: boolean;
19864
21449
  name?: string;
19865
21450
  tenant_id?: string;
19866
21451
  updated_at?: string;
19867
21452
  };
19868
- Relationships: [];
21453
+ Relationships: [{
21454
+ foreignKeyName: "product_groups_head_product_id_fkey";
21455
+ columns: ["head_product_id"];
21456
+ isOneToOne: false;
21457
+ referencedRelation: "products";
21458
+ referencedColumns: ["id"];
21459
+ }];
19869
21460
  };
19870
21461
  products: {
19871
21462
  Row: {
@@ -22416,6 +24007,7 @@ export declare const listDeliveryLocations: import("@tanstack/start-client-core"
22416
24007
  internal_notes: string | null;
22417
24008
  parent_werkbon_id: string | null;
22418
24009
  parsed_payload: import("../integrations/supabase/types").Json | null;
24010
+ planning_status: string;
22419
24011
  project_number: string | null;
22420
24012
  room_number: string | null;
22421
24013
  scheduled_end_time: string | null;
@@ -22423,6 +24015,7 @@ export declare const listDeliveryLocations: import("@tanstack/start-client-core"
22423
24015
  sequence_number: number;
22424
24016
  source_pdf_path: string | null;
22425
24017
  status: string;
24018
+ technician_id: string | null;
22426
24019
  technician_notes: string | null;
22427
24020
  technician_notes_raw: string | null;
22428
24021
  technician_task_description: string | null;
@@ -22443,6 +24036,7 @@ export declare const listDeliveryLocations: import("@tanstack/start-client-core"
22443
24036
  internal_notes?: string | null;
22444
24037
  parent_werkbon_id?: string | null;
22445
24038
  parsed_payload?: import("../integrations/supabase/types").Json | null;
24039
+ planning_status?: string;
22446
24040
  project_number?: string | null;
22447
24041
  room_number?: string | null;
22448
24042
  scheduled_end_time?: string | null;
@@ -22450,6 +24044,7 @@ export declare const listDeliveryLocations: import("@tanstack/start-client-core"
22450
24044
  sequence_number: number;
22451
24045
  source_pdf_path?: string | null;
22452
24046
  status?: string;
24047
+ technician_id?: string | null;
22453
24048
  technician_notes?: string | null;
22454
24049
  technician_notes_raw?: string | null;
22455
24050
  technician_task_description?: string | null;
@@ -22470,6 +24065,7 @@ export declare const listDeliveryLocations: import("@tanstack/start-client-core"
22470
24065
  internal_notes?: string | null;
22471
24066
  parent_werkbon_id?: string | null;
22472
24067
  parsed_payload?: import("../integrations/supabase/types").Json | null;
24068
+ planning_status?: string;
22473
24069
  project_number?: string | null;
22474
24070
  room_number?: string | null;
22475
24071
  scheduled_end_time?: string | null;
@@ -22477,6 +24073,7 @@ export declare const listDeliveryLocations: import("@tanstack/start-client-core"
22477
24073
  sequence_number?: number;
22478
24074
  source_pdf_path?: string | null;
22479
24075
  status?: string;
24076
+ technician_id?: string | null;
22480
24077
  technician_notes?: string | null;
22481
24078
  technician_notes_raw?: string | null;
22482
24079
  technician_task_description?: string | null;
@@ -22485,17 +24082,17 @@ export declare const listDeliveryLocations: import("@tanstack/start-client-core"
22485
24082
  work_address?: string | null;
22486
24083
  };
22487
24084
  Relationships: [{
22488
- foreignKeyName: "werkbonnen_customer_id_fkey";
22489
- columns: ["customer_id"];
22490
- isOneToOne: false;
22491
- referencedRelation: "customers";
22492
- referencedColumns: ["id"];
22493
- }, {
22494
24085
  foreignKeyName: "werkbonnen_parent_werkbon_id_fkey";
22495
24086
  columns: ["parent_werkbon_id"];
22496
24087
  isOneToOne: false;
22497
24088
  referencedRelation: "werkbonnen";
22498
24089
  referencedColumns: ["id"];
24090
+ }, {
24091
+ foreignKeyName: "werkbonnen_technician_id_fkey";
24092
+ columns: ["technician_id"];
24093
+ isOneToOne: false;
24094
+ referencedRelation: "monteurs";
24095
+ referencedColumns: ["id"];
22499
24096
  }];
22500
24097
  };
22501
24098
  work_order_monteurs: {
@@ -23214,6 +24811,21 @@ export declare const listDeliveryLocations: import("@tanstack/start-client-core"
23214
24811
  };
23215
24812
  Returns: string;
23216
24813
  };
24814
+ ai_usage_by_module: {
24815
+ Args: {
24816
+ _from: string;
24817
+ _to: string;
24818
+ };
24819
+ Returns: {
24820
+ calls: number;
24821
+ consumer_module_id: string;
24822
+ cost_usd: number;
24823
+ errors: number;
24824
+ input_tokens: number;
24825
+ output_tokens: number;
24826
+ total_tokens: number;
24827
+ }[];
24828
+ };
23217
24829
  apply_stock_consumption: {
23218
24830
  Args: {
23219
24831
  p_order_id: string;
@@ -23362,6 +24974,12 @@ export declare const listDeliveryLocations: import("@tanstack/start-client-core"
23362
24974
  Args: never;
23363
24975
  Returns: string;
23364
24976
  };
24977
+ custom_access_token_hook: {
24978
+ Args: {
24979
+ event: import("../integrations/supabase/types").Json;
24980
+ };
24981
+ Returns: import("../integrations/supabase/types").Json;
24982
+ };
23365
24983
  dashboard_alert_counts: {
23366
24984
  Args: never;
23367
24985
  Returns: import("../integrations/supabase/types").Json;
@@ -23697,6 +25315,14 @@ export declare const listDeliveryLocations: import("@tanstack/start-client-core"
23697
25315
  };
23698
25316
  Returns: string;
23699
25317
  };
25318
+ has_module_permission: {
25319
+ Args: {
25320
+ _min: string;
25321
+ _module_id: string;
25322
+ _user_id: string;
25323
+ };
25324
+ Returns: boolean;
25325
+ };
23700
25326
  has_role: {
23701
25327
  Args: {
23702
25328
  _role: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
@@ -23722,6 +25348,20 @@ export declare const listDeliveryLocations: import("@tanstack/start-client-core"
23722
25348
  };
23723
25349
  Returns: boolean;
23724
25350
  };
25351
+ jwt_has_role: {
25352
+ Args: {
25353
+ _role: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
25354
+ };
25355
+ Returns: boolean;
25356
+ };
25357
+ list_monteurs: {
25358
+ Args: never;
25359
+ Returns: {
25360
+ display_name: string;
25361
+ email: string;
25362
+ user_id: string;
25363
+ }[];
25364
+ };
23725
25365
  local_effective_price: {
23726
25366
  Args: {
23727
25367
  _customer_id: string;
@@ -23738,6 +25378,22 @@ export declare const listDeliveryLocations: import("@tanstack/start-client-core"
23738
25378
  source_id: string;
23739
25379
  }[];
23740
25380
  };
25381
+ log_ai_call: {
25382
+ Args: {
25383
+ _consumer_module_id: string;
25384
+ _cost_usd: number;
25385
+ _duration_ms: number;
25386
+ _error_code: string;
25387
+ _error_message: string;
25388
+ _input_tokens: number;
25389
+ _model_slug: string;
25390
+ _output_tokens: number;
25391
+ _provider_slug: string;
25392
+ _status: string;
25393
+ _total_tokens: number;
25394
+ };
25395
+ Returns: string;
25396
+ };
23741
25397
  mark_offer_clicked: {
23742
25398
  Args: {
23743
25399
  p_code: string;
@@ -23750,6 +25406,12 @@ export declare const listDeliveryLocations: import("@tanstack/start-client-core"
23750
25406
  };
23751
25407
  Returns: undefined;
23752
25408
  };
25409
+ mark_shipment_shipped: {
25410
+ Args: {
25411
+ p_shipment_id: string;
25412
+ };
25413
+ Returns: undefined;
25414
+ };
23753
25415
  next_order_number: {
23754
25416
  Args: {
23755
25417
  p_prefix: string;
@@ -24226,9 +25888,11 @@ export declare const listDeliveryLocations: import("@tanstack/start-client-core"
24226
25888
  };
24227
25889
  };
24228
25890
  Enums: {
24229
- app_role: "admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie" | "monteur";
25891
+ app_role: "admin" | "planner" | "monteur" | "administratie" | "ai_admin";
24230
25892
  exact_env: "staging" | "live";
24231
25893
  exact_push_status: "pending" | "sent" | "error";
25894
+ itk_customer_segment: "Business" | "Private";
25895
+ itk_dynamic_field_type: "text" | "select" | "date" | "checkbox";
24232
25896
  quote_status: "concept" | "verzonden" | "bekeken" | "in_behandeling" | "geaccepteerd" | "afgewezen" | "verlopen" | "gearchiveerd";
24233
25897
  };
24234
25898
  CompositeTypes: { [_ in never]: never; };
@@ -24543,6 +26207,57 @@ export declare const upsertDeliveryLocation: import("@tanstack/start-client-core
24543
26207
  referencedColumns: ["id"];
24544
26208
  }];
24545
26209
  };
26210
+ ai_call_log: {
26211
+ Row: {
26212
+ consumer_module_id: string;
26213
+ cost_usd: number | null;
26214
+ created_at: string;
26215
+ created_by: string | null;
26216
+ duration_ms: number | null;
26217
+ error_code: string | null;
26218
+ error_message: string | null;
26219
+ id: string;
26220
+ input_tokens: number;
26221
+ model_slug: string | null;
26222
+ output_tokens: number;
26223
+ provider_slug: string | null;
26224
+ status: string;
26225
+ total_tokens: number;
26226
+ };
26227
+ Insert: {
26228
+ consumer_module_id: string;
26229
+ cost_usd?: number | null;
26230
+ created_at?: string;
26231
+ created_by?: string | null;
26232
+ duration_ms?: number | null;
26233
+ error_code?: string | null;
26234
+ error_message?: string | null;
26235
+ id?: string;
26236
+ input_tokens?: number;
26237
+ model_slug?: string | null;
26238
+ output_tokens?: number;
26239
+ provider_slug?: string | null;
26240
+ status: string;
26241
+ total_tokens?: number;
26242
+ };
26243
+ Update: {
26244
+ consumer_module_id?: string;
26245
+ cost_usd?: number | null;
26246
+ created_at?: string;
26247
+ created_by?: string | null;
26248
+ duration_ms?: number | null;
26249
+ error_code?: string | null;
26250
+ error_message?: string | null;
26251
+ id?: string;
26252
+ input_tokens?: number;
26253
+ model_slug?: string | null;
26254
+ output_tokens?: number;
26255
+ provider_slug?: string | null;
26256
+ status?: string;
26257
+ total_tokens?: number;
26258
+ };
26259
+ Relationships: [];
26260
+ };
24546
26261
  ai_credentials: {
24547
26262
  Row: {
24548
26263
  active: boolean;
@@ -24579,6 +26294,36 @@ export declare const upsertDeliveryLocation: import("@tanstack/start-client-core
24579
26294
  referencedColumns: ["id"];
24580
26295
  }];
24581
26296
  };
26297
+ ai_goals: {
26298
+ Row: {
26299
+ active: boolean;
26300
+ created_at: string;
26301
+ description: string | null;
26302
+ key: string;
26303
+ label: string;
26304
+ sort_order: number;
26305
+ updated_at: string;
26306
+ };
26307
+ Insert: {
26308
+ active?: boolean;
26309
+ created_at?: string;
26310
+ description?: string | null;
26311
+ key: string;
26312
+ label: string;
26313
+ sort_order?: number;
26314
+ updated_at?: string;
26315
+ };
26316
+ Update: {
26317
+ active?: boolean;
26318
+ created_at?: string;
26319
+ description?: string | null;
26320
+ key?: string;
26321
+ label?: string;
26322
+ sort_order?: number;
26323
+ updated_at?: string;
26324
+ };
26325
+ Relationships: [];
26326
+ };
24582
26327
  ai_model_pricing: {
24583
26328
  Row: {
24584
26329
  created_at: string;
@@ -25365,6 +27110,141 @@ export declare const upsertDeliveryLocation: import("@tanstack/start-client-core
25365
27110
  };
25366
27111
  Relationships: [];
25367
27112
  };
27113
+ cart_planning_pick_times: {
27114
+ Row: {
27115
+ created_at: string;
27116
+ id: string;
27117
+ pot_size: string;
27118
+ seconds_per_cart: number;
27119
+ updated_at: string;
27120
+ };
27121
+ Insert: {
27122
+ created_at?: string;
27123
+ id?: string;
27124
+ pot_size: string;
27125
+ seconds_per_cart: number;
27126
+ updated_at?: string;
27127
+ };
27128
+ Update: {
27129
+ created_at?: string;
27130
+ id?: string;
27131
+ pot_size?: string;
27132
+ seconds_per_cart?: number;
27133
+ updated_at?: string;
27134
+ };
27135
+ Relationships: [];
27136
+ };
27137
+ cart_planning_product_overrides: {
27138
+ Row: {
27139
+ created_at: string;
27140
+ id: string;
27141
+ max_party_share_per_layer_pct_override: number | null;
27142
+ never_mix: boolean;
27143
+ notes: string | null;
27144
+ product_id: string;
27145
+ updated_at: string;
27146
+ };
27147
+ Insert: {
27148
+ created_at?: string;
27149
+ id?: string;
27150
+ max_party_share_per_layer_pct_override?: number | null;
27151
+ never_mix?: boolean;
27152
+ notes?: string | null;
27153
+ product_id: string;
27154
+ updated_at?: string;
27155
+ };
27156
+ Update: {
27157
+ created_at?: string;
27158
+ id?: string;
27159
+ max_party_share_per_layer_pct_override?: number | null;
27160
+ never_mix?: boolean;
27161
+ notes?: string | null;
27162
+ product_id?: string;
27163
+ updated_at?: string;
27164
+ };
27165
+ Relationships: [{
27166
+ foreignKeyName: "cart_planning_product_overrides_product_id_fkey";
27167
+ columns: ["product_id"];
27168
+ isOneToOne: true;
27169
+ referencedRelation: "products";
27170
+ referencedColumns: ["id"];
27171
+ }];
27172
+ };
27173
+ cart_planning_settings: {
27174
+ Row: {
27175
+ allow_editing_after_pickstation_send: boolean;
27176
+ buffer_grouping_mode: string;
27177
+ combine_floriday_orders: boolean;
27178
+ combine_floriday_orders_window: string;
27179
+ combine_orders_scope: string;
27180
+ default_workers: number;
27181
+ id: number;
27182
+ max_beladingen_per_layer: number;
27183
+ max_customers_per_cart: number;
27184
+ max_one_customer_per_layer: boolean;
27185
+ max_party_share_per_layer_pct: number;
27186
+ optimization_strategy: string;
27187
+ own_cart_from_layers: number;
27188
+ pick_time_mode: string;
27189
+ plants_per_day: number;
27190
+ plants_per_hour: number;
27191
+ require_same_carrier: boolean;
27192
+ require_same_crate_type: boolean;
27193
+ require_same_delivery_date: boolean;
27194
+ require_same_delivery_location: boolean;
27195
+ updated_at: string;
27196
+ updated_by: string | null;
27197
+ };
27198
+ Insert: {
27199
+ allow_editing_after_pickstation_send?: boolean;
27200
+ buffer_grouping_mode?: string;
27201
+ combine_floriday_orders?: boolean;
27202
+ combine_floriday_orders_window?: string;
27203
+ combine_orders_scope?: string;
27204
+ default_workers?: number;
27205
+ id?: number;
27206
+ max_beladingen_per_layer?: number;
27207
+ max_customers_per_cart?: number;
27208
+ max_one_customer_per_layer?: boolean;
27209
+ max_party_share_per_layer_pct?: number;
27210
+ optimization_strategy?: string;
27211
+ own_cart_from_layers?: number;
27212
+ pick_time_mode?: string;
27213
+ plants_per_day?: number;
27214
+ plants_per_hour?: number;
27215
+ require_same_carrier?: boolean;
27216
+ require_same_crate_type?: boolean;
27217
+ require_same_delivery_date?: boolean;
27218
+ require_same_delivery_location?: boolean;
27219
+ updated_at?: string;
27220
+ updated_by?: string | null;
27221
+ };
27222
+ Update: {
27223
+ allow_editing_after_pickstation_send?: boolean;
27224
+ buffer_grouping_mode?: string;
27225
+ combine_floriday_orders?: boolean;
27226
+ combine_floriday_orders_window?: string;
27227
+ combine_orders_scope?: string;
27228
+ default_workers?: number;
27229
+ id?: number;
27230
+ max_beladingen_per_layer?: number;
27231
+ max_customers_per_cart?: number;
27232
+ max_one_customer_per_layer?: boolean;
27233
+ max_party_share_per_layer_pct?: number;
27234
+ optimization_strategy?: string;
27235
+ own_cart_from_layers?: number;
27236
+ pick_time_mode?: string;
27237
+ plants_per_day?: number;
27238
+ plants_per_hour?: number;
27239
+ require_same_carrier?: boolean;
27240
+ require_same_crate_type?: boolean;
27241
+ require_same_delivery_date?: boolean;
27242
+ require_same_delivery_location?: boolean;
27243
+ updated_at?: string;
27244
+ updated_by?: string | null;
27245
+ };
27246
+ Relationships: [];
27247
+ };
25368
27248
  cart_replan_queue: {
25369
27249
  Row: {
25370
27250
  attempts: number;
@@ -25395,6 +27275,39 @@ export declare const upsertDeliveryLocation: import("@tanstack/start-client-core
25395
27275
  referencedColumns: ["id"];
25396
27276
  }];
25397
27277
  };
27278
+ cart_types: {
27279
+ Row: {
27280
+ created_at: string;
27281
+ id: string;
27282
+ is_default: boolean;
27283
+ layer_length_cm: number;
27284
+ layer_width_cm: number;
27285
+ layers_per_cart: number;
27286
+ name: string;
27287
+ updated_at: string;
27288
+ };
27289
+ Insert: {
27290
+ created_at?: string;
27291
+ id?: string;
27292
+ is_default?: boolean;
27293
+ layer_length_cm: number;
27294
+ layer_width_cm: number;
27295
+ layers_per_cart?: number;
27296
+ name: string;
27297
+ updated_at?: string;
27298
+ };
27299
+ Update: {
27300
+ created_at?: string;
27301
+ id?: string;
27302
+ is_default?: boolean;
27303
+ layer_length_cm?: number;
27304
+ layer_width_cm?: number;
27305
+ layers_per_cart?: number;
27306
+ name?: string;
27307
+ updated_at?: string;
27308
+ };
27309
+ Relationships: [];
27310
+ };
25398
27311
  catalog_articles_cache: {
25399
27312
  Row: {
25400
27313
  created_at: string;
@@ -25482,6 +27395,36 @@ export declare const upsertDeliveryLocation: import("@tanstack/start-client-core
25482
27395
  };
25483
27396
  Relationships: [];
25484
27397
  };
27398
+ crate_types: {
27399
+ Row: {
27400
+ created_at: string;
27401
+ id: string;
27402
+ length_cm: number;
27403
+ name: string;
27404
+ plants_per_crate: number;
27405
+ updated_at: string;
27406
+ width_cm: number;
27407
+ };
27408
+ Insert: {
27409
+ created_at?: string;
27410
+ id?: string;
27411
+ length_cm: number;
27412
+ name: string;
27413
+ plants_per_crate?: number;
27414
+ updated_at?: string;
27415
+ width_cm: number;
27416
+ };
27417
+ Update: {
27418
+ created_at?: string;
27419
+ id?: string;
27420
+ length_cm?: number;
27421
+ name?: string;
27422
+ plants_per_crate?: number;
27423
+ updated_at?: string;
27424
+ width_cm?: number;
27425
+ };
27426
+ Relationships: [];
27427
+ };
25485
27428
  customer_audit_log: {
25486
27429
  Row: {
25487
27430
  action: string;
@@ -30021,6 +31964,288 @@ export declare const upsertDeliveryLocation: import("@tanstack/start-client-core
30021
31964
  };
30022
31965
  Relationships: [];
30023
31966
  };
31967
+ itk_contact_persons: {
31968
+ Row: {
31969
+ created_at: string;
31970
+ customer_id: string;
31971
+ email: string | null;
31972
+ id: string;
31973
+ name: string;
31974
+ phone: string | null;
31975
+ role: string | null;
31976
+ updated_at: string;
31977
+ };
31978
+ Insert: {
31979
+ created_at?: string;
31980
+ customer_id: string;
31981
+ email?: string | null;
31982
+ id?: string;
31983
+ name: string;
31984
+ phone?: string | null;
31985
+ role?: string | null;
31986
+ updated_at?: string;
31987
+ };
31988
+ Update: {
31989
+ created_at?: string;
31990
+ customer_id?: string;
31991
+ email?: string | null;
31992
+ id?: string;
31993
+ name?: string;
31994
+ phone?: string | null;
31995
+ role?: string | null;
31996
+ updated_at?: string;
31997
+ };
31998
+ Relationships: [{
31999
+ foreignKeyName: "itk_contact_persons_customer_id_fkey";
32000
+ columns: ["customer_id"];
32001
+ isOneToOne: false;
32002
+ referencedRelation: "itk_customers";
32003
+ referencedColumns: ["id"];
32004
+ }];
32005
+ };
32006
+ itk_customer_dynamic_values: {
32007
+ Row: {
32008
+ created_at: string;
32009
+ customer_id: string;
32010
+ field_id: string;
32011
+ id: string;
32012
+ updated_at: string;
32013
+ value: string | null;
32014
+ };
32015
+ Insert: {
32016
+ created_at?: string;
32017
+ customer_id: string;
32018
+ field_id: string;
32019
+ id?: string;
32020
+ updated_at?: string;
32021
+ value?: string | null;
32022
+ };
32023
+ Update: {
32024
+ created_at?: string;
32025
+ customer_id?: string;
32026
+ field_id?: string;
32027
+ id?: string;
32028
+ updated_at?: string;
32029
+ value?: string | null;
32030
+ };
32031
+ Relationships: [{
32032
+ foreignKeyName: "itk_customer_dynamic_values_customer_id_fkey";
32033
+ columns: ["customer_id"];
32034
+ isOneToOne: false;
32035
+ referencedRelation: "itk_customers";
32036
+ referencedColumns: ["id"];
32037
+ }, {
32038
+ foreignKeyName: "itk_customer_dynamic_values_field_id_fkey";
32039
+ columns: ["field_id"];
32040
+ isOneToOne: false;
32041
+ referencedRelation: "itk_dynamic_fields";
32042
+ referencedColumns: ["id"];
32043
+ }];
32044
+ };
32045
+ itk_customer_notes: {
32046
+ Row: {
32047
+ body: string;
32048
+ created_at: string;
32049
+ created_by: string | null;
32050
+ customer_id: string;
32051
+ id: string;
32052
+ note_type: string;
32053
+ updated_at: string;
32054
+ };
32055
+ Insert: {
32056
+ body: string;
32057
+ created_at?: string;
32058
+ created_by?: string | null;
32059
+ customer_id: string;
32060
+ id?: string;
32061
+ note_type?: string;
32062
+ updated_at?: string;
32063
+ };
32064
+ Update: {
32065
+ body?: string;
32066
+ created_at?: string;
32067
+ created_by?: string | null;
32068
+ customer_id?: string;
32069
+ id?: string;
32070
+ note_type?: string;
32071
+ updated_at?: string;
32072
+ };
32073
+ Relationships: [{
32074
+ foreignKeyName: "itk_customer_notes_customer_id_fkey";
32075
+ columns: ["customer_id"];
32076
+ isOneToOne: false;
32077
+ referencedRelation: "itk_customers";
32078
+ referencedColumns: ["id"];
32079
+ }];
32080
+ };
32081
+ itk_customers: {
32082
+ Row: {
32083
+ billing_city: string | null;
32084
+ billing_postcode: string | null;
32085
+ billing_street: string | null;
32086
+ created_at: string;
32087
+ general_email: string | null;
32088
+ general_phone: string | null;
32089
+ id: string;
32090
+ legacy_customer_id: string | null;
32091
+ name: string;
32092
+ segment: import("../integrations/supabase/types").Database["public"]["Enums"]["itk_customer_segment"];
32093
+ updated_at: string;
32094
+ };
32095
+ Insert: {
32096
+ billing_city?: string | null;
32097
+ billing_postcode?: string | null;
32098
+ billing_street?: string | null;
32099
+ created_at?: string;
32100
+ general_email?: string | null;
32101
+ general_phone?: string | null;
32102
+ id?: string;
32103
+ legacy_customer_id?: string | null;
32104
+ name: string;
32105
+ segment?: import("../integrations/supabase/types").Database["public"]["Enums"]["itk_customer_segment"];
32106
+ updated_at?: string;
32107
+ };
32108
+ Update: {
32109
+ billing_city?: string | null;
32110
+ billing_postcode?: string | null;
32111
+ billing_street?: string | null;
32112
+ created_at?: string;
32113
+ general_email?: string | null;
32114
+ general_phone?: string | null;
32115
+ id?: string;
32116
+ legacy_customer_id?: string | null;
32117
+ name?: string;
32118
+ segment?: import("../integrations/supabase/types").Database["public"]["Enums"]["itk_customer_segment"];
32119
+ updated_at?: string;
32120
+ };
32121
+ Relationships: [{
32122
+ foreignKeyName: "itk_customers_legacy_customer_id_fkey";
32123
+ columns: ["legacy_customer_id"];
32124
+ isOneToOne: false;
32125
+ referencedRelation: "customers";
32126
+ referencedColumns: ["id"];
32127
+ }];
32128
+ };
32129
+ itk_dynamic_fields: {
32130
+ Row: {
32131
+ created_at: string;
32132
+ field_name: string;
32133
+ field_type: import("../integrations/supabase/types").Database["public"]["Enums"]["itk_dynamic_field_type"];
32134
+ id: string;
32135
+ options: import("../integrations/supabase/types").Json;
32136
+ sort_order: number;
32137
+ updated_at: string;
32138
+ };
32139
+ Insert: {
32140
+ created_at?: string;
32141
+ field_name: string;
32142
+ field_type?: import("../integrations/supabase/types").Database["public"]["Enums"]["itk_dynamic_field_type"];
32143
+ id?: string;
32144
+ options?: import("../integrations/supabase/types").Json;
32145
+ sort_order?: number;
32146
+ updated_at?: string;
32147
+ };
32148
+ Update: {
32149
+ created_at?: string;
32150
+ field_name?: string;
32151
+ field_type?: import("../integrations/supabase/types").Database["public"]["Enums"]["itk_dynamic_field_type"];
32152
+ id?: string;
32153
+ options?: import("../integrations/supabase/types").Json;
32154
+ sort_order?: number;
32155
+ updated_at?: string;
32156
+ };
32157
+ Relationships: [];
32158
+ };
32159
+ itk_work_locations: {
32160
+ Row: {
32161
+ city: string | null;
32162
+ created_at: string;
32163
+ customer_id: string;
32164
+ id: string;
32165
+ instructions: string | null;
32166
+ label: string;
32167
+ latitude: number | null;
32168
+ longitude: number | null;
32169
+ postcode: string | null;
32170
+ street: string | null;
32171
+ updated_at: string;
32172
+ };
32173
+ Insert: {
32174
+ city?: string | null;
32175
+ created_at?: string;
32176
+ customer_id: string;
32177
+ id?: string;
32178
+ instructions?: string | null;
32179
+ label: string;
32180
+ latitude?: number | null;
32181
+ longitude?: number | null;
32182
+ postcode?: string | null;
32183
+ street?: string | null;
32184
+ updated_at?: string;
32185
+ };
32186
+ Update: {
32187
+ city?: string | null;
32188
+ created_at?: string;
32189
+ customer_id?: string;
32190
+ id?: string;
32191
+ instructions?: string | null;
32192
+ label?: string;
32193
+ latitude?: number | null;
32194
+ longitude?: number | null;
32195
+ postcode?: string | null;
32196
+ street?: string | null;
32197
+ updated_at?: string;
32198
+ };
32199
+ Relationships: [{
32200
+ foreignKeyName: "itk_work_locations_customer_id_fkey";
32201
+ columns: ["customer_id"];
32202
+ isOneToOne: false;
32203
+ referencedRelation: "itk_customers";
32204
+ referencedColumns: ["id"];
32205
+ }];
32206
+ };
32207
+ leave_requests: {
32208
+ Row: {
32209
+ created_at: string;
32210
+ end_date: string;
32211
+ id: string;
32212
+ reason: string | null;
32213
+ start_date: string;
32214
+ status: string;
32215
+ tenant_id: string;
32216
+ updated_at: string;
32217
+ user_id: string;
32218
+ };
32219
+ Insert: {
32220
+ created_at?: string;
32221
+ end_date: string;
32222
+ id?: string;
32223
+ reason?: string | null;
32224
+ start_date: string;
32225
+ status?: string;
32226
+ tenant_id?: string;
32227
+ updated_at?: string;
32228
+ user_id: string;
32229
+ };
32230
+ Update: {
32231
+ created_at?: string;
32232
+ end_date?: string;
32233
+ id?: string;
32234
+ reason?: string | null;
32235
+ start_date?: string;
32236
+ status?: string;
32237
+ tenant_id?: string;
32238
+ updated_at?: string;
32239
+ user_id?: string;
32240
+ };
32241
+ Relationships: [{
32242
+ foreignKeyName: "leave_requests_user_id_fkey";
32243
+ columns: ["user_id"];
32244
+ isOneToOne: false;
32245
+ referencedRelation: "monteurs";
32246
+ referencedColumns: ["id"];
32247
+ }];
32248
+ };
30024
32249
  local_customer_agreements: {
30025
32250
  Row: {
30026
32251
  base_price: number | null;
@@ -30672,6 +32897,33 @@ export declare const upsertDeliveryLocation: import("@tanstack/start-client-core
30672
32897
  };
30673
32898
  Relationships: [];
30674
32899
  };
32900
+ module_permissions: {
32901
+ Row: {
32902
+ created_at: string;
32903
+ id: string;
32904
+ module_id: string;
32905
+ permission: string;
32906
+ role: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
32907
+ updated_at: string;
32908
+ };
32909
+ Insert: {
32910
+ created_at?: string;
32911
+ id?: string;
32912
+ module_id: string;
32913
+ permission: string;
32914
+ role: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
32915
+ updated_at?: string;
32916
+ };
32917
+ Update: {
32918
+ created_at?: string;
32919
+ id?: string;
32920
+ module_id?: string;
32921
+ permission?: string;
32922
+ role?: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
32923
+ updated_at?: string;
32924
+ };
32925
+ Relationships: [];
32926
+ };
30675
32927
  monteurs: {
30676
32928
  Row: {
30677
32929
  avatar_url: string | null;
@@ -31401,6 +33653,42 @@ export declare const upsertDeliveryLocation: import("@tanstack/start-client-core
31401
33653
  };
31402
33654
  Relationships: [];
31403
33655
  };
33656
+ order_buffers: {
33657
+ Row: {
33658
+ buffer_key: string;
33659
+ created_at: string;
33660
+ customer_id: string | null;
33661
+ grouping_mode: string;
33662
+ id: string;
33663
+ pickup_date: string | null;
33664
+ pickup_location: string | null;
33665
+ plan_locked_at: string | null;
33666
+ updated_at: string;
33667
+ };
33668
+ Insert: {
33669
+ buffer_key: string;
33670
+ created_at?: string;
33671
+ customer_id?: string | null;
33672
+ grouping_mode: string;
33673
+ id?: string;
33674
+ pickup_date?: string | null;
33675
+ pickup_location?: string | null;
33676
+ plan_locked_at?: string | null;
33677
+ updated_at?: string;
33678
+ };
33679
+ Update: {
33680
+ buffer_key?: string;
33681
+ created_at?: string;
33682
+ customer_id?: string | null;
33683
+ grouping_mode?: string;
33684
+ id?: string;
33685
+ pickup_date?: string | null;
33686
+ pickup_location?: string | null;
33687
+ plan_locked_at?: string | null;
33688
+ updated_at?: string;
33689
+ };
33690
+ Relationships: [];
33691
+ };
31404
33692
  order_cart_items: {
31405
33693
  Row: {
31406
33694
  cart_id: string;
@@ -31467,6 +33755,7 @@ export declare const upsertDeliveryLocation: import("@tanstack/start-client-core
31467
33755
  order_carts: {
31468
33756
  Row: {
31469
33757
  algorithm_version: number;
33758
+ buffer_id: string | null;
31470
33759
  cart_number: number;
31471
33760
  created_at: string;
31472
33761
  id: string;
@@ -31474,13 +33763,14 @@ export declare const upsertDeliveryLocation: import("@tanstack/start-client-core
31474
33763
  is_complete: boolean;
31475
33764
  notes: string | null;
31476
33765
  occupancy_pct: number;
31477
- order_id: string;
33766
+ order_id: string | null;
31478
33767
  source: string;
31479
33768
  total_layers_used: number;
31480
33769
  updated_at: string;
31481
33770
  };
31482
33771
  Insert: {
31483
33772
  algorithm_version?: number;
33773
+ buffer_id?: string | null;
31484
33774
  cart_number: number;
31485
33775
  created_at?: string;
31486
33776
  id?: string;
@@ -31488,13 +33778,14 @@ export declare const upsertDeliveryLocation: import("@tanstack/start-client-core
31488
33778
  is_complete?: boolean;
31489
33779
  notes?: string | null;
31490
33780
  occupancy_pct?: number;
31491
- order_id: string;
33781
+ order_id?: string | null;
31492
33782
  source?: string;
31493
33783
  total_layers_used?: number;
31494
33784
  updated_at?: string;
31495
33785
  };
31496
33786
  Update: {
31497
33787
  algorithm_version?: number;
33788
+ buffer_id?: string | null;
31498
33789
  cart_number?: number;
31499
33790
  created_at?: string;
31500
33791
  id?: string;
@@ -31502,12 +33793,18 @@ export declare const upsertDeliveryLocation: import("@tanstack/start-client-core
31502
33793
  is_complete?: boolean;
31503
33794
  notes?: string | null;
31504
33795
  occupancy_pct?: number;
31505
- order_id?: string;
33796
+ order_id?: string | null;
31506
33797
  source?: string;
31507
33798
  total_layers_used?: number;
31508
33799
  updated_at?: string;
31509
33800
  };
31510
33801
  Relationships: [{
33802
+ foreignKeyName: "order_carts_buffer_id_fkey";
33803
+ columns: ["buffer_id"];
33804
+ isOneToOne: false;
33805
+ referencedRelation: "order_buffers";
33806
+ referencedColumns: ["id"];
33807
+ }, {
31511
33808
  foreignKeyName: "order_carts_order_id_fkey";
31512
33809
  columns: ["order_id"];
31513
33810
  isOneToOne: false;
@@ -31644,15 +33941,117 @@ export declare const upsertDeliveryLocation: import("@tanstack/start-client-core
31644
33941
  };
31645
33942
  Relationships: [];
31646
33943
  };
33944
+ order_shipment_items: {
33945
+ Row: {
33946
+ created_at: string;
33947
+ id: string;
33948
+ order_item_id: string;
33949
+ product_id: string | null;
33950
+ product_name: string;
33951
+ quantity: number;
33952
+ shipment_id: string;
33953
+ updated_at: string;
33954
+ };
33955
+ Insert: {
33956
+ created_at?: string;
33957
+ id?: string;
33958
+ order_item_id: string;
33959
+ product_id?: string | null;
33960
+ product_name: string;
33961
+ quantity: number;
33962
+ shipment_id: string;
33963
+ updated_at?: string;
33964
+ };
33965
+ Update: {
33966
+ created_at?: string;
33967
+ id?: string;
33968
+ order_item_id?: string;
33969
+ product_id?: string | null;
33970
+ product_name?: string;
33971
+ quantity?: number;
33972
+ shipment_id?: string;
33973
+ updated_at?: string;
33974
+ };
33975
+ Relationships: [{
33976
+ foreignKeyName: "order_shipment_items_order_item_id_fkey";
33977
+ columns: ["order_item_id"];
33978
+ isOneToOne: false;
33979
+ referencedRelation: "order_items";
33980
+ referencedColumns: ["id"];
33981
+ }, {
33982
+ foreignKeyName: "order_shipment_items_shipment_id_fkey";
33983
+ columns: ["shipment_id"];
33984
+ isOneToOne: false;
33985
+ referencedRelation: "order_shipments";
33986
+ referencedColumns: ["id"];
33987
+ }];
33988
+ };
33989
+ order_shipments: {
33990
+ Row: {
33991
+ carrier_id: string | null;
33992
+ created_at: string;
33993
+ delivery_date: string | null;
33994
+ delivery_location_id: string | null;
33995
+ id: string;
33996
+ notes: string | null;
33997
+ order_id: string;
33998
+ shipment_number: number;
33999
+ shipped_at: string | null;
34000
+ status: string;
34001
+ updated_at: string;
34002
+ };
34003
+ Insert: {
34004
+ carrier_id?: string | null;
34005
+ created_at?: string;
34006
+ delivery_date?: string | null;
34007
+ delivery_location_id?: string | null;
34008
+ id?: string;
34009
+ notes?: string | null;
34010
+ order_id: string;
34011
+ shipment_number: number;
34012
+ shipped_at?: string | null;
34013
+ status?: string;
34014
+ updated_at?: string;
34015
+ };
34016
+ Update: {
34017
+ carrier_id?: string | null;
34018
+ created_at?: string;
34019
+ delivery_date?: string | null;
34020
+ delivery_location_id?: string | null;
34021
+ id?: string;
34022
+ notes?: string | null;
34023
+ order_id?: string;
34024
+ shipment_number?: number;
34025
+ shipped_at?: string | null;
34026
+ status?: string;
34027
+ updated_at?: string;
34028
+ };
34029
+ Relationships: [{
34030
+ foreignKeyName: "order_shipments_carrier_id_fkey";
34031
+ columns: ["carrier_id"];
34032
+ isOneToOne: false;
34033
+ referencedRelation: "carriers";
34034
+ referencedColumns: ["id"];
34035
+ }, {
34036
+ foreignKeyName: "order_shipments_order_id_fkey";
34037
+ columns: ["order_id"];
34038
+ isOneToOne: false;
34039
+ referencedRelation: "orders";
34040
+ referencedColumns: ["id"];
34041
+ }];
34042
+ };
31647
34043
  orders: {
31648
34044
  Row: {
34045
+ buffer_id: string | null;
31649
34046
  created_at: string;
31650
34047
  custom_fields: import("../integrations/supabase/types").Json;
31651
34048
  customer_id: string | null;
31652
34049
  customer_name: string;
31653
34050
  deleted_at: string | null;
31654
- delivery_date: string;
34051
+ delivery_date: string | null;
34052
+ floriday_sales_order_id: string | null;
31655
34053
  id: string;
34054
+ is_reservation: boolean;
31656
34055
  notes: string | null;
31657
34056
  order_date: string;
31658
34057
  order_number: string;
@@ -31664,13 +34063,16 @@ export declare const upsertDeliveryLocation: import("@tanstack/start-client-core
31664
34063
  updated_at: string;
31665
34064
  };
31666
34065
  Insert: {
34066
+ buffer_id?: string | null;
31667
34067
  created_at?: string;
31668
34068
  custom_fields?: import("../integrations/supabase/types").Json;
31669
34069
  customer_id?: string | null;
31670
34070
  customer_name?: string;
31671
34071
  deleted_at?: string | null;
31672
- delivery_date: string;
34072
+ delivery_date?: string | null;
34073
+ floriday_sales_order_id?: string | null;
31673
34074
  id?: string;
34075
+ is_reservation?: boolean;
31674
34076
  notes?: string | null;
31675
34077
  order_date?: string;
31676
34078
  order_number: string;
@@ -31682,13 +34084,16 @@ export declare const upsertDeliveryLocation: import("@tanstack/start-client-core
31682
34084
  updated_at?: string;
31683
34085
  };
31684
34086
  Update: {
34087
+ buffer_id?: string | null;
31685
34088
  created_at?: string;
31686
34089
  custom_fields?: import("../integrations/supabase/types").Json;
31687
34090
  customer_id?: string | null;
31688
34091
  customer_name?: string;
31689
34092
  deleted_at?: string | null;
31690
- delivery_date?: string;
34093
+ delivery_date?: string | null;
34094
+ floriday_sales_order_id?: string | null;
31691
34095
  id?: string;
34096
+ is_reservation?: boolean;
31692
34097
  notes?: string | null;
31693
34098
  order_date?: string;
31694
34099
  order_number?: string;
@@ -31700,6 +34105,12 @@ export declare const upsertDeliveryLocation: import("@tanstack/start-client-core
31700
34105
  updated_at?: string;
31701
34106
  };
31702
34107
  Relationships: [{
34108
+ foreignKeyName: "orders_buffer_id_fkey";
34109
+ columns: ["buffer_id"];
34110
+ isOneToOne: false;
34111
+ referencedRelation: "order_buffers";
34112
+ referencedColumns: ["id"];
34113
+ }, {
31703
34114
  foreignKeyName: "orders_customer_id_fkey";
31704
34115
  columns: ["customer_id"];
31705
34116
  isOneToOne: false;
@@ -31963,6 +34374,8 @@ export declare const upsertDeliveryLocation: import("@tanstack/start-client-core
31963
34374
  Row: {
31964
34375
  created_at: string;
31965
34376
  description: string | null;
34377
+ head_product_id: string | null;
34378
+ head_trade_item_floriday_id: string | null;
31966
34379
  id: string;
31967
34380
  is_active: boolean;
31968
34381
  name: string;
@@ -31972,6 +34385,8 @@ export declare const upsertDeliveryLocation: import("@tanstack/start-client-core
31972
34385
  Insert: {
31973
34386
  created_at?: string;
31974
34387
  description?: string | null;
34388
+ head_product_id?: string | null;
34389
+ head_trade_item_floriday_id?: string | null;
31975
34390
  id?: string;
31976
34391
  is_active?: boolean;
31977
34392
  name: string;
@@ -31981,13 +34396,21 @@ export declare const upsertDeliveryLocation: import("@tanstack/start-client-core
31981
34396
  Update: {
31982
34397
  created_at?: string;
31983
34398
  description?: string | null;
34399
+ head_product_id?: string | null;
34400
+ head_trade_item_floriday_id?: string | null;
31984
34401
  id?: string;
31985
34402
  is_active?: boolean;
31986
34403
  name?: string;
31987
34404
  tenant_id?: string;
31988
34405
  updated_at?: string;
31989
34406
  };
31990
- Relationships: [];
34407
+ Relationships: [{
34408
+ foreignKeyName: "product_groups_head_product_id_fkey";
34409
+ columns: ["head_product_id"];
34410
+ isOneToOne: false;
34411
+ referencedRelation: "products";
34412
+ referencedColumns: ["id"];
34413
+ }];
31991
34414
  };
31992
34415
  products: {
31993
34416
  Row: {
@@ -34538,6 +36961,7 @@ export declare const upsertDeliveryLocation: import("@tanstack/start-client-core
34538
36961
  internal_notes: string | null;
34539
36962
  parent_werkbon_id: string | null;
34540
36963
  parsed_payload: import("../integrations/supabase/types").Json | null;
36964
+ planning_status: string;
34541
36965
  project_number: string | null;
34542
36966
  room_number: string | null;
34543
36967
  scheduled_end_time: string | null;
@@ -34545,6 +36969,7 @@ export declare const upsertDeliveryLocation: import("@tanstack/start-client-core
34545
36969
  sequence_number: number;
34546
36970
  source_pdf_path: string | null;
34547
36971
  status: string;
36972
+ technician_id: string | null;
34548
36973
  technician_notes: string | null;
34549
36974
  technician_notes_raw: string | null;
34550
36975
  technician_task_description: string | null;
@@ -34565,6 +36990,7 @@ export declare const upsertDeliveryLocation: import("@tanstack/start-client-core
34565
36990
  internal_notes?: string | null;
34566
36991
  parent_werkbon_id?: string | null;
34567
36992
  parsed_payload?: import("../integrations/supabase/types").Json | null;
36993
+ planning_status?: string;
34568
36994
  project_number?: string | null;
34569
36995
  room_number?: string | null;
34570
36996
  scheduled_end_time?: string | null;
@@ -34572,6 +36998,7 @@ export declare const upsertDeliveryLocation: import("@tanstack/start-client-core
34572
36998
  sequence_number: number;
34573
36999
  source_pdf_path?: string | null;
34574
37000
  status?: string;
37001
+ technician_id?: string | null;
34575
37002
  technician_notes?: string | null;
34576
37003
  technician_notes_raw?: string | null;
34577
37004
  technician_task_description?: string | null;
@@ -34592,6 +37019,7 @@ export declare const upsertDeliveryLocation: import("@tanstack/start-client-core
34592
37019
  internal_notes?: string | null;
34593
37020
  parent_werkbon_id?: string | null;
34594
37021
  parsed_payload?: import("../integrations/supabase/types").Json | null;
37022
+ planning_status?: string;
34595
37023
  project_number?: string | null;
34596
37024
  room_number?: string | null;
34597
37025
  scheduled_end_time?: string | null;
@@ -34599,6 +37027,7 @@ export declare const upsertDeliveryLocation: import("@tanstack/start-client-core
34599
37027
  sequence_number?: number;
34600
37028
  source_pdf_path?: string | null;
34601
37029
  status?: string;
37030
+ technician_id?: string | null;
34602
37031
  technician_notes?: string | null;
34603
37032
  technician_notes_raw?: string | null;
34604
37033
  technician_task_description?: string | null;
@@ -34607,17 +37036,17 @@ export declare const upsertDeliveryLocation: import("@tanstack/start-client-core
34607
37036
  work_address?: string | null;
34608
37037
  };
34609
37038
  Relationships: [{
34610
- foreignKeyName: "werkbonnen_customer_id_fkey";
34611
- columns: ["customer_id"];
34612
- isOneToOne: false;
34613
- referencedRelation: "customers";
34614
- referencedColumns: ["id"];
34615
- }, {
34616
37039
  foreignKeyName: "werkbonnen_parent_werkbon_id_fkey";
34617
37040
  columns: ["parent_werkbon_id"];
34618
37041
  isOneToOne: false;
34619
37042
  referencedRelation: "werkbonnen";
34620
37043
  referencedColumns: ["id"];
37044
+ }, {
37045
+ foreignKeyName: "werkbonnen_technician_id_fkey";
37046
+ columns: ["technician_id"];
37047
+ isOneToOne: false;
37048
+ referencedRelation: "monteurs";
37049
+ referencedColumns: ["id"];
34621
37050
  }];
34622
37051
  };
34623
37052
  work_order_monteurs: {
@@ -35336,6 +37765,21 @@ export declare const upsertDeliveryLocation: import("@tanstack/start-client-core
35336
37765
  };
35337
37766
  Returns: string;
35338
37767
  };
37768
+ ai_usage_by_module: {
37769
+ Args: {
37770
+ _from: string;
37771
+ _to: string;
37772
+ };
37773
+ Returns: {
37774
+ calls: number;
37775
+ consumer_module_id: string;
37776
+ cost_usd: number;
37777
+ errors: number;
37778
+ input_tokens: number;
37779
+ output_tokens: number;
37780
+ total_tokens: number;
37781
+ }[];
37782
+ };
35339
37783
  apply_stock_consumption: {
35340
37784
  Args: {
35341
37785
  p_order_id: string;
@@ -35484,6 +37928,12 @@ export declare const upsertDeliveryLocation: import("@tanstack/start-client-core
35484
37928
  Args: never;
35485
37929
  Returns: string;
35486
37930
  };
37931
+ custom_access_token_hook: {
37932
+ Args: {
37933
+ event: import("../integrations/supabase/types").Json;
37934
+ };
37935
+ Returns: import("../integrations/supabase/types").Json;
37936
+ };
35487
37937
  dashboard_alert_counts: {
35488
37938
  Args: never;
35489
37939
  Returns: import("../integrations/supabase/types").Json;
@@ -35819,6 +38269,14 @@ export declare const upsertDeliveryLocation: import("@tanstack/start-client-core
35819
38269
  };
35820
38270
  Returns: string;
35821
38271
  };
38272
+ has_module_permission: {
38273
+ Args: {
38274
+ _min: string;
38275
+ _module_id: string;
38276
+ _user_id: string;
38277
+ };
38278
+ Returns: boolean;
38279
+ };
35822
38280
  has_role: {
35823
38281
  Args: {
35824
38282
  _role: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
@@ -35844,6 +38302,20 @@ export declare const upsertDeliveryLocation: import("@tanstack/start-client-core
35844
38302
  };
35845
38303
  Returns: boolean;
35846
38304
  };
38305
+ jwt_has_role: {
38306
+ Args: {
38307
+ _role: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
38308
+ };
38309
+ Returns: boolean;
38310
+ };
38311
+ list_monteurs: {
38312
+ Args: never;
38313
+ Returns: {
38314
+ display_name: string;
38315
+ email: string;
38316
+ user_id: string;
38317
+ }[];
38318
+ };
35847
38319
  local_effective_price: {
35848
38320
  Args: {
35849
38321
  _customer_id: string;
@@ -35860,6 +38332,22 @@ export declare const upsertDeliveryLocation: import("@tanstack/start-client-core
35860
38332
  source_id: string;
35861
38333
  }[];
35862
38334
  };
38335
+ log_ai_call: {
38336
+ Args: {
38337
+ _consumer_module_id: string;
38338
+ _cost_usd: number;
38339
+ _duration_ms: number;
38340
+ _error_code: string;
38341
+ _error_message: string;
38342
+ _input_tokens: number;
38343
+ _model_slug: string;
38344
+ _output_tokens: number;
38345
+ _provider_slug: string;
38346
+ _status: string;
38347
+ _total_tokens: number;
38348
+ };
38349
+ Returns: string;
38350
+ };
35863
38351
  mark_offer_clicked: {
35864
38352
  Args: {
35865
38353
  p_code: string;
@@ -35872,6 +38360,12 @@ export declare const upsertDeliveryLocation: import("@tanstack/start-client-core
35872
38360
  };
35873
38361
  Returns: undefined;
35874
38362
  };
38363
+ mark_shipment_shipped: {
38364
+ Args: {
38365
+ p_shipment_id: string;
38366
+ };
38367
+ Returns: undefined;
38368
+ };
35875
38369
  next_order_number: {
35876
38370
  Args: {
35877
38371
  p_prefix: string;
@@ -36348,9 +38842,11 @@ export declare const upsertDeliveryLocation: import("@tanstack/start-client-core
36348
38842
  };
36349
38843
  };
36350
38844
  Enums: {
36351
- app_role: "admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie" | "monteur";
38845
+ app_role: "admin" | "planner" | "monteur" | "administratie" | "ai_admin";
36352
38846
  exact_env: "staging" | "live";
36353
38847
  exact_push_status: "pending" | "sent" | "error";
38848
+ itk_customer_segment: "Business" | "Private";
38849
+ itk_dynamic_field_type: "text" | "select" | "date" | "checkbox";
36354
38850
  quote_status: "concept" | "verzonden" | "bekeken" | "in_behandeling" | "geaccepteerd" | "afgewezen" | "verlopen" | "gearchiveerd";
36355
38851
  };
36356
38852
  CompositeTypes: { [_ in never]: never; };
@@ -36675,6 +39171,57 @@ export declare const deleteDeliveryLocation: import("@tanstack/start-client-core
36675
39171
  referencedColumns: ["id"];
36676
39172
  }];
36677
39173
  };
39174
+ ai_call_log: {
39175
+ Row: {
39176
+ consumer_module_id: string;
39177
+ cost_usd: number | null;
39178
+ created_at: string;
39179
+ created_by: string | null;
39180
+ duration_ms: number | null;
39181
+ error_code: string | null;
39182
+ error_message: string | null;
39183
+ id: string;
39184
+ input_tokens: number;
39185
+ model_slug: string | null;
39186
+ output_tokens: number;
39187
+ provider_slug: string | null;
39188
+ status: string;
39189
+ total_tokens: number;
39190
+ };
39191
+ Insert: {
39192
+ consumer_module_id: string;
39193
+ cost_usd?: number | null;
39194
+ created_at?: string;
39195
+ created_by?: string | null;
39196
+ duration_ms?: number | null;
39197
+ error_code?: string | null;
39198
+ error_message?: string | null;
39199
+ id?: string;
39200
+ input_tokens?: number;
39201
+ model_slug?: string | null;
39202
+ output_tokens?: number;
39203
+ provider_slug?: string | null;
39204
+ status: string;
39205
+ total_tokens?: number;
39206
+ };
39207
+ Update: {
39208
+ consumer_module_id?: string;
39209
+ cost_usd?: number | null;
39210
+ created_at?: string;
39211
+ created_by?: string | null;
39212
+ duration_ms?: number | null;
39213
+ error_code?: string | null;
39214
+ error_message?: string | null;
39215
+ id?: string;
39216
+ input_tokens?: number;
39217
+ model_slug?: string | null;
39218
+ output_tokens?: number;
39219
+ provider_slug?: string | null;
39220
+ status?: string;
39221
+ total_tokens?: number;
39222
+ };
39223
+ Relationships: [];
39224
+ };
36678
39225
  ai_credentials: {
36679
39226
  Row: {
36680
39227
  active: boolean;
@@ -36711,6 +39258,36 @@ export declare const deleteDeliveryLocation: import("@tanstack/start-client-core
36711
39258
  referencedColumns: ["id"];
36712
39259
  }];
36713
39260
  };
39261
+ ai_goals: {
39262
+ Row: {
39263
+ active: boolean;
39264
+ created_at: string;
39265
+ description: string | null;
39266
+ key: string;
39267
+ label: string;
39268
+ sort_order: number;
39269
+ updated_at: string;
39270
+ };
39271
+ Insert: {
39272
+ active?: boolean;
39273
+ created_at?: string;
39274
+ description?: string | null;
39275
+ key: string;
39276
+ label: string;
39277
+ sort_order?: number;
39278
+ updated_at?: string;
39279
+ };
39280
+ Update: {
39281
+ active?: boolean;
39282
+ created_at?: string;
39283
+ description?: string | null;
39284
+ key?: string;
39285
+ label?: string;
39286
+ sort_order?: number;
39287
+ updated_at?: string;
39288
+ };
39289
+ Relationships: [];
39290
+ };
36714
39291
  ai_model_pricing: {
36715
39292
  Row: {
36716
39293
  created_at: string;
@@ -37497,6 +40074,141 @@ export declare const deleteDeliveryLocation: import("@tanstack/start-client-core
37497
40074
  };
37498
40075
  Relationships: [];
37499
40076
  };
40077
+ cart_planning_pick_times: {
40078
+ Row: {
40079
+ created_at: string;
40080
+ id: string;
40081
+ pot_size: string;
40082
+ seconds_per_cart: number;
40083
+ updated_at: string;
40084
+ };
40085
+ Insert: {
40086
+ created_at?: string;
40087
+ id?: string;
40088
+ pot_size: string;
40089
+ seconds_per_cart: number;
40090
+ updated_at?: string;
40091
+ };
40092
+ Update: {
40093
+ created_at?: string;
40094
+ id?: string;
40095
+ pot_size?: string;
40096
+ seconds_per_cart?: number;
40097
+ updated_at?: string;
40098
+ };
40099
+ Relationships: [];
40100
+ };
40101
+ cart_planning_product_overrides: {
40102
+ Row: {
40103
+ created_at: string;
40104
+ id: string;
40105
+ max_party_share_per_layer_pct_override: number | null;
40106
+ never_mix: boolean;
40107
+ notes: string | null;
40108
+ product_id: string;
40109
+ updated_at: string;
40110
+ };
40111
+ Insert: {
40112
+ created_at?: string;
40113
+ id?: string;
40114
+ max_party_share_per_layer_pct_override?: number | null;
40115
+ never_mix?: boolean;
40116
+ notes?: string | null;
40117
+ product_id: string;
40118
+ updated_at?: string;
40119
+ };
40120
+ Update: {
40121
+ created_at?: string;
40122
+ id?: string;
40123
+ max_party_share_per_layer_pct_override?: number | null;
40124
+ never_mix?: boolean;
40125
+ notes?: string | null;
40126
+ product_id?: string;
40127
+ updated_at?: string;
40128
+ };
40129
+ Relationships: [{
40130
+ foreignKeyName: "cart_planning_product_overrides_product_id_fkey";
40131
+ columns: ["product_id"];
40132
+ isOneToOne: true;
40133
+ referencedRelation: "products";
40134
+ referencedColumns: ["id"];
40135
+ }];
40136
+ };
40137
+ cart_planning_settings: {
40138
+ Row: {
40139
+ allow_editing_after_pickstation_send: boolean;
40140
+ buffer_grouping_mode: string;
40141
+ combine_floriday_orders: boolean;
40142
+ combine_floriday_orders_window: string;
40143
+ combine_orders_scope: string;
40144
+ default_workers: number;
40145
+ id: number;
40146
+ max_beladingen_per_layer: number;
40147
+ max_customers_per_cart: number;
40148
+ max_one_customer_per_layer: boolean;
40149
+ max_party_share_per_layer_pct: number;
40150
+ optimization_strategy: string;
40151
+ own_cart_from_layers: number;
40152
+ pick_time_mode: string;
40153
+ plants_per_day: number;
40154
+ plants_per_hour: number;
40155
+ require_same_carrier: boolean;
40156
+ require_same_crate_type: boolean;
40157
+ require_same_delivery_date: boolean;
40158
+ require_same_delivery_location: boolean;
40159
+ updated_at: string;
40160
+ updated_by: string | null;
40161
+ };
40162
+ Insert: {
40163
+ allow_editing_after_pickstation_send?: boolean;
40164
+ buffer_grouping_mode?: string;
40165
+ combine_floriday_orders?: boolean;
40166
+ combine_floriday_orders_window?: string;
40167
+ combine_orders_scope?: string;
40168
+ default_workers?: number;
40169
+ id?: number;
40170
+ max_beladingen_per_layer?: number;
40171
+ max_customers_per_cart?: number;
40172
+ max_one_customer_per_layer?: boolean;
40173
+ max_party_share_per_layer_pct?: number;
40174
+ optimization_strategy?: string;
40175
+ own_cart_from_layers?: number;
40176
+ pick_time_mode?: string;
40177
+ plants_per_day?: number;
40178
+ plants_per_hour?: number;
40179
+ require_same_carrier?: boolean;
40180
+ require_same_crate_type?: boolean;
40181
+ require_same_delivery_date?: boolean;
40182
+ require_same_delivery_location?: boolean;
40183
+ updated_at?: string;
40184
+ updated_by?: string | null;
40185
+ };
40186
+ Update: {
40187
+ allow_editing_after_pickstation_send?: boolean;
40188
+ buffer_grouping_mode?: string;
40189
+ combine_floriday_orders?: boolean;
40190
+ combine_floriday_orders_window?: string;
40191
+ combine_orders_scope?: string;
40192
+ default_workers?: number;
40193
+ id?: number;
40194
+ max_beladingen_per_layer?: number;
40195
+ max_customers_per_cart?: number;
40196
+ max_one_customer_per_layer?: boolean;
40197
+ max_party_share_per_layer_pct?: number;
40198
+ optimization_strategy?: string;
40199
+ own_cart_from_layers?: number;
40200
+ pick_time_mode?: string;
40201
+ plants_per_day?: number;
40202
+ plants_per_hour?: number;
40203
+ require_same_carrier?: boolean;
40204
+ require_same_crate_type?: boolean;
40205
+ require_same_delivery_date?: boolean;
40206
+ require_same_delivery_location?: boolean;
40207
+ updated_at?: string;
40208
+ updated_by?: string | null;
40209
+ };
40210
+ Relationships: [];
40211
+ };
37500
40212
  cart_replan_queue: {
37501
40213
  Row: {
37502
40214
  attempts: number;
@@ -37527,6 +40239,39 @@ export declare const deleteDeliveryLocation: import("@tanstack/start-client-core
37527
40239
  referencedColumns: ["id"];
37528
40240
  }];
37529
40241
  };
40242
+ cart_types: {
40243
+ Row: {
40244
+ created_at: string;
40245
+ id: string;
40246
+ is_default: boolean;
40247
+ layer_length_cm: number;
40248
+ layer_width_cm: number;
40249
+ layers_per_cart: number;
40250
+ name: string;
40251
+ updated_at: string;
40252
+ };
40253
+ Insert: {
40254
+ created_at?: string;
40255
+ id?: string;
40256
+ is_default?: boolean;
40257
+ layer_length_cm: number;
40258
+ layer_width_cm: number;
40259
+ layers_per_cart?: number;
40260
+ name: string;
40261
+ updated_at?: string;
40262
+ };
40263
+ Update: {
40264
+ created_at?: string;
40265
+ id?: string;
40266
+ is_default?: boolean;
40267
+ layer_length_cm?: number;
40268
+ layer_width_cm?: number;
40269
+ layers_per_cart?: number;
40270
+ name?: string;
40271
+ updated_at?: string;
40272
+ };
40273
+ Relationships: [];
40274
+ };
37530
40275
  catalog_articles_cache: {
37531
40276
  Row: {
37532
40277
  created_at: string;
@@ -37614,6 +40359,36 @@ export declare const deleteDeliveryLocation: import("@tanstack/start-client-core
37614
40359
  };
37615
40360
  Relationships: [];
37616
40361
  };
40362
+ crate_types: {
40363
+ Row: {
40364
+ created_at: string;
40365
+ id: string;
40366
+ length_cm: number;
40367
+ name: string;
40368
+ plants_per_crate: number;
40369
+ updated_at: string;
40370
+ width_cm: number;
40371
+ };
40372
+ Insert: {
40373
+ created_at?: string;
40374
+ id?: string;
40375
+ length_cm: number;
40376
+ name: string;
40377
+ plants_per_crate?: number;
40378
+ updated_at?: string;
40379
+ width_cm: number;
40380
+ };
40381
+ Update: {
40382
+ created_at?: string;
40383
+ id?: string;
40384
+ length_cm?: number;
40385
+ name?: string;
40386
+ plants_per_crate?: number;
40387
+ updated_at?: string;
40388
+ width_cm?: number;
40389
+ };
40390
+ Relationships: [];
40391
+ };
37617
40392
  customer_audit_log: {
37618
40393
  Row: {
37619
40394
  action: string;
@@ -42153,6 +44928,288 @@ export declare const deleteDeliveryLocation: import("@tanstack/start-client-core
42153
44928
  };
42154
44929
  Relationships: [];
42155
44930
  };
44931
+ itk_contact_persons: {
44932
+ Row: {
44933
+ created_at: string;
44934
+ customer_id: string;
44935
+ email: string | null;
44936
+ id: string;
44937
+ name: string;
44938
+ phone: string | null;
44939
+ role: string | null;
44940
+ updated_at: string;
44941
+ };
44942
+ Insert: {
44943
+ created_at?: string;
44944
+ customer_id: string;
44945
+ email?: string | null;
44946
+ id?: string;
44947
+ name: string;
44948
+ phone?: string | null;
44949
+ role?: string | null;
44950
+ updated_at?: string;
44951
+ };
44952
+ Update: {
44953
+ created_at?: string;
44954
+ customer_id?: string;
44955
+ email?: string | null;
44956
+ id?: string;
44957
+ name?: string;
44958
+ phone?: string | null;
44959
+ role?: string | null;
44960
+ updated_at?: string;
44961
+ };
44962
+ Relationships: [{
44963
+ foreignKeyName: "itk_contact_persons_customer_id_fkey";
44964
+ columns: ["customer_id"];
44965
+ isOneToOne: false;
44966
+ referencedRelation: "itk_customers";
44967
+ referencedColumns: ["id"];
44968
+ }];
44969
+ };
44970
+ itk_customer_dynamic_values: {
44971
+ Row: {
44972
+ created_at: string;
44973
+ customer_id: string;
44974
+ field_id: string;
44975
+ id: string;
44976
+ updated_at: string;
44977
+ value: string | null;
44978
+ };
44979
+ Insert: {
44980
+ created_at?: string;
44981
+ customer_id: string;
44982
+ field_id: string;
44983
+ id?: string;
44984
+ updated_at?: string;
44985
+ value?: string | null;
44986
+ };
44987
+ Update: {
44988
+ created_at?: string;
44989
+ customer_id?: string;
44990
+ field_id?: string;
44991
+ id?: string;
44992
+ updated_at?: string;
44993
+ value?: string | null;
44994
+ };
44995
+ Relationships: [{
44996
+ foreignKeyName: "itk_customer_dynamic_values_customer_id_fkey";
44997
+ columns: ["customer_id"];
44998
+ isOneToOne: false;
44999
+ referencedRelation: "itk_customers";
45000
+ referencedColumns: ["id"];
45001
+ }, {
45002
+ foreignKeyName: "itk_customer_dynamic_values_field_id_fkey";
45003
+ columns: ["field_id"];
45004
+ isOneToOne: false;
45005
+ referencedRelation: "itk_dynamic_fields";
45006
+ referencedColumns: ["id"];
45007
+ }];
45008
+ };
45009
+ itk_customer_notes: {
45010
+ Row: {
45011
+ body: string;
45012
+ created_at: string;
45013
+ created_by: string | null;
45014
+ customer_id: string;
45015
+ id: string;
45016
+ note_type: string;
45017
+ updated_at: string;
45018
+ };
45019
+ Insert: {
45020
+ body: string;
45021
+ created_at?: string;
45022
+ created_by?: string | null;
45023
+ customer_id: string;
45024
+ id?: string;
45025
+ note_type?: string;
45026
+ updated_at?: string;
45027
+ };
45028
+ Update: {
45029
+ body?: string;
45030
+ created_at?: string;
45031
+ created_by?: string | null;
45032
+ customer_id?: string;
45033
+ id?: string;
45034
+ note_type?: string;
45035
+ updated_at?: string;
45036
+ };
45037
+ Relationships: [{
45038
+ foreignKeyName: "itk_customer_notes_customer_id_fkey";
45039
+ columns: ["customer_id"];
45040
+ isOneToOne: false;
45041
+ referencedRelation: "itk_customers";
45042
+ referencedColumns: ["id"];
45043
+ }];
45044
+ };
45045
+ itk_customers: {
45046
+ Row: {
45047
+ billing_city: string | null;
45048
+ billing_postcode: string | null;
45049
+ billing_street: string | null;
45050
+ created_at: string;
45051
+ general_email: string | null;
45052
+ general_phone: string | null;
45053
+ id: string;
45054
+ legacy_customer_id: string | null;
45055
+ name: string;
45056
+ segment: import("../integrations/supabase/types").Database["public"]["Enums"]["itk_customer_segment"];
45057
+ updated_at: string;
45058
+ };
45059
+ Insert: {
45060
+ billing_city?: string | null;
45061
+ billing_postcode?: string | null;
45062
+ billing_street?: string | null;
45063
+ created_at?: string;
45064
+ general_email?: string | null;
45065
+ general_phone?: string | null;
45066
+ id?: string;
45067
+ legacy_customer_id?: string | null;
45068
+ name: string;
45069
+ segment?: import("../integrations/supabase/types").Database["public"]["Enums"]["itk_customer_segment"];
45070
+ updated_at?: string;
45071
+ };
45072
+ Update: {
45073
+ billing_city?: string | null;
45074
+ billing_postcode?: string | null;
45075
+ billing_street?: string | null;
45076
+ created_at?: string;
45077
+ general_email?: string | null;
45078
+ general_phone?: string | null;
45079
+ id?: string;
45080
+ legacy_customer_id?: string | null;
45081
+ name?: string;
45082
+ segment?: import("../integrations/supabase/types").Database["public"]["Enums"]["itk_customer_segment"];
45083
+ updated_at?: string;
45084
+ };
45085
+ Relationships: [{
45086
+ foreignKeyName: "itk_customers_legacy_customer_id_fkey";
45087
+ columns: ["legacy_customer_id"];
45088
+ isOneToOne: false;
45089
+ referencedRelation: "customers";
45090
+ referencedColumns: ["id"];
45091
+ }];
45092
+ };
45093
+ itk_dynamic_fields: {
45094
+ Row: {
45095
+ created_at: string;
45096
+ field_name: string;
45097
+ field_type: import("../integrations/supabase/types").Database["public"]["Enums"]["itk_dynamic_field_type"];
45098
+ id: string;
45099
+ options: import("../integrations/supabase/types").Json;
45100
+ sort_order: number;
45101
+ updated_at: string;
45102
+ };
45103
+ Insert: {
45104
+ created_at?: string;
45105
+ field_name: string;
45106
+ field_type?: import("../integrations/supabase/types").Database["public"]["Enums"]["itk_dynamic_field_type"];
45107
+ id?: string;
45108
+ options?: import("../integrations/supabase/types").Json;
45109
+ sort_order?: number;
45110
+ updated_at?: string;
45111
+ };
45112
+ Update: {
45113
+ created_at?: string;
45114
+ field_name?: string;
45115
+ field_type?: import("../integrations/supabase/types").Database["public"]["Enums"]["itk_dynamic_field_type"];
45116
+ id?: string;
45117
+ options?: import("../integrations/supabase/types").Json;
45118
+ sort_order?: number;
45119
+ updated_at?: string;
45120
+ };
45121
+ Relationships: [];
45122
+ };
45123
+ itk_work_locations: {
45124
+ Row: {
45125
+ city: string | null;
45126
+ created_at: string;
45127
+ customer_id: string;
45128
+ id: string;
45129
+ instructions: string | null;
45130
+ label: string;
45131
+ latitude: number | null;
45132
+ longitude: number | null;
45133
+ postcode: string | null;
45134
+ street: string | null;
45135
+ updated_at: string;
45136
+ };
45137
+ Insert: {
45138
+ city?: string | null;
45139
+ created_at?: string;
45140
+ customer_id: string;
45141
+ id?: string;
45142
+ instructions?: string | null;
45143
+ label: string;
45144
+ latitude?: number | null;
45145
+ longitude?: number | null;
45146
+ postcode?: string | null;
45147
+ street?: string | null;
45148
+ updated_at?: string;
45149
+ };
45150
+ Update: {
45151
+ city?: string | null;
45152
+ created_at?: string;
45153
+ customer_id?: string;
45154
+ id?: string;
45155
+ instructions?: string | null;
45156
+ label?: string;
45157
+ latitude?: number | null;
45158
+ longitude?: number | null;
45159
+ postcode?: string | null;
45160
+ street?: string | null;
45161
+ updated_at?: string;
45162
+ };
45163
+ Relationships: [{
45164
+ foreignKeyName: "itk_work_locations_customer_id_fkey";
45165
+ columns: ["customer_id"];
45166
+ isOneToOne: false;
45167
+ referencedRelation: "itk_customers";
45168
+ referencedColumns: ["id"];
45169
+ }];
45170
+ };
45171
+ leave_requests: {
45172
+ Row: {
45173
+ created_at: string;
45174
+ end_date: string;
45175
+ id: string;
45176
+ reason: string | null;
45177
+ start_date: string;
45178
+ status: string;
45179
+ tenant_id: string;
45180
+ updated_at: string;
45181
+ user_id: string;
45182
+ };
45183
+ Insert: {
45184
+ created_at?: string;
45185
+ end_date: string;
45186
+ id?: string;
45187
+ reason?: string | null;
45188
+ start_date: string;
45189
+ status?: string;
45190
+ tenant_id?: string;
45191
+ updated_at?: string;
45192
+ user_id: string;
45193
+ };
45194
+ Update: {
45195
+ created_at?: string;
45196
+ end_date?: string;
45197
+ id?: string;
45198
+ reason?: string | null;
45199
+ start_date?: string;
45200
+ status?: string;
45201
+ tenant_id?: string;
45202
+ updated_at?: string;
45203
+ user_id?: string;
45204
+ };
45205
+ Relationships: [{
45206
+ foreignKeyName: "leave_requests_user_id_fkey";
45207
+ columns: ["user_id"];
45208
+ isOneToOne: false;
45209
+ referencedRelation: "monteurs";
45210
+ referencedColumns: ["id"];
45211
+ }];
45212
+ };
42156
45213
  local_customer_agreements: {
42157
45214
  Row: {
42158
45215
  base_price: number | null;
@@ -42804,6 +45861,33 @@ export declare const deleteDeliveryLocation: import("@tanstack/start-client-core
42804
45861
  };
42805
45862
  Relationships: [];
42806
45863
  };
45864
+ module_permissions: {
45865
+ Row: {
45866
+ created_at: string;
45867
+ id: string;
45868
+ module_id: string;
45869
+ permission: string;
45870
+ role: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
45871
+ updated_at: string;
45872
+ };
45873
+ Insert: {
45874
+ created_at?: string;
45875
+ id?: string;
45876
+ module_id: string;
45877
+ permission: string;
45878
+ role: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
45879
+ updated_at?: string;
45880
+ };
45881
+ Update: {
45882
+ created_at?: string;
45883
+ id?: string;
45884
+ module_id?: string;
45885
+ permission?: string;
45886
+ role?: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
45887
+ updated_at?: string;
45888
+ };
45889
+ Relationships: [];
45890
+ };
42807
45891
  monteurs: {
42808
45892
  Row: {
42809
45893
  avatar_url: string | null;
@@ -43533,6 +46617,42 @@ export declare const deleteDeliveryLocation: import("@tanstack/start-client-core
43533
46617
  };
43534
46618
  Relationships: [];
43535
46619
  };
46620
+ order_buffers: {
46621
+ Row: {
46622
+ buffer_key: string;
46623
+ created_at: string;
46624
+ customer_id: string | null;
46625
+ grouping_mode: string;
46626
+ id: string;
46627
+ pickup_date: string | null;
46628
+ pickup_location: string | null;
46629
+ plan_locked_at: string | null;
46630
+ updated_at: string;
46631
+ };
46632
+ Insert: {
46633
+ buffer_key: string;
46634
+ created_at?: string;
46635
+ customer_id?: string | null;
46636
+ grouping_mode: string;
46637
+ id?: string;
46638
+ pickup_date?: string | null;
46639
+ pickup_location?: string | null;
46640
+ plan_locked_at?: string | null;
46641
+ updated_at?: string;
46642
+ };
46643
+ Update: {
46644
+ buffer_key?: string;
46645
+ created_at?: string;
46646
+ customer_id?: string | null;
46647
+ grouping_mode?: string;
46648
+ id?: string;
46649
+ pickup_date?: string | null;
46650
+ pickup_location?: string | null;
46651
+ plan_locked_at?: string | null;
46652
+ updated_at?: string;
46653
+ };
46654
+ Relationships: [];
46655
+ };
43536
46656
  order_cart_items: {
43537
46657
  Row: {
43538
46658
  cart_id: string;
@@ -43599,6 +46719,7 @@ export declare const deleteDeliveryLocation: import("@tanstack/start-client-core
43599
46719
  order_carts: {
43600
46720
  Row: {
43601
46721
  algorithm_version: number;
46722
+ buffer_id: string | null;
43602
46723
  cart_number: number;
43603
46724
  created_at: string;
43604
46725
  id: string;
@@ -43606,13 +46727,14 @@ export declare const deleteDeliveryLocation: import("@tanstack/start-client-core
43606
46727
  is_complete: boolean;
43607
46728
  notes: string | null;
43608
46729
  occupancy_pct: number;
43609
- order_id: string;
46730
+ order_id: string | null;
43610
46731
  source: string;
43611
46732
  total_layers_used: number;
43612
46733
  updated_at: string;
43613
46734
  };
43614
46735
  Insert: {
43615
46736
  algorithm_version?: number;
46737
+ buffer_id?: string | null;
43616
46738
  cart_number: number;
43617
46739
  created_at?: string;
43618
46740
  id?: string;
@@ -43620,13 +46742,14 @@ export declare const deleteDeliveryLocation: import("@tanstack/start-client-core
43620
46742
  is_complete?: boolean;
43621
46743
  notes?: string | null;
43622
46744
  occupancy_pct?: number;
43623
- order_id: string;
46745
+ order_id?: string | null;
43624
46746
  source?: string;
43625
46747
  total_layers_used?: number;
43626
46748
  updated_at?: string;
43627
46749
  };
43628
46750
  Update: {
43629
46751
  algorithm_version?: number;
46752
+ buffer_id?: string | null;
43630
46753
  cart_number?: number;
43631
46754
  created_at?: string;
43632
46755
  id?: string;
@@ -43634,12 +46757,18 @@ export declare const deleteDeliveryLocation: import("@tanstack/start-client-core
43634
46757
  is_complete?: boolean;
43635
46758
  notes?: string | null;
43636
46759
  occupancy_pct?: number;
43637
- order_id?: string;
46760
+ order_id?: string | null;
43638
46761
  source?: string;
43639
46762
  total_layers_used?: number;
43640
46763
  updated_at?: string;
43641
46764
  };
43642
46765
  Relationships: [{
46766
+ foreignKeyName: "order_carts_buffer_id_fkey";
46767
+ columns: ["buffer_id"];
46768
+ isOneToOne: false;
46769
+ referencedRelation: "order_buffers";
46770
+ referencedColumns: ["id"];
46771
+ }, {
43643
46772
  foreignKeyName: "order_carts_order_id_fkey";
43644
46773
  columns: ["order_id"];
43645
46774
  isOneToOne: false;
@@ -43776,15 +46905,117 @@ export declare const deleteDeliveryLocation: import("@tanstack/start-client-core
43776
46905
  };
43777
46906
  Relationships: [];
43778
46907
  };
46908
+ order_shipment_items: {
46909
+ Row: {
46910
+ created_at: string;
46911
+ id: string;
46912
+ order_item_id: string;
46913
+ product_id: string | null;
46914
+ product_name: string;
46915
+ quantity: number;
46916
+ shipment_id: string;
46917
+ updated_at: string;
46918
+ };
46919
+ Insert: {
46920
+ created_at?: string;
46921
+ id?: string;
46922
+ order_item_id: string;
46923
+ product_id?: string | null;
46924
+ product_name: string;
46925
+ quantity: number;
46926
+ shipment_id: string;
46927
+ updated_at?: string;
46928
+ };
46929
+ Update: {
46930
+ created_at?: string;
46931
+ id?: string;
46932
+ order_item_id?: string;
46933
+ product_id?: string | null;
46934
+ product_name?: string;
46935
+ quantity?: number;
46936
+ shipment_id?: string;
46937
+ updated_at?: string;
46938
+ };
46939
+ Relationships: [{
46940
+ foreignKeyName: "order_shipment_items_order_item_id_fkey";
46941
+ columns: ["order_item_id"];
46942
+ isOneToOne: false;
46943
+ referencedRelation: "order_items";
46944
+ referencedColumns: ["id"];
46945
+ }, {
46946
+ foreignKeyName: "order_shipment_items_shipment_id_fkey";
46947
+ columns: ["shipment_id"];
46948
+ isOneToOne: false;
46949
+ referencedRelation: "order_shipments";
46950
+ referencedColumns: ["id"];
46951
+ }];
46952
+ };
46953
+ order_shipments: {
46954
+ Row: {
46955
+ carrier_id: string | null;
46956
+ created_at: string;
46957
+ delivery_date: string | null;
46958
+ delivery_location_id: string | null;
46959
+ id: string;
46960
+ notes: string | null;
46961
+ order_id: string;
46962
+ shipment_number: number;
46963
+ shipped_at: string | null;
46964
+ status: string;
46965
+ updated_at: string;
46966
+ };
46967
+ Insert: {
46968
+ carrier_id?: string | null;
46969
+ created_at?: string;
46970
+ delivery_date?: string | null;
46971
+ delivery_location_id?: string | null;
46972
+ id?: string;
46973
+ notes?: string | null;
46974
+ order_id: string;
46975
+ shipment_number: number;
46976
+ shipped_at?: string | null;
46977
+ status?: string;
46978
+ updated_at?: string;
46979
+ };
46980
+ Update: {
46981
+ carrier_id?: string | null;
46982
+ created_at?: string;
46983
+ delivery_date?: string | null;
46984
+ delivery_location_id?: string | null;
46985
+ id?: string;
46986
+ notes?: string | null;
46987
+ order_id?: string;
46988
+ shipment_number?: number;
46989
+ shipped_at?: string | null;
46990
+ status?: string;
46991
+ updated_at?: string;
46992
+ };
46993
+ Relationships: [{
46994
+ foreignKeyName: "order_shipments_carrier_id_fkey";
46995
+ columns: ["carrier_id"];
46996
+ isOneToOne: false;
46997
+ referencedRelation: "carriers";
46998
+ referencedColumns: ["id"];
46999
+ }, {
47000
+ foreignKeyName: "order_shipments_order_id_fkey";
47001
+ columns: ["order_id"];
47002
+ isOneToOne: false;
47003
+ referencedRelation: "orders";
47004
+ referencedColumns: ["id"];
47005
+ }];
47006
+ };
43779
47007
  orders: {
43780
47008
  Row: {
47009
+ buffer_id: string | null;
43781
47010
  created_at: string;
43782
47011
  custom_fields: import("../integrations/supabase/types").Json;
43783
47012
  customer_id: string | null;
43784
47013
  customer_name: string;
43785
47014
  deleted_at: string | null;
43786
- delivery_date: string;
47015
+ delivery_date: string | null;
47016
+ floriday_sales_order_id: string | null;
43787
47017
  id: string;
47018
+ is_reservation: boolean;
43788
47019
  notes: string | null;
43789
47020
  order_date: string;
43790
47021
  order_number: string;
@@ -43796,13 +47027,16 @@ export declare const deleteDeliveryLocation: import("@tanstack/start-client-core
43796
47027
  updated_at: string;
43797
47028
  };
43798
47029
  Insert: {
47030
+ buffer_id?: string | null;
43799
47031
  created_at?: string;
43800
47032
  custom_fields?: import("../integrations/supabase/types").Json;
43801
47033
  customer_id?: string | null;
43802
47034
  customer_name?: string;
43803
47035
  deleted_at?: string | null;
43804
- delivery_date: string;
47036
+ delivery_date?: string | null;
47037
+ floriday_sales_order_id?: string | null;
43805
47038
  id?: string;
47039
+ is_reservation?: boolean;
43806
47040
  notes?: string | null;
43807
47041
  order_date?: string;
43808
47042
  order_number: string;
@@ -43814,13 +47048,16 @@ export declare const deleteDeliveryLocation: import("@tanstack/start-client-core
43814
47048
  updated_at?: string;
43815
47049
  };
43816
47050
  Update: {
47051
+ buffer_id?: string | null;
43817
47052
  created_at?: string;
43818
47053
  custom_fields?: import("../integrations/supabase/types").Json;
43819
47054
  customer_id?: string | null;
43820
47055
  customer_name?: string;
43821
47056
  deleted_at?: string | null;
43822
- delivery_date?: string;
47057
+ delivery_date?: string | null;
47058
+ floriday_sales_order_id?: string | null;
43823
47059
  id?: string;
47060
+ is_reservation?: boolean;
43824
47061
  notes?: string | null;
43825
47062
  order_date?: string;
43826
47063
  order_number?: string;
@@ -43832,6 +47069,12 @@ export declare const deleteDeliveryLocation: import("@tanstack/start-client-core
43832
47069
  updated_at?: string;
43833
47070
  };
43834
47071
  Relationships: [{
47072
+ foreignKeyName: "orders_buffer_id_fkey";
47073
+ columns: ["buffer_id"];
47074
+ isOneToOne: false;
47075
+ referencedRelation: "order_buffers";
47076
+ referencedColumns: ["id"];
47077
+ }, {
43835
47078
  foreignKeyName: "orders_customer_id_fkey";
43836
47079
  columns: ["customer_id"];
43837
47080
  isOneToOne: false;
@@ -44095,6 +47338,8 @@ export declare const deleteDeliveryLocation: import("@tanstack/start-client-core
44095
47338
  Row: {
44096
47339
  created_at: string;
44097
47340
  description: string | null;
47341
+ head_product_id: string | null;
47342
+ head_trade_item_floriday_id: string | null;
44098
47343
  id: string;
44099
47344
  is_active: boolean;
44100
47345
  name: string;
@@ -44104,6 +47349,8 @@ export declare const deleteDeliveryLocation: import("@tanstack/start-client-core
44104
47349
  Insert: {
44105
47350
  created_at?: string;
44106
47351
  description?: string | null;
47352
+ head_product_id?: string | null;
47353
+ head_trade_item_floriday_id?: string | null;
44107
47354
  id?: string;
44108
47355
  is_active?: boolean;
44109
47356
  name: string;
@@ -44113,13 +47360,21 @@ export declare const deleteDeliveryLocation: import("@tanstack/start-client-core
44113
47360
  Update: {
44114
47361
  created_at?: string;
44115
47362
  description?: string | null;
47363
+ head_product_id?: string | null;
47364
+ head_trade_item_floriday_id?: string | null;
44116
47365
  id?: string;
44117
47366
  is_active?: boolean;
44118
47367
  name?: string;
44119
47368
  tenant_id?: string;
44120
47369
  updated_at?: string;
44121
47370
  };
44122
- Relationships: [];
47371
+ Relationships: [{
47372
+ foreignKeyName: "product_groups_head_product_id_fkey";
47373
+ columns: ["head_product_id"];
47374
+ isOneToOne: false;
47375
+ referencedRelation: "products";
47376
+ referencedColumns: ["id"];
47377
+ }];
44123
47378
  };
44124
47379
  products: {
44125
47380
  Row: {
@@ -46670,6 +49925,7 @@ export declare const deleteDeliveryLocation: import("@tanstack/start-client-core
46670
49925
  internal_notes: string | null;
46671
49926
  parent_werkbon_id: string | null;
46672
49927
  parsed_payload: import("../integrations/supabase/types").Json | null;
49928
+ planning_status: string;
46673
49929
  project_number: string | null;
46674
49930
  room_number: string | null;
46675
49931
  scheduled_end_time: string | null;
@@ -46677,6 +49933,7 @@ export declare const deleteDeliveryLocation: import("@tanstack/start-client-core
46677
49933
  sequence_number: number;
46678
49934
  source_pdf_path: string | null;
46679
49935
  status: string;
49936
+ technician_id: string | null;
46680
49937
  technician_notes: string | null;
46681
49938
  technician_notes_raw: string | null;
46682
49939
  technician_task_description: string | null;
@@ -46697,6 +49954,7 @@ export declare const deleteDeliveryLocation: import("@tanstack/start-client-core
46697
49954
  internal_notes?: string | null;
46698
49955
  parent_werkbon_id?: string | null;
46699
49956
  parsed_payload?: import("../integrations/supabase/types").Json | null;
49957
+ planning_status?: string;
46700
49958
  project_number?: string | null;
46701
49959
  room_number?: string | null;
46702
49960
  scheduled_end_time?: string | null;
@@ -46704,6 +49962,7 @@ export declare const deleteDeliveryLocation: import("@tanstack/start-client-core
46704
49962
  sequence_number: number;
46705
49963
  source_pdf_path?: string | null;
46706
49964
  status?: string;
49965
+ technician_id?: string | null;
46707
49966
  technician_notes?: string | null;
46708
49967
  technician_notes_raw?: string | null;
46709
49968
  technician_task_description?: string | null;
@@ -46724,6 +49983,7 @@ export declare const deleteDeliveryLocation: import("@tanstack/start-client-core
46724
49983
  internal_notes?: string | null;
46725
49984
  parent_werkbon_id?: string | null;
46726
49985
  parsed_payload?: import("../integrations/supabase/types").Json | null;
49986
+ planning_status?: string;
46727
49987
  project_number?: string | null;
46728
49988
  room_number?: string | null;
46729
49989
  scheduled_end_time?: string | null;
@@ -46731,6 +49991,7 @@ export declare const deleteDeliveryLocation: import("@tanstack/start-client-core
46731
49991
  sequence_number?: number;
46732
49992
  source_pdf_path?: string | null;
46733
49993
  status?: string;
49994
+ technician_id?: string | null;
46734
49995
  technician_notes?: string | null;
46735
49996
  technician_notes_raw?: string | null;
46736
49997
  technician_task_description?: string | null;
@@ -46739,17 +50000,17 @@ export declare const deleteDeliveryLocation: import("@tanstack/start-client-core
46739
50000
  work_address?: string | null;
46740
50001
  };
46741
50002
  Relationships: [{
46742
- foreignKeyName: "werkbonnen_customer_id_fkey";
46743
- columns: ["customer_id"];
46744
- isOneToOne: false;
46745
- referencedRelation: "customers";
46746
- referencedColumns: ["id"];
46747
- }, {
46748
50003
  foreignKeyName: "werkbonnen_parent_werkbon_id_fkey";
46749
50004
  columns: ["parent_werkbon_id"];
46750
50005
  isOneToOne: false;
46751
50006
  referencedRelation: "werkbonnen";
46752
50007
  referencedColumns: ["id"];
50008
+ }, {
50009
+ foreignKeyName: "werkbonnen_technician_id_fkey";
50010
+ columns: ["technician_id"];
50011
+ isOneToOne: false;
50012
+ referencedRelation: "monteurs";
50013
+ referencedColumns: ["id"];
46753
50014
  }];
46754
50015
  };
46755
50016
  work_order_monteurs: {
@@ -47468,6 +50729,21 @@ export declare const deleteDeliveryLocation: import("@tanstack/start-client-core
47468
50729
  };
47469
50730
  Returns: string;
47470
50731
  };
50732
+ ai_usage_by_module: {
50733
+ Args: {
50734
+ _from: string;
50735
+ _to: string;
50736
+ };
50737
+ Returns: {
50738
+ calls: number;
50739
+ consumer_module_id: string;
50740
+ cost_usd: number;
50741
+ errors: number;
50742
+ input_tokens: number;
50743
+ output_tokens: number;
50744
+ total_tokens: number;
50745
+ }[];
50746
+ };
47471
50747
  apply_stock_consumption: {
47472
50748
  Args: {
47473
50749
  p_order_id: string;
@@ -47616,6 +50892,12 @@ export declare const deleteDeliveryLocation: import("@tanstack/start-client-core
47616
50892
  Args: never;
47617
50893
  Returns: string;
47618
50894
  };
50895
+ custom_access_token_hook: {
50896
+ Args: {
50897
+ event: import("../integrations/supabase/types").Json;
50898
+ };
50899
+ Returns: import("../integrations/supabase/types").Json;
50900
+ };
47619
50901
  dashboard_alert_counts: {
47620
50902
  Args: never;
47621
50903
  Returns: import("../integrations/supabase/types").Json;
@@ -47951,6 +51233,14 @@ export declare const deleteDeliveryLocation: import("@tanstack/start-client-core
47951
51233
  };
47952
51234
  Returns: string;
47953
51235
  };
51236
+ has_module_permission: {
51237
+ Args: {
51238
+ _min: string;
51239
+ _module_id: string;
51240
+ _user_id: string;
51241
+ };
51242
+ Returns: boolean;
51243
+ };
47954
51244
  has_role: {
47955
51245
  Args: {
47956
51246
  _role: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
@@ -47976,6 +51266,20 @@ export declare const deleteDeliveryLocation: import("@tanstack/start-client-core
47976
51266
  };
47977
51267
  Returns: boolean;
47978
51268
  };
51269
+ jwt_has_role: {
51270
+ Args: {
51271
+ _role: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
51272
+ };
51273
+ Returns: boolean;
51274
+ };
51275
+ list_monteurs: {
51276
+ Args: never;
51277
+ Returns: {
51278
+ display_name: string;
51279
+ email: string;
51280
+ user_id: string;
51281
+ }[];
51282
+ };
47979
51283
  local_effective_price: {
47980
51284
  Args: {
47981
51285
  _customer_id: string;
@@ -47992,6 +51296,22 @@ export declare const deleteDeliveryLocation: import("@tanstack/start-client-core
47992
51296
  source_id: string;
47993
51297
  }[];
47994
51298
  };
51299
+ log_ai_call: {
51300
+ Args: {
51301
+ _consumer_module_id: string;
51302
+ _cost_usd: number;
51303
+ _duration_ms: number;
51304
+ _error_code: string;
51305
+ _error_message: string;
51306
+ _input_tokens: number;
51307
+ _model_slug: string;
51308
+ _output_tokens: number;
51309
+ _provider_slug: string;
51310
+ _status: string;
51311
+ _total_tokens: number;
51312
+ };
51313
+ Returns: string;
51314
+ };
47995
51315
  mark_offer_clicked: {
47996
51316
  Args: {
47997
51317
  p_code: string;
@@ -48004,6 +51324,12 @@ export declare const deleteDeliveryLocation: import("@tanstack/start-client-core
48004
51324
  };
48005
51325
  Returns: undefined;
48006
51326
  };
51327
+ mark_shipment_shipped: {
51328
+ Args: {
51329
+ p_shipment_id: string;
51330
+ };
51331
+ Returns: undefined;
51332
+ };
48007
51333
  next_order_number: {
48008
51334
  Args: {
48009
51335
  p_prefix: string;
@@ -48480,9 +51806,11 @@ export declare const deleteDeliveryLocation: import("@tanstack/start-client-core
48480
51806
  };
48481
51807
  };
48482
51808
  Enums: {
48483
- app_role: "admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie" | "monteur";
51809
+ app_role: "admin" | "planner" | "monteur" | "administratie" | "ai_admin";
48484
51810
  exact_env: "staging" | "live";
48485
51811
  exact_push_status: "pending" | "sent" | "error";
51812
+ itk_customer_segment: "Business" | "Private";
51813
+ itk_dynamic_field_type: "text" | "select" | "date" | "checkbox";
48486
51814
  quote_status: "concept" | "verzonden" | "bekeken" | "in_behandeling" | "geaccepteerd" | "afgewezen" | "verlopen" | "gearchiveerd";
48487
51815
  };
48488
51816
  CompositeTypes: { [_ in never]: never; };