@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
@@ -331,6 +331,57 @@ export declare const listExternalProviders: import("@tanstack/start-client-core"
331
331
  referencedColumns: ["id"];
332
332
  }];
333
333
  };
334
+ ai_call_log: {
335
+ Row: {
336
+ consumer_module_id: string;
337
+ cost_usd: number | null;
338
+ created_at: string;
339
+ created_by: string | null;
340
+ duration_ms: number | null;
341
+ error_code: string | null;
342
+ error_message: string | null;
343
+ id: string;
344
+ input_tokens: number;
345
+ model_slug: string | null;
346
+ output_tokens: number;
347
+ provider_slug: string | null;
348
+ status: string;
349
+ total_tokens: number;
350
+ };
351
+ Insert: {
352
+ consumer_module_id: string;
353
+ cost_usd?: number | null;
354
+ created_at?: string;
355
+ created_by?: string | null;
356
+ duration_ms?: number | null;
357
+ error_code?: string | null;
358
+ error_message?: string | null;
359
+ id?: string;
360
+ input_tokens?: number;
361
+ model_slug?: string | null;
362
+ output_tokens?: number;
363
+ provider_slug?: string | null;
364
+ status: string;
365
+ total_tokens?: number;
366
+ };
367
+ Update: {
368
+ consumer_module_id?: string;
369
+ cost_usd?: number | null;
370
+ created_at?: string;
371
+ created_by?: string | null;
372
+ duration_ms?: number | null;
373
+ error_code?: string | null;
374
+ error_message?: string | null;
375
+ id?: string;
376
+ input_tokens?: number;
377
+ model_slug?: string | null;
378
+ output_tokens?: number;
379
+ provider_slug?: string | null;
380
+ status?: string;
381
+ total_tokens?: number;
382
+ };
383
+ Relationships: [];
384
+ };
334
385
  ai_credentials: {
335
386
  Row: {
336
387
  active: boolean;
@@ -367,6 +418,36 @@ export declare const listExternalProviders: import("@tanstack/start-client-core"
367
418
  referencedColumns: ["id"];
368
419
  }];
369
420
  };
