@flowselections/floriday-klanten-module 1.0.16 → 1.0.18

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 (48) 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/components/klanten/pricegroups/PriceGroupEditRoute.d.ts +2 -0
  5. package/dist-lib/components/klanten/pricegroups/PriceGroupEditRoute.d.ts.map +1 -0
  6. package/dist-lib/components/klanten/pricegroups/PriceGroupEditRoute.js +8 -0
  7. package/dist-lib/index.d.ts +2 -0
  8. package/dist-lib/index.d.ts.map +1 -1
  9. package/dist-lib/index.js +2 -0
  10. package/dist-lib/integrations/supabase/auth-middleware.d.ts +905 -27
  11. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
  12. package/dist-lib/integrations/supabase/client.d.ts +905 -27
  13. package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
  14. package/dist-lib/integrations/supabase/client.server.d.ts +905 -27
  15. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
  16. package/dist-lib/integrations/supabase/types.d.ts +930 -22
  17. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  18. package/dist-lib/integrations/supabase/types.js +4 -9
  19. package/dist-lib/lib/accounting/twinfield/mapping.d.ts.map +1 -1
  20. package/dist-lib/lib/accounting/twinfield/mapping.js +14 -2
  21. package/dist-lib/lib/accounting/twinfield/worker.functions.d.ts +2676 -42
  22. package/dist-lib/lib/accounting/twinfield/worker.functions.d.ts.map +1 -1
  23. package/dist-lib/lib/accounting.functions.d.ts +2676 -42
  24. package/dist-lib/lib/accounting.functions.d.ts.map +1 -1
  25. package/dist-lib/lib/customer-analytics.functions.d.ts +905 -27
  26. package/dist-lib/lib/customer-analytics.functions.d.ts.map +1 -1
  27. package/dist-lib/lib/customers.functions.d.ts +8028 -126
  28. package/dist-lib/lib/customers.functions.d.ts.map +1 -1
  29. package/dist-lib/lib/delivery-locations.functions.d.ts +3568 -56
  30. package/dist-lib/lib/delivery-locations.functions.d.ts.map +1 -1
  31. package/dist-lib/lib/external-customers.functions.d.ts +3568 -56
  32. package/dist-lib/lib/external-customers.functions.d.ts.map +1 -1
  33. package/dist-lib/lib/floriday-assortment.functions.d.ts +905 -27
  34. package/dist-lib/lib/floriday-assortment.functions.d.ts.map +1 -1
  35. package/dist-lib/lib/floriday-discounts.functions.d.ts +1888 -132
  36. package/dist-lib/lib/floriday-discounts.functions.d.ts.map +1 -1
  37. package/dist-lib/lib/floriday-trade-items.functions.d.ts +905 -27
  38. package/dist-lib/lib/floriday-trade-items.functions.d.ts.map +1 -1
  39. package/dist-lib/lib/local-discounts.functions.d.ts +6244 -98
  40. package/dist-lib/lib/local-discounts.functions.d.ts.map +1 -1
  41. package/dist-lib/lib/overdue-invoices.functions.d.ts +905 -27
  42. package/dist-lib/lib/overdue-invoices.functions.d.ts.map +1 -1
  43. package/dist-lib/lib/price-groups-local.functions.d.ts +6244 -98
  44. package/dist-lib/lib/price-groups-local.functions.d.ts.map +1 -1
  45. package/dist-lib/lib/price-groups.functions.d.ts +905 -27
  46. package/dist-lib/lib/price-groups.functions.d.ts.map +1 -1
  47. package/package.json +8 -2
  48. package/public/flowselections-assets/Klanten/floriday-logo.png +0 -0
@@ -278,6 +278,57 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
278
278
  referencedColumns: ["id"];
279
279
  }];
280
280
  };
281
+ ai_call_log: {
282
+ Row: {
283
+ consumer_module_id: string;
284
+ cost_usd: number | null;
285
+ created_at: string;
286
+ created_by: string | null;
287
+ duration_ms: number | null;
288
+ error_code: string | null;
289
+ error_message: string | null;
290
+ id: string;
291
+ input_tokens: number;
292
+ model_slug: string | null;
293
+ output_tokens: number;
294
+ provider_slug: string | null;
295
+ status: string;
296
+ total_tokens: number;
297
+ };
298
+ Insert: {
299
+ consumer_module_id: string;
300
+ cost_usd?: number | null;
301
+ created_at?: string;
302
+ created_by?: string | null;
303
+ duration_ms?: number | null;
304
+ error_code?: string | null;
305
+ error_message?: string | null;
306
+ id?: string;
307
+ input_tokens?: number;
308
+ model_slug?: string | null;
309
+ output_tokens?: number;
310
+ provider_slug?: string | null;
311
+ status: string;
312
+ total_tokens?: number;
313
+ };
314
+ Update: {
315
+ consumer_module_id?: string;
316
+ cost_usd?: number | null;
317
+ created_at?: string;
318
+ created_by?: string | null;
319
+ duration_ms?: number | null;
320
+ error_code?: string | null;
321
+ error_message?: string | null;
322
+ id?: string;
323
+ input_tokens?: number;
324
+ model_slug?: string | null;
325
+ output_tokens?: number;
326
+ provider_slug?: string | null;
327
+ status?: string;
328
+ total_tokens?: number;
329
+ };
330
+ Relationships: [];
331
+ };
281
332
  ai_credentials: {
282
333
  Row: {
283
334
  active: boolean;
@@ -314,6 +365,36 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
314
365
  referencedColumns: ["id"];
315
366
  }];
316
367
  };
