@flowselections/floriday-verkoop-module 1.0.24 → 1.0.26

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 (51) hide show
  1. package/dist-lib/integrations/supabase/auth-middleware.d.ts +1057 -17
  2. package/dist-lib/integrations/supabase/auth-middleware.d.ts.map +1 -1
  3. package/dist-lib/integrations/supabase/client.d.ts +1057 -17
  4. package/dist-lib/integrations/supabase/client.d.ts.map +1 -1
  5. package/dist-lib/integrations/supabase/client.server.d.ts +1057 -17
  6. package/dist-lib/integrations/supabase/client.server.d.ts.map +1 -1
  7. package/dist-lib/integrations/supabase/types.d.ts +1079 -14
  8. package/dist-lib/integrations/supabase/types.d.ts.map +1 -1
  9. package/dist-lib/integrations/supabase/types.js +9 -1
  10. package/dist-lib/lib/cart-lock.functions.d.ts +1057 -17
  11. package/dist-lib/lib/cart-lock.functions.d.ts.map +1 -1
  12. package/dist-lib/lib/cart-planning-settings.functions.d.ts +11506 -66
  13. package/dist-lib/lib/cart-planning-settings.functions.d.ts.map +1 -1
  14. package/dist-lib/lib/cart-replan.functions.d.ts +3138 -18
  15. package/dist-lib/lib/cart-replan.functions.d.ts.map +1 -1
  16. package/dist-lib/lib/create-order.functions.d.ts +12552 -72
  17. package/dist-lib/lib/create-order.functions.d.ts.map +1 -1
  18. package/dist-lib/lib/cron/index.d.ts +5 -0
  19. package/dist-lib/lib/cron/index.d.ts.map +1 -0
  20. package/dist-lib/lib/cron/index.js +4 -0
  21. package/dist-lib/lib/cron/mirror-floriday-orders.d.ts +4 -0
  22. package/dist-lib/lib/cron/mirror-floriday-orders.d.ts.map +1 -0
  23. package/dist-lib/lib/cron/mirror-floriday-orders.js +23 -0
  24. package/dist-lib/lib/cron/replan-carts.d.ts +4 -0
  25. package/dist-lib/lib/cron/replan-carts.d.ts.map +1 -0
  26. package/dist-lib/lib/cron/replan-carts.js +18 -0
  27. package/dist-lib/lib/cron/sync-salesorders.d.ts +4 -0
  28. package/dist-lib/lib/cron/sync-salesorders.d.ts.map +1 -0
  29. package/dist-lib/lib/cron/sync-salesorders.js +18 -0
  30. package/dist-lib/lib/cron/sync-tradeitems.d.ts +4 -0
  31. package/dist-lib/lib/cron/sync-tradeitems.d.ts.map +1 -0
  32. package/dist-lib/lib/cron/sync-tradeitems.js +18 -0
  33. package/dist-lib/lib/floriday-auto-fulfillment.functions.d.ts +3138 -18
  34. package/dist-lib/lib/floriday-auto-fulfillment.functions.d.ts.map +1 -1
  35. package/dist-lib/lib/floriday-logistic-labels.functions.d.ts +1057 -17
  36. package/dist-lib/lib/floriday-logistic-labels.functions.d.ts.map +1 -1
  37. package/dist-lib/lib/floriday-mirror.functions.d.ts +1057 -17
  38. package/dist-lib/lib/floriday-mirror.functions.d.ts.map +1 -1
  39. package/dist-lib/lib/floriday-public.functions.d.ts +7322 -42
  40. package/dist-lib/lib/floriday-public.functions.d.ts.map +1 -1
  41. package/dist-lib/lib/floriday-writes.functions.d.ts +5230 -30
  42. package/dist-lib/lib/floriday-writes.functions.d.ts.map +1 -1
  43. package/dist-lib/lib/order-buffers.functions.d.ts +3138 -18
  44. package/dist-lib/lib/order-buffers.functions.d.ts.map +1 -1
  45. package/dist-lib/lib/order-shipments.functions.d.ts +4184 -24
  46. package/dist-lib/lib/order-shipments.functions.d.ts.map +1 -1
  47. package/dist-lib/lib/salesorders.functions.d.ts +5230 -30
  48. package/dist-lib/lib/salesorders.functions.d.ts.map +1 -1
  49. package/dist-lib/lib/tradeitems.functions.d.ts +1057 -17
  50. package/dist-lib/lib/tradeitems.functions.d.ts.map +1 -1
  51. package/package.json +24 -2
@@ -282,6 +282,57 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
282
282
  referencedColumns: ["id"];
283
283
  }];
284
284
  };
285
+ ai_call_log: {
286
+ Row: {
287
+ consumer_module_id: string;
288
+ cost_usd: number | null;
289
+ created_at: string;
290
+ created_by: string | null;
291
+ duration_ms: number | null;
292
+ error_code: string | null;
293
+ error_message: string | null;
294
+ id: string;
295
+ input_tokens: number;
296
+ model_slug: string | null;
297
+ output_tokens: number;
298
+ provider_slug: string | null;
299
+ status: string;
300
+ total_tokens: number;
301
+ };
302
+ Insert: {
303
+ consumer_module_id: string;
304
+ cost_usd?: number | null;
305
+ created_at?: string;
306
+ created_by?: string | null;
307
+ duration_ms?: number | null;
308
+ error_code?: string | null;
309
+ error_message?: string | null;
310
+ id?: string;
311
+ input_tokens?: number;
312
+ model_slug?: string | null;
313
+ output_tokens?: number;
314
+ provider_slug?: string | null;
315
+ status: string;
316
+ total_tokens?: number;
317
+ };
318
+ Update: {
319
+ consumer_module_id?: string;
320
+ cost_usd?: number | null;
321
+ created_at?: string;
322
+ created_by?: string | null;
323
+ duration_ms?: number | null;
324
+ error_code?: string | null;
325
+ error_message?: string | null;
326
+ id?: string;
327
+ input_tokens?: number;
328
+ model_slug?: string | null;
329
+ output_tokens?: number;
330
+ provider_slug?: string | null;
331
+ status?: string;
332
+ total_tokens?: number;
333
+ };
334
+ Relationships: [];
335
+ };
285
336
  ai_credentials: {
286
337
  Row: {
287
338
  active: boolean;
@@ -318,6 +369,36 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
318
369
  referencedColumns: ["id"];
319
370
  }];
320
371
  };
372
+ ai_goals: {
373
+ Row: {
374
+ active: boolean;
375
+ created_at: string;
376
+ description: string | null;
377
+ key: string;
378
+ label: string;
379
+ sort_order: number;
380
+ updated_at: string;
381
+ };
382
+ Insert: {
383
+ active?: boolean;
384
+ created_at?: string;
385
+ description?: string | null;
386
+ key: string;
387
+ label: string;
388
+ sort_order?: number;
389
+ updated_at?: string;
390
+ };
391
+ Update: {
392
+ active?: boolean;
393
+ created_at?: string;
394
+ description?: string | null;
395
+ key?: string;
396
+ label?: string;
397
+ sort_order?: number;
398
+ updated_at?: string;
399
+ };
400
+ Relationships: [];
401
+ };
321
402
  ai_model_pricing: {
322
403
  Row: {
323
404
  created_at: string;
@@ -6462,6 +6543,285 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
6462
6543
  };
6463
6544
  Relationships: [];
6464
6545
  };