421
+ ai_goals: {
422
+ Row: {
423
+ active: boolean;
424
+ created_at: string;
425
+ description: string | null;
426
+ key: string;
427
+ label: string;
428
+ sort_order: number;
429
+ updated_at: string;
430
+ };
431
+ Insert: {
432
+ active?: boolean;
433
+ created_at?: string;
434
+ description?: string | null;
435
+ key: string;
436
+ label: string;
437
+ sort_order?: number;
438
+ updated_at?: string;
439
+ };
440
+ Update: {
441
+ active?: boolean;
442
+ created_at?: string;
443
+ description?: string | null;
444
+ key?: string;
445
+ label?: string;
446
+ sort_order?: number;
447
+ updated_at?: string;
448
+ };
449
+ Relationships: [];
450
+ };
370
451
  ai_model_pricing: {
371
452
  Row: {
372
453
  created_at: string;
@@ -1153,6 +1234,141 @@ export declare const listExternalProviders: import("@tanstack/start-client-core"
1153
1234
  };
1154
1235
  Relationships: [];
1155
1236
  };
1237
+ cart_planning_pick_times: {
1238
+ Row: {
1239
+ created_at: string;
1240
+ id: string;
1241
+ pot_size: string;
1242
+ seconds_per_cart: number;
1243
+ updated_at: string;
1244
+ };
1245
+ Insert: {
1246
+ created_at?: string;
1247
+ id?: string;
1248
+ pot_size: string;
1249
+ seconds_per_cart: number;
1250
+ updated_at?: string;
1251
+ };
1252
+ Update: {
1253
+ created_at?: string;
1254
+ id?: string;
1255
+ pot_size?: string;
1256
+ seconds_per_cart?: number;
1257
+ updated_at?: string;
1258
+ };
1259
+ Relationships: [];
1260
+ };
1261
+ cart_planning_product_overrides: {
1262
+ Row: {
1263
+ created_at: string;
1264
+ id: string;
1265
+ max_party_share_per_layer_pct_override: number | null;
1266
+ never_mix: boolean;
1267
+ notes: string | null;
1268
+ product_id: string;
1269
+ updated_at: string;
1270
+ };
1271
+ Insert: {
1272
+ created_at?: string;
1273
+ id?: string;
1274
+ max_party_share_per_layer_pct_override?: number | null;
1275
+ never_mix?: boolean;
1276
+ notes?: string | null;
1277
+ product_id: string;
1278
+ updated_at?: string;
1279
+ };
1280
+ Update: {
1281
+ created_at?: string;
1282
+ id?: string;
1283
+ max_party_share_per_layer_pct_override?: number | null;
1284
+ never_mix?: boolean;
1285
+ notes?: string | null;
1286
+ product_id?: string;
1287
+ updated_at?: string;
1288
+ };
1289
+ Relationships: [{
1290
+ foreignKeyName: "cart_planning_product_overrides_product_id_fkey";
1291
+ columns: ["product_id"];
1292
+ isOneToOne: true;
1293
+ referencedRelation: "products";
1294
+ referencedColumns: ["id"];
1295
+ }];
1296
+ };
1297
+ cart_planning_settings: {
1298
+ Row: {
1299
+ allow_editing_after_pickstation_send: boolean;
1300
+ buffer_grouping_mode: string;
1301
+ combine_floriday_orders: boolean;
1302
+ combine_floriday_orders_window: string;
1303
+ combine_orders_scope: string;
1304
+ default_workers: number;
1305
+ id: number;
1306
+ max_beladingen_per_layer: number;
1307
+ max_customers_per_cart: number;
1308
+ max_one_customer_per_layer: boolean;
1309
+ max_party_share_per_layer_pct: number;
1310
+ optimization_strategy: string;
1311
+ own_cart_from_layers: number;
1312
+ pick_time_mode: string;
1313
+ plants_per_day: number;
1314
+ plants_per_hour: number;
1315
+ require_same_carrier: boolean;
1316
+ require_same_crate_type: boolean;
1317
+ require_same_delivery_date: boolean;
1318
+ require_same_delivery_location: boolean;
1319
+ updated_at: string;
1320
+ updated_by: string | null;
1321
+ };
1322
+ Insert: {
1323
+ allow_editing_after_pickstation_send?: boolean;
1324
+ buffer_grouping_mode?: string;
1325
+ combine_floriday_orders?: boolean;
1326
+ combine_floriday_orders_window?: string;
1327
+ combine_orders_scope?: string;
1328
+ default_workers?: number;
1329
+ id?: number;
1330
+ max_beladingen_per_layer?: number;
1331
+ max_customers_per_cart?: number;
1332
+ max_one_customer_per_layer?: boolean;
1333
+ max_party_share_per_layer_pct?: number;
1334
+ optimization_strategy?: string;
1335
+ own_cart_from_layers?: number;
1336
+ pick_time_mode?: string;
1337
+ plants_per_day?: number;
1338
+ plants_per_hour?: number;
1339
+ require_same_carrier?: boolean;
1340
+ require_same_crate_type?: boolean;
1341
+ require_same_delivery_date?: boolean;
1342
+ require_same_delivery_location?: boolean;
1343
+ updated_at?: string;
1344
+ updated_by?: string | null;
1345
+ };
1346
+ Update: {
1347
+ allow_editing_after_pickstation_send?: boolean;
1348
+ buffer_grouping_mode?: string;
1349
+ combine_floriday_orders?: boolean;
1350
+ combine_floriday_orders_window?: string;
1351
+ combine_orders_scope?: string;
1352
+ default_workers?: number;
1353
+ id?: number;
1354
+ max_beladingen_per_layer?: number;
1355
+ max_customers_per_cart?: number;
1356
+ max_one_customer_per_layer?: boolean;
1357
+ max_party_share_per_layer_pct?: number;
1358
+ optimization_strategy?: string;
1359
+ own_cart_from_layers?: number;
1360
+ pick_time_mode?: string;
1361
+ plants_per_day?: number;
1362
+ plants_per_hour?: number;
1363
+ require_same_carrier?: boolean;
1364
+ require_same_crate_type?: boolean;
1365
+ require_same_delivery_date?: boolean;
1366
+ require_same_delivery_location?: boolean;
1367
+ updated_at?: string;
1368
+ updated_by?: string | null;
1369
+ };
1370
+ Relationships: [];
1371
+ };
1156
1372
  cart_replan_queue: {
1157
1373
  Row: {
1158
1374
  attempts: number;
@@ -1183,6 +1399,39 @@ export declare const listExternalProviders: import("@tanstack/start-client-core"
1183
1399
  referencedColumns: ["id"];
1184
1400
  }];
1185
1401
  };
1402
+ cart_types: {
1403
+ Row: {
1404
+ created_at: string;
1405
+ id: string;
1406
+ is_default: boolean;
1407
+ layer_length_cm: number;
1408
+ layer_width_cm: number;
1409
+ layers_per_cart: number;
1410
+ name: string;
1411
+ updated_at: string;
1412
+ };
1413
+ Insert: {
1414
+ created_at?: string;
1415
+ id?: string;
1416
+ is_default?: boolean;
1417
+ layer_length_cm: number;
1418
+ layer_width_cm: number;
1419
+ layers_per_cart?: number;
1420
+ name: string;
1421
+ updated_at?: string;
1422
+ };
1423
+ Update: {
1424
+ created_at?: string;
1425
+ id?: string;
1426
+ is_default?: boolean;
1427
+ layer_length_cm?: number;
1428
+ layer_width_cm?: number;
1429
+ layers_per_cart?: number;
1430
+ name?: string;
1431
+ updated_at?: string;
1432
+ };
1433
+ Relationships: [];
1434
+ };
1186
1435
  catalog_articles_cache: {
1187
1436
  Row: {
1188
1437
  created_at: string;
@@ -1270,6 +1519,36 @@ export declare const listExternalProviders: import("@tanstack/start-client-core"
1270
1519
  };
1271
1520
  Relationships: [];
1272
1521
  };
1522
+ crate_types: {
1523
+ Row: {
1524
+ created_at: string;
1525
+ id: string;
1526
+ length_cm: number;
1527
+ name: string;
1528
+ plants_per_crate: number;
1529
+ updated_at: string;
1530
+ width_cm: number;
1531
+ };
1532
+ Insert: {
1533
+ created_at?: string;
1534
+ id?: string;
1535
+ length_cm: number;
1536
+ name: string;
1537
+ plants_per_crate?: number;
1538
+ updated_at?: string;
1539
+ width_cm: number;
1540
+ };
1541
+ Update: {
1542
+ created_at?: string;
1543
+ id?: string;
1544
+ length_cm?: number;
1545
+ name?: string;
1546
+ plants_per_crate?: number;
1547
+ updated_at?: string;
1548
+ width_cm?: number;
1549
+ };
1550
+ Relationships: [];
1551
+ };
1273
1552
  customer_audit_log: {
1274
1553
  Row: {
1275
1554
  action: string;
@@ -5809,6 +6088,288 @@ export declare const listExternalProviders: import("@tanstack/start-client-core"
5809
6088
  };
5810
6089
  Relationships: [];
5811
6090
  };
6091
+ itk_contact_persons: {
6092
+ Row: {
6093
+ created_at: string;
6094
+ customer_id: string;
6095
+ email: string | null;
6096
+ id: string;
6097
+ name: string;
6098
+ phone: string | null;
6099
+ role: string | null;
6100
+ updated_at: string;
6101
+ };
6102
+ Insert: {
6103
+ created_at?: string;
6104
+ customer_id: string;
6105
+ email?: string | null;
6106
+ id?: string;
6107
+ name: string;
6108
+ phone?: string | null;
6109
+ role?: string | null;
6110
+ updated_at?: string;
6111
+ };
6112
+ Update: {
6113
+ created_at?: string;
6114
+ customer_id?: string;
6115
+ email?: string | null;
6116
+ id?: string;
6117
+ name?: string;
6118
+ phone?: string | null;
6119
+ role?: string | null;
6120
+ updated_at?: string;
6121
+ };
6122
+ Relationships: [{
6123
+ foreignKeyName: "itk_contact_persons_customer_id_fkey";
6124
+ columns: ["customer_id"];
6125
+ isOneToOne: false;
6126
+ referencedRelation: "itk_customers";
6127
+ referencedColumns: ["id"];
6128
+ }];
6129
+ };
6130
+ itk_customer_dynamic_values: {
6131
+ Row: {
6132
+ created_at: string;
6133
+ customer_id: string;
6134
+ field_id: string;
6135
+ id: string;
6136
+ updated_at: string;
6137
+ value: string | null;
6138
+ };
6139
+ Insert: {
6140
+ created_at?: string;
6141
+ customer_id: string;
6142
+ field_id: string;
6143
+ id?: string;
6144
+ updated_at?: string;
6145
+ value?: string | null;
6146
+ };
6147
+ Update: {
6148
+ created_at?: string;
6149
+ customer_id?: string;
6150
+ field_id?: string;
6151
+ id?: string;
6152
+ updated_at?: string;
6153
+ value?: string | null;
6154
+ };
6155
+ Relationships: [{
6156
+ foreignKeyName: "itk_customer_dynamic_values_customer_id_fkey";
6157
+ columns: ["customer_id"];
6158
+ isOneToOne: false;
6159
+ referencedRelation: "itk_customers";
6160
+ referencedColumns: ["id"];
6161
+ }, {
6162
+ foreignKeyName: "itk_customer_dynamic_values_field_id_fkey";
6163
+ columns: ["field_id"];
6164
+ isOneToOne: false;
6165
+ referencedRelation: "itk_dynamic_fields";
6166
+ referencedColumns: ["id"];
6167
+ }];
6168
+ };
6169
+ itk_customer_notes: {
6170
+ Row: {
6171
+ body: string;
6172
+ created_at: string;
6173
+ created_by: string | null;
6174
+ customer_id: string;
6175
+ id: string;
6176
+ note_type: string;
6177
+ updated_at: string;
6178
+ };
6179
+ Insert: {
6180
+ body: string;
6181
+ created_at?: string;
6182
+ created_by?: string | null;
6183
+ customer_id: string;
6184
+ id?: string;
6185
+ note_type?: string;
6186
+ updated_at?: string;
6187
+ };
6188
+ Update: {
6189
+ body?: string;
6190
+ created_at?: string;
6191
+ created_by?: string | null;
6192
+ customer_id?: string;
6193
+ id?: string;
6194
+ note_type?: string;
6195
+ updated_at?: string;
6196
+ };
6197
+ Relationships: [{
6198
+ foreignKeyName: "itk_customer_notes_customer_id_fkey";
6199
+ columns: ["customer_id"];
6200
+ isOneToOne: false;
6201
+ referencedRelation: "itk_customers";
6202
+ referencedColumns: ["id"];
6203
+ }];
6204
+ };
6205
+ itk_customers: {
6206
+ Row: {
6207
+ billing_city: string | null;
6208
+ billing_postcode: string | null;
6209
+ billing_street: string | null;
6210
+ created_at: string;
6211
+ general_email: string | null;
6212
+ general_phone: string | null;
6213
+ id: string;
6214
+ legacy_customer_id: string | null;
6215
+ name: string;
6216
+ segment: import("../integrations/supabase/types").Database["public"]["Enums"]["itk_customer_segment"];
6217
+ updated_at: string;
6218
+ };
6219
+ Insert: {
6220
+ billing_city?: string | null;
6221
+ billing_postcode?: string | null;
6222
+ billing_street?: string | null;
6223
+ created_at?: string;
6224
+ general_email?: string | null;
6225
+ general_phone?: string | null;
6226
+ id?: string;
6227
+ legacy_customer_id?: string | null;
6228
+ name: string;
6229
+ segment?: import("../integrations/supabase/types").Database["public"]["Enums"]["itk_customer_segment"];
6230
+ updated_at?: string;
6231
+ };
6232
+ Update: {
6233
+ billing_city?: string | null;
6234
+ billing_postcode?: string | null;
6235
+ billing_street?: string | null;
6236
+ created_at?: string;
6237
+ general_email?: string | null;
6238
+ general_phone?: string | null;
6239
+ id?: string;
6240
+ legacy_customer_id?: string | null;
6241
+ name?: string;
6242
+ segment?: import("../integrations/supabase/types").Database["public"]["Enums"]["itk_customer_segment"];
6243
+ updated_at?: string;
6244
+ };
6245
+ Relationships: [{
6246
+ foreignKeyName: "itk_customers_legacy_customer_id_fkey";
6247
+ columns: ["legacy_customer_id"];
6248
+ isOneToOne: false;
6249
+ referencedRelation: "customers";
6250
+ referencedColumns: ["id"];
6251
+ }];
6252
+ };
6253
+ itk_dynamic_fields: {
6254
+ Row: {
6255
+ created_at: string;
6256
+ field_name: string;
6257
+ field_type: import("../integrations/supabase/types").Database["public"]["Enums"]["itk_dynamic_field_type"];
6258
+ id: string;
6259
+ options: import("../integrations/supabase/types").Json;
6260
+ sort_order: number;
6261
+ updated_at: string;
6262
+ };
6263
+ Insert: {
6264
+ created_at?: string;
6265
+ field_name: string;
6266
+ field_type?: import("../integrations/supabase/types").Database["public"]["Enums"]["itk_dynamic_field_type"];
6267
+ id?: string;
6268
+ options?: import("../integrations/supabase/types").Json;
6269
+ sort_order?: number;
6270
+ updated_at?: string;
6271
+ };
6272
+ Update: {
6273
+ created_at?: string;
6274
+ field_name?: string;
6275
+ field_type?: import("../integrations/supabase/types").Database["public"]["Enums"]["itk_dynamic_field_type"];
6276
+ id?: string;
6277
+ options?: import("../integrations/supabase/types").Json;
6278
+ sort_order?: number;
6279
+ updated_at?: string;
6280
+ };
6281
+ Relationships: [];
6282
+ };
6283
+ itk_work_locations: {
6284
+ Row: {
6285
+ city: string | null;
6286
+ created_at: string;
6287
+ customer_id: string;
6288
+ id: string;
6289
+ instructions: string | null;
6290
+ label: string;
6291
+ latitude: number | null;
6292
+ longitude: number | null;
6293
+ postcode: string | null;
6294
+ street: string | null;
6295
+ updated_at: string;
6296
+ };
6297
+ Insert: {
6298
+ city?: string | null;
6299
+ created_at?: string;
6300
+ customer_id: string;
6301
+ id?: string;
6302
+ instructions?: string | null;
6303
+ label: string;
6304
+ latitude?: number | null;
6305
+ longitude?: number | null;
6306
+ postcode?: string | null;
6307
+ street?: string | null;
6308
+ updated_at?: string;
6309
+ };
6310
+ Update: {
6311
+ city?: string | null;
6312
+ created_at?: string;
6313
+ customer_id?: string;
6314
+ id?: string;
6315
+ instructions?: string | null;
6316
+ label?: string;
6317
+ latitude?: number | null;
6318
+ longitude?: number | null;
6319
+ postcode?: string | null;
6320
+ street?: string | null;
6321
+ updated_at?: string;
6322
+ };
6323
+ Relationships: [{
6324
+ foreignKeyName: "itk_work_locations_customer_id_fkey";
6325
+ columns: ["customer_id"];
6326
+ isOneToOne: false;
6327
+ referencedRelation: "itk_customers";
6328
+ referencedColumns: ["id"];
6329
+ }];
6330
+ };
6331
+ leave_requests: {
6332
+ Row: {
6333
+ created_at: string;
6334
+ end_date: string;
6335
+ id: string;
6336
+ reason: string | null;
6337
+ start_date: string;
6338
+ status: string;
6339
+ tenant_id: string;
6340
+ updated_at: string;
6341
+ user_id: string;
6342
+ };
6343
+ Insert: {
6344
+ created_at?: string;
6345
+ end_date: string;
6346
+ id?: string;
6347
+ reason?: string | null;
6348
+ start_date: string;
6349
+ status?: string;
6350
+ tenant_id?: string;
6351
+ updated_at?: string;
6352
+ user_id: string;
6353
+ };
6354
+ Update: {
6355
+ created_at?: string;
6356
+ end_date?: string;
6357
+ id?: string;
6358
+ reason?: string | null;
6359
+ start_date?: string;
6360
+ status?: string;
6361
+ tenant_id?: string;
6362
+ updated_at?: string;
6363
+ user_id?: string;
6364
+ };
6365
+ Relationships: [{
6366
+ foreignKeyName: "leave_requests_user_id_fkey";
6367
+ columns: ["user_id"];
6368
+ isOneToOne: false;
6369
+ referencedRelation: "monteurs";
6370
+ referencedColumns: ["id"];
6371
+ }];
6372
+ };
5812
6373
  local_customer_agreements: {
5813
6374
  Row: {
5814
6375
  base_price: number | null;
@@ -6460,6 +7021,33 @@ export declare const listExternalProviders: import("@tanstack/start-client-core"
6460
7021
  };
6461
7022
  Relationships: [];
6462
7023
  };
7024
+ module_permissions: {
7025
+ Row: {
7026
+ created_at: string;
7027
+ id: string;
7028
+ module_id: string;
7029
+ permission: string;
7030
+ role: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
7031
+ updated_at: string;
7032
+ };
7033
+ Insert: {
7034
+ created_at?: string;
7035
+ id?: string;
7036
+ module_id: string;
7037
+ permission: string;
7038
+ role: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
7039
+ updated_at?: string;
7040
+ };
7041
+ Update: {
7042
+ created_at?: string;
7043
+ id?: string;
7044
+ module_id?: string;
7045
+ permission?: string;
7046
+ role?: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
7047
+ updated_at?: string;
7048
+ };
7049
+ Relationships: [];
7050
+ };
6463
7051
  monteurs: {
6464
7052
  Row: {
6465
7053
  avatar_url: string | null;
@@ -7189,6 +7777,42 @@ export declare const listExternalProviders: import("@tanstack/start-client-core"
7189
7777
  };
7190
7778
  Relationships: [];
7191
7779
  };
7780
+ order_buffers: {
7781
+ Row: {
7782
+ buffer_key: string;
7783
+ created_at: string;
7784
+ customer_id: string | null;
7785
+ grouping_mode: string;
7786
+ id: string;
7787
+ pickup_date: string | null;
7788
+ pickup_location: string | null;
7789
+ plan_locked_at: string | null;
7790
+ updated_at: string;
7791
+ };
7792
+ Insert: {
7793
+ buffer_key: string;
7794
+ created_at?: string;
7795
+ customer_id?: string | null;
7796
+ grouping_mode: string;
7797
+ id?: string;
7798
+ pickup_date?: string | null;
7799
+ pickup_location?: string | null;
7800
+ plan_locked_at?: string | null;
7801
+ updated_at?: string;
7802
+ };
7803
+ Update: {
7804
+ buffer_key?: string;
7805
+ created_at?: string;
7806
+ customer_id?: string | null;
7807
+ grouping_mode?: string;
7808
+ id?: string;
7809
+ pickup_date?: string | null;
7810
+ pickup_location?: string | null;
7811
+ plan_locked_at?: string | null;
7812
+ updated_at?: string;
7813
+ };
7814
+ Relationships: [];
7815
+ };
7192
7816
  order_cart_items: {
7193
7817
  Row: {
7194
7818
  cart_id: string;
@@ -7255,6 +7879,7 @@ export declare const listExternalProviders: import("@tanstack/start-client-core"
7255
7879
  order_carts: {
7256
7880
  Row: {
7257
7881
  algorithm_version: number;
7882
+ buffer_id: string | null;
7258
7883
  cart_number: number;
7259
7884
  created_at: string;
7260
7885
  id: string;
@@ -7262,13 +7887,14 @@ export declare const listExternalProviders: import("@tanstack/start-client-core"
7262
7887
  is_complete: boolean;
7263
7888
  notes: string | null;
7264
7889
  occupancy_pct: number;
7265
- order_id: string;
7890
+ order_id: string | null;
7266
7891
  source: string;
7267
7892
  total_layers_used: number;
7268
7893
  updated_at: string;
7269
7894
  };
7270
7895
  Insert: {
7271
7896
  algorithm_version?: number;
7897
+ buffer_id?: string | null;
7272
7898
  cart_number: number;
7273
7899
  created_at?: string;
7274
7900
  id?: string;
@@ -7276,13 +7902,14 @@ export declare const listExternalProviders: import("@tanstack/start-client-core"
7276
7902
  is_complete?: boolean;
7277
7903
  notes?: string | null;
7278
7904
  occupancy_pct?: number;
7279
- order_id: string;
7905
+ order_id?: string | null;
7280
7906
  source?: string;
7281
7907
  total_layers_used?: number;
7282
7908
  updated_at?: string;
7283
7909
  };
7284
7910
  Update: {
7285
7911
  algorithm_version?: number;
7912
+ buffer_id?: string | null;
7286
7913
  cart_number?: number;
7287
7914
  created_at?: string;
7288
7915
  id?: string;
@@ -7290,12 +7917,18 @@ export declare const listExternalProviders: import("@tanstack/start-client-core"
7290
7917
  is_complete?: boolean;
7291
7918
  notes?: string | null;
7292
7919
  occupancy_pct?: number;
7293
- order_id?: string;
7920
+ order_id?: string | null;
7294
7921
  source?: string;
7295
7922
  total_layers_used?: number;
7296
7923
  updated_at?: string;
7297
7924
  };
7298
7925
  Relationships: [{
7926
+ foreignKeyName: "order_carts_buffer_id_fkey";
7927
+ columns: ["buffer_id"];
7928
+ isOneToOne: false;
7929
+ referencedRelation: "order_buffers";
7930
+ referencedColumns: ["id"];
7931
+ }, {
7299
7932
  foreignKeyName: "order_carts_order_id_fkey";
7300
7933
  columns: ["order_id"];
7301
7934
  isOneToOne: false;
@@ -7432,15 +8065,117 @@ export declare const listExternalProviders: import("@tanstack/start-client-core"
7432
8065
  };
7433
8066
  Relationships: [];
7434
8067
  };
8068
+ order_shipment_items: {
8069
+ Row: {
8070
+ created_at: string;
8071
+ id: string;
8072
+ order_item_id: string;
8073
+ product_id: string | null;
8074
+ product_name: string;
8075
+ quantity: number;
8076
+ shipment_id: string;
8077
+ updated_at: string;
8078
+ };
8079
+ Insert: {
8080
+ created_at?: string;
8081
+ id?: string;
8082
+ order_item_id: string;
8083
+ product_id?: string | null;
8084
+ product_name: string;
8085
+ quantity: number;
8086
+ shipment_id: string;
8087
+ updated_at?: string;
8088
+ };
8089
+ Update: {
8090
+ created_at?: string;
8091
+ id?: string;
8092
+ order_item_id?: string;
8093
+ product_id?: string | null;
8094
+ product_name?: string;
8095
+ quantity?: number;
8096
+ shipment_id?: string;
8097
+ updated_at?: string;
8098
+ };
8099
+ Relationships: [{
8100
+ foreignKeyName: "order_shipment_items_order_item_id_fkey";
8101
+ columns: ["order_item_id"];
8102
+ isOneToOne: false;
8103
+ referencedRelation: "order_items";
8104
+ referencedColumns: ["id"];
8105
+ }, {
8106
+ foreignKeyName: "order_shipment_items_shipment_id_fkey";
8107
+ columns: ["shipment_id"];
8108
+ isOneToOne: false;
8109
+ referencedRelation: "order_shipments";
8110
+ referencedColumns: ["id"];
8111
+ }];
8112
+ };
8113
+ order_shipments: {
8114
+ Row: {
8115
+ carrier_id: string | null;
8116
+ created_at: string;
8117
+ delivery_date: string | null;
8118
+ delivery_location_id: string | null;
8119
+ id: string;
8120
+ notes: string | null;
8121
+ order_id: string;
8122
+ shipment_number: number;
8123
+ shipped_at: string | null;
8124
+ status: string;
8125
+ updated_at: string;
8126
+ };
8127
+ Insert: {
8128
+ carrier_id?: string | null;
8129
+ created_at?: string;
8130
+ delivery_date?: string | null;
8131
+ delivery_location_id?: string | null;
8132
+ id?: string;
8133
+ notes?: string | null;
8134
+ order_id: string;
8135
+ shipment_number: number;
8136
+ shipped_at?: string | null;
8137
+ status?: string;
8138
+ updated_at?: string;
8139
+ };
8140
+ Update: {
8141
+ carrier_id?: string | null;
8142
+ created_at?: string;
8143
+ delivery_date?: string | null;
8144
+ delivery_location_id?: string | null;
8145
+ id?: string;
8146
+ notes?: string | null;
8147
+ order_id?: string;
8148
+ shipment_number?: number;
8149
+ shipped_at?: string | null;
8150
+ status?: string;
8151
+ updated_at?: string;
8152
+ };
8153
+ Relationships: [{
8154
+ foreignKeyName: "order_shipments_carrier_id_fkey";
8155
+ columns: ["carrier_id"];
8156
+ isOneToOne: false;
8157
+ referencedRelation: "carriers";
8158
+ referencedColumns: ["id"];
8159
+ }, {
8160
+ foreignKeyName: "order_shipments_order_id_fkey";
8161
+ columns: ["order_id"];
8162
+ isOneToOne: false;
8163
+ referencedRelation: "orders";
8164
+ referencedColumns: ["id"];
8165
+ }];
8166
+ };
7435
8167
  orders: {
7436
8168
  Row: {
8169
+ buffer_id: string | null;
7437
8170
  created_at: string;
7438
8171
  custom_fields: import("../integrations/supabase/types").Json;
7439
8172
  customer_id: string | null;
7440
8173
  customer_name: string;
7441
8174
  deleted_at: string | null;
7442
- delivery_date: string;
8175
+ delivery_date: string | null;
8176
+ floriday_sales_order_id: string | null;
7443
8177
  id: string;
8178
+ is_reservation: boolean;
7444
8179
  notes: string | null;
7445
8180
  order_date: string;
7446
8181
  order_number: string;
@@ -7452,13 +8187,16 @@ export declare const listExternalProviders: import("@tanstack/start-client-core"
7452
8187
  updated_at: string;
7453
8188
  };
7454
8189
  Insert: {
8190
+ buffer_id?: string | null;
7455
8191
  created_at?: string;
7456
8192
  custom_fields?: import("../integrations/supabase/types").Json;
7457
8193
  customer_id?: string | null;
7458
8194
  customer_name?: string;
7459
8195
  deleted_at?: string | null;
7460
- delivery_date: string;
8196
+ delivery_date?: string | null;
8197
+ floriday_sales_order_id?: string | null;
7461
8198
  id?: string;
8199
+ is_reservation?: boolean;
7462
8200
  notes?: string | null;
7463
8201
  order_date?: string;
7464
8202
  order_number: string;
@@ -7470,13 +8208,16 @@ export declare const listExternalProviders: import("@tanstack/start-client-core"
7470
8208
  updated_at?: string;
7471
8209
  };
7472
8210
  Update: {
8211
+ buffer_id?: string | null;
7473
8212
  created_at?: string;
7474
8213
  custom_fields?: import("../integrations/supabase/types").Json;
7475
8214
  customer_id?: string | null;
7476
8215
  customer_name?: string;
7477
8216
  deleted_at?: string | null;
7478
- delivery_date?: string;
8217
+ delivery_date?: string | null;
8218
+ floriday_sales_order_id?: string | null;
7479
8219
  id?: string;
8220
+ is_reservation?: boolean;
7480
8221
  notes?: string | null;
7481
8222
  order_date?: string;
7482
8223
  order_number?: string;
@@ -7488,6 +8229,12 @@ export declare const listExternalProviders: import("@tanstack/start-client-core"
7488
8229
  updated_at?: string;
7489
8230
  };
7490
8231
  Relationships: [{
8232
+ foreignKeyName: "orders_buffer_id_fkey";
8233
+ columns: ["buffer_id"];
8234
+ isOneToOne: false;
8235
+ referencedRelation: "order_buffers";
8236
+ referencedColumns: ["id"];
8237
+ }, {
7491
8238
  foreignKeyName: "orders_customer_id_fkey";
7492
8239
  columns: ["customer_id"];
7493
8240
  isOneToOne: false;
@@ -7751,6 +8498,8 @@ export declare const listExternalProviders: import("@tanstack/start-client-core"
7751
8498
  Row: {
7752
8499
  created_at: string;
7753
8500
  description: string | null;
8501
+ head_product_id: string | null;
8502
+ head_trade_item_floriday_id: string | null;
7754
8503
  id: string;
7755
8504
  is_active: boolean;
7756
8505
  name: string;
@@ -7760,6 +8509,8 @@ export declare const listExternalProviders: import("@tanstack/start-client-core"
7760
8509
  Insert: {
7761
8510
  created_at?: string;
7762
8511
  description?: string | null;
8512
+ head_product_id?: string | null;
8513
+ head_trade_item_floriday_id?: string | null;
7763
8514
  id?: string;
7764
8515
  is_active?: boolean;
7765
8516
  name: string;
@@ -7769,13 +8520,21 @@ export declare const listExternalProviders: import("@tanstack/start-client-core"
7769
8520
  Update: {
7770
8521
  created_at?: string;
7771
8522
  description?: string | null;
8523
+ head_product_id?: string | null;
8524
+ head_trade_item_floriday_id?: string | null;
7772
8525
  id?: string;
7773
8526
  is_active?: boolean;
7774
8527
  name?: string;
7775
8528
  tenant_id?: string;
7776
8529
  updated_at?: string;
7777
8530
  };
7778
- Relationships: [];
8531
+ Relationships: [{
8532
+ foreignKeyName: "product_groups_head_product_id_fkey";
8533
+ columns: ["head_product_id"];
8534
+ isOneToOne: false;
8535
+ referencedRelation: "products";
8536
+ referencedColumns: ["id"];
8537
+ }];
7779
8538
  };
7780
8539
  products: {
7781
8540
  Row: {
@@ -10326,6 +11085,7 @@ export declare const listExternalProviders: import("@tanstack/start-client-core"
10326
11085
  internal_notes: string | null;
10327
11086
  parent_werkbon_id: string | null;
10328
11087
  parsed_payload: import("../integrations/supabase/types").Json | null;
11088
+ planning_status: string;
10329
11089
  project_number: string | null;
10330
11090
  room_number: string | null;
10331
11091
  scheduled_end_time: string | null;
@@ -10333,6 +11093,7 @@ export declare const listExternalProviders: import("@tanstack/start-client-core"
10333
11093
  sequence_number: number;
10334
11094
  source_pdf_path: string | null;
10335
11095
  status: string;
11096
+ technician_id: string | null;
10336
11097
  technician_notes: string | null;
10337
11098
  technician_notes_raw: string | null;
10338
11099
  technician_task_description: string | null;
@@ -10353,6 +11114,7 @@ export declare const listExternalProviders: import("@tanstack/start-client-core"
10353
11114
  internal_notes?: string | null;
10354
11115
  parent_werkbon_id?: string | null;
10355
11116
  parsed_payload?: import("../integrations/supabase/types").Json | null;
11117
+ planning_status?: string;
10356
11118
  project_number?: string | null;
10357
11119
  room_number?: string | null;
10358
11120
  scheduled_end_time?: string | null;
@@ -10360,6 +11122,7 @@ export declare const listExternalProviders: import("@tanstack/start-client-core"
10360
11122
  sequence_number: number;
10361
11123
  source_pdf_path?: string | null;
10362
11124
  status?: string;
11125
+ technician_id?: string | null;
10363
11126
  technician_notes?: string | null;
10364
11127
  technician_notes_raw?: string | null;
10365
11128
  technician_task_description?: string | null;
@@ -10380,6 +11143,7 @@ export declare const listExternalProviders: import("@tanstack/start-client-core"
10380
11143
  internal_notes?: string | null;
10381
11144
  parent_werkbon_id?: string | null;
10382
11145
  parsed_payload?: import("../integrations/supabase/types").Json | null;
11146
+ planning_status?: string;
10383
11147
  project_number?: string | null;
10384
11148
  room_number?: string | null;
10385
11149
  scheduled_end_time?: string | null;
@@ -10387,6 +11151,7 @@ export declare const listExternalProviders: import("@tanstack/start-client-core"
10387
11151
  sequence_number?: number;
10388
11152
  source_pdf_path?: string | null;
10389
11153
  status?: string;
11154
+ technician_id?: string | null;
10390
11155
  technician_notes?: string | null;
10391
11156
  technician_notes_raw?: string | null;
10392
11157
  technician_task_description?: string | null;
@@ -10395,17 +11160,17 @@ export declare const listExternalProviders: import("@tanstack/start-client-core"
10395
11160
  work_address?: string | null;
10396
11161
  };
10397
11162
  Relationships: [{
10398
- foreignKeyName: "werkbonnen_customer_id_fkey";
10399
- columns: ["customer_id"];
10400
- isOneToOne: false;
10401
- referencedRelation: "customers";
10402
- referencedColumns: ["id"];
10403
- }, {
10404
11163
  foreignKeyName: "werkbonnen_parent_werkbon_id_fkey";
10405
11164
  columns: ["parent_werkbon_id"];
10406
11165
  isOneToOne: false;
10407
11166
  referencedRelation: "werkbonnen";
10408
11167
  referencedColumns: ["id"];
11168
+ }, {
11169
+ foreignKeyName: "werkbonnen_technician_id_fkey";
11170
+ columns: ["technician_id"];
11171
+ isOneToOne: false;
11172
+ referencedRelation: "monteurs";
11173
+ referencedColumns: ["id"];
10409
11174
  }];
10410
11175
  };
10411
11176
  work_order_monteurs: {
@@ -11124,6 +11889,21 @@ export declare const listExternalProviders: import("@tanstack/start-client-core"
11124
11889
  };
11125
11890
  Returns: string;
11126
11891
  };
11892
+ ai_usage_by_module: {
11893
+ Args: {
11894
+ _from: string;
11895
+ _to: string;
11896
+ };
11897
+ Returns: {
11898
+ calls: number;
11899
+ consumer_module_id: string;
11900
+ cost_usd: number;
11901
+ errors: number;
11902
+ input_tokens: number;
11903
+ output_tokens: number;
11904
+ total_tokens: number;
11905
+ }[];
11906
+ };
11127
11907
  apply_stock_consumption: {
11128
11908
  Args: {
11129
11909
  p_order_id: string;
@@ -11272,6 +12052,12 @@ export declare const listExternalProviders: import("@tanstack/start-client-core"
11272
12052
  Args: never;
11273
12053
  Returns: string;
11274
12054
  };
12055
+ custom_access_token_hook: {
12056
+ Args: {
12057
+ event: import("../integrations/supabase/types").Json;
12058
+ };
12059
+ Returns: import("../integrations/supabase/types").Json;
12060
+ };
11275
12061
  dashboard_alert_counts: {
11276
12062
  Args: never;
11277
12063
  Returns: import("../integrations/supabase/types").Json;
@@ -11607,6 +12393,14 @@ export declare const listExternalProviders: import("@tanstack/start-client-core"
11607
12393
  };
11608
12394
  Returns: string;
11609
12395
  };
12396
+ has_module_permission: {
12397
+ Args: {
12398
+ _min: string;
12399
+ _module_id: string;
12400
+ _user_id: string;
12401
+ };
12402
+ Returns: boolean;
12403
+ };
11610
12404
  has_role: {
11611
12405
  Args: {
11612
12406
  _role: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
@@ -11632,6 +12426,20 @@ export declare const listExternalProviders: import("@tanstack/start-client-core"
11632
12426
  };
11633
12427
  Returns: boolean;
11634
12428
  };
12429
+ jwt_has_role: {
12430
+ Args: {
12431
+ _role: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
12432
+ };
12433
+ Returns: boolean;
12434
+ };
12435
+ list_monteurs: {
12436
+ Args: never;
12437
+ Returns: {
12438
+ display_name: string;
12439
+ email: string;
12440
+ user_id: string;
12441
+ }[];
12442
+ };
11635
12443
  local_effective_price: {
11636
12444
  Args: {
11637
12445
  _customer_id: string;
@@ -11648,6 +12456,22 @@ export declare const listExternalProviders: import("@tanstack/start-client-core"
11648
12456
  source_id: string;
11649
12457
  }[];
11650
12458
  };
12459
+ log_ai_call: {
12460
+ Args: {
12461
+ _consumer_module_id: string;
12462
+ _cost_usd: number;
12463
+ _duration_ms: number;
12464
+ _error_code: string;
12465
+ _error_message: string;
12466
+ _input_tokens: number;
12467
+ _model_slug: string;
12468
+ _output_tokens: number;
12469
+ _provider_slug: string;
12470
+ _status: string;
12471
+ _total_tokens: number;
12472
+ };
12473
+ Returns: string;
12474
+ };
11651
12475
  mark_offer_clicked: {
11652
12476
  Args: {
11653
12477
  p_code: string;
@@ -11660,6 +12484,12 @@ export declare const listExternalProviders: import("@tanstack/start-client-core"
11660
12484
  };
11661
12485
  Returns: undefined;
11662
12486
  };
12487
+ mark_shipment_shipped: {
12488
+ Args: {
12489
+ p_shipment_id: string;
12490
+ };
12491
+ Returns: undefined;
12492
+ };
11663
12493
  next_order_number: {
11664
12494
  Args: {
11665
12495
  p_prefix: string;
@@ -12136,9 +12966,11 @@ export declare const listExternalProviders: import("@tanstack/start-client-core"
12136
12966
  };
12137
12967
  };
12138
12968
  Enums: {
12139
- app_role: "admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie" | "monteur";
12969
+ app_role: "admin" | "planner" | "monteur" | "administratie" | "ai_admin";
12140
12970
  exact_env: "staging" | "live";
12141
12971
  exact_push_status: "pending" | "sent" | "error";
12972
+ itk_customer_segment: "Business" | "Private";
12973
+ itk_dynamic_field_type: "text" | "select" | "date" | "checkbox";
12142
12974
  quote_status: "concept" | "verzonden" | "bekeken" | "in_behandeling" | "geaccepteerd" | "afgewezen" | "verlopen" | "gearchiveerd";
12143
12975
  };
12144
12976
  CompositeTypes: { [_ in never]: never; };
@@ -12429,6 +13261,57 @@ export declare const listExternalCustomers: import("@tanstack/start-client-core"
12429
13261
  referencedColumns: ["id"];
12430
13262
  }];
12431
13263
  };
13264
+ ai_call_log: {
13265
+ Row: {
13266
+ consumer_module_id: string;
13267
+ cost_usd: number | null;
13268
+ created_at: string;
13269
+ created_by: string | null;
13270
+ duration_ms: number | null;
13271
+ error_code: string | null;
13272
+ error_message: string | null;
13273
+ id: string;
13274
+ input_tokens: number;
13275
+ model_slug: string | null;
13276
+ output_tokens: number;
13277
+ provider_slug: string | null;
13278
+ status: string;
13279
+ total_tokens: number;
13280
+ };
13281
+ Insert: {
13282
+ consumer_module_id: string;
13283
+ cost_usd?: number | null;
13284
+ created_at?: string;
13285
+ created_by?: string | null;
13286
+ duration_ms?: number | null;
13287
+ error_code?: string | null;
13288
+ error_message?: string | null;
13289
+ id?: string;
13290
+ input_tokens?: number;
13291
+ model_slug?: string | null;
13292
+ output_tokens?: number;
13293
+ provider_slug?: string | null;
13294
+ status: string;
13295
+ total_tokens?: number;
13296
+ };
13297
+ Update: {
13298
+ consumer_module_id?: string;
13299
+ cost_usd?: number | null;
13300
+ created_at?: string;
13301
+ created_by?: string | null;
13302
+ duration_ms?: number | null;
13303
+ error_code?: string | null;
13304
+ error_message?: string | null;
13305
+ id?: string;
13306
+ input_tokens?: number;
13307
+ model_slug?: string | null;
13308
+ output_tokens?: number;
13309
+ provider_slug?: string | null;
13310
+ status?: string;
13311
+ total_tokens?: number;
13312
+ };
13313
+ Relationships: [];
13314
+ };
12432
13315
  ai_credentials: {
12433
13316
  Row: {
12434
13317
  active: boolean;
@@ -12465,6 +13348,36 @@ export declare const listExternalCustomers: import("@tanstack/start-client-core"
12465
13348
  referencedColumns: ["id"];
12466
13349
  }];
12467
13350
  };
13351
+ ai_goals: {
13352
+ Row: {
13353
+ active: boolean;
13354
+ created_at: string;
13355
+ description: string | null;
13356
+ key: string;
13357
+ label: string;
13358
+ sort_order: number;
13359
+ updated_at: string;
13360
+ };
13361
+ Insert: {
13362
+ active?: boolean;
13363
+ created_at?: string;
13364
+ description?: string | null;
13365
+ key: string;
13366
+ label: string;
13367
+ sort_order?: number;
13368
+ updated_at?: string;
13369
+ };
13370
+ Update: {
13371
+ active?: boolean;
13372
+ created_at?: string;
13373
+ description?: string | null;
13374
+ key?: string;
13375
+ label?: string;
13376
+ sort_order?: number;
13377
+ updated_at?: string;
13378
+ };
13379
+ Relationships: [];
13380
+ };
12468
13381
  ai_model_pricing: {
12469
13382
  Row: {
12470
13383
  created_at: string;
@@ -13251,6 +14164,141 @@ export declare const listExternalCustomers: import("@tanstack/start-client-core"
13251
14164
  };
13252
14165
  Relationships: [];
13253
14166
  };
14167
+ cart_planning_pick_times: {
14168
+ Row: {
14169
+ created_at: string;
14170
+ id: string;
14171
+ pot_size: string;
14172
+ seconds_per_cart: number;
14173
+ updated_at: string;
14174
+ };
14175
+ Insert: {
14176
+ created_at?: string;
14177
+ id?: string;
14178
+ pot_size: string;
14179
+ seconds_per_cart: number;
14180
+ updated_at?: string;
14181
+ };
14182
+ Update: {
14183
+ created_at?: string;
14184
+ id?: string;
14185
+ pot_size?: string;
14186
+ seconds_per_cart?: number;
14187
+ updated_at?: string;
14188
+ };
14189
+ Relationships: [];
14190
+ };
14191
+ cart_planning_product_overrides: {
14192
+ Row: {
14193
+ created_at: string;
14194
+ id: string;
14195
+ max_party_share_per_layer_pct_override: number | null;
14196
+ never_mix: boolean;
14197
+ notes: string | null;
14198
+ product_id: string;
14199
+ updated_at: string;
14200
+ };
14201
+ Insert: {
14202
+ created_at?: string;
14203
+ id?: string;
14204
+ max_party_share_per_layer_pct_override?: number | null;
14205
+ never_mix?: boolean;
14206
+ notes?: string | null;
14207
+ product_id: string;
14208
+ updated_at?: string;
14209
+ };
14210
+ Update: {
14211
+ created_at?: string;
14212
+ id?: string;
14213
+ max_party_share_per_layer_pct_override?: number | null;
14214
+ never_mix?: boolean;
14215
+ notes?: string | null;
14216
+ product_id?: string;
14217
+ updated_at?: string;
14218
+ };
14219
+ Relationships: [{
14220
+ foreignKeyName: "cart_planning_product_overrides_product_id_fkey";
14221
+ columns: ["product_id"];
14222
+ isOneToOne: true;
14223
+ referencedRelation: "products";
14224
+ referencedColumns: ["id"];
14225
+ }];
14226
+ };
14227
+ cart_planning_settings: {
14228
+ Row: {
14229
+ allow_editing_after_pickstation_send: boolean;
14230
+ buffer_grouping_mode: string;
14231
+ combine_floriday_orders: boolean;
14232
+ combine_floriday_orders_window: string;
14233
+ combine_orders_scope: string;
14234
+ default_workers: number;
14235
+ id: number;
14236
+ max_beladingen_per_layer: number;
14237
+ max_customers_per_cart: number;
14238
+ max_one_customer_per_layer: boolean;
14239
+ max_party_share_per_layer_pct: number;
14240
+ optimization_strategy: string;
14241
+ own_cart_from_layers: number;
14242
+ pick_time_mode: string;
14243
+ plants_per_day: number;
14244
+ plants_per_hour: number;
14245
+ require_same_carrier: boolean;
14246
+ require_same_crate_type: boolean;
14247
+ require_same_delivery_date: boolean;
14248
+ require_same_delivery_location: boolean;
14249
+ updated_at: string;
14250
+ updated_by: string | null;
14251
+ };
14252
+ Insert: {
14253
+ allow_editing_after_pickstation_send?: boolean;
14254
+ buffer_grouping_mode?: string;
14255
+ combine_floriday_orders?: boolean;
14256
+ combine_floriday_orders_window?: string;
14257
+ combine_orders_scope?: string;
14258
+ default_workers?: number;
14259
+ id?: number;
14260
+ max_beladingen_per_layer?: number;
14261
+ max_customers_per_cart?: number;
14262
+ max_one_customer_per_layer?: boolean;
14263
+ max_party_share_per_layer_pct?: number;
14264
+ optimization_strategy?: string;
14265
+ own_cart_from_layers?: number;
14266
+ pick_time_mode?: string;
14267
+ plants_per_day?: number;
14268
+ plants_per_hour?: number;
14269
+ require_same_carrier?: boolean;
14270
+ require_same_crate_type?: boolean;
14271
+ require_same_delivery_date?: boolean;
14272
+ require_same_delivery_location?: boolean;
14273
+ updated_at?: string;
14274
+ updated_by?: string | null;
14275
+ };
14276
+ Update: {
14277
+ allow_editing_after_pickstation_send?: boolean;
14278
+ buffer_grouping_mode?: string;
14279
+ combine_floriday_orders?: boolean;
14280
+ combine_floriday_orders_window?: string;
14281
+ combine_orders_scope?: string;
14282
+ default_workers?: number;
14283
+ id?: number;
14284
+ max_beladingen_per_layer?: number;
14285
+ max_customers_per_cart?: number;
14286
+ max_one_customer_per_layer?: boolean;
14287
+ max_party_share_per_layer_pct?: number;
14288
+ optimization_strategy?: string;
14289
+ own_cart_from_layers?: number;
14290
+ pick_time_mode?: string;
14291
+ plants_per_day?: number;
14292
+ plants_per_hour?: number;
14293
+ require_same_carrier?: boolean;
14294
+ require_same_crate_type?: boolean;
14295
+ require_same_delivery_date?: boolean;
14296
+ require_same_delivery_location?: boolean;
14297
+ updated_at?: string;
14298
+ updated_by?: string | null;
14299
+ };
14300
+ Relationships: [];
14301
+ };
13254
14302
  cart_replan_queue: {
13255
14303
  Row: {
13256
14304
  attempts: number;
@@ -13281,6 +14329,39 @@ export declare const listExternalCustomers: import("@tanstack/start-client-core"
13281
14329
  referencedColumns: ["id"];
13282
14330
  }];
13283
14331
  };
14332
+ cart_types: {
14333
+ Row: {
14334
+ created_at: string;
14335
+ id: string;
14336
+ is_default: boolean;
14337
+ layer_length_cm: number;
14338
+ layer_width_cm: number;
14339
+ layers_per_cart: number;
14340
+ name: string;
14341
+ updated_at: string;
14342
+ };
14343
+ Insert: {
14344
+ created_at?: string;
14345
+ id?: string;
14346
+ is_default?: boolean;
14347
+ layer_length_cm: number;
14348
+ layer_width_cm: number;
14349
+ layers_per_cart?: number;
14350
+ name: string;
14351
+ updated_at?: string;
14352
+ };
14353
+ Update: {
14354
+ created_at?: string;
14355
+ id?: string;
14356
+ is_default?: boolean;
14357
+ layer_length_cm?: number;
14358
+ layer_width_cm?: number;
14359
+ layers_per_cart?: number;
14360
+ name?: string;
14361
+ updated_at?: string;
14362
+ };
14363
+ Relationships: [];
14364
+ };
13284
14365
  catalog_articles_cache: {
13285
14366
  Row: {
13286
14367
  created_at: string;
@@ -13368,6 +14449,36 @@ export declare const listExternalCustomers: import("@tanstack/start-client-core"
13368
14449
  };
13369
14450
  Relationships: [];
13370
14451
  };
14452
+ crate_types: {
14453
+ Row: {
14454
+ created_at: string;
14455
+ id: string;
14456
+ length_cm: number;
14457
+ name: string;
14458
+ plants_per_crate: number;
14459
+ updated_at: string;
14460
+ width_cm: number;
14461
+ };
14462
+ Insert: {
14463
+ created_at?: string;
14464
+ id?: string;
14465
+ length_cm: number;
14466
+ name: string;
14467
+ plants_per_crate?: number;
14468
+ updated_at?: string;
14469
+ width_cm: number;
14470
+ };
14471
+ Update: {
14472
+ created_at?: string;
14473
+ id?: string;
14474
+ length_cm?: number;
14475
+ name?: string;
14476
+ plants_per_crate?: number;
14477
+ updated_at?: string;
14478
+ width_cm?: number;
14479
+ };
14480
+ Relationships: [];
14481
+ };
13371
14482
  customer_audit_log: {
13372
14483
  Row: {
13373
14484
  action: string;
@@ -17907,6 +19018,288 @@ export declare const listExternalCustomers: import("@tanstack/start-client-core"
17907
19018
  };
17908
19019
  Relationships: [];
17909
19020
  };
19021
+ itk_contact_persons: {
19022
+ Row: {
19023
+ created_at: string;
19024
+ customer_id: string;
19025
+ email: string | null;
19026
+ id: string;
19027
+ name: string;
19028
+ phone: string | null;
19029
+ role: string | null;
19030
+ updated_at: string;
19031
+ };
19032
+ Insert: {
19033
+ created_at?: string;
19034
+ customer_id: string;
19035
+ email?: string | null;
19036
+ id?: string;
19037
+ name: string;
19038
+ phone?: string | null;
19039
+ role?: string | null;
19040
+ updated_at?: string;
19041
+ };
19042
+ Update: {
19043
+ created_at?: string;
19044
+ customer_id?: string;
19045
+ email?: string | null;
19046
+ id?: string;
19047
+ name?: string;
19048
+ phone?: string | null;
19049
+ role?: string | null;
19050
+ updated_at?: string;
19051
+ };
19052
+ Relationships: [{
19053
+ foreignKeyName: "itk_contact_persons_customer_id_fkey";
19054
+ columns: ["customer_id"];
19055
+ isOneToOne: false;
19056
+ referencedRelation: "itk_customers";
19057
+ referencedColumns: ["id"];
19058
+ }];
19059
+ };
19060
+ itk_customer_dynamic_values: {
19061
+ Row: {
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
+ Insert: {
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
+ Update: {
19078
+ created_at?: string;
19079
+ customer_id?: string;
19080
+ field_id?: string;
19081
+ id?: string;
19082
+ updated_at?: string;
19083
+ value?: string | null;
19084
+ };
19085
+ Relationships: [{
19086
+ foreignKeyName: "itk_customer_dynamic_values_customer_id_fkey";
19087
+ columns: ["customer_id"];
19088
+ isOneToOne: false;
19089
+ referencedRelation: "itk_customers";
19090
+ referencedColumns: ["id"];
19091
+ }, {
19092
+ foreignKeyName: "itk_customer_dynamic_values_field_id_fkey";
19093
+ columns: ["field_id"];
19094
+ isOneToOne: false;
19095
+ referencedRelation: "itk_dynamic_fields";
19096
+ referencedColumns: ["id"];
19097
+ }];
19098
+ };
19099
+ itk_customer_notes: {
19100
+ Row: {
19101
+ body: string;
19102
+ created_at: string;
19103
+ created_by: string | null;
19104
+ customer_id: string;
19105
+ id: string;
19106
+ note_type: string;
19107
+ updated_at: string;
19108
+ };
19109
+ Insert: {
19110
+ body: string;
19111
+ created_at?: string;
19112
+ created_by?: string | null;
19113
+ customer_id: string;
19114
+ id?: string;
19115
+ note_type?: string;
19116
+ updated_at?: string;
19117
+ };
19118
+ Update: {
19119
+ body?: string;
19120
+ created_at?: string;
19121
+ created_by?: string | null;
19122
+ customer_id?: string;
19123
+ id?: string;
19124
+ note_type?: string;
19125
+ updated_at?: string;
19126
+ };
19127
+ Relationships: [{
19128
+ foreignKeyName: "itk_customer_notes_customer_id_fkey";
19129
+ columns: ["customer_id"];
19130
+ isOneToOne: false;
19131
+ referencedRelation: "itk_customers";
19132
+ referencedColumns: ["id"];
19133
+ }];
19134
+ };
19135
+ itk_customers: {
19136
+ Row: {
19137
+ billing_city: string | null;
19138
+ billing_postcode: string | null;
19139
+ billing_street: string | null;
19140
+ created_at: string;
19141
+ general_email: string | null;
19142
+ general_phone: string | null;
19143
+ id: string;
19144
+ legacy_customer_id: string | null;
19145
+ name: string;
19146
+ segment: import("../integrations/supabase/types").Database["public"]["Enums"]["itk_customer_segment"];
19147
+ updated_at: string;
19148
+ };
19149
+ Insert: {
19150
+ billing_city?: string | null;
19151
+ billing_postcode?: string | null;
19152
+ billing_street?: string | null;
19153
+ created_at?: string;
19154
+ general_email?: string | null;
19155
+ general_phone?: string | null;
19156
+ id?: string;
19157
+ legacy_customer_id?: string | null;
19158
+ name: string;
19159
+ segment?: import("../integrations/supabase/types").Database["public"]["Enums"]["itk_customer_segment"];
19160
+ updated_at?: string;
19161
+ };
19162
+ Update: {
19163
+ billing_city?: string | null;
19164
+ billing_postcode?: string | null;
19165
+ billing_street?: string | null;
19166
+ created_at?: string;
19167
+ general_email?: string | null;
19168
+ general_phone?: string | null;
19169
+ id?: string;
19170
+ legacy_customer_id?: string | null;
19171
+ name?: string;
19172
+ segment?: import("../integrations/supabase/types").Database["public"]["Enums"]["itk_customer_segment"];
19173
+ updated_at?: string;
19174
+ };
19175
+ Relationships: [{
19176
+ foreignKeyName: "itk_customers_legacy_customer_id_fkey";
19177
+ columns: ["legacy_customer_id"];
19178
+ isOneToOne: false;
19179
+ referencedRelation: "customers";
19180
+ referencedColumns: ["id"];
19181
+ }];
19182
+ };
19183
+ itk_dynamic_fields: {
19184
+ Row: {
19185
+ created_at: string;
19186
+ field_name: string;
19187
+ field_type: import("../integrations/supabase/types").Database["public"]["Enums"]["itk_dynamic_field_type"];
19188
+ id: string;
19189
+ options: import("../integrations/supabase/types").Json;
19190
+ sort_order: number;
19191
+ updated_at: string;
19192
+ };
19193
+ Insert: {
19194
+ created_at?: string;
19195
+ field_name: string;
19196
+ field_type?: import("../integrations/supabase/types").Database["public"]["Enums"]["itk_dynamic_field_type"];
19197
+ id?: string;
19198
+ options?: import("../integrations/supabase/types").Json;
19199
+ sort_order?: number;
19200
+ updated_at?: string;
19201
+ };
19202
+ Update: {
19203
+ created_at?: string;
19204
+ field_name?: string;
19205
+ field_type?: import("../integrations/supabase/types").Database["public"]["Enums"]["itk_dynamic_field_type"];
19206
+ id?: string;
19207
+ options?: import("../integrations/supabase/types").Json;
19208
+ sort_order?: number;
19209
+ updated_at?: string;
19210
+ };
19211
+ Relationships: [];
19212
+ };
19213
+ itk_work_locations: {
19214
+ Row: {
19215
+ city: string | null;
19216
+ created_at: string;
19217
+ customer_id: string;
19218
+ id: string;
19219
+ instructions: string | null;
19220
+ label: string;
19221
+ latitude: number | null;
19222
+ longitude: number | null;
19223
+ postcode: string | null;
19224
+ street: string | null;
19225
+ updated_at: string;
19226
+ };
19227
+ Insert: {
19228
+ city?: string | null;
19229
+ created_at?: string;
19230
+ customer_id: string;
19231
+ id?: string;
19232
+ instructions?: string | null;
19233
+ label: string;
19234
+ latitude?: number | null;
19235
+ longitude?: number | null;
19236
+ postcode?: string | null;
19237
+ street?: string | null;
19238
+ updated_at?: string;
19239
+ };
19240
+ Update: {
19241
+ city?: string | null;
19242
+ created_at?: string;
19243
+ customer_id?: string;
19244
+ id?: string;
19245
+ instructions?: string | null;
19246
+ label?: string;
19247
+ latitude?: number | null;
19248
+ longitude?: number | null;
19249
+ postcode?: string | null;
19250
+ street?: string | null;
19251
+ updated_at?: string;
19252
+ };
19253
+ Relationships: [{
19254
+ foreignKeyName: "itk_work_locations_customer_id_fkey";
19255
+ columns: ["customer_id"];
19256
+ isOneToOne: false;
19257
+ referencedRelation: "itk_customers";
19258
+ referencedColumns: ["id"];
19259
+ }];
19260
+ };
19261
+ leave_requests: {
19262
+ Row: {
19263
+ created_at: string;
19264
+ end_date: string;
19265
+ id: string;
19266
+ reason: string | null;
19267
+ start_date: string;
19268
+ status: string;
19269
+ tenant_id: string;
19270
+ updated_at: string;
19271
+ user_id: string;
19272
+ };
19273
+ Insert: {
19274
+ created_at?: string;
19275
+ end_date: string;
19276
+ id?: string;
19277
+ reason?: string | null;
19278
+ start_date: string;
19279
+ status?: string;
19280
+ tenant_id?: string;
19281
+ updated_at?: string;
19282
+ user_id: string;
19283
+ };
19284
+ Update: {
19285
+ created_at?: string;
19286
+ end_date?: string;
19287
+ id?: string;
19288
+ reason?: string | null;
19289
+ start_date?: string;
19290
+ status?: string;
19291
+ tenant_id?: string;
19292
+ updated_at?: string;
19293
+ user_id?: string;
19294
+ };
19295
+ Relationships: [{
19296
+ foreignKeyName: "leave_requests_user_id_fkey";
19297
+ columns: ["user_id"];
19298
+ isOneToOne: false;
19299
+ referencedRelation: "monteurs";
19300
+ referencedColumns: ["id"];
19301
+ }];
19302
+ };
17910
19303
  local_customer_agreements: {
17911
19304
  Row: {
17912
19305
  base_price: number | null;
@@ -18558,6 +19951,33 @@ export declare const listExternalCustomers: import("@tanstack/start-client-core"
18558
19951
  };
18559
19952
  Relationships: [];
18560
19953
  };
19954
+ module_permissions: {
19955
+ Row: {
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
+ Insert: {
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
+ Update: {
19972
+ created_at?: string;
19973
+ id?: string;
19974
+ module_id?: string;
19975
+ permission?: string;
19976
+ role?: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
19977
+ updated_at?: string;
19978
+ };
19979
+ Relationships: [];
19980
+ };
18561
19981
  monteurs: {
18562
19982
  Row: {
18563
19983
  avatar_url: string | null;
@@ -19287,6 +20707,42 @@ export declare const listExternalCustomers: import("@tanstack/start-client-core"
19287
20707
  };
19288
20708
  Relationships: [];
19289
20709
  };
20710
+ order_buffers: {
20711
+ Row: {
20712
+ buffer_key: string;
20713
+ created_at: string;
20714
+ customer_id: string | null;
20715
+ grouping_mode: string;
20716
+ id: string;
20717
+ pickup_date: string | null;
20718
+ pickup_location: string | null;
20719
+ plan_locked_at: string | null;
20720
+ updated_at: string;
20721
+ };
20722
+ Insert: {
20723
+ buffer_key: string;
20724
+ created_at?: string;
20725
+ customer_id?: string | null;
20726
+ grouping_mode: string;
20727
+ id?: string;
20728
+ pickup_date?: string | null;
20729
+ pickup_location?: string | null;
20730
+ plan_locked_at?: string | null;
20731
+ updated_at?: string;
20732
+ };
20733
+ Update: {
20734
+ buffer_key?: string;
20735
+ created_at?: string;
20736
+ customer_id?: string | null;
20737
+ grouping_mode?: string;
20738
+ id?: string;
20739
+ pickup_date?: string | null;
20740
+ pickup_location?: string | null;
20741
+ plan_locked_at?: string | null;
20742
+ updated_at?: string;
20743
+ };
20744
+ Relationships: [];
20745
+ };
19290
20746
  order_cart_items: {
19291
20747
  Row: {
19292
20748
  cart_id: string;
@@ -19353,6 +20809,7 @@ export declare const listExternalCustomers: import("@tanstack/start-client-core"
19353
20809
  order_carts: {
19354
20810
  Row: {
19355
20811
  algorithm_version: number;
20812
+ buffer_id: string | null;
19356
20813
  cart_number: number;
19357
20814
  created_at: string;
19358
20815
  id: string;
@@ -19360,13 +20817,14 @@ export declare const listExternalCustomers: import("@tanstack/start-client-core"
19360
20817
  is_complete: boolean;
19361
20818
  notes: string | null;
19362
20819
  occupancy_pct: number;
19363
- order_id: string;
20820
+ order_id: string | null;
19364
20821
  source: string;
19365
20822
  total_layers_used: number;
19366
20823
  updated_at: string;
19367
20824
  };
19368
20825
  Insert: {
19369
20826
  algorithm_version?: number;
20827
+ buffer_id?: string | null;
19370
20828
  cart_number: number;
19371
20829
  created_at?: string;
19372
20830
  id?: string;
@@ -19374,13 +20832,14 @@ export declare const listExternalCustomers: import("@tanstack/start-client-core"
19374
20832
  is_complete?: boolean;
19375
20833
  notes?: string | null;
19376
20834
  occupancy_pct?: number;
19377
- order_id: string;
20835
+ order_id?: string | null;
19378
20836
  source?: string;
19379
20837
  total_layers_used?: number;
19380
20838
  updated_at?: string;
19381
20839
  };
19382
20840
  Update: {
19383
20841
  algorithm_version?: number;
20842
+ buffer_id?: string | null;
19384
20843
  cart_number?: number;
19385
20844
  created_at?: string;
19386
20845
  id?: string;
@@ -19388,12 +20847,18 @@ export declare const listExternalCustomers: import("@tanstack/start-client-core"
19388
20847
  is_complete?: boolean;
19389
20848
  notes?: string | null;
19390
20849
  occupancy_pct?: number;
19391
- order_id?: string;
20850
+ order_id?: string | null;
19392
20851
  source?: string;
19393
20852
  total_layers_used?: number;
19394
20853
  updated_at?: string;
19395
20854
  };
19396
20855
  Relationships: [{
20856
+ foreignKeyName: "order_carts_buffer_id_fkey";
20857
+ columns: ["buffer_id"];
20858
+ isOneToOne: false;
20859
+ referencedRelation: "order_buffers";
20860
+ referencedColumns: ["id"];
20861
+ }, {
19397
20862
  foreignKeyName: "order_carts_order_id_fkey";
19398
20863
  columns: ["order_id"];
19399
20864
  isOneToOne: false;
@@ -19530,15 +20995,117 @@ export declare const listExternalCustomers: import("@tanstack/start-client-core"
19530
20995
  };
19531
20996
  Relationships: [];
19532
20997
  };
20998
+ order_shipment_items: {
20999
+ Row: {
21000
+ created_at: string;
21001
+ id: string;
21002
+ order_item_id: string;
21003
+ product_id: string | null;
21004
+ product_name: string;
21005
+ quantity: number;
21006
+ shipment_id: string;
21007
+ updated_at: string;
21008
+ };
21009
+ Insert: {
21010
+ created_at?: string;
21011
+ id?: string;
21012
+ order_item_id: string;
21013
+ product_id?: string | null;
21014
+ product_name: string;
21015
+ quantity: number;
21016
+ shipment_id: string;
21017
+ updated_at?: string;
21018
+ };
21019
+ Update: {
21020
+ created_at?: string;
21021
+ id?: string;
21022
+ order_item_id?: string;
21023
+ product_id?: string | null;
21024
+ product_name?: string;
21025
+ quantity?: number;
21026
+ shipment_id?: string;
21027
+ updated_at?: string;
21028
+ };
21029
+ Relationships: [{
21030
+ foreignKeyName: "order_shipment_items_order_item_id_fkey";
21031
+ columns: ["order_item_id"];
21032
+ isOneToOne: false;
21033
+ referencedRelation: "order_items";
21034
+ referencedColumns: ["id"];
21035
+ }, {
21036
+ foreignKeyName: "order_shipment_items_shipment_id_fkey";
21037
+ columns: ["shipment_id"];
21038
+ isOneToOne: false;
21039
+ referencedRelation: "order_shipments";
21040
+ referencedColumns: ["id"];
21041
+ }];
21042
+ };
21043
+ order_shipments: {
21044
+ Row: {
21045
+ carrier_id: string | null;
21046
+ created_at: string;
21047
+ delivery_date: string | null;
21048
+ delivery_location_id: string | null;
21049
+ id: string;
21050
+ notes: string | null;
21051
+ order_id: string;
21052
+ shipment_number: number;
21053
+ shipped_at: string | null;
21054
+ status: string;
21055
+ updated_at: string;
21056
+ };
21057
+ Insert: {
21058
+ carrier_id?: string | null;
21059
+ created_at?: string;
21060
+ delivery_date?: string | null;
21061
+ delivery_location_id?: string | null;
21062
+ id?: string;
21063
+ notes?: string | null;
21064
+ order_id: string;
21065
+ shipment_number: number;
21066
+ shipped_at?: string | null;
21067
+ status?: string;
21068
+ updated_at?: string;
21069
+ };
21070
+ Update: {
21071
+ carrier_id?: string | null;
21072
+ created_at?: string;
21073
+ delivery_date?: string | null;
21074
+ delivery_location_id?: string | null;
21075
+ id?: string;
21076
+ notes?: string | null;
21077
+ order_id?: string;
21078
+ shipment_number?: number;
21079
+ shipped_at?: string | null;
21080
+ status?: string;
21081
+ updated_at?: string;
21082
+ };
21083
+ Relationships: [{
21084
+ foreignKeyName: "order_shipments_carrier_id_fkey";
21085
+ columns: ["carrier_id"];
21086
+ isOneToOne: false;
21087
+ referencedRelation: "carriers";
21088
+ referencedColumns: ["id"];
21089
+ }, {
21090
+ foreignKeyName: "order_shipments_order_id_fkey";
21091
+ columns: ["order_id"];
21092
+ isOneToOne: false;
21093
+ referencedRelation: "orders";
21094
+ referencedColumns: ["id"];
21095
+ }];
21096
+ };
19533
21097
  orders: {
19534
21098
  Row: {
21099
+ buffer_id: string | null;
19535
21100
  created_at: string;
19536
21101
  custom_fields: import("../integrations/supabase/types").Json;
19537
21102
  customer_id: string | null;
19538
21103
  customer_name: string;
19539
21104
  deleted_at: string | null;
19540
- delivery_date: string;
21105
+ delivery_date: string | null;
21106
+ floriday_sales_order_id: string | null;
19541
21107
  id: string;
21108
+ is_reservation: boolean;
19542
21109
  notes: string | null;
19543
21110
  order_date: string;
19544
21111
  order_number: string;
@@ -19550,13 +21117,16 @@ export declare const listExternalCustomers: import("@tanstack/start-client-core"
19550
21117
  updated_at: string;
19551
21118
  };
19552
21119
  Insert: {
21120
+ buffer_id?: string | null;
19553
21121
  created_at?: string;
19554
21122
  custom_fields?: import("../integrations/supabase/types").Json;
19555
21123
  customer_id?: string | null;
19556
21124
  customer_name?: string;
19557
21125
  deleted_at?: string | null;
19558
- delivery_date: string;
21126
+ delivery_date?: string | null;
21127
+ floriday_sales_order_id?: string | null;
19559
21128
  id?: string;
21129
+ is_reservation?: boolean;
19560
21130
  notes?: string | null;
19561
21131
  order_date?: string;
19562
21132
  order_number: string;
@@ -19568,13 +21138,16 @@ export declare const listExternalCustomers: import("@tanstack/start-client-core"
19568
21138
  updated_at?: string;
19569
21139
  };
19570
21140
  Update: {
21141
+ buffer_id?: string | null;
19571
21142
  created_at?: string;
19572
21143
  custom_fields?: import("../integrations/supabase/types").Json;
19573
21144
  customer_id?: string | null;
19574
21145
  customer_name?: string;
19575
21146
  deleted_at?: string | null;
19576
- delivery_date?: string;
21147
+ delivery_date?: string | null;
21148
+ floriday_sales_order_id?: string | null;
19577
21149
  id?: string;
21150
+ is_reservation?: boolean;
19578
21151
  notes?: string | null;
19579
21152
  order_date?: string;
19580
21153
  order_number?: string;
@@ -19586,6 +21159,12 @@ export declare const listExternalCustomers: import("@tanstack/start-client-core"
19586
21159
  updated_at?: string;
19587
21160
  };
19588
21161
  Relationships: [{
21162
+ foreignKeyName: "orders_buffer_id_fkey";
21163
+ columns: ["buffer_id"];
21164
+ isOneToOne: false;
21165
+ referencedRelation: "order_buffers";
21166
+ referencedColumns: ["id"];
21167
+ }, {
19589
21168
  foreignKeyName: "orders_customer_id_fkey";
19590
21169
  columns: ["customer_id"];
19591
21170
  isOneToOne: false;
@@ -19849,6 +21428,8 @@ export declare const listExternalCustomers: import("@tanstack/start-client-core"
19849
21428
  Row: {
19850
21429
  created_at: string;
19851
21430
  description: string | null;
21431
+ head_product_id: string | null;
21432
+ head_trade_item_floriday_id: string | null;
19852
21433
  id: string;
19853
21434
  is_active: boolean;
19854
21435
  name: string;
@@ -19858,6 +21439,8 @@ export declare const listExternalCustomers: import("@tanstack/start-client-core"
19858
21439
  Insert: {
19859
21440
  created_at?: string;
19860
21441
  description?: string | null;
21442
+ head_product_id?: string | null;
21443
+ head_trade_item_floriday_id?: string | null;
19861
21444
  id?: string;
19862
21445
  is_active?: boolean;
19863
21446
  name: string;
@@ -19867,13 +21450,21 @@ export declare const listExternalCustomers: import("@tanstack/start-client-core"
19867
21450
  Update: {
19868
21451
  created_at?: string;
19869
21452
  description?: string | null;
21453
+ head_product_id?: string | null;
21454
+ head_trade_item_floriday_id?: string | null;
19870
21455
  id?: string;
19871
21456
  is_active?: boolean;
19872
21457
  name?: string;
19873
21458
  tenant_id?: string;
19874
21459
  updated_at?: string;
19875
21460
  };
19876
- Relationships: [];
21461
+ Relationships: [{
21462
+ foreignKeyName: "product_groups_head_product_id_fkey";
21463
+ columns: ["head_product_id"];
21464
+ isOneToOne: false;
21465
+ referencedRelation: "products";
21466
+ referencedColumns: ["id"];
21467
+ }];
19877
21468
  };
19878
21469
  products: {
19879
21470
  Row: {
@@ -22424,6 +24015,7 @@ export declare const listExternalCustomers: import("@tanstack/start-client-core"
22424
24015
  internal_notes: string | null;
22425
24016
  parent_werkbon_id: string | null;
22426
24017
  parsed_payload: import("../integrations/supabase/types").Json | null;
24018
+ planning_status: string;
22427
24019
  project_number: string | null;
22428
24020
  room_number: string | null;
22429
24021
  scheduled_end_time: string | null;
@@ -22431,6 +24023,7 @@ export declare const listExternalCustomers: import("@tanstack/start-client-core"
22431
24023
  sequence_number: number;
22432
24024
  source_pdf_path: string | null;
22433
24025
  status: string;
24026
+ technician_id: string | null;
22434
24027
  technician_notes: string | null;
22435
24028
  technician_notes_raw: string | null;
22436
24029
  technician_task_description: string | null;
@@ -22451,6 +24044,7 @@ export declare const listExternalCustomers: import("@tanstack/start-client-core"
22451
24044
  internal_notes?: string | null;
22452
24045
  parent_werkbon_id?: string | null;
22453
24046
  parsed_payload?: import("../integrations/supabase/types").Json | null;
24047
+ planning_status?: string;
22454
24048
  project_number?: string | null;
22455
24049
  room_number?: string | null;
22456
24050
  scheduled_end_time?: string | null;
@@ -22458,6 +24052,7 @@ export declare const listExternalCustomers: import("@tanstack/start-client-core"
22458
24052
  sequence_number: number;
22459
24053
  source_pdf_path?: string | null;
22460
24054
  status?: string;
24055
+ technician_id?: string | null;
22461
24056
  technician_notes?: string | null;
22462
24057
  technician_notes_raw?: string | null;
22463
24058
  technician_task_description?: string | null;
@@ -22478,6 +24073,7 @@ export declare const listExternalCustomers: import("@tanstack/start-client-core"
22478
24073
  internal_notes?: string | null;
22479
24074
  parent_werkbon_id?: string | null;
22480
24075
  parsed_payload?: import("../integrations/supabase/types").Json | null;
24076
+ planning_status?: string;
22481
24077
  project_number?: string | null;
22482
24078
  room_number?: string | null;
22483
24079
  scheduled_end_time?: string | null;
@@ -22485,6 +24081,7 @@ export declare const listExternalCustomers: import("@tanstack/start-client-core"
22485
24081
  sequence_number?: number;
22486
24082
  source_pdf_path?: string | null;
22487
24083
  status?: string;
24084
+ technician_id?: string | null;
22488
24085
  technician_notes?: string | null;
22489
24086
  technician_notes_raw?: string | null;
22490
24087
  technician_task_description?: string | null;
@@ -22493,17 +24090,17 @@ export declare const listExternalCustomers: import("@tanstack/start-client-core"
22493
24090
  work_address?: string | null;
22494
24091
  };
22495
24092
  Relationships: [{
22496
- foreignKeyName: "werkbonnen_customer_id_fkey";
22497
- columns: ["customer_id"];
22498
- isOneToOne: false;
22499
- referencedRelation: "customers";
22500
- referencedColumns: ["id"];
22501
- }, {
22502
24093
  foreignKeyName: "werkbonnen_parent_werkbon_id_fkey";
22503
24094
  columns: ["parent_werkbon_id"];
22504
24095
  isOneToOne: false;
22505
24096
  referencedRelation: "werkbonnen";
22506
24097
  referencedColumns: ["id"];
24098
+ }, {
24099
+ foreignKeyName: "werkbonnen_technician_id_fkey";
24100
+ columns: ["technician_id"];
24101
+ isOneToOne: false;
24102
+ referencedRelation: "monteurs";
24103
+ referencedColumns: ["id"];
22507
24104
  }];
22508
24105
  };
22509
24106
  work_order_monteurs: {
@@ -23222,6 +24819,21 @@ export declare const listExternalCustomers: import("@tanstack/start-client-core"
23222
24819
  };
23223
24820
  Returns: string;
23224
24821
  };
24822
+ ai_usage_by_module: {
24823
+ Args: {
24824
+ _from: string;
24825
+ _to: string;
24826
+ };
24827
+ Returns: {
24828
+ calls: number;
24829
+ consumer_module_id: string;
24830
+ cost_usd: number;
24831
+ errors: number;
24832
+ input_tokens: number;
24833
+ output_tokens: number;
24834
+ total_tokens: number;
24835
+ }[];
24836
+ };
23225
24837
  apply_stock_consumption: {
23226
24838
  Args: {
23227
24839
  p_order_id: string;
@@ -23370,6 +24982,12 @@ export declare const listExternalCustomers: import("@tanstack/start-client-core"
23370
24982
  Args: never;
23371
24983
  Returns: string;
23372
24984
  };
24985
+ custom_access_token_hook: {
24986
+ Args: {
24987
+ event: import("../integrations/supabase/types").Json;
24988
+ };
24989
+ Returns: import("../integrations/supabase/types").Json;
24990
+ };
23373
24991
  dashboard_alert_counts: {
23374
24992
  Args: never;
23375
24993
  Returns: import("../integrations/supabase/types").Json;
@@ -23705,6 +25323,14 @@ export declare const listExternalCustomers: import("@tanstack/start-client-core"
23705
25323
  };
23706
25324
  Returns: string;
23707
25325
  };
25326
+ has_module_permission: {
25327
+ Args: {
25328
+ _min: string;
25329
+ _module_id: string;
25330
+ _user_id: string;
25331
+ };
25332
+ Returns: boolean;
25333
+ };
23708
25334
  has_role: {
23709
25335
  Args: {
23710
25336
  _role: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
@@ -23730,6 +25356,20 @@ export declare const listExternalCustomers: import("@tanstack/start-client-core"
23730
25356
  };
23731
25357
  Returns: boolean;
23732
25358
  };
25359
+ jwt_has_role: {
25360
+ Args: {
25361
+ _role: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
25362
+ };
25363
+ Returns: boolean;
25364
+ };
25365
+ list_monteurs: {
25366
+ Args: never;
25367
+ Returns: {
25368
+ display_name: string;
25369
+ email: string;
25370
+ user_id: string;
25371
+ }[];
25372
+ };
23733
25373
  local_effective_price: {
23734
25374
  Args: {
23735
25375
  _customer_id: string;
@@ -23746,6 +25386,22 @@ export declare const listExternalCustomers: import("@tanstack/start-client-core"
23746
25386
  source_id: string;
23747
25387
  }[];
23748
25388
  };
25389
+ log_ai_call: {
25390
+ Args: {
25391
+ _consumer_module_id: string;
25392
+ _cost_usd: number;
25393
+ _duration_ms: number;
25394
+ _error_code: string;
25395
+ _error_message: string;
25396
+ _input_tokens: number;
25397
+ _model_slug: string;
25398
+ _output_tokens: number;
25399
+ _provider_slug: string;
25400
+ _status: string;
25401
+ _total_tokens: number;
25402
+ };
25403
+ Returns: string;
25404
+ };
23749
25405
  mark_offer_clicked: {
23750
25406
  Args: {
23751
25407
  p_code: string;
@@ -23758,6 +25414,12 @@ export declare const listExternalCustomers: import("@tanstack/start-client-core"
23758
25414
  };
23759
25415
  Returns: undefined;
23760
25416
  };
25417
+ mark_shipment_shipped: {
25418
+ Args: {
25419
+ p_shipment_id: string;
25420
+ };
25421
+ Returns: undefined;
25422
+ };
23761
25423
  next_order_number: {
23762
25424
  Args: {
23763
25425
  p_prefix: string;
@@ -24234,9 +25896,11 @@ export declare const listExternalCustomers: import("@tanstack/start-client-core"
24234
25896
  };
24235
25897
  };
24236
25898
  Enums: {
24237
- app_role: "admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie" | "monteur";
25899
+ app_role: "admin" | "planner" | "monteur" | "administratie" | "ai_admin";
24238
25900
  exact_env: "staging" | "live";
24239
25901
  exact_push_status: "pending" | "sent" | "error";
25902
+ itk_customer_segment: "Business" | "Private";
25903
+ itk_dynamic_field_type: "text" | "select" | "date" | "checkbox";
24240
25904
  quote_status: "concept" | "verzonden" | "bekeken" | "in_behandeling" | "geaccepteerd" | "afgewezen" | "verlopen" | "gearchiveerd";
24241
25905
  };
24242
25906
  CompositeTypes: { [_ in never]: never; };
@@ -24534,6 +26198,57 @@ export declare const getGroupedCustomerDetail: import("@tanstack/start-client-co
24534
26198
  referencedColumns: ["id"];
24535
26199
  }];
24536
26200
  };
26201
+ ai_call_log: {
26202
+ Row: {
26203
+ consumer_module_id: string;
26204
+ cost_usd: number | null;
26205
+ created_at: string;
26206
+ created_by: string | null;
26207
+ duration_ms: number | null;
26208
+ error_code: string | null;
26209
+ error_message: string | null;
26210
+ id: string;
26211
+ input_tokens: number;
26212
+ model_slug: string | null;
26213
+ output_tokens: number;
26214
+ provider_slug: string | null;
26215
+ status: string;
26216
+ total_tokens: number;
26217
+ };
26218
+ Insert: {
26219
+ consumer_module_id: string;
26220
+ cost_usd?: number | null;
26221
+ created_at?: string;
26222
+ created_by?: string | null;
26223
+ duration_ms?: number | null;
26224
+ error_code?: string | null;
26225
+ error_message?: string | null;
26226
+ id?: string;
26227
+ input_tokens?: number;
26228
+ model_slug?: string | null;
26229
+ output_tokens?: number;
26230
+ provider_slug?: string | null;
26231
+ status: string;
26232
+ total_tokens?: number;
26233
+ };
26234
+ Update: {
26235
+ consumer_module_id?: string;
26236
+ cost_usd?: number | null;
26237
+ created_at?: string;
26238
+ created_by?: string | null;
26239
+ duration_ms?: number | null;
26240
+ error_code?: string | null;
26241
+ error_message?: string | null;
26242
+ id?: string;
26243
+ input_tokens?: number;
26244
+ model_slug?: string | null;
26245
+ output_tokens?: number;
26246
+ provider_slug?: string | null;
26247
+ status?: string;
26248
+ total_tokens?: number;
26249
+ };
26250
+ Relationships: [];
26251
+ };
24537
26252
  ai_credentials: {
24538
26253
  Row: {
24539
26254
  active: boolean;
@@ -24570,6 +26285,36 @@ export declare const getGroupedCustomerDetail: import("@tanstack/start-client-co
24570
26285
  referencedColumns: ["id"];
24571
26286
  }];
24572
26287
  };
26288
+ ai_goals: {
26289
+ Row: {
26290
+ active: boolean;
26291
+ created_at: string;
26292
+ description: string | null;
26293
+ key: string;
26294
+ label: string;
26295
+ sort_order: number;
26296
+ updated_at: string;
26297
+ };
26298
+ Insert: {
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
+ Update: {
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
+ Relationships: [];
26317
+ };
24573
26318
  ai_model_pricing: {
24574
26319
  Row: {
24575
26320
  created_at: string;
@@ -25356,6 +27101,141 @@ export declare const getGroupedCustomerDetail: import("@tanstack/start-client-co
25356
27101
  };
25357
27102
  Relationships: [];
25358
27103
  };
27104
+ cart_planning_pick_times: {
27105
+ Row: {
27106
+ created_at: string;
27107
+ id: string;
27108
+ pot_size: string;
27109
+ seconds_per_cart: number;
27110
+ updated_at: string;
27111
+ };
27112
+ Insert: {
27113
+ created_at?: string;
27114
+ id?: string;
27115
+ pot_size: string;
27116
+ seconds_per_cart: number;
27117
+ updated_at?: string;
27118
+ };
27119
+ Update: {
27120
+ created_at?: string;
27121
+ id?: string;
27122
+ pot_size?: string;
27123
+ seconds_per_cart?: number;
27124
+ updated_at?: string;
27125
+ };
27126
+ Relationships: [];
27127
+ };
27128
+ cart_planning_product_overrides: {
27129
+ Row: {
27130
+ created_at: string;
27131
+ id: string;
27132
+ max_party_share_per_layer_pct_override: number | null;
27133
+ never_mix: boolean;
27134
+ notes: string | null;
27135
+ product_id: string;
27136
+ updated_at: string;
27137
+ };
27138
+ Insert: {
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
+ Update: {
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
+ Relationships: [{
27157
+ foreignKeyName: "cart_planning_product_overrides_product_id_fkey";
27158
+ columns: ["product_id"];
27159
+ isOneToOne: true;
27160
+ referencedRelation: "products";
27161
+ referencedColumns: ["id"];
27162
+ }];
27163
+ };
27164
+ cart_planning_settings: {
27165
+ Row: {
27166
+ allow_editing_after_pickstation_send: boolean;
27167
+ buffer_grouping_mode: string;
27168
+ combine_floriday_orders: boolean;
27169
+ combine_floriday_orders_window: string;
27170
+ combine_orders_scope: string;
27171
+ default_workers: number;
27172
+ id: number;
27173
+ max_beladingen_per_layer: number;
27174
+ max_customers_per_cart: number;
27175
+ max_one_customer_per_layer: boolean;
27176
+ max_party_share_per_layer_pct: number;
27177
+ optimization_strategy: string;
27178
+ own_cart_from_layers: number;
27179
+ pick_time_mode: string;
27180
+ plants_per_day: number;
27181
+ plants_per_hour: number;
27182
+ require_same_carrier: boolean;
27183
+ require_same_crate_type: boolean;
27184
+ require_same_delivery_date: boolean;
27185
+ require_same_delivery_location: boolean;
27186
+ updated_at: string;
27187
+ updated_by: string | null;
27188
+ };
27189
+ Insert: {
27190
+ allow_editing_after_pickstation_send?: boolean;
27191
+ buffer_grouping_mode?: string;
27192
+ combine_floriday_orders?: boolean;
27193
+ combine_floriday_orders_window?: string;
27194
+ combine_orders_scope?: string;
27195
+ default_workers?: number;
27196
+ id?: number;
27197
+ max_beladingen_per_layer?: number;
27198
+ max_customers_per_cart?: number;
27199
+ max_one_customer_per_layer?: boolean;
27200
+ max_party_share_per_layer_pct?: number;
27201
+ optimization_strategy?: string;
27202
+ own_cart_from_layers?: number;
27203
+ pick_time_mode?: string;
27204
+ plants_per_day?: number;
27205
+ plants_per_hour?: number;
27206
+ require_same_carrier?: boolean;
27207
+ require_same_crate_type?: boolean;
27208
+ require_same_delivery_date?: boolean;
27209
+ require_same_delivery_location?: boolean;
27210
+ updated_at?: string;
27211
+ updated_by?: string | null;
27212
+ };
27213
+ Update: {
27214
+ allow_editing_after_pickstation_send?: boolean;
27215
+ buffer_grouping_mode?: string;
27216
+ combine_floriday_orders?: boolean;
27217
+ combine_floriday_orders_window?: string;
27218
+ combine_orders_scope?: string;
27219
+ default_workers?: number;
27220
+ id?: number;
27221
+ max_beladingen_per_layer?: number;
27222
+ max_customers_per_cart?: number;
27223
+ max_one_customer_per_layer?: boolean;
27224
+ max_party_share_per_layer_pct?: number;
27225
+ optimization_strategy?: string;
27226
+ own_cart_from_layers?: number;
27227
+ pick_time_mode?: string;
27228
+ plants_per_day?: number;
27229
+ plants_per_hour?: number;
27230
+ require_same_carrier?: boolean;
27231
+ require_same_crate_type?: boolean;
27232
+ require_same_delivery_date?: boolean;
27233
+ require_same_delivery_location?: boolean;
27234
+ updated_at?: string;
27235
+ updated_by?: string | null;
27236
+ };
27237
+ Relationships: [];
27238
+ };
25359
27239
  cart_replan_queue: {
25360
27240
  Row: {
25361
27241
  attempts: number;
@@ -25386,6 +27266,39 @@ export declare const getGroupedCustomerDetail: import("@tanstack/start-client-co
25386
27266
  referencedColumns: ["id"];
25387
27267
  }];
25388
27268
  };
27269
+ cart_types: {
27270
+ Row: {
27271
+ created_at: string;
27272
+ id: string;
27273
+ is_default: boolean;
27274
+ layer_length_cm: number;
27275
+ layer_width_cm: number;
27276
+ layers_per_cart: number;
27277
+ name: string;
27278
+ updated_at: string;
27279
+ };
27280
+ Insert: {
27281
+ created_at?: string;
27282
+ id?: string;
27283
+ is_default?: boolean;
27284
+ layer_length_cm: number;
27285
+ layer_width_cm: number;
27286
+ layers_per_cart?: number;
27287
+ name: string;
27288
+ updated_at?: string;
27289
+ };
27290
+ Update: {
27291
+ created_at?: string;
27292
+ id?: string;
27293
+ is_default?: boolean;
27294
+ layer_length_cm?: number;
27295
+ layer_width_cm?: number;
27296
+ layers_per_cart?: number;
27297
+ name?: string;
27298
+ updated_at?: string;
27299
+ };
27300
+ Relationships: [];
27301
+ };
25389
27302
  catalog_articles_cache: {
25390
27303
  Row: {
25391
27304
  created_at: string;
@@ -25473,6 +27386,36 @@ export declare const getGroupedCustomerDetail: import("@tanstack/start-client-co
25473
27386
  };
25474
27387
  Relationships: [];
25475
27388
  };
27389
+ crate_types: {
27390
+ Row: {
27391
+ created_at: string;
27392
+ id: string;
27393
+ length_cm: number;
27394
+ name: string;
27395
+ plants_per_crate: number;
27396
+ updated_at: string;
27397
+ width_cm: number;
27398
+ };
27399
+ Insert: {
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
+ Update: {
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
+ Relationships: [];
27418
+ };
25476
27419
  customer_audit_log: {
25477
27420
  Row: {
25478
27421
  action: string;
@@ -30012,6 +31955,288 @@ export declare const getGroupedCustomerDetail: import("@tanstack/start-client-co
30012
31955
  };
30013
31956
  Relationships: [];
30014
31957
  };
31958
+ itk_contact_persons: {
31959
+ Row: {
31960
+ created_at: string;
31961
+ customer_id: string;
31962
+ email: string | null;
31963
+ id: string;
31964
+ name: string;
31965
+ phone: string | null;
31966
+ role: string | null;
31967
+ updated_at: string;
31968
+ };
31969
+ Insert: {
31970
+ created_at?: string;
31971
+ customer_id: string;
31972
+ email?: string | null;
31973
+ id?: string;
31974
+ name: string;
31975
+ phone?: string | null;
31976
+ role?: string | null;
31977
+ updated_at?: string;
31978
+ };
31979
+ Update: {
31980
+ created_at?: string;
31981
+ customer_id?: string;
31982
+ email?: string | null;
31983
+ id?: string;
31984
+ name?: string;
31985
+ phone?: string | null;
31986
+ role?: string | null;
31987
+ updated_at?: string;
31988
+ };
31989
+ Relationships: [{
31990
+ foreignKeyName: "itk_contact_persons_customer_id_fkey";
31991
+ columns: ["customer_id"];
31992
+ isOneToOne: false;
31993
+ referencedRelation: "itk_customers";
31994
+ referencedColumns: ["id"];
31995
+ }];
31996
+ };
31997
+ itk_customer_dynamic_values: {
31998
+ Row: {
31999
+ created_at: string;
32000
+ customer_id: string;
32001
+ field_id: string;
32002
+ id: string;
32003
+ updated_at: string;
32004
+ value: string | null;
32005
+ };
32006
+ Insert: {
32007
+ created_at?: string;
32008
+ customer_id: string;
32009
+ field_id: string;
32010
+ id?: string;
32011
+ updated_at?: string;
32012
+ value?: string | null;
32013
+ };
32014
+ Update: {
32015
+ created_at?: string;
32016
+ customer_id?: string;
32017
+ field_id?: string;
32018
+ id?: string;
32019
+ updated_at?: string;
32020
+ value?: string | null;
32021
+ };
32022
+ Relationships: [{
32023
+ foreignKeyName: "itk_customer_dynamic_values_customer_id_fkey";
32024
+ columns: ["customer_id"];
32025
+ isOneToOne: false;
32026
+ referencedRelation: "itk_customers";
32027
+ referencedColumns: ["id"];
32028
+ }, {
32029
+ foreignKeyName: "itk_customer_dynamic_values_field_id_fkey";
32030
+ columns: ["field_id"];
32031
+ isOneToOne: false;
32032
+ referencedRelation: "itk_dynamic_fields";
32033
+ referencedColumns: ["id"];
32034
+ }];
32035
+ };
32036
+ itk_customer_notes: {
32037
+ Row: {
32038
+ body: string;
32039
+ created_at: string;
32040
+ created_by: string | null;
32041
+ customer_id: string;
32042
+ id: string;
32043
+ note_type: string;
32044
+ updated_at: string;
32045
+ };
32046
+ Insert: {
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
+ Update: {
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
+ Relationships: [{
32065
+ foreignKeyName: "itk_customer_notes_customer_id_fkey";
32066
+ columns: ["customer_id"];
32067
+ isOneToOne: false;
32068
+ referencedRelation: "itk_customers";
32069
+ referencedColumns: ["id"];
32070
+ }];
32071
+ };
32072
+ itk_customers: {
32073
+ Row: {
32074
+ billing_city: string | null;
32075
+ billing_postcode: string | null;
32076
+ billing_street: string | null;
32077
+ created_at: string;
32078
+ general_email: string | null;
32079
+ general_phone: string | null;
32080
+ id: string;
32081
+ legacy_customer_id: string | null;
32082
+ name: string;
32083
+ segment: import("../integrations/supabase/types").Database["public"]["Enums"]["itk_customer_segment"];
32084
+ updated_at: string;
32085
+ };
32086
+ Insert: {
32087
+ billing_city?: string | null;
32088
+ billing_postcode?: string | null;
32089
+ billing_street?: string | null;
32090
+ created_at?: string;
32091
+ general_email?: string | null;
32092
+ general_phone?: string | null;
32093
+ id?: string;
32094
+ legacy_customer_id?: string | null;
32095
+ name: string;
32096
+ segment?: import("../integrations/supabase/types").Database["public"]["Enums"]["itk_customer_segment"];
32097
+ updated_at?: string;
32098
+ };
32099
+ Update: {
32100
+ billing_city?: string | null;
32101
+ billing_postcode?: string | null;
32102
+ billing_street?: string | null;
32103
+ created_at?: string;
32104
+ general_email?: string | null;
32105
+ general_phone?: string | null;
32106
+ id?: string;
32107
+ legacy_customer_id?: string | null;
32108
+ name?: string;
32109
+ segment?: import("../integrations/supabase/types").Database["public"]["Enums"]["itk_customer_segment"];
32110
+ updated_at?: string;
32111
+ };
32112
+ Relationships: [{
32113
+ foreignKeyName: "itk_customers_legacy_customer_id_fkey";
32114
+ columns: ["legacy_customer_id"];
32115
+ isOneToOne: false;
32116
+ referencedRelation: "customers";
32117
+ referencedColumns: ["id"];
32118
+ }];
32119
+ };
32120
+ itk_dynamic_fields: {
32121
+ Row: {
32122
+ created_at: string;
32123
+ field_name: string;
32124
+ field_type: import("../integrations/supabase/types").Database["public"]["Enums"]["itk_dynamic_field_type"];
32125
+ id: string;
32126
+ options: import("../integrations/supabase/types").Json;
32127
+ sort_order: number;
32128
+ updated_at: string;
32129
+ };
32130
+ Insert: {
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
+ Update: {
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
+ Relationships: [];
32149
+ };
32150
+ itk_work_locations: {
32151
+ Row: {
32152
+ city: string | null;
32153
+ created_at: string;
32154
+ customer_id: string;
32155
+ id: string;
32156
+ instructions: string | null;
32157
+ label: string;
32158
+ latitude: number | null;
32159
+ longitude: number | null;
32160
+ postcode: string | null;
32161
+ street: string | null;
32162
+ updated_at: string;
32163
+ };
32164
+ Insert: {
32165
+ city?: string | null;
32166
+ created_at?: string;
32167
+ customer_id: string;
32168
+ id?: string;
32169
+ instructions?: string | null;
32170
+ label: string;
32171
+ latitude?: number | null;
32172
+ longitude?: number | null;
32173
+ postcode?: string | null;
32174
+ street?: string | null;
32175
+ updated_at?: string;
32176
+ };
32177
+ Update: {
32178
+ city?: string | null;
32179
+ created_at?: string;
32180
+ customer_id?: string;
32181
+ id?: string;
32182
+ instructions?: string | null;
32183
+ label?: string;
32184
+ latitude?: number | null;
32185
+ longitude?: number | null;
32186
+ postcode?: string | null;
32187
+ street?: string | null;
32188
+ updated_at?: string;
32189
+ };
32190
+ Relationships: [{
32191
+ foreignKeyName: "itk_work_locations_customer_id_fkey";
32192
+ columns: ["customer_id"];
32193
+ isOneToOne: false;
32194
+ referencedRelation: "itk_customers";
32195
+ referencedColumns: ["id"];
32196
+ }];
32197
+ };
32198
+ leave_requests: {
32199
+ Row: {
32200
+ created_at: string;
32201
+ end_date: string;
32202
+ id: string;
32203
+ reason: string | null;
32204
+ start_date: string;
32205
+ status: string;
32206
+ tenant_id: string;
32207
+ updated_at: string;
32208
+ user_id: string;
32209
+ };
32210
+ Insert: {
32211
+ created_at?: string;
32212
+ end_date: string;
32213
+ id?: string;
32214
+ reason?: string | null;
32215
+ start_date: string;
32216
+ status?: string;
32217
+ tenant_id?: string;
32218
+ updated_at?: string;
32219
+ user_id: string;
32220
+ };
32221
+ Update: {
32222
+ created_at?: string;
32223
+ end_date?: string;
32224
+ id?: string;
32225
+ reason?: string | null;
32226
+ start_date?: string;
32227
+ status?: string;
32228
+ tenant_id?: string;
32229
+ updated_at?: string;
32230
+ user_id?: string;
32231
+ };
32232
+ Relationships: [{
32233
+ foreignKeyName: "leave_requests_user_id_fkey";
32234
+ columns: ["user_id"];
32235
+ isOneToOne: false;
32236
+ referencedRelation: "monteurs";
32237
+ referencedColumns: ["id"];
32238
+ }];
32239
+ };
30015
32240
  local_customer_agreements: {
30016
32241
  Row: {
30017
32242
  base_price: number | null;
@@ -30663,6 +32888,33 @@ export declare const getGroupedCustomerDetail: import("@tanstack/start-client-co
30663
32888
  };
30664
32889
  Relationships: [];
30665
32890
  };
32891
+ module_permissions: {
32892
+ Row: {
32893
+ created_at: string;
32894
+ id: string;
32895
+ module_id: string;
32896
+ permission: string;
32897
+ role: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
32898
+ updated_at: string;
32899
+ };
32900
+ Insert: {
32901
+ created_at?: string;
32902
+ id?: string;
32903
+ module_id: string;
32904
+ permission: string;
32905
+ role: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
32906
+ updated_at?: string;
32907
+ };
32908
+ Update: {
32909
+ created_at?: string;
32910
+ id?: string;
32911
+ module_id?: string;
32912
+ permission?: string;
32913
+ role?: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
32914
+ updated_at?: string;
32915
+ };
32916
+ Relationships: [];
32917
+ };
30666
32918
  monteurs: {
30667
32919
  Row: {
30668
32920
  avatar_url: string | null;
@@ -31392,6 +33644,42 @@ export declare const getGroupedCustomerDetail: import("@tanstack/start-client-co
31392
33644
  };
31393
33645
  Relationships: [];
31394
33646
  };
33647
+ order_buffers: {
33648
+ Row: {
33649
+ buffer_key: string;
33650
+ created_at: string;
33651
+ customer_id: string | null;
33652
+ grouping_mode: string;
33653
+ id: string;
33654
+ pickup_date: string | null;
33655
+ pickup_location: string | null;
33656
+ plan_locked_at: string | null;
33657
+ updated_at: string;
33658
+ };
33659
+ Insert: {
33660
+ buffer_key: string;
33661
+ created_at?: string;
33662
+ customer_id?: string | null;
33663
+ grouping_mode: string;
33664
+ id?: string;
33665
+ pickup_date?: string | null;
33666
+ pickup_location?: string | null;
33667
+ plan_locked_at?: string | null;
33668
+ updated_at?: string;
33669
+ };
33670
+ Update: {
33671
+ buffer_key?: string;
33672
+ created_at?: string;
33673
+ customer_id?: string | null;
33674
+ grouping_mode?: string;
33675
+ id?: string;
33676
+ pickup_date?: string | null;
33677
+ pickup_location?: string | null;
33678
+ plan_locked_at?: string | null;
33679
+ updated_at?: string;
33680
+ };
33681
+ Relationships: [];
33682
+ };
31395
33683
  order_cart_items: {
31396
33684
  Row: {
31397
33685
  cart_id: string;
@@ -31458,6 +33746,7 @@ export declare const getGroupedCustomerDetail: import("@tanstack/start-client-co
31458
33746
  order_carts: {
31459
33747
  Row: {
31460
33748
  algorithm_version: number;
33749
+ buffer_id: string | null;
31461
33750
  cart_number: number;
31462
33751
  created_at: string;
31463
33752
  id: string;
@@ -31465,13 +33754,14 @@ export declare const getGroupedCustomerDetail: import("@tanstack/start-client-co
31465
33754
  is_complete: boolean;
31466
33755
  notes: string | null;
31467
33756
  occupancy_pct: number;
31468
- order_id: string;
33757
+ order_id: string | null;
31469
33758
  source: string;
31470
33759
  total_layers_used: number;
31471
33760
  updated_at: string;
31472
33761
  };
31473
33762
  Insert: {
31474
33763
  algorithm_version?: number;
33764
+ buffer_id?: string | null;
31475
33765
  cart_number: number;
31476
33766
  created_at?: string;
31477
33767
  id?: string;
@@ -31479,13 +33769,14 @@ export declare const getGroupedCustomerDetail: import("@tanstack/start-client-co
31479
33769
  is_complete?: boolean;
31480
33770
  notes?: string | null;
31481
33771
  occupancy_pct?: number;
31482
- order_id: string;
33772
+ order_id?: string | null;
31483
33773
  source?: string;
31484
33774
  total_layers_used?: number;
31485
33775
  updated_at?: string;
31486
33776
  };
31487
33777
  Update: {
31488
33778
  algorithm_version?: number;
33779
+ buffer_id?: string | null;
31489
33780
  cart_number?: number;
31490
33781
  created_at?: string;
31491
33782
  id?: string;
@@ -31493,12 +33784,18 @@ export declare const getGroupedCustomerDetail: import("@tanstack/start-client-co
31493
33784
  is_complete?: boolean;
31494
33785
  notes?: string | null;
31495
33786
  occupancy_pct?: number;
31496
- order_id?: string;
33787
+ order_id?: string | null;
31497
33788
  source?: string;
31498
33789
  total_layers_used?: number;
31499
33790
  updated_at?: string;
31500
33791
  };
31501
33792
  Relationships: [{
33793
+ foreignKeyName: "order_carts_buffer_id_fkey";
33794
+ columns: ["buffer_id"];
33795
+ isOneToOne: false;
33796
+ referencedRelation: "order_buffers";
33797
+ referencedColumns: ["id"];
33798
+ }, {
31502
33799
  foreignKeyName: "order_carts_order_id_fkey";
31503
33800
  columns: ["order_id"];
31504
33801
  isOneToOne: false;
@@ -31635,15 +33932,117 @@ export declare const getGroupedCustomerDetail: import("@tanstack/start-client-co
31635
33932
  };
31636
33933
  Relationships: [];
31637
33934
  };
33935
+ order_shipment_items: {
33936
+ Row: {
33937
+ created_at: string;
33938
+ id: string;
33939
+ order_item_id: string;
33940
+ product_id: string | null;
33941
+ product_name: string;
33942
+ quantity: number;
33943
+ shipment_id: string;
33944
+ updated_at: string;
33945
+ };
33946
+ Insert: {
33947
+ created_at?: string;
33948
+ id?: string;
33949
+ order_item_id: string;
33950
+ product_id?: string | null;
33951
+ product_name: string;
33952
+ quantity: number;
33953
+ shipment_id: string;
33954
+ updated_at?: string;
33955
+ };
33956
+ Update: {
33957
+ created_at?: string;
33958
+ id?: string;
33959
+ order_item_id?: string;
33960
+ product_id?: string | null;
33961
+ product_name?: string;
33962
+ quantity?: number;
33963
+ shipment_id?: string;
33964
+ updated_at?: string;
33965
+ };
33966
+ Relationships: [{
33967
+ foreignKeyName: "order_shipment_items_order_item_id_fkey";
33968
+ columns: ["order_item_id"];
33969
+ isOneToOne: false;
33970
+ referencedRelation: "order_items";
33971
+ referencedColumns: ["id"];
33972
+ }, {
33973
+ foreignKeyName: "order_shipment_items_shipment_id_fkey";
33974
+ columns: ["shipment_id"];
33975
+ isOneToOne: false;
33976
+ referencedRelation: "order_shipments";
33977
+ referencedColumns: ["id"];
33978
+ }];
33979
+ };
33980
+ order_shipments: {
33981
+ Row: {
33982
+ carrier_id: string | null;
33983
+ created_at: string;
33984
+ delivery_date: string | null;
33985
+ delivery_location_id: string | null;
33986
+ id: string;
33987
+ notes: string | null;
33988
+ order_id: string;
33989
+ shipment_number: number;
33990
+ shipped_at: string | null;
33991
+ status: string;
33992
+ updated_at: string;
33993
+ };
33994
+ Insert: {
33995
+ carrier_id?: string | null;
33996
+ created_at?: string;
33997
+ delivery_date?: string | null;
33998
+ delivery_location_id?: string | null;
33999
+ id?: string;
34000
+ notes?: string | null;
34001
+ order_id: string;
34002
+ shipment_number: number;
34003
+ shipped_at?: string | null;
34004
+ status?: string;
34005
+ updated_at?: string;
34006
+ };
34007
+ Update: {
34008
+ carrier_id?: string | null;
34009
+ created_at?: string;
34010
+ delivery_date?: string | null;
34011
+ delivery_location_id?: string | null;
34012
+ id?: string;
34013
+ notes?: string | null;
34014
+ order_id?: string;
34015
+ shipment_number?: number;
34016
+ shipped_at?: string | null;
34017
+ status?: string;
34018
+ updated_at?: string;
34019
+ };
34020
+ Relationships: [{
34021
+ foreignKeyName: "order_shipments_carrier_id_fkey";
34022
+ columns: ["carrier_id"];
34023
+ isOneToOne: false;
34024
+ referencedRelation: "carriers";
34025
+ referencedColumns: ["id"];
34026
+ }, {
34027
+ foreignKeyName: "order_shipments_order_id_fkey";
34028
+ columns: ["order_id"];
34029
+ isOneToOne: false;
34030
+ referencedRelation: "orders";
34031
+ referencedColumns: ["id"];
34032
+ }];
34033
+ };
31638
34034
  orders: {
31639
34035
  Row: {
34036
+ buffer_id: string | null;
31640
34037
  created_at: string;
31641
34038
  custom_fields: import("../integrations/supabase/types").Json;
31642
34039
  customer_id: string | null;
31643
34040
  customer_name: string;
31644
34041
  deleted_at: string | null;
31645
- delivery_date: string;
34042
+ delivery_date: string | null;
34043
+ floriday_sales_order_id: string | null;
31646
34044
  id: string;
34045
+ is_reservation: boolean;
31647
34046
  notes: string | null;
31648
34047
  order_date: string;
31649
34048
  order_number: string;
@@ -31655,13 +34054,16 @@ export declare const getGroupedCustomerDetail: import("@tanstack/start-client-co
31655
34054
  updated_at: string;
31656
34055
  };
31657
34056
  Insert: {
34057
+ buffer_id?: string | null;
31658
34058
  created_at?: string;
31659
34059
  custom_fields?: import("../integrations/supabase/types").Json;
31660
34060
  customer_id?: string | null;
31661
34061
  customer_name?: string;
31662
34062
  deleted_at?: string | null;
31663
- delivery_date: string;
34063
+ delivery_date?: string | null;
34064
+ floriday_sales_order_id?: string | null;
31664
34065
  id?: string;
34066
+ is_reservation?: boolean;
31665
34067
  notes?: string | null;
31666
34068
  order_date?: string;
31667
34069
  order_number: string;
@@ -31673,13 +34075,16 @@ export declare const getGroupedCustomerDetail: import("@tanstack/start-client-co
31673
34075
  updated_at?: string;
31674
34076
  };
31675
34077
  Update: {
34078
+ buffer_id?: string | null;
31676
34079
  created_at?: string;
31677
34080
  custom_fields?: import("../integrations/supabase/types").Json;
31678
34081
  customer_id?: string | null;
31679
34082
  customer_name?: string;
31680
34083
  deleted_at?: string | null;
31681
- delivery_date?: string;
34084
+ delivery_date?: string | null;
34085
+ floriday_sales_order_id?: string | null;
31682
34086
  id?: string;
34087
+ is_reservation?: boolean;
31683
34088
  notes?: string | null;
31684
34089
  order_date?: string;
31685
34090
  order_number?: string;
@@ -31691,6 +34096,12 @@ export declare const getGroupedCustomerDetail: import("@tanstack/start-client-co
31691
34096
  updated_at?: string;
31692
34097
  };
31693
34098
  Relationships: [{
34099
+ foreignKeyName: "orders_buffer_id_fkey";
34100
+ columns: ["buffer_id"];
34101
+ isOneToOne: false;
34102
+ referencedRelation: "order_buffers";
34103
+ referencedColumns: ["id"];
34104
+ }, {
31694
34105
  foreignKeyName: "orders_customer_id_fkey";
31695
34106
  columns: ["customer_id"];
31696
34107
  isOneToOne: false;
@@ -31954,6 +34365,8 @@ export declare const getGroupedCustomerDetail: import("@tanstack/start-client-co
31954
34365
  Row: {
31955
34366
  created_at: string;
31956
34367
  description: string | null;
34368
+ head_product_id: string | null;
34369
+ head_trade_item_floriday_id: string | null;
31957
34370
  id: string;
31958
34371
  is_active: boolean;
31959
34372
  name: string;
@@ -31963,6 +34376,8 @@ export declare const getGroupedCustomerDetail: import("@tanstack/start-client-co
31963
34376
  Insert: {
31964
34377
  created_at?: string;
31965
34378
  description?: string | null;
34379
+ head_product_id?: string | null;
34380
+ head_trade_item_floriday_id?: string | null;
31966
34381
  id?: string;
31967
34382
  is_active?: boolean;
31968
34383
  name: string;
@@ -31972,13 +34387,21 @@ export declare const getGroupedCustomerDetail: import("@tanstack/start-client-co
31972
34387
  Update: {
31973
34388
  created_at?: string;
31974
34389
  description?: string | null;
34390
+ head_product_id?: string | null;
34391
+ head_trade_item_floriday_id?: string | null;
31975
34392
  id?: string;
31976
34393
  is_active?: boolean;
31977
34394
  name?: string;
31978
34395
  tenant_id?: string;
31979
34396
  updated_at?: string;
31980
34397
  };
31981
- Relationships: [];
34398
+ Relationships: [{
34399
+ foreignKeyName: "product_groups_head_product_id_fkey";
34400
+ columns: ["head_product_id"];
34401
+ isOneToOne: false;
34402
+ referencedRelation: "products";
34403
+ referencedColumns: ["id"];
34404
+ }];
31982
34405
  };
31983
34406
  products: {
31984
34407
  Row: {
@@ -34529,6 +36952,7 @@ export declare const getGroupedCustomerDetail: import("@tanstack/start-client-co
34529
36952
  internal_notes: string | null;
34530
36953
  parent_werkbon_id: string | null;
34531
36954
  parsed_payload: import("../integrations/supabase/types").Json | null;
36955
+ planning_status: string;
34532
36956
  project_number: string | null;
34533
36957
  room_number: string | null;
34534
36958
  scheduled_end_time: string | null;
@@ -34536,6 +36960,7 @@ export declare const getGroupedCustomerDetail: import("@tanstack/start-client-co
34536
36960
  sequence_number: number;
34537
36961
  source_pdf_path: string | null;
34538
36962
  status: string;
36963
+ technician_id: string | null;
34539
36964
  technician_notes: string | null;
34540
36965
  technician_notes_raw: string | null;
34541
36966
  technician_task_description: string | null;
@@ -34556,6 +36981,7 @@ export declare const getGroupedCustomerDetail: import("@tanstack/start-client-co
34556
36981
  internal_notes?: string | null;
34557
36982
  parent_werkbon_id?: string | null;
34558
36983
  parsed_payload?: import("../integrations/supabase/types").Json | null;
36984
+ planning_status?: string;
34559
36985
  project_number?: string | null;
34560
36986
  room_number?: string | null;
34561
36987
  scheduled_end_time?: string | null;
@@ -34563,6 +36989,7 @@ export declare const getGroupedCustomerDetail: import("@tanstack/start-client-co
34563
36989
  sequence_number: number;
34564
36990
  source_pdf_path?: string | null;
34565
36991
  status?: string;
36992
+ technician_id?: string | null;
34566
36993
  technician_notes?: string | null;
34567
36994
  technician_notes_raw?: string | null;
34568
36995
  technician_task_description?: string | null;
@@ -34583,6 +37010,7 @@ export declare const getGroupedCustomerDetail: import("@tanstack/start-client-co
34583
37010
  internal_notes?: string | null;
34584
37011
  parent_werkbon_id?: string | null;
34585
37012
  parsed_payload?: import("../integrations/supabase/types").Json | null;
37013
+ planning_status?: string;
34586
37014
  project_number?: string | null;
34587
37015
  room_number?: string | null;
34588
37016
  scheduled_end_time?: string | null;
@@ -34590,6 +37018,7 @@ export declare const getGroupedCustomerDetail: import("@tanstack/start-client-co
34590
37018
  sequence_number?: number;
34591
37019
  source_pdf_path?: string | null;
34592
37020
  status?: string;
37021
+ technician_id?: string | null;
34593
37022
  technician_notes?: string | null;
34594
37023
  technician_notes_raw?: string | null;
34595
37024
  technician_task_description?: string | null;
@@ -34598,17 +37027,17 @@ export declare const getGroupedCustomerDetail: import("@tanstack/start-client-co
34598
37027
  work_address?: string | null;
34599
37028
  };
34600
37029
  Relationships: [{
34601
- foreignKeyName: "werkbonnen_customer_id_fkey";
34602
- columns: ["customer_id"];
34603
- isOneToOne: false;
34604
- referencedRelation: "customers";
34605
- referencedColumns: ["id"];
34606
- }, {
34607
37030
  foreignKeyName: "werkbonnen_parent_werkbon_id_fkey";
34608
37031
  columns: ["parent_werkbon_id"];
34609
37032
  isOneToOne: false;
34610
37033
  referencedRelation: "werkbonnen";
34611
37034
  referencedColumns: ["id"];
37035
+ }, {
37036
+ foreignKeyName: "werkbonnen_technician_id_fkey";
37037
+ columns: ["technician_id"];
37038
+ isOneToOne: false;
37039
+ referencedRelation: "monteurs";
37040
+ referencedColumns: ["id"];
34612
37041
  }];
34613
37042
  };
34614
37043
  work_order_monteurs: {
@@ -35327,6 +37756,21 @@ export declare const getGroupedCustomerDetail: import("@tanstack/start-client-co
35327
37756
  };
35328
37757
  Returns: string;
35329
37758
  };
37759
+ ai_usage_by_module: {
37760
+ Args: {
37761
+ _from: string;
37762
+ _to: string;
37763
+ };
37764
+ Returns: {
37765
+ calls: number;
37766
+ consumer_module_id: string;
37767
+ cost_usd: number;
37768
+ errors: number;
37769
+ input_tokens: number;
37770
+ output_tokens: number;
37771
+ total_tokens: number;
37772
+ }[];
37773
+ };
35330
37774
  apply_stock_consumption: {
35331
37775
  Args: {
35332
37776
  p_order_id: string;
@@ -35475,6 +37919,12 @@ export declare const getGroupedCustomerDetail: import("@tanstack/start-client-co
35475
37919
  Args: never;
35476
37920
  Returns: string;
35477
37921
  };
37922
+ custom_access_token_hook: {
37923
+ Args: {
37924
+ event: import("../integrations/supabase/types").Json;
37925
+ };
37926
+ Returns: import("../integrations/supabase/types").Json;
37927
+ };
35478
37928
  dashboard_alert_counts: {
35479
37929
  Args: never;
35480
37930
  Returns: import("../integrations/supabase/types").Json;
@@ -35810,6 +38260,14 @@ export declare const getGroupedCustomerDetail: import("@tanstack/start-client-co
35810
38260
  };
35811
38261
  Returns: string;
35812
38262
  };
38263
+ has_module_permission: {
38264
+ Args: {
38265
+ _min: string;
38266
+ _module_id: string;
38267
+ _user_id: string;
38268
+ };
38269
+ Returns: boolean;
38270
+ };
35813
38271
  has_role: {
35814
38272
  Args: {
35815
38273
  _role: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
@@ -35835,6 +38293,20 @@ export declare const getGroupedCustomerDetail: import("@tanstack/start-client-co
35835
38293
  };
35836
38294
  Returns: boolean;
35837
38295
  };
38296
+ jwt_has_role: {
38297
+ Args: {
38298
+ _role: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
38299
+ };
38300
+ Returns: boolean;
38301
+ };
38302
+ list_monteurs: {
38303
+ Args: never;
38304
+ Returns: {
38305
+ display_name: string;
38306
+ email: string;
38307
+ user_id: string;
38308
+ }[];
38309
+ };
35838
38310
  local_effective_price: {
35839
38311
  Args: {
35840
38312
  _customer_id: string;
@@ -35851,6 +38323,22 @@ export declare const getGroupedCustomerDetail: import("@tanstack/start-client-co
35851
38323
  source_id: string;
35852
38324
  }[];
35853
38325
  };
38326
+ log_ai_call: {
38327
+ Args: {
38328
+ _consumer_module_id: string;
38329
+ _cost_usd: number;
38330
+ _duration_ms: number;
38331
+ _error_code: string;
38332
+ _error_message: string;
38333
+ _input_tokens: number;
38334
+ _model_slug: string;
38335
+ _output_tokens: number;
38336
+ _provider_slug: string;
38337
+ _status: string;
38338
+ _total_tokens: number;
38339
+ };
38340
+ Returns: string;
38341
+ };
35854
38342
  mark_offer_clicked: {
35855
38343
  Args: {
35856
38344
  p_code: string;
@@ -35863,6 +38351,12 @@ export declare const getGroupedCustomerDetail: import("@tanstack/start-client-co
35863
38351
  };
35864
38352
  Returns: undefined;
35865
38353
  };
38354
+ mark_shipment_shipped: {
38355
+ Args: {
38356
+ p_shipment_id: string;
38357
+ };
38358
+ Returns: undefined;
38359
+ };
35866
38360
  next_order_number: {
35867
38361
  Args: {
35868
38362
  p_prefix: string;
@@ -36339,9 +38833,11 @@ export declare const getGroupedCustomerDetail: import("@tanstack/start-client-co
36339
38833
  };
36340
38834
  };
36341
38835
  Enums: {
36342
- app_role: "admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie" | "monteur";
38836
+ app_role: "admin" | "planner" | "monteur" | "administratie" | "ai_admin";
36343
38837
  exact_env: "staging" | "live";
36344
38838
  exact_push_status: "pending" | "sent" | "error";
38839
+ itk_customer_segment: "Business" | "Private";
38840
+ itk_dynamic_field_type: "text" | "select" | "date" | "checkbox";
36345
38841
  quote_status: "concept" | "verzonden" | "bekeken" | "in_behandeling" | "geaccepteerd" | "afgewezen" | "verlopen" | "gearchiveerd";
36346
38842
  };
36347
38843
  CompositeTypes: { [_ in never]: never; };
@@ -36637,6 +39133,57 @@ export declare const getExternalCustomerDetail: import("@tanstack/start-client-c
36637
39133
  referencedColumns: ["id"];
36638
39134
  }];
36639
39135
  };
39136
+ ai_call_log: {
39137
+ Row: {
39138
+ consumer_module_id: string;
39139
+ cost_usd: number | null;
39140
+ created_at: string;
39141
+ created_by: string | null;
39142
+ duration_ms: number | null;
39143
+ error_code: string | null;
39144
+ error_message: string | null;
39145
+ id: string;
39146
+ input_tokens: number;
39147
+ model_slug: string | null;
39148
+ output_tokens: number;
39149
+ provider_slug: string | null;
39150
+ status: string;
39151
+ total_tokens: number;
39152
+ };
39153
+ Insert: {
39154
+ consumer_module_id: string;
39155
+ cost_usd?: number | null;
39156
+ created_at?: string;
39157
+ created_by?: string | null;
39158
+ duration_ms?: number | null;
39159
+ error_code?: string | null;
39160
+ error_message?: string | null;
39161
+ id?: string;
39162
+ input_tokens?: number;
39163
+ model_slug?: string | null;
39164
+ output_tokens?: number;
39165
+ provider_slug?: string | null;
39166
+ status: string;
39167
+ total_tokens?: number;
39168
+ };
39169
+ Update: {
39170
+ consumer_module_id?: string;
39171
+ cost_usd?: number | null;
39172
+ created_at?: string;
39173
+ created_by?: string | null;
39174
+ duration_ms?: number | null;
39175
+ error_code?: string | null;
39176
+ error_message?: string | null;
39177
+ id?: string;
39178
+ input_tokens?: number;
39179
+ model_slug?: string | null;
39180
+ output_tokens?: number;
39181
+ provider_slug?: string | null;
39182
+ status?: string;
39183
+ total_tokens?: number;
39184
+ };
39185
+ Relationships: [];
39186
+ };
36640
39187
  ai_credentials: {
36641
39188
  Row: {
36642
39189
  active: boolean;
@@ -36673,6 +39220,36 @@ export declare const getExternalCustomerDetail: import("@tanstack/start-client-c
36673
39220
  referencedColumns: ["id"];
36674
39221
  }];
36675
39222
  };
39223
+ ai_goals: {
39224
+ Row: {
39225
+ active: boolean;
39226
+ created_at: string;
39227
+ description: string | null;
39228
+ key: string;
39229
+ label: string;
39230
+ sort_order: number;
39231
+ updated_at: string;
39232
+ };
39233
+ Insert: {
39234
+ active?: boolean;
39235
+ created_at?: string;
39236
+ description?: string | null;
39237
+ key: string;
39238
+ label: string;
39239
+ sort_order?: number;
39240
+ updated_at?: string;
39241
+ };
39242
+ Update: {
39243
+ active?: boolean;
39244
+ created_at?: string;
39245
+ description?: string | null;
39246
+ key?: string;
39247
+ label?: string;
39248
+ sort_order?: number;
39249
+ updated_at?: string;
39250
+ };
39251
+ Relationships: [];
39252
+ };
36676
39253
  ai_model_pricing: {
36677
39254
  Row: {
36678
39255
  created_at: string;
@@ -37459,6 +40036,141 @@ export declare const getExternalCustomerDetail: import("@tanstack/start-client-c
37459
40036
  };
37460
40037
  Relationships: [];
37461
40038
  };
40039
+ cart_planning_pick_times: {
40040
+ Row: {
40041
+ created_at: string;
40042
+ id: string;
40043
+ pot_size: string;
40044
+ seconds_per_cart: number;
40045
+ updated_at: string;
40046
+ };
40047
+ Insert: {
40048
+ created_at?: string;
40049
+ id?: string;
40050
+ pot_size: string;
40051
+ seconds_per_cart: number;
40052
+ updated_at?: string;
40053
+ };
40054
+ Update: {
40055
+ created_at?: string;
40056
+ id?: string;
40057
+ pot_size?: string;
40058
+ seconds_per_cart?: number;
40059
+ updated_at?: string;
40060
+ };
40061
+ Relationships: [];
40062
+ };
40063
+ cart_planning_product_overrides: {
40064
+ Row: {
40065
+ created_at: string;
40066
+ id: string;
40067
+ max_party_share_per_layer_pct_override: number | null;
40068
+ never_mix: boolean;
40069
+ notes: string | null;
40070
+ product_id: string;
40071
+ updated_at: string;
40072
+ };
40073
+ Insert: {
40074
+ created_at?: string;
40075
+ id?: string;
40076
+ max_party_share_per_layer_pct_override?: number | null;
40077
+ never_mix?: boolean;
40078
+ notes?: string | null;
40079
+ product_id: string;
40080
+ updated_at?: string;
40081
+ };
40082
+ Update: {
40083
+ created_at?: string;
40084
+ id?: string;
40085
+ max_party_share_per_layer_pct_override?: number | null;
40086
+ never_mix?: boolean;
40087
+ notes?: string | null;
40088
+ product_id?: string;
40089
+ updated_at?: string;
40090
+ };
40091
+ Relationships: [{
40092
+ foreignKeyName: "cart_planning_product_overrides_product_id_fkey";
40093
+ columns: ["product_id"];
40094
+ isOneToOne: true;
40095
+ referencedRelation: "products";
40096
+ referencedColumns: ["id"];
40097
+ }];
40098
+ };
40099
+ cart_planning_settings: {
40100
+ Row: {
40101
+ allow_editing_after_pickstation_send: boolean;
40102
+ buffer_grouping_mode: string;
40103
+ combine_floriday_orders: boolean;
40104
+ combine_floriday_orders_window: string;
40105
+ combine_orders_scope: string;
40106
+ default_workers: number;
40107
+ id: number;
40108
+ max_beladingen_per_layer: number;
40109
+ max_customers_per_cart: number;
40110
+ max_one_customer_per_layer: boolean;
40111
+ max_party_share_per_layer_pct: number;
40112
+ optimization_strategy: string;
40113
+ own_cart_from_layers: number;
40114
+ pick_time_mode: string;
40115
+ plants_per_day: number;
40116
+ plants_per_hour: number;
40117
+ require_same_carrier: boolean;
40118
+ require_same_crate_type: boolean;
40119
+ require_same_delivery_date: boolean;
40120
+ require_same_delivery_location: boolean;
40121
+ updated_at: string;
40122
+ updated_by: string | null;
40123
+ };
40124
+ Insert: {
40125
+ allow_editing_after_pickstation_send?: boolean;
40126
+ buffer_grouping_mode?: string;
40127
+ combine_floriday_orders?: boolean;
40128
+ combine_floriday_orders_window?: string;
40129
+ combine_orders_scope?: string;
40130
+ default_workers?: number;
40131
+ id?: number;
40132
+ max_beladingen_per_layer?: number;
40133
+ max_customers_per_cart?: number;
40134
+ max_one_customer_per_layer?: boolean;
40135
+ max_party_share_per_layer_pct?: number;
40136
+ optimization_strategy?: string;
40137
+ own_cart_from_layers?: number;
40138
+ pick_time_mode?: string;
40139
+ plants_per_day?: number;
40140
+ plants_per_hour?: number;
40141
+ require_same_carrier?: boolean;
40142
+ require_same_crate_type?: boolean;
40143
+ require_same_delivery_date?: boolean;
40144
+ require_same_delivery_location?: boolean;
40145
+ updated_at?: string;
40146
+ updated_by?: string | null;
40147
+ };
40148
+ Update: {
40149
+ allow_editing_after_pickstation_send?: boolean;
40150
+ buffer_grouping_mode?: string;
40151
+ combine_floriday_orders?: boolean;
40152
+ combine_floriday_orders_window?: string;
40153
+ combine_orders_scope?: string;
40154
+ default_workers?: number;
40155
+ id?: number;
40156
+ max_beladingen_per_layer?: number;
40157
+ max_customers_per_cart?: number;
40158
+ max_one_customer_per_layer?: boolean;
40159
+ max_party_share_per_layer_pct?: number;
40160
+ optimization_strategy?: string;
40161
+ own_cart_from_layers?: number;
40162
+ pick_time_mode?: string;
40163
+ plants_per_day?: number;
40164
+ plants_per_hour?: number;
40165
+ require_same_carrier?: boolean;
40166
+ require_same_crate_type?: boolean;
40167
+ require_same_delivery_date?: boolean;
40168
+ require_same_delivery_location?: boolean;
40169
+ updated_at?: string;
40170
+ updated_by?: string | null;
40171
+ };
40172
+ Relationships: [];
40173
+ };
37462
40174
  cart_replan_queue: {
37463
40175
  Row: {
37464
40176
  attempts: number;
@@ -37489,6 +40201,39 @@ export declare const getExternalCustomerDetail: import("@tanstack/start-client-c
37489
40201
  referencedColumns: ["id"];
37490
40202
  }];
37491
40203
  };
40204
+ cart_types: {
40205
+ Row: {
40206
+ created_at: string;
40207
+ id: string;
40208
+ is_default: boolean;
40209
+ layer_length_cm: number;
40210
+ layer_width_cm: number;
40211
+ layers_per_cart: number;
40212
+ name: string;
40213
+ updated_at: string;
40214
+ };
40215
+ Insert: {
40216
+ created_at?: string;
40217
+ id?: string;
40218
+ is_default?: boolean;
40219
+ layer_length_cm: number;
40220
+ layer_width_cm: number;
40221
+ layers_per_cart?: number;
40222
+ name: string;
40223
+ updated_at?: string;
40224
+ };
40225
+ Update: {
40226
+ created_at?: string;
40227
+ id?: string;
40228
+ is_default?: boolean;
40229
+ layer_length_cm?: number;
40230
+ layer_width_cm?: number;
40231
+ layers_per_cart?: number;
40232
+ name?: string;
40233
+ updated_at?: string;
40234
+ };
40235
+ Relationships: [];
40236
+ };
37492
40237
  catalog_articles_cache: {
37493
40238
  Row: {
37494
40239
  created_at: string;
@@ -37576,6 +40321,36 @@ export declare const getExternalCustomerDetail: import("@tanstack/start-client-c
37576
40321
  };
37577
40322
  Relationships: [];
37578
40323
  };
40324
+ crate_types: {
40325
+ Row: {
40326
+ created_at: string;
40327
+ id: string;
40328
+ length_cm: number;
40329
+ name: string;
40330
+ plants_per_crate: number;
40331
+ updated_at: string;
40332
+ width_cm: number;
40333
+ };
40334
+ Insert: {
40335
+ created_at?: string;
40336
+ id?: string;
40337
+ length_cm: number;
40338
+ name: string;
40339
+ plants_per_crate?: number;
40340
+ updated_at?: string;
40341
+ width_cm: number;
40342
+ };
40343
+ Update: {
40344
+ created_at?: string;
40345
+ id?: string;
40346
+ length_cm?: number;
40347
+ name?: string;
40348
+ plants_per_crate?: number;
40349
+ updated_at?: string;
40350
+ width_cm?: number;
40351
+ };
40352
+ Relationships: [];
40353
+ };
37579
40354
  customer_audit_log: {
37580
40355
  Row: {
37581
40356
  action: string;
@@ -42115,6 +44890,288 @@ export declare const getExternalCustomerDetail: import("@tanstack/start-client-c
42115
44890
  };
42116
44891
  Relationships: [];
42117
44892
  };
44893
+ itk_contact_persons: {
44894
+ Row: {
44895
+ created_at: string;
44896
+ customer_id: string;
44897
+ email: string | null;
44898
+ id: string;
44899
+ name: string;
44900
+ phone: string | null;
44901
+ role: string | null;
44902
+ updated_at: string;
44903
+ };
44904
+ Insert: {
44905
+ created_at?: string;
44906
+ customer_id: string;
44907
+ email?: string | null;
44908
+ id?: string;
44909
+ name: string;
44910
+ phone?: string | null;
44911
+ role?: string | null;
44912
+ updated_at?: string;
44913
+ };
44914
+ Update: {
44915
+ created_at?: string;
44916
+ customer_id?: string;
44917
+ email?: string | null;
44918
+ id?: string;
44919
+ name?: string;
44920
+ phone?: string | null;
44921
+ role?: string | null;
44922
+ updated_at?: string;
44923
+ };
44924
+ Relationships: [{
44925
+ foreignKeyName: "itk_contact_persons_customer_id_fkey";
44926
+ columns: ["customer_id"];
44927
+ isOneToOne: false;
44928
+ referencedRelation: "itk_customers";
44929
+ referencedColumns: ["id"];
44930
+ }];
44931
+ };
44932
+ itk_customer_dynamic_values: {
44933
+ Row: {
44934
+ created_at: string;
44935
+ customer_id: string;
44936
+ field_id: string;
44937
+ id: string;
44938
+ updated_at: string;
44939
+ value: string | null;
44940
+ };
44941
+ Insert: {
44942
+ created_at?: string;
44943
+ customer_id: string;
44944
+ field_id: string;
44945
+ id?: string;
44946
+ updated_at?: string;
44947
+ value?: string | null;
44948
+ };
44949
+ Update: {
44950
+ created_at?: string;
44951
+ customer_id?: string;
44952
+ field_id?: string;
44953
+ id?: string;
44954
+ updated_at?: string;
44955
+ value?: string | null;
44956
+ };
44957
+ Relationships: [{
44958
+ foreignKeyName: "itk_customer_dynamic_values_customer_id_fkey";
44959
+ columns: ["customer_id"];
44960
+ isOneToOne: false;
44961
+ referencedRelation: "itk_customers";
44962
+ referencedColumns: ["id"];
44963
+ }, {
44964
+ foreignKeyName: "itk_customer_dynamic_values_field_id_fkey";
44965
+ columns: ["field_id"];
44966
+ isOneToOne: false;
44967
+ referencedRelation: "itk_dynamic_fields";
44968
+ referencedColumns: ["id"];
44969
+ }];
44970
+ };
44971
+ itk_customer_notes: {
44972
+ Row: {
44973
+ body: string;
44974
+ created_at: string;
44975
+ created_by: string | null;
44976
+ customer_id: string;
44977
+ id: string;
44978
+ note_type: string;
44979
+ updated_at: string;
44980
+ };
44981
+ Insert: {
44982
+ body: string;
44983
+ created_at?: string;
44984
+ created_by?: string | null;
44985
+ customer_id: string;
44986
+ id?: string;
44987
+ note_type?: string;
44988
+ updated_at?: string;
44989
+ };
44990
+ Update: {
44991
+ body?: string;
44992
+ created_at?: string;
44993
+ created_by?: string | null;
44994
+ customer_id?: string;
44995
+ id?: string;
44996
+ note_type?: string;
44997
+ updated_at?: string;
44998
+ };
44999
+ Relationships: [{
45000
+ foreignKeyName: "itk_customer_notes_customer_id_fkey";
45001
+ columns: ["customer_id"];
45002
+ isOneToOne: false;
45003
+ referencedRelation: "itk_customers";
45004
+ referencedColumns: ["id"];
45005
+ }];
45006
+ };
45007
+ itk_customers: {
45008
+ Row: {
45009
+ billing_city: string | null;
45010
+ billing_postcode: string | null;
45011
+ billing_street: string | null;
45012
+ created_at: string;
45013
+ general_email: string | null;
45014
+ general_phone: string | null;
45015
+ id: string;
45016
+ legacy_customer_id: string | null;
45017
+ name: string;
45018
+ segment: import("../integrations/supabase/types").Database["public"]["Enums"]["itk_customer_segment"];
45019
+ updated_at: string;
45020
+ };
45021
+ Insert: {
45022
+ billing_city?: string | null;
45023
+ billing_postcode?: string | null;
45024
+ billing_street?: string | null;
45025
+ created_at?: string;
45026
+ general_email?: string | null;
45027
+ general_phone?: string | null;
45028
+ id?: string;
45029
+ legacy_customer_id?: string | null;
45030
+ name: string;
45031
+ segment?: import("../integrations/supabase/types").Database["public"]["Enums"]["itk_customer_segment"];
45032
+ updated_at?: string;
45033
+ };
45034
+ Update: {
45035
+ billing_city?: string | null;
45036
+ billing_postcode?: string | null;
45037
+ billing_street?: string | null;
45038
+ created_at?: string;
45039
+ general_email?: string | null;
45040
+ general_phone?: string | null;
45041
+ id?: string;
45042
+ legacy_customer_id?: string | null;
45043
+ name?: string;
45044
+ segment?: import("../integrations/supabase/types").Database["public"]["Enums"]["itk_customer_segment"];
45045
+ updated_at?: string;
45046
+ };
45047
+ Relationships: [{
45048
+ foreignKeyName: "itk_customers_legacy_customer_id_fkey";
45049
+ columns: ["legacy_customer_id"];
45050
+ isOneToOne: false;
45051
+ referencedRelation: "customers";
45052
+ referencedColumns: ["id"];
45053
+ }];
45054
+ };
45055
+ itk_dynamic_fields: {
45056
+ Row: {
45057
+ created_at: string;
45058
+ field_name: string;
45059
+ field_type: import("../integrations/supabase/types").Database["public"]["Enums"]["itk_dynamic_field_type"];
45060
+ id: string;
45061
+ options: import("../integrations/supabase/types").Json;
45062
+ sort_order: number;
45063
+ updated_at: string;
45064
+ };
45065
+ Insert: {
45066
+ created_at?: string;
45067
+ field_name: string;
45068
+ field_type?: import("../integrations/supabase/types").Database["public"]["Enums"]["itk_dynamic_field_type"];
45069
+ id?: string;
45070
+ options?: import("../integrations/supabase/types").Json;
45071
+ sort_order?: number;
45072
+ updated_at?: string;
45073
+ };
45074
+ Update: {
45075
+ created_at?: string;
45076
+ field_name?: string;
45077
+ field_type?: import("../integrations/supabase/types").Database["public"]["Enums"]["itk_dynamic_field_type"];
45078
+ id?: string;
45079
+ options?: import("../integrations/supabase/types").Json;
45080
+ sort_order?: number;
45081
+ updated_at?: string;
45082
+ };
45083
+ Relationships: [];
45084
+ };
45085
+ itk_work_locations: {
45086
+ Row: {
45087
+ city: string | null;
45088
+ created_at: string;
45089
+ customer_id: string;
45090
+ id: string;
45091
+ instructions: string | null;
45092
+ label: string;
45093
+ latitude: number | null;
45094
+ longitude: number | null;
45095
+ postcode: string | null;
45096
+ street: string | null;
45097
+ updated_at: string;
45098
+ };
45099
+ Insert: {
45100
+ city?: string | null;
45101
+ created_at?: string;
45102
+ customer_id: string;
45103
+ id?: string;
45104
+ instructions?: string | null;
45105
+ label: string;
45106
+ latitude?: number | null;
45107
+ longitude?: number | null;
45108
+ postcode?: string | null;
45109
+ street?: string | null;
45110
+ updated_at?: string;
45111
+ };
45112
+ Update: {
45113
+ city?: string | null;
45114
+ created_at?: string;
45115
+ customer_id?: string;
45116
+ id?: string;
45117
+ instructions?: string | null;
45118
+ label?: string;
45119
+ latitude?: number | null;
45120
+ longitude?: number | null;
45121
+ postcode?: string | null;
45122
+ street?: string | null;
45123
+ updated_at?: string;
45124
+ };
45125
+ Relationships: [{
45126
+ foreignKeyName: "itk_work_locations_customer_id_fkey";
45127
+ columns: ["customer_id"];
45128
+ isOneToOne: false;
45129
+ referencedRelation: "itk_customers";
45130
+ referencedColumns: ["id"];
45131
+ }];
45132
+ };
45133
+ leave_requests: {
45134
+ Row: {
45135
+ created_at: string;
45136
+ end_date: string;
45137
+ id: string;
45138
+ reason: string | null;
45139
+ start_date: string;
45140
+ status: string;
45141
+ tenant_id: string;
45142
+ updated_at: string;
45143
+ user_id: string;
45144
+ };
45145
+ Insert: {
45146
+ created_at?: string;
45147
+ end_date: string;
45148
+ id?: string;
45149
+ reason?: string | null;
45150
+ start_date: string;
45151
+ status?: string;
45152
+ tenant_id?: string;
45153
+ updated_at?: string;
45154
+ user_id: string;
45155
+ };
45156
+ Update: {
45157
+ created_at?: string;
45158
+ end_date?: string;
45159
+ id?: string;
45160
+ reason?: string | null;
45161
+ start_date?: string;
45162
+ status?: string;
45163
+ tenant_id?: string;
45164
+ updated_at?: string;
45165
+ user_id?: string;
45166
+ };
45167
+ Relationships: [{
45168
+ foreignKeyName: "leave_requests_user_id_fkey";
45169
+ columns: ["user_id"];
45170
+ isOneToOne: false;
45171
+ referencedRelation: "monteurs";
45172
+ referencedColumns: ["id"];
45173
+ }];
45174
+ };
42118
45175
  local_customer_agreements: {
42119
45176
  Row: {
42120
45177
  base_price: number | null;
@@ -42766,6 +45823,33 @@ export declare const getExternalCustomerDetail: import("@tanstack/start-client-c
42766
45823
  };
42767
45824
  Relationships: [];
42768
45825
  };
45826
+ module_permissions: {
45827
+ Row: {
45828
+ created_at: string;
45829
+ id: string;
45830
+ module_id: string;
45831
+ permission: string;
45832
+ role: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
45833
+ updated_at: string;
45834
+ };
45835
+ Insert: {
45836
+ created_at?: string;
45837
+ id?: string;
45838
+ module_id: string;
45839
+ permission: string;
45840
+ role: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
45841
+ updated_at?: string;
45842
+ };
45843
+ Update: {
45844
+ created_at?: string;
45845
+ id?: string;
45846
+ module_id?: string;
45847
+ permission?: string;
45848
+ role?: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
45849
+ updated_at?: string;
45850
+ };
45851
+ Relationships: [];
45852
+ };
42769
45853
  monteurs: {
42770
45854
  Row: {
42771
45855
  avatar_url: string | null;
@@ -43495,6 +46579,42 @@ export declare const getExternalCustomerDetail: import("@tanstack/start-client-c
43495
46579
  };
43496
46580
  Relationships: [];
43497
46581
  };
46582
+ order_buffers: {
46583
+ Row: {
46584
+ buffer_key: string;
46585
+ created_at: string;
46586
+ customer_id: string | null;
46587
+ grouping_mode: string;
46588
+ id: string;
46589
+ pickup_date: string | null;
46590
+ pickup_location: string | null;
46591
+ plan_locked_at: string | null;
46592
+ updated_at: string;
46593
+ };
46594
+ Insert: {
46595
+ buffer_key: string;
46596
+ created_at?: string;
46597
+ customer_id?: string | null;
46598
+ grouping_mode: string;
46599
+ id?: string;
46600
+ pickup_date?: string | null;
46601
+ pickup_location?: string | null;
46602
+ plan_locked_at?: string | null;
46603
+ updated_at?: string;
46604
+ };
46605
+ Update: {
46606
+ buffer_key?: string;
46607
+ created_at?: string;
46608
+ customer_id?: string | null;
46609
+ grouping_mode?: string;
46610
+ id?: string;
46611
+ pickup_date?: string | null;
46612
+ pickup_location?: string | null;
46613
+ plan_locked_at?: string | null;
46614
+ updated_at?: string;
46615
+ };
46616
+ Relationships: [];
46617
+ };
43498
46618
  order_cart_items: {
43499
46619
  Row: {
43500
46620
  cart_id: string;
@@ -43561,6 +46681,7 @@ export declare const getExternalCustomerDetail: import("@tanstack/start-client-c
43561
46681
  order_carts: {
43562
46682
  Row: {
43563
46683
  algorithm_version: number;
46684
+ buffer_id: string | null;
43564
46685
  cart_number: number;
43565
46686
  created_at: string;
43566
46687
  id: string;
@@ -43568,13 +46689,14 @@ export declare const getExternalCustomerDetail: import("@tanstack/start-client-c
43568
46689
  is_complete: boolean;
43569
46690
  notes: string | null;
43570
46691
  occupancy_pct: number;
43571
- order_id: string;
46692
+ order_id: string | null;
43572
46693
  source: string;
43573
46694
  total_layers_used: number;
43574
46695
  updated_at: string;
43575
46696
  };
43576
46697
  Insert: {
43577
46698
  algorithm_version?: number;
46699
+ buffer_id?: string | null;
43578
46700
  cart_number: number;
43579
46701
  created_at?: string;
43580
46702
  id?: string;
@@ -43582,13 +46704,14 @@ export declare const getExternalCustomerDetail: import("@tanstack/start-client-c
43582
46704
  is_complete?: boolean;
43583
46705
  notes?: string | null;
43584
46706
  occupancy_pct?: number;
43585
- order_id: string;
46707
+ order_id?: string | null;
43586
46708
  source?: string;
43587
46709
  total_layers_used?: number;
43588
46710
  updated_at?: string;
43589
46711
  };
43590
46712
  Update: {
43591
46713
  algorithm_version?: number;
46714
+ buffer_id?: string | null;
43592
46715
  cart_number?: number;
43593
46716
  created_at?: string;
43594
46717
  id?: string;
@@ -43596,12 +46719,18 @@ export declare const getExternalCustomerDetail: import("@tanstack/start-client-c
43596
46719
  is_complete?: boolean;
43597
46720
  notes?: string | null;
43598
46721
  occupancy_pct?: number;
43599
- order_id?: string;
46722
+ order_id?: string | null;
43600
46723
  source?: string;
43601
46724
  total_layers_used?: number;
43602
46725
  updated_at?: string;
43603
46726
  };
43604
46727
  Relationships: [{
46728
+ foreignKeyName: "order_carts_buffer_id_fkey";
46729
+ columns: ["buffer_id"];
46730
+ isOneToOne: false;
46731
+ referencedRelation: "order_buffers";
46732
+ referencedColumns: ["id"];
46733
+ }, {
43605
46734
  foreignKeyName: "order_carts_order_id_fkey";
43606
46735
  columns: ["order_id"];
43607
46736
  isOneToOne: false;
@@ -43738,15 +46867,117 @@ export declare const getExternalCustomerDetail: import("@tanstack/start-client-c
43738
46867
  };
43739
46868
  Relationships: [];
43740
46869
  };
46870
+ order_shipment_items: {
46871
+ Row: {
46872
+ created_at: string;
46873
+ id: string;
46874
+ order_item_id: string;
46875
+ product_id: string | null;
46876
+ product_name: string;
46877
+ quantity: number;
46878
+ shipment_id: string;
46879
+ updated_at: string;
46880
+ };
46881
+ Insert: {
46882
+ created_at?: string;
46883
+ id?: string;
46884
+ order_item_id: string;
46885
+ product_id?: string | null;
46886
+ product_name: string;
46887
+ quantity: number;
46888
+ shipment_id: string;
46889
+ updated_at?: string;
46890
+ };
46891
+ Update: {
46892
+ created_at?: string;
46893
+ id?: string;
46894
+ order_item_id?: string;
46895
+ product_id?: string | null;
46896
+ product_name?: string;
46897
+ quantity?: number;
46898
+ shipment_id?: string;
46899
+ updated_at?: string;
46900
+ };
46901
+ Relationships: [{
46902
+ foreignKeyName: "order_shipment_items_order_item_id_fkey";
46903
+ columns: ["order_item_id"];
46904
+ isOneToOne: false;
46905
+ referencedRelation: "order_items";
46906
+ referencedColumns: ["id"];
46907
+ }, {
46908
+ foreignKeyName: "order_shipment_items_shipment_id_fkey";
46909
+ columns: ["shipment_id"];
46910
+ isOneToOne: false;
46911
+ referencedRelation: "order_shipments";
46912
+ referencedColumns: ["id"];
46913
+ }];
46914
+ };
46915
+ order_shipments: {
46916
+ Row: {
46917
+ carrier_id: string | null;
46918
+ created_at: string;
46919
+ delivery_date: string | null;
46920
+ delivery_location_id: string | null;
46921
+ id: string;
46922
+ notes: string | null;
46923
+ order_id: string;
46924
+ shipment_number: number;
46925
+ shipped_at: string | null;
46926
+ status: string;
46927
+ updated_at: string;
46928
+ };
46929
+ Insert: {
46930
+ carrier_id?: string | null;
46931
+ created_at?: string;
46932
+ delivery_date?: string | null;
46933
+ delivery_location_id?: string | null;
46934
+ id?: string;
46935
+ notes?: string | null;
46936
+ order_id: string;
46937
+ shipment_number: number;
46938
+ shipped_at?: string | null;
46939
+ status?: string;
46940
+ updated_at?: string;
46941
+ };
46942
+ Update: {
46943
+ carrier_id?: string | null;
46944
+ created_at?: string;
46945
+ delivery_date?: string | null;
46946
+ delivery_location_id?: string | null;
46947
+ id?: string;
46948
+ notes?: string | null;
46949
+ order_id?: string;
46950
+ shipment_number?: number;
46951
+ shipped_at?: string | null;
46952
+ status?: string;
46953
+ updated_at?: string;
46954
+ };
46955
+ Relationships: [{
46956
+ foreignKeyName: "order_shipments_carrier_id_fkey";
46957
+ columns: ["carrier_id"];
46958
+ isOneToOne: false;
46959
+ referencedRelation: "carriers";
46960
+ referencedColumns: ["id"];
46961
+ }, {
46962
+ foreignKeyName: "order_shipments_order_id_fkey";
46963
+ columns: ["order_id"];
46964
+ isOneToOne: false;
46965
+ referencedRelation: "orders";
46966
+ referencedColumns: ["id"];
46967
+ }];
46968
+ };
43741
46969
  orders: {
43742
46970
  Row: {
46971
+ buffer_id: string | null;
43743
46972
  created_at: string;
43744
46973
  custom_fields: import("../integrations/supabase/types").Json;
43745
46974
  customer_id: string | null;
43746
46975
  customer_name: string;
43747
46976
  deleted_at: string | null;
43748
- delivery_date: string;
46977
+ delivery_date: string | null;
46978
+ floriday_sales_order_id: string | null;
43749
46979
  id: string;
46980
+ is_reservation: boolean;
43750
46981
  notes: string | null;
43751
46982
  order_date: string;
43752
46983
  order_number: string;
@@ -43758,13 +46989,16 @@ export declare const getExternalCustomerDetail: import("@tanstack/start-client-c
43758
46989
  updated_at: string;
43759
46990
  };
43760
46991
  Insert: {
46992
+ buffer_id?: string | null;
43761
46993
  created_at?: string;
43762
46994
  custom_fields?: import("../integrations/supabase/types").Json;
43763
46995
  customer_id?: string | null;
43764
46996
  customer_name?: string;
43765
46997
  deleted_at?: string | null;
43766
- delivery_date: string;
46998
+ delivery_date?: string | null;
46999
+ floriday_sales_order_id?: string | null;
43767
47000
  id?: string;
47001
+ is_reservation?: boolean;
43768
47002
  notes?: string | null;
43769
47003
  order_date?: string;
43770
47004
  order_number: string;
@@ -43776,13 +47010,16 @@ export declare const getExternalCustomerDetail: import("@tanstack/start-client-c
43776
47010
  updated_at?: string;
43777
47011
  };
43778
47012
  Update: {
47013
+ buffer_id?: string | null;
43779
47014
  created_at?: string;
43780
47015
  custom_fields?: import("../integrations/supabase/types").Json;
43781
47016
  customer_id?: string | null;
43782
47017
  customer_name?: string;
43783
47018
  deleted_at?: string | null;
43784
- delivery_date?: string;
47019
+ delivery_date?: string | null;
47020
+ floriday_sales_order_id?: string | null;
43785
47021
  id?: string;
47022
+ is_reservation?: boolean;
43786
47023
  notes?: string | null;
43787
47024
  order_date?: string;
43788
47025
  order_number?: string;
@@ -43794,6 +47031,12 @@ export declare const getExternalCustomerDetail: import("@tanstack/start-client-c
43794
47031
  updated_at?: string;
43795
47032
  };
43796
47033
  Relationships: [{
47034
+ foreignKeyName: "orders_buffer_id_fkey";
47035
+ columns: ["buffer_id"];
47036
+ isOneToOne: false;
47037
+ referencedRelation: "order_buffers";
47038
+ referencedColumns: ["id"];
47039
+ }, {
43797
47040
  foreignKeyName: "orders_customer_id_fkey";
43798
47041
  columns: ["customer_id"];
43799
47042
  isOneToOne: false;
@@ -44057,6 +47300,8 @@ export declare const getExternalCustomerDetail: import("@tanstack/start-client-c
44057
47300
  Row: {
44058
47301
  created_at: string;
44059
47302
  description: string | null;
47303
+ head_product_id: string | null;
47304
+ head_trade_item_floriday_id: string | null;
44060
47305
  id: string;
44061
47306
  is_active: boolean;
44062
47307
  name: string;
@@ -44066,6 +47311,8 @@ export declare const getExternalCustomerDetail: import("@tanstack/start-client-c
44066
47311
  Insert: {
44067
47312
  created_at?: string;
44068
47313
  description?: string | null;
47314
+ head_product_id?: string | null;
47315
+ head_trade_item_floriday_id?: string | null;
44069
47316
  id?: string;
44070
47317
  is_active?: boolean;
44071
47318
  name: string;
@@ -44075,13 +47322,21 @@ export declare const getExternalCustomerDetail: import("@tanstack/start-client-c
44075
47322
  Update: {
44076
47323
  created_at?: string;
44077
47324
  description?: string | null;
47325
+ head_product_id?: string | null;
47326
+ head_trade_item_floriday_id?: string | null;
44078
47327
  id?: string;
44079
47328
  is_active?: boolean;
44080
47329
  name?: string;
44081
47330
  tenant_id?: string;
44082
47331
  updated_at?: string;
44083
47332
  };
44084
- Relationships: [];
47333
+ Relationships: [{
47334
+ foreignKeyName: "product_groups_head_product_id_fkey";
47335
+ columns: ["head_product_id"];
47336
+ isOneToOne: false;
47337
+ referencedRelation: "products";
47338
+ referencedColumns: ["id"];
47339
+ }];
44085
47340
  };
44086
47341
  products: {
44087
47342
  Row: {
@@ -46632,6 +49887,7 @@ export declare const getExternalCustomerDetail: import("@tanstack/start-client-c
46632
49887
  internal_notes: string | null;
46633
49888
  parent_werkbon_id: string | null;
46634
49889
  parsed_payload: import("../integrations/supabase/types").Json | null;
49890
+ planning_status: string;
46635
49891
  project_number: string | null;
46636
49892
  room_number: string | null;
46637
49893
  scheduled_end_time: string | null;
@@ -46639,6 +49895,7 @@ export declare const getExternalCustomerDetail: import("@tanstack/start-client-c
46639
49895
  sequence_number: number;
46640
49896
  source_pdf_path: string | null;
46641
49897
  status: string;
49898
+ technician_id: string | null;
46642
49899
  technician_notes: string | null;
46643
49900
  technician_notes_raw: string | null;
46644
49901
  technician_task_description: string | null;
@@ -46659,6 +49916,7 @@ export declare const getExternalCustomerDetail: import("@tanstack/start-client-c
46659
49916
  internal_notes?: string | null;
46660
49917
  parent_werkbon_id?: string | null;
46661
49918
  parsed_payload?: import("../integrations/supabase/types").Json | null;
49919
+ planning_status?: string;
46662
49920
  project_number?: string | null;
46663
49921
  room_number?: string | null;
46664
49922
  scheduled_end_time?: string | null;
@@ -46666,6 +49924,7 @@ export declare const getExternalCustomerDetail: import("@tanstack/start-client-c
46666
49924
  sequence_number: number;
46667
49925
  source_pdf_path?: string | null;
46668
49926
  status?: string;
49927
+ technician_id?: string | null;
46669
49928
  technician_notes?: string | null;
46670
49929
  technician_notes_raw?: string | null;
46671
49930
  technician_task_description?: string | null;
@@ -46686,6 +49945,7 @@ export declare const getExternalCustomerDetail: import("@tanstack/start-client-c
46686
49945
  internal_notes?: string | null;
46687
49946
  parent_werkbon_id?: string | null;
46688
49947
  parsed_payload?: import("../integrations/supabase/types").Json | null;
49948
+ planning_status?: string;
46689
49949
  project_number?: string | null;
46690
49950
  room_number?: string | null;
46691
49951
  scheduled_end_time?: string | null;
@@ -46693,6 +49953,7 @@ export declare const getExternalCustomerDetail: import("@tanstack/start-client-c
46693
49953
  sequence_number?: number;
46694
49954
  source_pdf_path?: string | null;
46695
49955
  status?: string;
49956
+ technician_id?: string | null;
46696
49957
  technician_notes?: string | null;
46697
49958
  technician_notes_raw?: string | null;
46698
49959
  technician_task_description?: string | null;
@@ -46701,17 +49962,17 @@ export declare const getExternalCustomerDetail: import("@tanstack/start-client-c
46701
49962
  work_address?: string | null;
46702
49963
  };
46703
49964
  Relationships: [{
46704
- foreignKeyName: "werkbonnen_customer_id_fkey";
46705
- columns: ["customer_id"];
46706
- isOneToOne: false;
46707
- referencedRelation: "customers";
46708
- referencedColumns: ["id"];
46709
- }, {
46710
49965
  foreignKeyName: "werkbonnen_parent_werkbon_id_fkey";
46711
49966
  columns: ["parent_werkbon_id"];
46712
49967
  isOneToOne: false;
46713
49968
  referencedRelation: "werkbonnen";
46714
49969
  referencedColumns: ["id"];
49970
+ }, {
49971
+ foreignKeyName: "werkbonnen_technician_id_fkey";
49972
+ columns: ["technician_id"];
49973
+ isOneToOne: false;
49974
+ referencedRelation: "monteurs";
49975
+ referencedColumns: ["id"];
46715
49976
  }];
46716
49977
  };
46717
49978
  work_order_monteurs: {
@@ -47430,6 +50691,21 @@ export declare const getExternalCustomerDetail: import("@tanstack/start-client-c
47430
50691
  };
47431
50692
  Returns: string;
47432
50693
  };
50694
+ ai_usage_by_module: {
50695
+ Args: {
50696
+ _from: string;
50697
+ _to: string;
50698
+ };
50699
+ Returns: {
50700
+ calls: number;
50701
+ consumer_module_id: string;
50702
+ cost_usd: number;
50703
+ errors: number;
50704
+ input_tokens: number;
50705
+ output_tokens: number;
50706
+ total_tokens: number;
50707
+ }[];
50708
+ };
47433
50709
  apply_stock_consumption: {
47434
50710
  Args: {
47435
50711
  p_order_id: string;
@@ -47578,6 +50854,12 @@ export declare const getExternalCustomerDetail: import("@tanstack/start-client-c
47578
50854
  Args: never;
47579
50855
  Returns: string;
47580
50856
  };
50857
+ custom_access_token_hook: {
50858
+ Args: {
50859
+ event: import("../integrations/supabase/types").Json;
50860
+ };
50861
+ Returns: import("../integrations/supabase/types").Json;
50862
+ };
47581
50863
  dashboard_alert_counts: {
47582
50864
  Args: never;
47583
50865
  Returns: import("../integrations/supabase/types").Json;
@@ -47913,6 +51195,14 @@ export declare const getExternalCustomerDetail: import("@tanstack/start-client-c
47913
51195
  };
47914
51196
  Returns: string;
47915
51197
  };
51198
+ has_module_permission: {
51199
+ Args: {
51200
+ _min: string;
51201
+ _module_id: string;
51202
+ _user_id: string;
51203
+ };
51204
+ Returns: boolean;
51205
+ };
47916
51206
  has_role: {
47917
51207
  Args: {
47918
51208
  _role: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
@@ -47938,6 +51228,20 @@ export declare const getExternalCustomerDetail: import("@tanstack/start-client-c
47938
51228
  };
47939
51229
  Returns: boolean;
47940
51230
  };
51231
+ jwt_has_role: {
51232
+ Args: {
51233
+ _role: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
51234
+ };
51235
+ Returns: boolean;
51236
+ };
51237
+ list_monteurs: {
51238
+ Args: never;
51239
+ Returns: {
51240
+ display_name: string;
51241
+ email: string;
51242
+ user_id: string;
51243
+ }[];
51244
+ };
47941
51245
  local_effective_price: {
47942
51246
  Args: {
47943
51247
  _customer_id: string;
@@ -47954,6 +51258,22 @@ export declare const getExternalCustomerDetail: import("@tanstack/start-client-c
47954
51258
  source_id: string;
47955
51259
  }[];
47956
51260
  };
51261
+ log_ai_call: {
51262
+ Args: {
51263
+ _consumer_module_id: string;
51264
+ _cost_usd: number;
51265
+ _duration_ms: number;
51266
+ _error_code: string;
51267
+ _error_message: string;
51268
+ _input_tokens: number;
51269
+ _model_slug: string;
51270
+ _output_tokens: number;
51271
+ _provider_slug: string;
51272
+ _status: string;
51273
+ _total_tokens: number;
51274
+ };
51275
+ Returns: string;
51276
+ };
47957
51277
  mark_offer_clicked: {
47958
51278
  Args: {
47959
51279
  p_code: string;
@@ -47966,6 +51286,12 @@ export declare const getExternalCustomerDetail: import("@tanstack/start-client-c
47966
51286
  };
47967
51287
  Returns: undefined;
47968
51288
  };
51289
+ mark_shipment_shipped: {
51290
+ Args: {
51291
+ p_shipment_id: string;
51292
+ };
51293
+ Returns: undefined;
51294
+ };
47969
51295
  next_order_number: {
47970
51296
  Args: {
47971
51297
  p_prefix: string;
@@ -48442,9 +51768,11 @@ export declare const getExternalCustomerDetail: import("@tanstack/start-client-c
48442
51768
  };
48443
51769
  };
48444
51770
  Enums: {
48445
- app_role: "admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie" | "monteur";
51771
+ app_role: "admin" | "planner" | "monteur" | "administratie" | "ai_admin";
48446
51772
  exact_env: "staging" | "live";
48447
51773
  exact_push_status: "pending" | "sent" | "error";
51774
+ itk_customer_segment: "Business" | "Private";
51775
+ itk_dynamic_field_type: "text" | "select" | "date" | "checkbox";
48448
51776
  quote_status: "concept" | "verzonden" | "bekeken" | "in_behandeling" | "geaccepteerd" | "afgewezen" | "verlopen" | "gearchiveerd";
48449
51777
  };
48450
51778
  CompositeTypes: { [_ in never]: never; };