368
+ ai_goals: {
369
+ Row: {
370
+ active: boolean;
371
+ created_at: string;
372
+ description: string | null;
373
+ key: string;
374
+ label: string;
375
+ sort_order: number;
376
+ updated_at: string;
377
+ };
378
+ Insert: {
379
+ active?: boolean;
380
+ created_at?: string;
381
+ description?: string | null;
382
+ key: string;
383
+ label: string;
384
+ sort_order?: number;
385
+ updated_at?: string;
386
+ };
387
+ Update: {
388
+ active?: boolean;
389
+ created_at?: string;
390
+ description?: string | null;
391
+ key?: string;
392
+ label?: string;
393
+ sort_order?: number;
394
+ updated_at?: string;
395
+ };
396
+ Relationships: [];
397
+ };
317
398
  ai_model_pricing: {
318
399
  Row: {
319
400
  created_at: string;
@@ -1100,6 +1181,141 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
1100
1181
  };
1101
1182
  Relationships: [];
1102
1183
  };
1184
+ cart_planning_pick_times: {
1185
+ Row: {
1186
+ created_at: string;
1187
+ id: string;
1188
+ pot_size: string;
1189
+ seconds_per_cart: number;
1190
+ updated_at: string;
1191
+ };
1192
+ Insert: {
1193
+ created_at?: string;
1194
+ id?: string;
1195
+ pot_size: string;
1196
+ seconds_per_cart: number;
1197
+ updated_at?: string;
1198
+ };
1199
+ Update: {
1200
+ created_at?: string;
1201
+ id?: string;
1202
+ pot_size?: string;
1203
+ seconds_per_cart?: number;
1204
+ updated_at?: string;
1205
+ };
1206
+ Relationships: [];
1207
+ };
1208
+ cart_planning_product_overrides: {
1209
+ Row: {
1210
+ created_at: string;
1211
+ id: string;
1212
+ max_party_share_per_layer_pct_override: number | null;
1213
+ never_mix: boolean;
1214
+ notes: string | null;
1215
+ product_id: string;
1216
+ updated_at: string;
1217
+ };
1218
+ Insert: {
1219
+ created_at?: string;
1220
+ id?: string;
1221
+ max_party_share_per_layer_pct_override?: number | null;
1222
+ never_mix?: boolean;
1223
+ notes?: string | null;
1224
+ product_id: string;
1225
+ updated_at?: string;
1226
+ };
1227
+ Update: {
1228
+ created_at?: string;
1229
+ id?: string;
1230
+ max_party_share_per_layer_pct_override?: number | null;
1231
+ never_mix?: boolean;
1232
+ notes?: string | null;
1233
+ product_id?: string;
1234
+ updated_at?: string;
1235
+ };
1236
+ Relationships: [{
1237
+ foreignKeyName: "cart_planning_product_overrides_product_id_fkey";
1238
+ columns: ["product_id"];
1239
+ isOneToOne: true;
1240
+ referencedRelation: "products";
1241
+ referencedColumns: ["id"];
1242
+ }];
1243
+ };
1244
+ cart_planning_settings: {
1245
+ Row: {
1246
+ allow_editing_after_pickstation_send: boolean;
1247
+ buffer_grouping_mode: string;
1248
+ combine_floriday_orders: boolean;
1249
+ combine_floriday_orders_window: string;
1250
+ combine_orders_scope: string;
1251
+ default_workers: number;
1252
+ id: number;
1253
+ max_beladingen_per_layer: number;
1254
+ max_customers_per_cart: number;
1255
+ max_one_customer_per_layer: boolean;
1256
+ max_party_share_per_layer_pct: number;
1257
+ optimization_strategy: string;
1258
+ own_cart_from_layers: number;
1259
+ pick_time_mode: string;
1260
+ plants_per_day: number;
1261
+ plants_per_hour: number;
1262
+ require_same_carrier: boolean;
1263
+ require_same_crate_type: boolean;
1264
+ require_same_delivery_date: boolean;
1265
+ require_same_delivery_location: boolean;
1266
+ updated_at: string;
1267
+ updated_by: string | null;
1268
+ };
1269
+ Insert: {
1270
+ allow_editing_after_pickstation_send?: boolean;
1271
+ buffer_grouping_mode?: string;
1272
+ combine_floriday_orders?: boolean;
1273
+ combine_floriday_orders_window?: string;
1274
+ combine_orders_scope?: string;
1275
+ default_workers?: number;
1276
+ id?: number;
1277
+ max_beladingen_per_layer?: number;
1278
+ max_customers_per_cart?: number;
1279
+ max_one_customer_per_layer?: boolean;
1280
+ max_party_share_per_layer_pct?: number;
1281
+ optimization_strategy?: string;
1282
+ own_cart_from_layers?: number;
1283
+ pick_time_mode?: string;
1284
+ plants_per_day?: number;
1285
+ plants_per_hour?: number;
1286
+ require_same_carrier?: boolean;
1287
+ require_same_crate_type?: boolean;
1288
+ require_same_delivery_date?: boolean;
1289
+ require_same_delivery_location?: boolean;
1290
+ updated_at?: string;
1291
+ updated_by?: string | null;
1292
+ };
1293
+ Update: {
1294
+ allow_editing_after_pickstation_send?: boolean;
1295
+ buffer_grouping_mode?: string;
1296
+ combine_floriday_orders?: boolean;
1297
+ combine_floriday_orders_window?: string;
1298
+ combine_orders_scope?: string;
1299
+ default_workers?: number;
1300
+ id?: number;
1301
+ max_beladingen_per_layer?: number;
1302
+ max_customers_per_cart?: number;
1303
+ max_one_customer_per_layer?: boolean;
1304
+ max_party_share_per_layer_pct?: number;
1305
+ optimization_strategy?: string;
1306
+ own_cart_from_layers?: number;
1307
+ pick_time_mode?: string;
1308
+ plants_per_day?: number;
1309
+ plants_per_hour?: number;
1310
+ require_same_carrier?: boolean;
1311
+ require_same_crate_type?: boolean;
1312
+ require_same_delivery_date?: boolean;
1313
+ require_same_delivery_location?: boolean;
1314
+ updated_at?: string;
1315
+ updated_by?: string | null;
1316
+ };
1317
+ Relationships: [];
1318
+ };
1103
1319
  cart_replan_queue: {
1104
1320
  Row: {
1105
1321
  attempts: number;
@@ -1130,6 +1346,39 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
1130
1346
  referencedColumns: ["id"];
1131
1347
  }];