6546
+ logistics_capacity_events: {
6547
+ Row: {
6548
+ available_carts: number;
6549
+ created_at: string;
6550
+ id: string;
6551
+ measures: import("../integrations/supabase/types").Json;
6552
+ note: string | null;
6553
+ outcome: string;
6554
+ required_carts: number;
6555
+ reserve_minutes: number;
6556
+ shortage_carts: number;
6557
+ status: string;
6558
+ user_id: string;
6559
+ };
6560
+ Insert: {
6561
+ available_carts?: number;
6562
+ created_at?: string;
6563
+ id?: string;
6564
+ measures?: import("../integrations/supabase/types").Json;
6565
+ note?: string | null;
6566
+ outcome?: string;
6567
+ required_carts?: number;
6568
+ reserve_minutes?: number;
6569
+ shortage_carts?: number;
6570
+ status: string;
6571
+ user_id: string;
6572
+ };
6573
+ Update: {
6574
+ available_carts?: number;
6575
+ created_at?: string;
6576
+ id?: string;
6577
+ measures?: import("../integrations/supabase/types").Json;
6578
+ note?: string | null;
6579
+ outcome?: string;
6580
+ required_carts?: number;
6581
+ reserve_minutes?: number;
6582
+ shortage_carts?: number;
6583
+ status?: string;
6584
+ user_id?: string;
6585
+ };
6586
+ Relationships: [];
6587
+ };
6588
+ logistics_capacity_settings: {
6589
+ Row: {
6590
+ created_at: string;
6591
+ settings: import("../integrations/supabase/types").Json;
6592
+ updated_at: string;
6593
+ user_id: string;
6594
+ };
6595
+ Insert: {
6596
+ created_at?: string;
6597
+ settings?: import("../integrations/supabase/types").Json;
6598
+ updated_at?: string;
6599
+ user_id: string;
6600
+ };
6601
+ Update: {
6602
+ created_at?: string;
6603
+ settings?: import("../integrations/supabase/types").Json;
6604
+ updated_at?: string;
6605
+ user_id?: string;
6606
+ };
6607
+ Relationships: [];
6608
+ };
6609
+ logistics_decisions: {
6610
+ Row: {
6611
+ created_at: string;
6612
+ explanation: string | null;
6613
+ id: string;
6614
+ input_snapshot: import("../integrations/supabase/types").Json;
6615
+ result: import("../integrations/supabase/types").Json;
6616
+ slot: string;
6617
+ strategy_id: string | null;
6618
+ subject_id: string;
6619
+ subject_type: string;
6620
+ user_id: string;
6621
+ };
6622
+ Insert: {
6623
+ created_at?: string;
6624
+ explanation?: string | null;
6625
+ id?: string;
6626
+ input_snapshot?: import("../integrations/supabase/types").Json;
6627
+ result?: import("../integrations/supabase/types").Json;
6628
+ slot: string;
6629
+ strategy_id?: string | null;
6630
+ subject_id: string;
6631
+ subject_type: string;
6632
+ user_id: string;
6633
+ };
6634
+ Update: {
6635
+ created_at?: string;
6636
+ explanation?: string | null;
6637
+ id?: string;
6638
+ input_snapshot?: import("../integrations/supabase/types").Json;
6639
+ result?: import("../integrations/supabase/types").Json;
6640
+ slot?: string;
6641
+ strategy_id?: string | null;
6642
+ subject_id?: string;
6643
+ subject_type?: string;
6644
+ user_id?: string;
6645
+ };
6646
+ Relationships: [{
6647
+ foreignKeyName: "logistics_decisions_strategy_id_fkey";
6648
+ columns: ["strategy_id"];
6649
+ isOneToOne: false;
6650
+ referencedRelation: "logistics_strategies";
6651
+ referencedColumns: ["id"];
6652
+ }];
6653
+ };
6654
+ logistics_formulas: {
6655
+ Row: {
6656
+ created_at: string;
6657
+ expression: string;
6658
+ id: string;
6659
+ notes: string | null;
6660
+ slot: string;
6661
+ strategy_id: string;
6662
+ updated_at: string;
6663
+ user_id: string;
6664
+ version: number;
6665
+ };
6666
+ Insert: {
6667
+ created_at?: string;
6668
+ expression?: string;
6669
+ id?: string;
6670
+ notes?: string | null;
6671
+ slot: string;
6672
+ strategy_id: string;
6673
+ updated_at?: string;
6674
+ user_id: string;
6675
+ version?: number;
6676
+ };
6677
+ Update: {
6678
+ created_at?: string;
6679
+ expression?: string;
6680
+ id?: string;
6681
+ notes?: string | null;
6682
+ slot?: string;
6683
+ strategy_id?: string;
6684
+ updated_at?: string;
6685
+ user_id?: string;
6686
+ version?: number;
6687
+ };
6688
+ Relationships: [{
6689
+ foreignKeyName: "logistics_formulas_strategy_id_fkey";
6690
+ columns: ["strategy_id"];
6691
+ isOneToOne: false;
6692
+ referencedRelation: "logistics_strategies";
6693
+ referencedColumns: ["id"];
6694
+ }];
6695
+ };
6696
+ logistics_strategies: {
6697
+ Row: {
6698
+ color: string;
6699
+ created_at: string;
6700
+ description: string | null;
6701
+ id: string;
6702
+ is_active: boolean;
6703
+ name: string;
6704
+ priority: number;
6705
+ updated_at: string;
6706
+ updated_by: string | null;
6707
+ user_id: string;
6708
+ version: number;
6709
+ };
6710
+ Insert: {
6711
+ color?: string;
6712
+ created_at?: string;
6713
+ description?: string | null;
6714
+ id?: string;
6715
+ is_active?: boolean;
6716
+ name: string;
6717
+ priority?: number;
6718
+ updated_at?: string;
6719
+ updated_by?: string | null;
6720
+ user_id: string;
6721
+ version?: number;
6722
+ };
6723
+ Update: {
6724
+ color?: string;
6725
+ created_at?: string;
6726
+ description?: string | null;
6727
+ id?: string;
6728
+ is_active?: boolean;
6729
+ name?: string;
6730
+ priority?: number;
6731
+ updated_at?: string;
6732
+ updated_by?: string | null;
6733
+ user_id?: string;
6734
+ version?: number;
6735
+ };
6736
+ Relationships: [];
6737
+ };
6738
+ logistics_strategy_schedules: {
6739
+ Row: {
6740
+ condition_expression: string | null;
6741
+ created_at: string;
6742
+ end_date: string | null;
6743
+ id: string;
6744
+ is_enabled: boolean;
6745
+ priority: number;
6746
+ rule_type: string;
6747
+ start_date: string | null;
6748
+ strategy_id: string;
6749
+ updated_at: string;
6750
+ user_id: string;
6751
+ };
6752
+ Insert: {
6753
+ condition_expression?: string | null;
6754
+ created_at?: string;
6755
+ end_date?: string | null;
6756
+ id?: string;
6757
+ is_enabled?: boolean;
6758
+ priority?: number;
6759
+ rule_type: string;
6760
+ start_date?: string | null;
6761
+ strategy_id: string;
6762
+ updated_at?: string;
6763
+ user_id: string;
6764
+ };
6765
+ Update: {
6766
+ condition_expression?: string | null;
6767
+ created_at?: string;
6768
+ end_date?: string | null;
6769
+ id?: string;
6770
+ is_enabled?: boolean;
6771
+ priority?: number;
6772
+ rule_type?: string;
6773
+ start_date?: string | null;
6774
+ strategy_id?: string;
6775
+ updated_at?: string;
6776
+ user_id?: string;
6777
+ };
6778
+ Relationships: [{
6779
+ foreignKeyName: "logistics_strategy_schedules_strategy_id_fkey";
6780
+ columns: ["strategy_id"];
6781
+ isOneToOne: false;
6782
+ referencedRelation: "logistics_strategies";
6783
+ referencedColumns: ["id"];
6784
+ }];
6785
+ };
6786
+ logistics_variables: {
6787
+ Row: {
6788
+ created_at: string;
6789
+ default_value: string | null;
6790
+ description: string | null;
6791
+ id: string;
6792
+ is_builtin: boolean;
6793
+ key: string;
6794
+ label: string;
6795
+ updated_at: string;
6796
+ user_id: string;
6797
+ value_type: string;
6798
+ };
6799
+ Insert: {
6800
+ created_at?: string;
6801
+ default_value?: string | null;
6802
+ description?: string | null;
6803
+ id?: string;
6804
+ is_builtin?: boolean;
6805
+ key: string;
6806
+ label: string;
6807
+ updated_at?: string;
6808
+ user_id: string;
6809
+ value_type: string;
6810
+ };
6811
+ Update: {
6812
+ created_at?: string;
6813
+ default_value?: string | null;
6814
+ description?: string | null;
6815
+ id?: string;
6816
+ is_builtin?: boolean;
6817
+ key?: string;
6818
+ label?: string;
6819
+ updated_at?: string;
6820
+ user_id?: string;
6821
+ value_type?: string;
6822
+ };
6823
+ Relationships: [];
6824
+ };
6465
6825
  mailbox_messages: {
6466
6826
  Row: {
6467
6827
  body_html: string | null;
@@ -8235,22 +8595,154 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
8235
8595
  };
8236
8596
  Relationships: [];
8237
8597
  };