1132
1348
  };
1349
+ cart_types: {
1350
+ Row: {
1351
+ created_at: string;
1352
+ id: string;
1353
+ is_default: boolean;
1354
+ layer_length_cm: number;
1355
+ layer_width_cm: number;
1356
+ layers_per_cart: number;
1357
+ name: string;
1358
+ updated_at: string;
1359
+ };
1360
+ Insert: {
1361
+ created_at?: string;
1362
+ id?: string;
1363
+ is_default?: boolean;
1364
+ layer_length_cm: number;
1365
+ layer_width_cm: number;
1366
+ layers_per_cart?: number;
1367
+ name: string;
1368
+ updated_at?: string;
1369
+ };
1370
+ Update: {
1371
+ created_at?: string;
1372
+ id?: string;
1373
+ is_default?: boolean;
1374
+ layer_length_cm?: number;
1375
+ layer_width_cm?: number;
1376
+ layers_per_cart?: number;
1377
+ name?: string;
1378
+ updated_at?: string;
1379
+ };
1380
+ Relationships: [];
1381
+ };
1133
1382
  catalog_articles_cache: {
1134
1383
  Row: {
1135
1384
  created_at: string;
@@ -1217,6 +1466,36 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
1217
1466
  };
1218
1467
  Relationships: [];
1219
1468
  };
1469
+ crate_types: {
1470
+ Row: {
1471
+ created_at: string;
1472
+ id: string;
1473
+ length_cm: number;
1474
+ name: string;
1475
+ plants_per_crate: number;
1476
+ updated_at: string;
1477
+ width_cm: number;
1478
+ };
1479
+ Insert: {
1480
+ created_at?: string;
1481
+ id?: string;
1482
+ length_cm: number;
1483
+ name: string;
1484
+ plants_per_crate?: number;
1485
+ updated_at?: string;
1486
+ width_cm: number;
1487
+ };
1488
+ Update: {
1489
+ created_at?: string;
1490
+ id?: string;
1491
+ length_cm?: number;
1492
+ name?: string;
1493
+ plants_per_crate?: number;
1494
+ updated_at?: string;
1495
+ width_cm?: number;
1496
+ };
1497
+ Relationships: [];
1498
+ };
1220
1499
  customer_audit_log: {
1221
1500
  Row: {
1222
1501
  action: string;
@@ -5734,27 +6013,309 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
5734
6013
  };
5735
6014
  Insert: {
5736
6015
  created_at?: string;
5737
- created_by?: string | null;
6016
+ created_by?: string | null;
6017
+ id?: string;
6018
+ period_end: string;
6019
+ period_start: string;
6020
+ status?: string;
6021
+ total_excl_vat?: number | null;
6022
+ total_incl_vat?: number | null;
6023
+ vat_amount?: number | null;
6024
+ };
6025
+ Update: {
6026
+ created_at?: string;
6027
+ created_by?: string | null;
6028
+ id?: string;
6029
+ period_end?: string;
6030
+ period_start?: string;
6031
+ status?: string;
6032
+ total_excl_vat?: number | null;
6033
+ total_incl_vat?: number | null;
6034
+ vat_amount?: number | null;
6035
+ };
6036
+ Relationships: [];
6037
+ };
6038
+ itk_contact_persons: {
6039
+ Row: {
6040
+ created_at: string;
6041
+ customer_id: string;
6042
+ email: string | null;
6043
+ id: string;
6044
+ name: string;
6045
+ phone: string | null;
6046
+ role: string | null;
6047
+ updated_at: string;
6048
+ };
6049
+ Insert: {
6050
+ created_at?: string;
6051
+ customer_id: string;
6052
+ email?: string | null;
6053
+ id?: string;
6054
+ name: string;
6055
+ phone?: string | null;
6056
+ role?: string | null;
6057
+ updated_at?: string;
6058
+ };
6059
+ Update: {
6060
+ created_at?: string;
6061
+ customer_id?: string;
6062
+ email?: string | null;
6063
+ id?: string;
6064
+ name?: string;
6065
+ phone?: string | null;
6066
+ role?: string | null;
6067
+ updated_at?: string;
6068
+ };
6069
+ Relationships: [{
6070
+ foreignKeyName: "itk_contact_persons_customer_id_fkey";
6071
+ columns: ["customer_id"];
6072
+ isOneToOne: false;
6073
+ referencedRelation: "itk_customers";
6074
+ referencedColumns: ["id"];
6075
+ }];
6076
+ };
6077
+ itk_customer_dynamic_values: {
6078
+ Row: {
6079
+ created_at: string;
6080
+ customer_id: string;
6081
+ field_id: string;
6082
+ id: string;
6083
+ updated_at: string;
6084
+ value: string | null;
6085
+ };
6086
+ Insert: {
6087
+ created_at?: string;
6088
+ customer_id: string;
6089
+ field_id: string;
6090
+ id?: string;
6091
+ updated_at?: string;
6092
+ value?: string | null;
6093
+ };
6094
+ Update: {
6095
+ created_at?: string;
6096
+ customer_id?: string;
6097
+ field_id?: string;
6098
+ id?: string;
6099
+ updated_at?: string;
6100
+ value?: string | null;
6101
+ };
6102
+ Relationships: [{
6103
+ foreignKeyName: "itk_customer_dynamic_values_customer_id_fkey";
6104
+ columns: ["customer_id"];
6105
+ isOneToOne: false;
6106
+ referencedRelation: "itk_customers";
6107
+ referencedColumns: ["id"];
6108
+ }, {
6109
+ foreignKeyName: "itk_customer_dynamic_values_field_id_fkey";
6110
+ columns: ["field_id"];
6111
+ isOneToOne: false;
6112
+ referencedRelation: "itk_dynamic_fields";
6113
+ referencedColumns: ["id"];
6114
+ }];
6115
+ };
6116
+ itk_customer_notes: {
6117
+ Row: {
6118
+ body: string;
6119
+ created_at: string;
6120
+ created_by: string | null;
6121
+ customer_id: string;
6122
+ id: string;
6123
+ note_type: string;
6124
+ updated_at: string;
6125
+ };
6126
+ Insert: {
6127
+ body: string;
6128
+ created_at?: string;
6129
+ created_by?: string | null;
6130
+ customer_id: string;
6131
+ id?: string;
6132
+ note_type?: string;
6133
+ updated_at?: string;
6134
+ };
6135
+ Update: {
6136
+ body?: string;
6137
+ created_at?: string;
6138
+ created_by?: string | null;
6139
+ customer_id?: string;
6140
+ id?: string;
6141
+ note_type?: string;
6142
+ updated_at?: string;
6143
+ };
6144
+ Relationships: [{
6145
+ foreignKeyName: "itk_customer_notes_customer_id_fkey";
6146
+ columns: ["customer_id"];
6147
+ isOneToOne: false;
6148
+ referencedRelation: "itk_customers";
6149
+ referencedColumns: ["id"];
6150
+ }];
6151
+ };
6152
+ itk_customers: {
6153
+ Row: {
6154
+ billing_city: string | null;
6155
+ billing_postcode: string | null;
6156
+ billing_street: string | null;
6157
+ created_at: string;
6158
+ general_email: string | null;
6159
+ general_phone: string | null;
6160
+ id: string;
6161
+ legacy_customer_id: string | null;
6162
+ name: string;
6163
+ segment: Database["public"]["Enums"]["itk_customer_segment"];
6164
+ updated_at: string;
6165
+ };
6166
+ Insert: {
6167
+ billing_city?: string | null;
6168
+ billing_postcode?: string | null;
6169
+ billing_street?: string | null;
6170
+ created_at?: string;
6171
+ general_email?: string | null;
6172
+ general_phone?: string | null;
6173
+ id?: string;
6174
+ legacy_customer_id?: string | null;
6175
+ name: string;
6176
+ segment?: Database["public"]["Enums"]["itk_customer_segment"];
6177
+ updated_at?: string;
6178
+ };
6179
+ Update: {
6180
+ billing_city?: string | null;
6181
+ billing_postcode?: string | null;
6182
+ billing_street?: string | null;
6183
+ created_at?: string;
6184
+ general_email?: string | null;
6185
+ general_phone?: string | null;
6186
+ id?: string;
6187
+ legacy_customer_id?: string | null;
6188
+ name?: string;
6189
+ segment?: Database["public"]["Enums"]["itk_customer_segment"];
6190
+ updated_at?: string;
6191
+ };
6192
+ Relationships: [{
6193
+ foreignKeyName: "itk_customers_legacy_customer_id_fkey";
6194
+ columns: ["legacy_customer_id"];
6195
+ isOneToOne: false;
6196
+ referencedRelation: "customers";
6197
+ referencedColumns: ["id"];
6198
+ }];
6199
+ };
6200
+ itk_dynamic_fields: {
6201
+ Row: {
6202
+ created_at: string;
6203
+ field_name: string;
6204
+ field_type: Database["public"]["Enums"]["itk_dynamic_field_type"];
6205
+ id: string;
6206
+ options: import("./types").Json;
6207
+ sort_order: number;
6208
+ updated_at: string;
6209
+ };
6210
+ Insert: {
6211
+ created_at?: string;
6212
+ field_name: string;
6213
+ field_type?: Database["public"]["Enums"]["itk_dynamic_field_type"];
6214
+ id?: string;
6215
+ options?: import("./types").Json;
6216
+ sort_order?: number;
6217
+ updated_at?: string;
6218
+ };
6219
+ Update: {
6220
+ created_at?: string;
6221
+ field_name?: string;
6222
+ field_type?: Database["public"]["Enums"]["itk_dynamic_field_type"];
6223
+ id?: string;
6224
+ options?: import("./types").Json;
6225
+ sort_order?: number;
6226
+ updated_at?: string;
6227
+ };
6228
+ Relationships: [];
6229
+ };
6230
+ itk_work_locations: {
6231
+ Row: {
6232
+ city: string | null;
6233
+ created_at: string;
6234
+ customer_id: string;
6235
+ id: string;
6236
+ instructions: string | null;
6237
+ label: string;
6238
+ latitude: number | null;
6239
+ longitude: number | null;
6240
+ postcode: string | null;
6241
+ street: string | null;
6242
+ updated_at: string;
6243
+ };
6244
+ Insert: {
6245
+ city?: string | null;
6246
+ created_at?: string;
6247
+ customer_id: string;
6248
+ id?: string;
6249
+ instructions?: string | null;
6250
+ label: string;
6251
+ latitude?: number | null;
6252
+ longitude?: number | null;
6253
+ postcode?: string | null;
6254
+ street?: string | null;
6255
+ updated_at?: string;
6256
+ };
6257
+ Update: {
6258
+ city?: string | null;
6259
+ created_at?: string;
6260
+ customer_id?: string;
6261
+ id?: string;
6262
+ instructions?: string | null;
6263
+ label?: string;
6264
+ latitude?: number | null;
6265
+ longitude?: number | null;
6266
+ postcode?: string | null;
6267
+ street?: string | null;
6268
+ updated_at?: string;
6269
+ };
6270
+ Relationships: [{
6271
+ foreignKeyName: "itk_work_locations_customer_id_fkey";
6272
+ columns: ["customer_id"];
6273
+ isOneToOne: false;
6274
+ referencedRelation: "itk_customers";
6275
+ referencedColumns: ["id"];
6276
+ }];
6277
+ };
6278
+ leave_requests: {
6279
+ Row: {
6280
+ created_at: string;
6281
+ end_date: string;
6282
+ id: string;
6283
+ reason: string | null;
6284
+ start_date: string;
6285
+ status: string;
6286
+ tenant_id: string;
6287
+ updated_at: string;
6288
+ user_id: string;
6289
+ };
6290
+ Insert: {
6291
+ created_at?: string;
6292
+ end_date: string;
5738
6293
  id?: string;
5739
- period_end: string;
5740
- period_start: string;
6294
+ reason?: string | null;
6295
+ start_date: string;
5741
6296
  status?: string;
5742
- total_excl_vat?: number | null;
5743
- total_incl_vat?: number | null;
5744
- vat_amount?: number | null;
6297
+ tenant_id?: string;
6298
+ updated_at?: string;
6299
+ user_id: string;
5745
6300
  };
5746
6301
  Update: {
5747
6302
  created_at?: string;
5748
- created_by?: string | null;
6303
+ end_date?: string;
5749
6304
  id?: string;
5750
- period_end?: string;
5751
- period_start?: string;
6305
+ reason?: string | null;
6306
+ start_date?: string;
5752
6307
  status?: string;
5753
- total_excl_vat?: number | null;
5754
- total_incl_vat?: number | null;
5755
- vat_amount?: number | null;
6308
+ tenant_id?: string;
6309
+ updated_at?: string;
6310
+ user_id?: string;
5756
6311
  };
5757
- Relationships: [];
6312
+ Relationships: [{
6313
+ foreignKeyName: "leave_requests_user_id_fkey";
6314
+ columns: ["user_id"];
6315
+ isOneToOne: false;
6316
+ referencedRelation: "monteurs";
6317
+ referencedColumns: ["id"];
6318
+ }];
5758
6319
  };