8238
- product_categories: {
8598
+ planning_item_assistants: {
8239
8599
  Row: {
8240
- color: string;
8241
8600
  created_at: string;
8242
- icon: string | null;
8243
- id: string;
8244
- name: string;
8245
- slug: string;
8246
- sort_order: number;
8247
- updated_at: string;
8601
+ created_by: string | null;
8602
+ monteur_id: string;
8603
+ planning_item_id: string;
8248
8604
  };
8249
8605
  Insert: {
8250
- color?: string;
8251
8606
  created_at?: string;
8252
- icon?: string | null;
8253
- id?: string;
8607
+ created_by?: string | null;
8608
+ monteur_id: string;
8609
+ planning_item_id: string;
8610
+ };
8611
+ Update: {
8612
+ created_at?: string;
8613
+ created_by?: string | null;
8614
+ monteur_id?: string;
8615
+ planning_item_id?: string;
8616
+ };
8617
+ Relationships: [{
8618
+ foreignKeyName: "planning_item_assistants_planning_item_id_fkey";
8619
+ columns: ["planning_item_id"];
8620
+ isOneToOne: false;
8621
+ referencedRelation: "planning_items";
8622
+ referencedColumns: ["id"];
8623
+ }];
8624
+ };
8625
+ planning_items: {
8626
+ Row: {
8627
+ assigned_monteur_id: string;
8628
+ created_at: string;
8629
+ created_by: string | null;
8630
+ end_at: string;
8631
+ id: string;
8632
+ notes: string | null;
8633
+ start_at: string;
8634
+ status: import("../integrations/supabase/types").Database["public"]["Enums"]["planning_item_status"];
8635
+ updated_at: string;
8636
+ werkbon_id: string;
8637
+ };
8638
+ Insert: {
8639
+ assigned_monteur_id: string;
8640
+ created_at?: string;
8641
+ created_by?: string | null;
8642
+ end_at: string;
8643
+ id?: string;
8644
+ notes?: string | null;
8645
+ start_at: string;
8646
+ status?: import("../integrations/supabase/types").Database["public"]["Enums"]["planning_item_status"];
8647
+ updated_at?: string;
8648
+ werkbon_id: string;
8649
+ };
8650
+ Update: {
8651
+ assigned_monteur_id?: string;
8652
+ created_at?: string;
8653
+ created_by?: string | null;
8654
+ end_at?: string;
8655
+ id?: string;
8656
+ notes?: string | null;
8657
+ start_at?: string;
8658
+ status?: import("../integrations/supabase/types").Database["public"]["Enums"]["planning_item_status"];
8659
+ updated_at?: string;
8660
+ werkbon_id?: string;
8661
+ };
8662
+ Relationships: [{
8663
+ foreignKeyName: "planning_items_werkbon_id_fkey";
8664
+ columns: ["werkbon_id"];
8665
+ isOneToOne: false;
8666
+ referencedRelation: "werkbonnen";
8667
+ referencedColumns: ["id"];
8668
+ }];
8669
+ };
8670
+ product_bom_items: {
8671
+ Row: {
8672
+ component_product_id: string | null;
8673
+ component_trade_item_floriday_id: string | null;
8674
+ created_at: string;
8675
+ id: string;
8676
+ notes: string | null;
8677
+ packing_configuration_id: string | null;
8678
+ parent_product_id: string | null;
8679
+ parent_trade_item_floriday_id: string | null;
8680
+ quantity: number;
8681
+ sort_order: number;
8682
+ tenant_id: string;
8683
+ unit: string;
8684
+ updated_at: string;
8685
+ };
8686
+ Insert: {
8687
+ component_product_id?: string | null;
8688
+ component_trade_item_floriday_id?: string | null;
8689
+ created_at?: string;
8690
+ id?: string;
8691
+ notes?: string | null;
8692
+ packing_configuration_id?: string | null;
8693
+ parent_product_id?: string | null;
8694
+ parent_trade_item_floriday_id?: string | null;
8695
+ quantity?: number;
8696
+ sort_order?: number;
8697
+ tenant_id: string;
8698
+ unit?: string;
8699
+ updated_at?: string;
8700
+ };
8701
+ Update: {
8702
+ component_product_id?: string | null;
8703
+ component_trade_item_floriday_id?: string | null;
8704
+ created_at?: string;
8705
+ id?: string;
8706
+ notes?: string | null;
8707
+ packing_configuration_id?: string | null;
8708
+ parent_product_id?: string | null;
8709
+ parent_trade_item_floriday_id?: string | null;
8710
+ quantity?: number;
8711
+ sort_order?: number;
8712
+ tenant_id?: string;
8713
+ unit?: string;
8714
+ updated_at?: string;
8715
+ };
8716
+ Relationships: [{
8717
+ foreignKeyName: "product_bom_items_component_product_id_fkey";
8718
+ columns: ["component_product_id"];
8719
+ isOneToOne: false;
8720
+ referencedRelation: "products";
8721
+ referencedColumns: ["id"];
8722
+ }, {
8723
+ foreignKeyName: "product_bom_items_parent_product_id_fkey";
8724
+ columns: ["parent_product_id"];
8725
+ isOneToOne: false;
8726
+ referencedRelation: "products";
8727
+ referencedColumns: ["id"];
8728
+ }];
8729
+ };
8730
+ product_categories: {
8731
+ Row: {
8732
+ color: string;
8733
+ created_at: string;
8734
+ icon: string | null;
8735
+ id: string;
8736
+ name: string;
8737
+ slug: string;
8738
+ sort_order: number;
8739
+ updated_at: string;
8740
+ };
8741
+ Insert: {
8742
+ color?: string;
8743
+ created_at?: string;
8744
+ icon?: string | null;
8745
+ id?: string;
8254
8746
  name: string;
8255
8747
  slug: string;
8256
8748
  sort_order?: number;
@@ -8340,6 +8832,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
8340
8832
  id: string;
8341
8833
  product_group_id: string;
8342
8834
  quantity: number;
8835
+ sort_order: number;
8343
8836
  trade_item_id: string;
8344
8837
  };
8345
8838
  Insert: {
@@ -8347,6 +8840,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
8347
8840
  id?: string;
8348
8841
  product_group_id: string;
8349
8842
  quantity?: number;
8843
+ sort_order?: number;
8350
8844
  trade_item_id: string;
8351
8845
  };
8352
8846
  Update: {
@@ -8354,6 +8848,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
8354
8848
  id?: string;
8355
8849
  product_group_id?: string;
8356
8850
  quantity?: number;
8851
+ sort_order?: number;
8357
8852
  trade_item_id?: string;
8358
8853
  };
8359
8854
  Relationships: [{
@@ -8368,6 +8863,8 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
8368
8863
  Row: {
8369
8864
  created_at: string;
8370
8865
  description: string | null;
8866
+ head_product_id: string | null;
8867
+ head_trade_item_floriday_id: string | null;
8371
8868
  id: string;
8372
8869
  is_active: boolean;
8373
8870
  name: string;
@@ -8377,6 +8874,8 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
8377
8874
  Insert: {
8378
8875
  created_at?: string;
8379
8876
  description?: string | null;
8877
+ head_product_id?: string | null;
8878
+ head_trade_item_floriday_id?: string | null;
8380
8879
  id?: string;
8381
8880
  is_active?: boolean;
8382
8881
  name: string;
@@ -8386,24 +8885,134 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
8386
8885
  Update: {
8387
8886
  created_at?: string;
8388
8887
  description?: string | null;
8888
+ head_product_id?: string | null;
8889
+ head_trade_item_floriday_id?: string | null;
8389
8890
  id?: string;
8390
8891
  is_active?: boolean;
8391
8892
  name?: string;
8392
8893
  tenant_id?: string;
8393
8894
  updated_at?: string;
8394
8895
  };
8896
+ Relationships: [{
8897
+ foreignKeyName: "product_groups_head_product_id_fkey";
8898
+ columns: ["head_product_id"];
8899
+ isOneToOne: false;
8900
+ referencedRelation: "products";
8901
+ referencedColumns: ["id"];
8902
+ }];
8903
+ };
8904
+ product_load_settings: {
8905
+ Row: {
8906
+ created_at: string;
8907
+ id: string;
8908
+ is_package: boolean;
8909
+ label: string | null;
8910
+ layers_per_load_carrier: number | null;
8911
+ load_carrier: string | null;
8912
+ package_id: string | null;
8913
+ package_label: string | null;
8914
+ packages_per_layer: number | null;
8915
+ packing_configuration_id: string;
8916
+ product_id: string | null;
8917
+ tenant_id: string;
8918
+ trade_item_floriday_id: string | null;
8919
+ units_per_package: number | null;
8920
+ updated_at: string;
8921
+ };
8922
+ Insert: {
8923
+ created_at?: string;
8924
+ id?: string;
8925
+ is_package?: boolean;
8926
+ label?: string | null;
8927
+ layers_per_load_carrier?: number | null;
8928
+ load_carrier?: string | null;
8929
+ package_id?: string | null;
8930
+ package_label?: string | null;
8931
+ packages_per_layer?: number | null;
8932
+ packing_configuration_id?: string;
8933
+ product_id?: string | null;
8934
+ tenant_id: string;
8935
+ trade_item_floriday_id?: string | null;
8936
+ units_per_package?: number | null;
8937
+ updated_at?: string;
8938
+ };
8939
+ Update: {
8940
+ created_at?: string;
8941
+ id?: string;
8942
+ is_package?: boolean;
8943
+ label?: string | null;
8944
+ layers_per_load_carrier?: number | null;
8945
+ load_carrier?: string | null;
8946
+ package_id?: string | null;
8947
+ package_label?: string | null;
8948
+ packages_per_layer?: number | null;
8949
+ packing_configuration_id?: string;
8950
+ product_id?: string | null;
8951
+ tenant_id?: string;
8952
+ trade_item_floriday_id?: string | null;
8953
+ units_per_package?: number | null;
8954
+ updated_at?: string;
8955
+ };
8956
+ Relationships: [{
8957
+ foreignKeyName: "product_load_settings_package_id_fkey";
8958
+ columns: ["package_id"];
8959
+ isOneToOne: false;
8960
+ referencedRelation: "packages";
8961
+ referencedColumns: ["id"];
8962
+ }, {
8963
+ foreignKeyName: "product_load_settings_product_id_fkey";
8964
+ columns: ["product_id"];
8965
+ isOneToOne: false;
8966
+ referencedRelation: "products";
8967
+ referencedColumns: ["id"];
8968
+ }];
8969
+ };
8970
+ product_merge_log: {
8971
+ Row: {
8972
+ canonical_product_id: string | null;
8973
+ id: string;
8974
+ merged_at: string;
8975
+ merged_from_id: string;
8976
+ notes: string | null;
8977
+ snapshot: import("../integrations/supabase/types").Json;
8978
+ source_table: string;
8979
+ status: string;
8980
+ };
8981
+ Insert: {
8982
+ canonical_product_id?: string | null;
8983
+ id?: string;
8984
+ merged_at?: string;
8985
+ merged_from_id: string;
8986
+ notes?: string | null;
8987
+ snapshot?: import("../integrations/supabase/types").Json;
8988
+ source_table: string;
8989
+ status?: string;
8990
+ };
8991
+ Update: {
8992
+ canonical_product_id?: string | null;
8993
+ id?: string;
8994
+ merged_at?: string;
8995
+ merged_from_id?: string;
8996
+ notes?: string | null;
8997
+ snapshot?: import("../integrations/supabase/types").Json;
8998
+ source_table?: string;
8999
+ status?: string;
9000
+ };
8395
9001
  Relationships: [];
8396
9002
  };
8397
9003
  products: {
8398
9004
  Row: {
9005
+ article_number: string | null;
8399
9006
  barcode: string | null;
8400
9007
  batch: string;
8401
9008
  crates_per_layer: number;
8402
9009
  created_at: string;
8403
9010
  custom_fields: import("../integrations/supabase/types").Json;
9011
+ floriday_trade_item_id: string | null;
8404
9012
  id: string;
8405
9013
  image_url: string | null;
8406
9014
  incoming_quantity: number;
9015
+ is_layer: boolean;
8407
9016
  layers_per_cart: number;
8408
9017
  location: string;
8409
9018
  min_quantity: number;
@@ -8419,14 +9028,17 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
8419
9028
  weight: string | null;
8420
9029
  };
8421
9030
  Insert: {
9031
+ article_number?: string | null;
8422
9032
  barcode?: string | null;
8423
9033
  batch: string;
8424
9034
  crates_per_layer?: number;
8425
9035
  created_at?: string;
8426
9036
  custom_fields?: import("../integrations/supabase/types").Json;
9037
+ floriday_trade_item_id?: string | null;
8427
9038
  id?: string;
8428
9039
  image_url?: string | null;
8429
9040
  incoming_quantity?: number;
9041
+ is_layer?: boolean;
8430
9042
  layers_per_cart?: number;
8431
9043
  location: string;
8432
9044
  min_quantity?: number;
@@ -8442,14 +9054,17 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
8442
9054
  weight?: string | null;
8443
9055
  };
8444
9056
  Update: {
9057
+ article_number?: string | null;
8445
9058
  barcode?: string | null;
8446
9059
  batch?: string;
8447
9060
  crates_per_layer?: number;
8448
9061
  created_at?: string;
8449
9062
  custom_fields?: import("../integrations/supabase/types").Json;
9063
+ floriday_trade_item_id?: string | null;
8450
9064
  id?: string;
8451
9065
  image_url?: string | null;
8452
9066
  incoming_quantity?: number;
9067
+ is_layer?: boolean;
8453
9068
  layers_per_cart?: number;
8454
9069
  location?: string;
8455
9070
  min_quantity?: number;
@@ -8469,6 +9084,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
8469
9084
  profiles: {
8470
9085
  Row: {
8471
9086
  address: string | null;
9087
+ avatar_url: string | null;
8472
9088
  created_at: string;
8473
9089
  display_name: string | null;
8474
9090
  email: string | null;
@@ -8480,6 +9096,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
8480
9096
  };
8481
9097
  Insert: {
8482
9098
  address?: string | null;
9099
+ avatar_url?: string | null;
8483
9100
  created_at?: string;
8484
9101
  display_name?: string | null;
8485
9102
  email?: string | null;
@@ -8491,6 +9108,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
8491
9108
  };
8492
9109
  Update: {
8493
9110
  address?: string | null;
9111
+ avatar_url?: string | null;
8494
9112
  created_at?: string;
8495
9113
  display_name?: string | null;
8496
9114
  email?: string | null;
@@ -9357,6 +9975,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
9357
9975
  order_source: string | null;
9358
9976
  physical_after: number | null;
9359
9977
  physical_before: number | null;
9978
+ production_batch_id: string | null;
9360
9979
  qty_delta: number;
9361
9980
  reason: string | null;
9362
9981
  reserved_after: number | null;
@@ -9374,6 +9993,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
9374
9993
  order_source?: string | null;
9375
9994
  physical_after?: number | null;
9376
9995
  physical_before?: number | null;
9996
+ production_batch_id?: string | null;
9377
9997
  qty_delta: number;
9378
9998
  reason?: string | null;
9379
9999
  reserved_after?: number | null;
@@ -9391,6 +10011,7 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
9391
10011
  order_source?: string | null;
9392
10012
  physical_after?: number | null;
9393
10013
  physical_before?: number | null;
10014
+ production_batch_id?: string | null;
9394
10015
  qty_delta?: number;
9395
10016
  reason?: string | null;
9396
10017
  reserved_after?: number | null;
@@ -9717,6 +10338,48 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
9717
10338
  };
9718
10339
  Relationships: [];
9719
10340
  };
10341
+ trade_item_prices: {
10342
+ Row: {
10343
+ created_at: string;
10344
+ currency: string;
10345
+ id: string;
10346
+ last_push_error: string | null;
10347
+ last_pushed_at: string | null;
10348
+ price_group_id: string | null;
10349
+ price_per_piece: number;
10350
+ supply_line_id: string | null;
10351
+ trade_item_key: string;
10352
+ updated_at: string;
10353
+ user_id: string;
10354
+ };
10355
+ Insert: {
10356
+ created_at?: string;
10357
+ currency?: string;
10358
+ id?: string;
10359
+ last_push_error?: string | null;
10360
+ last_pushed_at?: string | null;
10361
+ price_group_id?: string | null;
10362
+ price_per_piece: number;
10363
+ supply_line_id?: string | null;
10364
+ trade_item_key: string;
10365
+ updated_at?: string;
10366
+ user_id: string;
10367
+ };
10368
+ Update: {
10369
+ created_at?: string;
10370
+ currency?: string;
10371
+ id?: string;
10372
+ last_push_error?: string | null;
10373
+ last_pushed_at?: string | null;
10374
+ price_group_id?: string | null;
10375
+ price_per_piece?: number;
10376
+ supply_line_id?: string | null;
10377
+ trade_item_key?: string;
10378
+ updated_at?: string;
10379
+ user_id?: string;
10380
+ };
10381
+ Relationships: [];
10382
+ };
9720
10383
  trade_item_stock: {
9721
10384
  Row: {
9722
10385
  connection_id: string;
@@ -10182,6 +10845,51 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
10182
10845
  referencedColumns: ["id"];
10183
10846
  }];
10184
10847
  };
10848
+ twinfield_invoice_pdf_cache: {
10849
+ Row: {
10850
+ connection_id: string;
10851
+ created_at: string;
10852
+ fetched_at: string;
10853
+ id: string;
10854
+ invoice_number: string;
10855
+ last_accessed_at: string;
10856
+ object_path: string;
10857
+ office_code: string;
10858
+ size_bytes: number;
10859
+ updated_at: string;
10860
+ };
10861
+ Insert: {
10862
+ connection_id: string;
10863
+ created_at?: string;
10864
+ fetched_at?: string;
10865
+ id?: string;
10866
+ invoice_number: string;
10867
+ last_accessed_at?: string;
10868
+ object_path: string;
10869
+ office_code: string;
10870
+ size_bytes?: number;
10871
+ updated_at?: string;
10872
+ };
10873
+ Update: {
10874
+ connection_id?: string;
10875
+ created_at?: string;
10876
+ fetched_at?: string;
10877
+ id?: string;
10878
+ invoice_number?: string;
10879
+ last_accessed_at?: string;
10880
+ object_path?: string;
10881
+ office_code?: string;
10882
+ size_bytes?: number;
10883
+ updated_at?: string;
10884
+ };
10885
+ Relationships: [{
10886
+ foreignKeyName: "twinfield_invoice_pdf_cache_connection_id_fkey";
10887
+ columns: ["connection_id"];
10888
+ isOneToOne: false;
10889
+ referencedRelation: "twinfield_connections";
10890
+ referencedColumns: ["id"];
10891
+ }];
10892
+ };
10185
10893
  twinfield_invoice_settings: {
10186
10894
  Row: {
10187
10895
  created_at: string;
@@ -10785,6 +11493,78 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
10785
11493
  };
10786
11494
  Relationships: [];
10787
11495
  };
11496
+ werkbon_package_ai_rules: {
11497
+ Row: {
11498
+ active: boolean;
11499
+ case_sensitive: boolean;
11500
+ created_at: string;
11501
+ id: string;
11502
+ package_id: string;
11503
+ priority: number;
11504
+ rule_type: string;
11505
+ updated_at: string;
11506
+ value: string;
11507
+ };
11508
+ Insert: {
11509
+ active?: boolean;
11510
+ case_sensitive?: boolean;
11511
+ created_at?: string;
11512
+ id?: string;
11513
+ package_id: string;
11514
+ priority?: number;
11515
+ rule_type: string;
11516
+ updated_at?: string;
11517
+ value: string;
11518
+ };
11519
+ Update: {
11520
+ active?: boolean;
11521
+ case_sensitive?: boolean;
11522
+ created_at?: string;
11523
+ id?: string;
11524
+ package_id?: string;
11525
+ priority?: number;
11526
+ rule_type?: string;
11527
+ updated_at?: string;
11528
+ value?: string;
11529
+ };
11530
+ Relationships: [{
11531
+ foreignKeyName: "werkbon_package_ai_rules_package_id_fkey";
11532
+ columns: ["package_id"];
11533
+ isOneToOne: false;
11534
+ referencedRelation: "werkbon_packages";
11535
+ referencedColumns: ["id"];
11536
+ }];
11537
+ };
11538
+ werkbon_package_categories: {
11539
+ Row: {
11540
+ active: boolean;
11541
+ created_at: string;
11542
+ id: string;
11543
+ kleur: string | null;
11544
+ naam: string;
11545
+ sort_order: number;
11546
+ updated_at: string;
11547
+ };
11548
+ Insert: {
11549
+ active?: boolean;
11550
+ created_at?: string;
11551
+ id?: string;
11552
+ kleur?: string | null;
11553
+ naam: string;
11554
+ sort_order?: number;
11555
+ updated_at?: string;
11556
+ };
11557
+ Update: {
11558
+ active?: boolean;
11559
+ created_at?: string;
11560
+ id?: string;
11561
+ kleur?: string | null;
11562
+ naam?: string;
11563
+ sort_order?: number;
11564
+ updated_at?: string;
11565
+ };
11566
+ Relationships: [];
11567
+ };
10788
11568
  werkbon_package_lines: {
10789
11569
  Row: {
10790
11570
  created_at: string;
@@ -10830,38 +11610,59 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
10830
11610
  werkbon_packages: {
10831
11611
  Row: {
10832
11612
  active: boolean;
11613
+ ai_tags: string[];
11614
+ category_id: string | null;
10833
11615
  code: string;
10834
11616
  created_at: string;
10835
11617
  default_quantity: number;
10836
11618
  description: string | null;
11619
+ duration_minutes: number | null;
10837
11620
  id: string;
11621
+ mandaat_type: string | null;
10838
11622
  name: string;
11623
+ sort_order: number;
10839
11624
  unit_price_cents: number;
10840
11625
  updated_at: string;
10841
11626
  };
10842
11627
  Insert: {
10843
11628
  active?: boolean;
11629
+ ai_tags?: string[];
11630
+ category_id?: string | null;
10844
11631
  code: string;
10845
11632
  created_at?: string;
10846
11633
  default_quantity?: number;
10847
11634
  description?: string | null;
11635
+ duration_minutes?: number | null;
10848
11636
  id?: string;
11637
+ mandaat_type?: string | null;
10849
11638
  name: string;
11639
+ sort_order?: number;
10850
11640
  unit_price_cents?: number;
10851
11641
  updated_at?: string;
10852
11642
  };
10853
11643
  Update: {
10854
11644
  active?: boolean;
11645
+ ai_tags?: string[];
11646
+ category_id?: string | null;
10855
11647
  code?: string;
10856
11648
  created_at?: string;
10857
11649
  default_quantity?: number;
10858
11650
  description?: string | null;
11651
+ duration_minutes?: number | null;
10859
11652
  id?: string;
11653
+ mandaat_type?: string | null;
10860
11654
  name?: string;
11655
+ sort_order?: number;
10861
11656
  unit_price_cents?: number;
10862
11657
  updated_at?: string;
10863
11658
  };
10864
- Relationships: [];
11659
+ Relationships: [{
11660
+ foreignKeyName: "werkbon_packages_category_id_fkey";
11661
+ columns: ["category_id"];
11662
+ isOneToOne: false;
11663
+ referencedRelation: "werkbon_package_categories";
11664
+ referencedColumns: ["id"];
11665
+ }];
10865
11666
  };
10866
11667
  werkbon_photos: {
10867
11668
  Row: {
@@ -10949,7 +11750,10 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
10949
11750
  scheduled_end_time: string | null;
10950
11751
  scheduled_start_time: string | null;
10951
11752
  sequence_number: number;
11753
+ source_email_meta: import("../integrations/supabase/types").Json | null;
11754
+ source_mailbox_message_id: string | null;
10952
11755
  source_pdf_path: string | null;
11756
+ source_type: string;
10953
11757
  status: string;
10954
11758
  technician_id: string | null;
10955
11759
  technician_notes: string | null;
@@ -10978,7 +11782,10 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
10978
11782
  scheduled_end_time?: string | null;
10979
11783
  scheduled_start_time?: string | null;
10980
11784
  sequence_number: number;
11785
+ source_email_meta?: import("../integrations/supabase/types").Json | null;
11786
+ source_mailbox_message_id?: string | null;
10981
11787
  source_pdf_path?: string | null;
11788
+ source_type?: string;
10982
11789
  status?: string;
10983
11790
  technician_id?: string | null;
10984
11791
  technician_notes?: string | null;
@@ -11007,7 +11814,10 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
11007
11814
  scheduled_end_time?: string | null;
11008
11815
  scheduled_start_time?: string | null;
11009
11816
  sequence_number?: number;
11817
+ source_email_meta?: import("../integrations/supabase/types").Json | null;
11818
+ source_mailbox_message_id?: string | null;
11010
11819
  source_pdf_path?: string | null;
11820
+ source_type?: string;
11011
11821
  status?: string;
11012
11822
  technician_id?: string | null;
11013
11823
  technician_notes?: string | null;
@@ -11024,10 +11834,10 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
11024
11834
  referencedRelation: "werkbonnen";
11025
11835
  referencedColumns: ["id"];
11026
11836
  }, {
11027
- foreignKeyName: "werkbonnen_technician_id_fkey";
11028
- columns: ["technician_id"];
11837
+ foreignKeyName: "werkbonnen_source_mailbox_message_id_fkey";
11838
+ columns: ["source_mailbox_message_id"];
11029
11839
  isOneToOne: false;
11030
- referencedRelation: "monteurs";
11840
+ referencedRelation: "mailbox_messages";
11031
11841
  referencedColumns: ["id"];
11032
11842
  }];
11033
11843
  };
@@ -11721,6 +12531,13 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
11721
12531
  };
11722
12532
  Returns: number;
11723
12533
  };
12534
+ _migrate_rewrite_stock_key: {
12535
+ Args: {
12536
+ _from_key: string;
12537
+ _to_key: string;
12538
+ };
12539
+ Returns: undefined;
12540
+ };
11724
12541
  afh_city_code: {
11725
12542
  Args: {
11726
12543
  _city: string;
@@ -11747,6 +12564,21 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
11747
12564
  };
11748
12565
  Returns: string;
11749
12566
  };
12567
+ ai_usage_by_module: {
12568
+ Args: {
12569
+ _from: string;
12570
+ _to: string;
12571
+ };
12572
+ Returns: {
12573
+ calls: number;
12574
+ consumer_module_id: string;
12575
+ cost_usd: number;
12576
+ errors: number;
12577
+ input_tokens: number;
12578
+ output_tokens: number;
12579
+ total_tokens: number;
12580
+ }[];
12581
+ };
11750
12582
  apply_stock_consumption: {
11751
12583
  Args: {
11752
12584
  p_order_id: string;
@@ -11804,6 +12636,12 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
11804
12636
  processed_items: number;
11805
12637
  }[];
11806
12638
  };
12639
+ calculate_layer_stock: {
12640
+ Args: {
12641
+ p_product_id: string;
12642
+ };
12643
+ Returns: number;
12644
+ };
11807
12645
  call_exact_route: {
11808
12646
  Args: {
11809
12647
  path: string;
@@ -11863,6 +12701,28 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
11863
12701
  Args: never;
11864
12702
  Returns: undefined;
11865
12703
  };
12704
+ consume_bom_for_production: {
12705
+ Args: {
12706
+ p_connection_id: string;
12707
+ p_parent_id: string;
12708
+ p_parent_key: string;
12709
+ p_parent_kind: string;
12710
+ p_quantity: number;
12711
+ p_user_id: string;
12712
+ };
12713
+ Returns: import("../integrations/supabase/types").Json;
12714
+ } | {
12715
+ Args: {
12716
+ p_batch_id?: string;
12717
+ p_connection_id: string;
12718
+ p_parent_id: string;
12719
+ p_parent_key: string;
12720
+ p_parent_kind: string;
12721
+ p_quantity: number;
12722
+ p_user_id: string;
12723
+ };
12724
+ Returns: import("../integrations/supabase/types").Json;
12725
+ };
11866
12726
  consume_floriday_rate_limit: {
11867
12727
  Args: {
11868
12728
  p_bucket: string;
@@ -11895,6 +12755,12 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
11895
12755
  Args: never;
11896
12756
  Returns: string;
11897
12757
  };
12758
+ custom_access_token_hook: {
12759
+ Args: {
12760
+ event: import("../integrations/supabase/types").Json;
12761
+ };
12762
+ Returns: import("../integrations/supabase/types").Json;
12763
+ };
11898
12764
  dashboard_alert_counts: {
11899
12765
  Args: never;
11900
12766
  Returns: import("../integrations/supabase/types").Json;
@@ -11914,6 +12780,13 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
11914
12780
  table_name: string;
11915
12781
  }[];
11916
12782
  };
12783
+ delete_samenstelling: {
12784
+ Args: {
12785
+ p_parent_id: string;
12786
+ p_parent_kind: string;
12787
+ };
12788
+ Returns: import("../integrations/supabase/types").Json;
12789
+ };
11917
12790
  dispatch_carrier_signups_sql: {
11918
12791
  Args: {
11919
12792
  _catchup?: string;
@@ -12169,6 +13042,27 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
12169
13042
  minutes_since_success: number;
12170
13043
  }[];
12171
13044
  };
13045
+ get_group_allocation_keys: {
13046
+ Args: {
13047
+ p_product_id: string;
13048
+ };
13049
+ Returns: {
13050
+ k: string;
13051
+ ord: number;
13052
+ }[];
13053
+ };
13054
+ get_group_head_key: {
13055
+ Args: {
13056
+ p_group_id: string;
13057
+ };
13058
+ Returns: string;
13059
+ };
13060
+ get_inventory_stock_for_key: {
13061
+ Args: {
13062
+ p_key: string;
13063
+ };
13064
+ Returns: number;
13065
+ };
12172
13066
  get_offer_by_link_code: {
12173
13067
  Args: {
12174
13068
  p_code: string;
@@ -12199,6 +13093,12 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
12199
13093
  };
12200
13094
  Returns: string;
12201
13095
  };
13096
+ get_product_group_available_stock: {
13097
+ Args: {
13098
+ p_group_id: string;
13099
+ };
13100
+ Returns: number;
13101
+ };
12202
13102
  get_room_busy_windows: {
12203
13103
  Args: {
12204
13104
  p_from: string;
@@ -12263,12 +13163,35 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
12263
13163
  };
12264
13164
  Returns: boolean;
12265
13165
  };
13166
+ jwt_has_role: {
13167
+ Args: {
13168
+ _role: import("../integrations/supabase/types").Database["public"]["Enums"]["app_role"];
13169
+ };
13170
+ Returns: boolean;
13171
+ };
12266
13172
  list_monteurs: {
12267
13173
  Args: never;
12268
13174
  Returns: {
13175
+ avatar_url: string;
12269
13176
  display_name: string;
12270
13177
  email: string;
12271
- user_id: string;
13178
+ id: string;
13179
+ }[];
13180
+ };
13181
+ list_my_planning_items: {
13182
+ Args: {
13183
+ _from: string;
13184
+ _to: string;
13185
+ };
13186
+ Returns: {
13187
+ assigned_monteur_id: string;
13188
+ end_at: string;
13189
+ id: string;
13190
+ notes: string;
13191
+ role: string;
13192
+ start_at: string;
13193
+ status: import("../integrations/supabase/types").Database["public"]["Enums"]["planning_item_status"];
13194
+ werkbon_id: string;
12272
13195
  }[];
12273
13196
  };
12274
13197
  local_effective_price: {
@@ -12287,6 +13210,22 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
12287
13210
  source_id: string;
12288
13211
  }[];
12289
13212
  };
13213
+ log_ai_call: {
13214
+ Args: {
13215
+ _consumer_module_id: string;
13216
+ _cost_usd: number;
13217
+ _duration_ms: number;
13218
+ _error_code: string;
13219
+ _error_message: string;
13220
+ _input_tokens: number;
13221
+ _model_slug: string;
13222
+ _output_tokens: number;
13223
+ _provider_slug: string;
13224
+ _status: string;
13225
+ _total_tokens: number;
13226
+ };
13227
+ Returns: string;
13228
+ };
12290
13229
  mark_offer_clicked: {
12291
13230
  Args: {
12292
13231
  p_code: string;
@@ -12299,12 +13238,32 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
12299
13238
  };
12300
13239
  Returns: undefined;
12301
13240
  };
13241
+ mark_salesorder_controlled: {
13242
+ Args: {
13243
+ p_controlled: boolean;
13244
+ p_floriday_id: string;
13245
+ };
13246
+ Returns: undefined;
13247
+ };
12302
13248
  mark_shipment_shipped: {
12303
13249
  Args: {
12304
13250
  p_shipment_id: string;
12305
13251
  };
12306
13252
  Returns: undefined;
12307
13253
  };
13254
+ merge_products: {
13255
+ Args: {
13256
+ _canonical: string;
13257
+ _loser: string;
13258
+ };
13259
+ Returns: undefined;
13260
+ };
13261
+ next_manufacture_partij: {
13262
+ Args: {
13263
+ _tenant_id: string;
13264
+ };
13265
+ Returns: string;
13266
+ };
12308
13267
  next_order_number: {
12309
13268
  Args: {
12310
13269
  p_prefix: string;
@@ -12378,6 +13337,15 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
12378
13337
  };
12379
13338
  Returns: undefined;
12380
13339
  };
13340
+ pickstation_resolve_delivery_orders: {
13341
+ Args: {
13342
+ p_sales_order_ids: string[];
13343
+ };
13344
+ Returns: {
13345
+ delivery_order_id: string;
13346
+ sales_order_id: string;
13347
+ }[];
13348
+ };
12381
13349
  pickstation_set_cart_status: {
12382
13350
  Args: {
12383
13351
  p_cart_index: number;
@@ -12387,6 +13355,14 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
12387
13355
  };
12388
13356
  Returns: undefined;
12389
13357
  };
13358
+ produce_designed_product: {
13359
+ Args: {
13360
+ p_parent_id: string;
13361
+ p_parent_kind: string;
13362
+ p_quantity: number;
13363
+ };
13364
+ Returns: import("../integrations/supabase/types").Json;
13365
+ };
12390
13366
  promote_trade_item_key: {
12391
13367
  Args: {
12392
13368
  p_new: string;
@@ -12394,6 +13370,10 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
12394
13370
  };
12395
13371
  Returns: undefined;
12396
13372
  };
13373
+ recompute_all_reserved_stock: {
13374
+ Args: never;
13375
+ Returns: undefined;
13376
+ };
12397
13377
  recompute_order_status: {
12398
13378
  Args: {
12399
13379
  p_order_id: string;
@@ -12449,18 +13429,50 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
12449
13429
  };
12450
13430
  Returns: undefined;
12451
13431
  };
13432
+ resolve_group_allocation: {
13433
+ Args: {
13434
+ _needed: number;
13435
+ _product_group_id: string;
13436
+ };
13437
+ Returns: {
13438
+ allocated: number;
13439
+ trade_item_id: string;
13440
+ }[];
13441
+ };
13442
+ resolve_group_member_stock_key: {
13443
+ Args: {
13444
+ p_trade_item_id: string;
13445
+ };
13446
+ Returns: string;
13447
+ };
12452
13448
  resolve_product_id_for_item: {
12453
13449
  Args: {
12454
13450
  p_product_name: string;
12455
13451
  };
12456
13452
  Returns: string;
12457
13453
  };
13454
+ resolve_stock_trade_item_key: {
13455
+ Args: {
13456
+ p_product_id: string;
13457
+ };
13458
+ Returns: string;
13459
+ };
12458
13460
  retry_twinfield_push: {
12459
13461
  Args: {
12460
13462
  _customer_id: string;
12461
13463
  };
12462
13464
  Returns: number;
12463
13465
  };
13466
+ reverse_production: {
13467
+ Args: {
13468
+ p_connection_id?: string;
13469
+ p_parent_key: string;
13470
+ p_quantity: number;
13471
+ p_reason?: string;
13472
+ p_user_id?: string;
13473
+ };
13474
+ Returns: import("../integrations/supabase/types").Json;
13475
+ };
12464
13476
  schedule_floriday_additional_services_sync: {
12465
13477
  Args: {
12466
13478
  p_apikey: string;
@@ -12728,6 +13740,17 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
12728
13740
  };
12729
13741
  Returns: number;
12730
13742
  };
13743
+ self_heal_floriday_links: {
13744
+ Args: never;
13745
+ Returns: number;
13746
+ };
13747
+ set_planning_status: {
13748
+ Args: {
13749
+ _id: string;
13750
+ _status: import("../integrations/supabase/types").Database["public"]["Enums"]["planning_item_status"];
13751
+ };
13752
+ Returns: undefined;
13753
+ };
12731
13754
  show_limit: {
12732
13755
  Args: never;
12733
13756
  Returns: number;
@@ -12738,18 +13761,34 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
12738
13761
  };
12739
13762
  Returns: string[];
12740
13763
  };
13764
+ sync_all_layer_stocks: {
13765
+ Args: never;
13766
+ Returns: undefined;
13767
+ };
12741
13768
  sync_cached_packing_from_product: {
12742
13769
  Args: {
12743
13770
  p_product_id: string;
12744
13771
  };
12745
13772
  Returns: undefined;
12746
13773
  };
13774
+ sync_layer_stock: {
13775
+ Args: {
13776
+ p_product_id: string;
13777
+ };
13778
+ Returns: undefined;
13779
+ };
12747
13780
  sync_order_cart_item_packing_from_product: {
12748
13781
  Args: {
12749
13782
  p_product_id: string;
12750
13783
  };
12751
13784
  Returns: undefined;
12752
13785
  };
13786
+ sync_product_group_belading: {
13787
+ Args: {
13788
+ _group_id: string;
13789
+ };
13790
+ Returns: undefined;
13791
+ };
12753
13792
  sync_product_packing_from_floriday_cache: {
12754
13793
  Args: {
12755
13794
  p_floriday_id: string;
@@ -12781,11 +13820,12 @@ export declare const runTradeItemsSync: import("@tanstack/start-client-core").Op
12781
13820
  };
12782
13821
  };
12783
13822
  Enums: {
12784
- app_role: "admin" | "planner" | "monteur" | "administratie";
13823
+ app_role: "admin" | "planner" | "monteur" | "administratie" | "ai_admin";
12785
13824
  exact_env: "staging" | "live";
12786
13825
  exact_push_status: "pending" | "sent" | "error";
12787
13826
  itk_customer_segment: "Business" | "Private";
12788
13827
  itk_dynamic_field_type: "text" | "select" | "date" | "checkbox";
13828
+ planning_item_status: "gepland" | "bezig" | "afgerond" | "geannuleerd" | "concept" | "vrijgegeven";
12789
13829
  quote_status: "concept" | "verzonden" | "bekeken" | "in_behandeling" | "geaccepteerd" | "afgewezen" | "verlopen" | "gearchiveerd";
12790
13830
  };
12791
13831
  CompositeTypes: { [_ in never]: never; };