5759
6320
  local_customer_agreements: {
5760
6321
  Row: {
@@ -6407,6 +6968,33 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
6407
6968
  };
6408
6969
  Relationships: [];
6409
6970
  };
6971
+ module_permissions: {
6972
+ Row: {
6973
+ created_at: string;
6974
+ id: string;
6975
+ module_id: string;
6976
+ permission: string;
6977
+ role: Database["public"]["Enums"]["app_role"];
6978
+ updated_at: string;
6979
+ };
6980
+ Insert: {
6981
+ created_at?: string;
6982
+ id?: string;
6983
+ module_id: string;
6984
+ permission: string;
6985
+ role: Database["public"]["Enums"]["app_role"];
6986
+ updated_at?: string;
6987
+ };
6988
+ Update: {
6989
+ created_at?: string;
6990
+ id?: string;
6991
+ module_id?: string;
6992
+ permission?: string;
6993
+ role?: Database["public"]["Enums"]["app_role"];
6994
+ updated_at?: string;
6995
+ };
6996
+ Relationships: [];
6997
+ };
6410
6998
  monteurs: {
6411
6999
  Row: {
6412
7000
  avatar_url: string | null;
@@ -7136,6 +7724,42 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7136
7724
  };
7137
7725
  Relationships: [];
7138
7726
  };
7727
+ order_buffers: {
7728
+ Row: {
7729
+ buffer_key: string;
7730
+ created_at: string;
7731
+ customer_id: string | null;
7732
+ grouping_mode: string;
7733
+ id: string;
7734
+ pickup_date: string | null;
7735
+ pickup_location: string | null;
7736
+ plan_locked_at: string | null;
7737
+ updated_at: string;
7738
+ };
7739
+ Insert: {
7740
+ buffer_key: string;
7741
+ created_at?: string;
7742
+ customer_id?: string | null;
7743
+ grouping_mode: string;
7744
+ id?: string;
7745
+ pickup_date?: string | null;
7746
+ pickup_location?: string | null;
7747
+ plan_locked_at?: string | null;
7748
+ updated_at?: string;
7749
+ };
7750
+ Update: {
7751
+ buffer_key?: string;
7752
+ created_at?: string;
7753
+ customer_id?: string | null;
7754
+ grouping_mode?: string;
7755
+ id?: string;
7756
+ pickup_date?: string | null;
7757
+ pickup_location?: string | null;
7758
+ plan_locked_at?: string | null;
7759
+ updated_at?: string;
7760
+ };
7761
+ Relationships: [];
7762
+ };
7139
7763
  order_cart_items: {
7140
7764
  Row: {
7141
7765
  cart_id: string;
@@ -7202,6 +7826,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7202
7826
  order_carts: {
7203
7827
  Row: {
7204
7828
  algorithm_version: number;
7829
+ buffer_id: string | null;
7205
7830
  cart_number: number;
7206
7831
  created_at: string;
7207
7832
  id: string;
@@ -7209,13 +7834,14 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7209
7834
  is_complete: boolean;
7210
7835
  notes: string | null;
7211
7836
  occupancy_pct: number;
7212
- order_id: string;
7837
+ order_id: string | null;
7213
7838
  source: string;
7214
7839
  total_layers_used: number;
7215
7840
  updated_at: string;
7216
7841
  };
7217
7842
  Insert: {
7218
7843
  algorithm_version?: number;
7844
+ buffer_id?: string | null;
7219
7845
  cart_number: number;
7220
7846
  created_at?: string;
7221
7847
  id?: string;
@@ -7223,13 +7849,14 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7223
7849
  is_complete?: boolean;
7224
7850
  notes?: string | null;
7225
7851
  occupancy_pct?: number;
7226
- order_id: string;
7852
+ order_id?: string | null;
7227
7853
  source?: string;
7228
7854
  total_layers_used?: number;
7229
7855
  updated_at?: string;
7230
7856
  };
7231
7857
  Update: {
7232
7858
  algorithm_version?: number;
7859
+ buffer_id?: string | null;
7233
7860
  cart_number?: number;
7234
7861
  created_at?: string;
7235
7862
  id?: string;
@@ -7237,12 +7864,18 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7237
7864
  is_complete?: boolean;
7238
7865
  notes?: string | null;
7239
7866
  occupancy_pct?: number;
7240
- order_id?: string;
7867
+ order_id?: string | null;
7241
7868
  source?: string;
7242
7869
  total_layers_used?: number;
7243
7870
  updated_at?: string;
7244
7871
  };
7245
7872
  Relationships: [{
7873
+ foreignKeyName: "order_carts_buffer_id_fkey";
7874
+ columns: ["buffer_id"];
7875
+ isOneToOne: false;
7876
+ referencedRelation: "order_buffers";
7877
+ referencedColumns: ["id"];
7878
+ }, {
7246
7879
  foreignKeyName: "order_carts_order_id_fkey";
7247
7880
  columns: ["order_id"];
7248
7881
  isOneToOne: false;
@@ -7379,15 +8012,117 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7379
8012
  };
7380
8013
  Relationships: [];
7381
8014
  };
8015
+ order_shipment_items: {
8016
+ Row: {
8017
+ created_at: string;
8018
+ id: string;
8019
+ order_item_id: string;
8020
+ product_id: string | null;
8021
+ product_name: string;
8022
+ quantity: number;
8023
+ shipment_id: string;
8024
+ updated_at: string;
8025
+ };
8026
+ Insert: {
8027
+ created_at?: string;
8028
+ id?: string;
8029
+ order_item_id: string;
8030
+ product_id?: string | null;
8031
+ product_name: string;
8032
+ quantity: number;
8033
+ shipment_id: string;
8034
+ updated_at?: string;
8035
+ };
8036
+ Update: {
8037
+ created_at?: string;
8038
+ id?: string;
8039
+ order_item_id?: string;
8040
+ product_id?: string | null;
8041
+ product_name?: string;
8042
+ quantity?: number;
8043
+ shipment_id?: string;
8044
+ updated_at?: string;
8045
+ };
8046
+ Relationships: [{
8047
+ foreignKeyName: "order_shipment_items_order_item_id_fkey";
8048
+ columns: ["order_item_id"];
8049
+ isOneToOne: false;
8050
+ referencedRelation: "order_items";
8051
+ referencedColumns: ["id"];
8052
+ }, {
8053
+ foreignKeyName: "order_shipment_items_shipment_id_fkey";
8054
+ columns: ["shipment_id"];
8055
+ isOneToOne: false;
8056
+ referencedRelation: "order_shipments";
8057
+ referencedColumns: ["id"];
8058
+ }];
8059
+ };
8060
+ order_shipments: {
8061
+ Row: {
8062
+ carrier_id: string | null;
8063
+ created_at: string;
8064
+ delivery_date: string | null;
8065
+ delivery_location_id: string | null;
8066
+ id: string;
8067
+ notes: string | null;
8068
+ order_id: string;
8069
+ shipment_number: number;
8070
+ shipped_at: string | null;
8071
+ status: string;
8072
+ updated_at: string;
8073
+ };
8074
+ Insert: {
8075
+ carrier_id?: string | null;
8076
+ created_at?: string;
8077
+ delivery_date?: string | null;
8078
+ delivery_location_id?: string | null;
8079
+ id?: string;
8080
+ notes?: string | null;
8081
+ order_id: string;
8082
+ shipment_number: number;
8083
+ shipped_at?: string | null;
8084
+ status?: string;
8085
+ updated_at?: string;
8086
+ };
8087
+ Update: {
8088
+ carrier_id?: string | null;
8089
+ created_at?: string;
8090
+ delivery_date?: string | null;
8091
+ delivery_location_id?: string | null;
8092
+ id?: string;
8093
+ notes?: string | null;
8094
+ order_id?: string;
8095
+ shipment_number?: number;
8096
+ shipped_at?: string | null;
8097
+ status?: string;
8098
+ updated_at?: string;
8099
+ };
8100
+ Relationships: [{
8101
+ foreignKeyName: "order_shipments_carrier_id_fkey";
8102
+ columns: ["carrier_id"];
8103
+ isOneToOne: false;
8104
+ referencedRelation: "carriers";
8105
+ referencedColumns: ["id"];
8106
+ }, {
8107
+ foreignKeyName: "order_shipments_order_id_fkey";
8108
+ columns: ["order_id"];
8109
+ isOneToOne: false;
8110
+ referencedRelation: "orders";
8111
+ referencedColumns: ["id"];
8112
+ }];
8113
+ };
7382
8114
  orders: {
7383
8115
  Row: {
8116
+ buffer_id: string | null;
7384
8117
  created_at: string;
7385
8118
  custom_fields: import("./types").Json;
7386
8119
  customer_id: string | null;
7387
8120
  customer_name: string;
7388
8121
  deleted_at: string | null;
7389
- delivery_date: string;
8122
+ delivery_date: string | null;
8123
+ floriday_sales_order_id: string | null;
7390
8124
  id: string;
8125
+ is_reservation: boolean;
7391
8126
  notes: string | null;
7392
8127
  order_date: string;
7393
8128
  order_number: string;
@@ -7399,13 +8134,16 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7399
8134
  updated_at: string;
7400
8135
  };
7401
8136
  Insert: {
8137
+ buffer_id?: string | null;
7402
8138
  created_at?: string;
7403
8139
  custom_fields?: import("./types").Json;
7404
8140
  customer_id?: string | null;
7405
8141
  customer_name?: string;
7406
8142
  deleted_at?: string | null;
7407
- delivery_date: string;
8143
+ delivery_date?: string | null;
8144
+ floriday_sales_order_id?: string | null;
7408
8145
  id?: string;
8146
+ is_reservation?: boolean;
7409
8147
  notes?: string | null;
7410
8148
  order_date?: string;
7411
8149
  order_number: string;
@@ -7417,13 +8155,16 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7417
8155
  updated_at?: string;
7418
8156
  };
7419
8157
  Update: {
8158
+ buffer_id?: string | null;
7420
8159
  created_at?: string;
7421
8160
  custom_fields?: import("./types").Json;
7422
8161
  customer_id?: string | null;
7423
8162
  customer_name?: string;
7424
8163
  deleted_at?: string | null;
7425
- delivery_date?: string;
8164
+ delivery_date?: string | null;
8165
+ floriday_sales_order_id?: string | null;
7426
8166
  id?: string;
8167
+ is_reservation?: boolean;
7427
8168
  notes?: string | null;
7428
8169
  order_date?: string;
7429
8170
  order_number?: string;
@@ -7435,6 +8176,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7435
8176
  updated_at?: string;
7436
8177
  };
7437
8178
  Relationships: [{
8179
+ foreignKeyName: "orders_buffer_id_fkey";
8180
+ columns: ["buffer_id"];
8181
+ isOneToOne: false;
8182
+ referencedRelation: "order_buffers";
8183
+ referencedColumns: ["id"];
8184
+ }, {
7438
8185
  foreignKeyName: "orders_customer_id_fkey";
7439
8186
  columns: ["customer_id"];
7440
8187
  isOneToOne: false;
@@ -7565,6 +8312,51 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7565
8312
  };
7566
8313
  Relationships: [];
7567
8314
  };
8315
+ planning_items: {
8316
+ Row: {
8317
+ assigned_monteur_id: string;
8318
+ created_at: string;
8319
+ created_by: string | null;
8320
+ end_at: string;
8321
+ id: string;
8322
+ notes: string | null;
8323
+ start_at: string;
8324
+ status: Database["public"]["Enums"]["planning_item_status"];
8325
+ updated_at: string;
8326
+ werkbon_id: string;
8327
+ };
8328
+ Insert: {
8329
+ assigned_monteur_id: string;
8330
+ created_at?: string;
8331
+ created_by?: string | null;
8332
+ end_at: string;
8333
+ id?: string;
8334
+ notes?: string | null;
8335
+ start_at: string;
8336
+ status?: Database["public"]["Enums"]["planning_item_status"];
8337
+ updated_at?: string;
8338
+ werkbon_id: string;
8339
+ };
8340
+ Update: {
8341
+ assigned_monteur_id?: string;
8342
+ created_at?: string;
8343
+ created_by?: string | null;
8344
+ end_at?: string;
8345
+ id?: string;
8346
+ notes?: string | null;
8347
+ start_at?: string;
8348
+ status?: Database["public"]["Enums"]["planning_item_status"];
8349
+ updated_at?: string;
8350
+ werkbon_id?: string;
8351
+ };
8352
+ Relationships: [{
8353
+ foreignKeyName: "planning_items_werkbon_id_fkey";
8354
+ columns: ["werkbon_id"];
8355
+ isOneToOne: false;
8356
+ referencedRelation: "werkbonnen";
8357
+ referencedColumns: ["id"];
8358
+ }];
8359
+ };
7568
8360
  product_categories: {
7569
8361
  Row: {
7570
8362
  color: string;
@@ -7698,6 +8490,8 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7698
8490
  Row: {
7699
8491
  created_at: string;
7700
8492
  description: string | null;
8493
+ head_product_id: string | null;
8494
+ head_trade_item_floriday_id: string | null;
7701
8495
  id: string;
7702
8496
  is_active: boolean;
7703
8497
  name: string;
@@ -7707,6 +8501,8 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7707
8501
  Insert: {
7708
8502
  created_at?: string;
7709
8503
  description?: string | null;
8504
+ head_product_id?: string | null;
8505
+ head_trade_item_floriday_id?: string | null;
7710
8506
  id?: string;
7711
8507
  is_active?: boolean;
7712
8508
  name: string;
@@ -7716,13 +8512,21 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
7716
8512
  Update: {
7717
8513
  created_at?: string;
7718
8514
  description?: string | null;
8515
+ head_product_id?: string | null;
8516
+ head_trade_item_floriday_id?: string | null;
7719
8517
  id?: string;
7720
8518
  is_active?: boolean;
7721
8519
  name?: string;
7722
8520
  tenant_id?: string;
7723
8521
  updated_at?: string;
7724
8522
  };
7725
- Relationships: [];
8523
+ Relationships: [{
8524
+ foreignKeyName: "product_groups_head_product_id_fkey";
8525
+ columns: ["head_product_id"];
8526
+ isOneToOne: false;
8527
+ referencedRelation: "products";
8528
+ referencedColumns: ["id"];
8529
+ }];
7726
8530
  };
7727
8531
  products: {
7728
8532
  Row: {
@@ -10273,6 +11077,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10273
11077
  internal_notes: string | null;
10274
11078
  parent_werkbon_id: string | null;
10275
11079
  parsed_payload: import("./types").Json | null;
11080
+ planning_status: string;
10276
11081
  project_number: string | null;
10277
11082
  room_number: string | null;
10278
11083
  scheduled_end_time: string | null;
@@ -10280,6 +11085,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10280
11085
  sequence_number: number;
10281
11086
  source_pdf_path: string | null;
10282
11087
  status: string;
11088
+ technician_id: string | null;
10283
11089
  technician_notes: string | null;
10284
11090
  technician_notes_raw: string | null;
10285
11091
  technician_task_description: string | null;
@@ -10300,6 +11106,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10300
11106
  internal_notes?: string | null;
10301
11107
  parent_werkbon_id?: string | null;
10302
11108
  parsed_payload?: import("./types").Json | null;
11109
+ planning_status?: string;
10303
11110
  project_number?: string | null;
10304
11111
  room_number?: string | null;
10305
11112
  scheduled_end_time?: string | null;
@@ -10307,6 +11114,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10307
11114
  sequence_number: number;
10308
11115
  source_pdf_path?: string | null;
10309
11116
  status?: string;
11117
+ technician_id?: string | null;
10310
11118
  technician_notes?: string | null;
10311
11119
  technician_notes_raw?: string | null;
10312
11120
  technician_task_description?: string | null;
@@ -10327,6 +11135,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10327
11135
  internal_notes?: string | null;
10328
11136
  parent_werkbon_id?: string | null;
10329
11137
  parsed_payload?: import("./types").Json | null;
11138
+ planning_status?: string;
10330
11139
  project_number?: string | null;
10331
11140
  room_number?: string | null;
10332
11141
  scheduled_end_time?: string | null;
@@ -10334,6 +11143,7 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10334
11143
  sequence_number?: number;
10335
11144
  source_pdf_path?: string | null;
10336
11145
  status?: string;
11146
+ technician_id?: string | null;
10337
11147
  technician_notes?: string | null;
10338
11148
  technician_notes_raw?: string | null;
10339
11149
  technician_task_description?: string | null;
@@ -10342,17 +11152,17 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
10342
11152
  work_address?: string | null;
10343
11153
  };
10344
11154
  Relationships: [{
10345
- foreignKeyName: "werkbonnen_customer_id_fkey";
10346
- columns: ["customer_id"];
10347
- isOneToOne: false;
10348
- referencedRelation: "customers";
10349
- referencedColumns: ["id"];
10350
- }, {
10351
11155
  foreignKeyName: "werkbonnen_parent_werkbon_id_fkey";
10352
11156
  columns: ["parent_werkbon_id"];
10353
11157
  isOneToOne: false;
10354
11158
  referencedRelation: "werkbonnen";
10355
11159
  referencedColumns: ["id"];
11160
+ }, {
11161
+ foreignKeyName: "werkbonnen_technician_id_fkey";
11162
+ columns: ["technician_id"];
11163
+ isOneToOne: false;
11164
+ referencedRelation: "monteurs";
11165
+ referencedColumns: ["id"];
10356
11166
  }];
10357
11167
  };
10358
11168
  work_order_monteurs: {
@@ -11071,6 +11881,21 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
11071
11881
  };
11072
11882
  Returns: string;
11073
11883
  };
11884
+ ai_usage_by_module: {
11885
+ Args: {
11886
+ _from: string;
11887
+ _to: string;
11888
+ };
11889
+ Returns: {
11890
+ calls: number;
11891
+ consumer_module_id: string;
11892
+ cost_usd: number;
11893
+ errors: number;
11894
+ input_tokens: number;
11895
+ output_tokens: number;
11896
+ total_tokens: number;
11897
+ }[];
11898
+ };
11074
11899
  apply_stock_consumption: {
11075
11900
  Args: {
11076
11901
  p_order_id: string;
@@ -11219,6 +12044,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
11219
12044
  Args: never;
11220
12045
  Returns: string;
11221
12046
  };
12047
+ custom_access_token_hook: {
12048
+ Args: {
12049
+ event: import("./types").Json;
12050
+ };
12051
+ Returns: import("./types").Json;
12052
+ };
11222
12053
  dashboard_alert_counts: {
11223
12054
  Args: never;
11224
12055
  Returns: import("./types").Json;
@@ -11554,6 +12385,14 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
11554
12385
  };
11555
12386
  Returns: string;
11556
12387
  };
12388
+ has_module_permission: {
12389
+ Args: {
12390
+ _min: string;
12391
+ _module_id: string;
12392
+ _user_id: string;
12393
+ };
12394
+ Returns: boolean;
12395
+ };
11557
12396
  has_role: {
11558
12397
  Args: {
11559
12398
  _role: Database["public"]["Enums"]["app_role"];
@@ -11579,6 +12418,20 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
11579
12418
  };
11580
12419
  Returns: boolean;
11581
12420
  };
12421
+ jwt_has_role: {
12422
+ Args: {
12423
+ _role: Database["public"]["Enums"]["app_role"];
12424
+ };
12425
+ Returns: boolean;
12426
+ };
12427
+ list_monteurs: {
12428
+ Args: never;
12429
+ Returns: {
12430
+ display_name: string;
12431
+ email: string;
12432
+ user_id: string;
12433
+ }[];
12434
+ };
11582
12435
  local_effective_price: {
11583
12436
  Args: {
11584
12437
  _customer_id: string;
@@ -11595,6 +12448,22 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
11595
12448
  source_id: string;
11596
12449
  }[];
11597
12450
  };
12451
+ log_ai_call: {
12452
+ Args: {
12453
+ _consumer_module_id: string;
12454
+ _cost_usd: number;
12455
+ _duration_ms: number;
12456
+ _error_code: string;
12457
+ _error_message: string;
12458
+ _input_tokens: number;
12459
+ _model_slug: string;
12460
+ _output_tokens: number;
12461
+ _provider_slug: string;
12462
+ _status: string;
12463
+ _total_tokens: number;
12464
+ };
12465
+ Returns: string;
12466
+ };
11598
12467
  mark_offer_clicked: {
11599
12468
  Args: {
11600
12469
  p_code: string;
@@ -11607,6 +12476,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
11607
12476
  };
11608
12477
  Returns: undefined;
11609
12478
  };
12479
+ mark_shipment_shipped: {
12480
+ Args: {
12481
+ p_shipment_id: string;
12482
+ };
12483
+ Returns: undefined;
12484
+ };
11610
12485
  next_order_number: {
11611
12486
  Args: {
11612
12487
  p_prefix: string;
@@ -12083,9 +12958,12 @@ export declare const requireSupabaseAuth: import("@tanstack/start-client-core").
12083
12958
  };
12084
12959
  };
12085
12960
  Enums: {
12086
- app_role: "admin" | "manager" | "warehouse" | "sales" | "developer" | "receptie" | "monteur";
12961
+ app_role: "admin" | "planner" | "monteur" | "administratie" | "ai_admin";
12087
12962
  exact_env: "staging" | "live";
12088
12963
  exact_push_status: "pending" | "sent" | "error";
12964
+ itk_customer_segment: "Business" | "Private";
12965
+ itk_dynamic_field_type: "text" | "select" | "date" | "checkbox";
12966
+ planning_item_status: "gepland" | "bezig" | "afgerond" | "geannuleerd";
12089
12967
  quote_status: "concept" | "verzonden" | "bekeken" | "in_behandeling" | "geaccepteerd" | "afgewezen" | "verlopen" | "gearchiveerd";
12090
12968
  };
12091
12969
  CompositeTypes: { [_ in never]: never; };