@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
@@ -277,6 +277,57 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
277
277
  referencedColumns: ["id"];
278
278
  }];
279
279
  };
280
+ ai_call_log: {
281
+ Row: {
282
+ consumer_module_id: string;
283
+ cost_usd: number | null;
284
+ created_at: string;
285
+ created_by: string | null;
286
+ duration_ms: number | null;
287
+ error_code: string | null;
288
+ error_message: string | null;
289
+ id: string;
290
+ input_tokens: number;
291
+ model_slug: string | null;
292
+ output_tokens: number;
293
+ provider_slug: string | null;
294
+ status: string;
295
+ total_tokens: number;
296
+ };
297
+ Insert: {
298
+ consumer_module_id: string;
299
+ cost_usd?: number | null;
300
+ created_at?: string;
301
+ created_by?: string | null;
302
+ duration_ms?: number | null;
303
+ error_code?: string | null;
304
+ error_message?: string | null;
305
+ id?: string;
306
+ input_tokens?: number;
307
+ model_slug?: string | null;
308
+ output_tokens?: number;
309
+ provider_slug?: string | null;
310
+ status: string;
311
+ total_tokens?: number;
312
+ };
313
+ Update: {
314
+ consumer_module_id?: string;
315
+ cost_usd?: number | null;
316
+ created_at?: string;
317
+ created_by?: string | null;
318
+ duration_ms?: number | null;
319
+ error_code?: string | null;
320
+ error_message?: string | null;
321
+ id?: string;
322
+ input_tokens?: number;
323
+ model_slug?: string | null;
324
+ output_tokens?: number;
325
+ provider_slug?: string | null;
326
+ status?: string;
327
+ total_tokens?: number;
328
+ };
329
+ Relationships: [];
330
+ };
280
331
  ai_credentials: {
281
332
  Row: {
282
333
  active: boolean;
@@ -313,6 +364,36 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
313
364
  referencedColumns: ["id"];
314
365
  }];
315
366
  };
367
+ ai_goals: {
368
+ Row: {
369
+ active: boolean;
370
+ created_at: string;
371
+ description: string | null;
372
+ key: string;
373
+ label: string;
374
+ sort_order: number;
375
+ updated_at: string;
376
+ };
377
+ Insert: {
378
+ active?: boolean;
379
+ created_at?: string;
380
+ description?: string | null;
381
+ key: string;
382
+ label: string;
383
+ sort_order?: number;
384
+ updated_at?: string;
385
+ };
386
+ Update: {
387
+ active?: boolean;
388
+ created_at?: string;
389
+ description?: string | null;
390
+ key?: string;
391
+ label?: string;
392
+ sort_order?: number;
393
+ updated_at?: string;
394
+ };
395
+ Relationships: [];
396
+ };
316
397
  ai_model_pricing: {
317
398
  Row: {
318
399
  created_at: string;
@@ -6457,6 +6538,285 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
6457
6538
  };
6458
6539
  Relationships: [];
6459
6540
  };
6541
+ logistics_capacity_events: {
6542
+ Row: {
6543
+ available_carts: number;
6544
+ created_at: string;
6545
+ id: string;
6546
+ measures: import("./types").Json;
6547
+ note: string | null;
6548
+ outcome: string;
6549
+ required_carts: number;
6550
+ reserve_minutes: number;
6551
+ shortage_carts: number;
6552
+ status: string;
6553
+ user_id: string;
6554
+ };
6555
+ Insert: {
6556
+ available_carts?: number;
6557
+ created_at?: string;
6558
+ id?: string;
6559
+ measures?: import("./types").Json;
6560
+ note?: string | null;
6561
+ outcome?: string;
6562
+ required_carts?: number;
6563
+ reserve_minutes?: number;
6564
+ shortage_carts?: number;
6565
+ status: string;
6566
+ user_id: string;
6567
+ };
6568
+ Update: {
6569
+ available_carts?: number;
6570
+ created_at?: string;
6571
+ id?: string;
6572
+ measures?: import("./types").Json;
6573
+ note?: string | null;
6574
+ outcome?: string;
6575
+ required_carts?: number;
6576
+ reserve_minutes?: number;
6577
+ shortage_carts?: number;
6578
+ status?: string;
6579
+ user_id?: string;
6580
+ };
6581
+ Relationships: [];
6582
+ };
6583
+ logistics_capacity_settings: {
6584
+ Row: {
6585
+ created_at: string;
6586
+ settings: import("./types").Json;
6587
+ updated_at: string;
6588
+ user_id: string;
6589
+ };
6590
+ Insert: {
6591
+ created_at?: string;
6592
+ settings?: import("./types").Json;
6593
+ updated_at?: string;
6594
+ user_id: string;
6595
+ };
6596
+ Update: {
6597
+ created_at?: string;
6598
+ settings?: import("./types").Json;
6599
+ updated_at?: string;
6600
+ user_id?: string;
6601
+ };
6602
+ Relationships: [];
6603
+ };
6604
+ logistics_decisions: {
6605
+ Row: {
6606
+ created_at: string;
6607
+ explanation: string | null;
6608
+ id: string;
6609
+ input_snapshot: import("./types").Json;
6610
+ result: import("./types").Json;
6611
+ slot: string;
6612
+ strategy_id: string | null;
6613
+ subject_id: string;
6614
+ subject_type: string;
6615
+ user_id: string;
6616
+ };
6617
+ Insert: {
6618
+ created_at?: string;
6619
+ explanation?: string | null;
6620
+ id?: string;
6621
+ input_snapshot?: import("./types").Json;
6622
+ result?: import("./types").Json;
6623
+ slot: string;
6624
+ strategy_id?: string | null;
6625
+ subject_id: string;
6626
+ subject_type: string;
6627
+ user_id: string;
6628
+ };
6629
+ Update: {
6630
+ created_at?: string;
6631
+ explanation?: string | null;
6632
+ id?: string;
6633
+ input_snapshot?: import("./types").Json;
6634
+ result?: import("./types").Json;
6635
+ slot?: string;
6636
+ strategy_id?: string | null;
6637
+ subject_id?: string;
6638
+ subject_type?: string;
6639
+ user_id?: string;
6640
+ };
6641
+ Relationships: [{
6642
+ foreignKeyName: "logistics_decisions_strategy_id_fkey";
6643
+ columns: ["strategy_id"];
6644
+ isOneToOne: false;
6645
+ referencedRelation: "logistics_strategies";
6646
+ referencedColumns: ["id"];
6647
+ }];
6648
+ };
6649
+ logistics_formulas: {
6650
+ Row: {
6651
+ created_at: string;
6652
+ expression: string;
6653
+ id: string;
6654
+ notes: string | null;
6655
+ slot: string;
6656
+ strategy_id: string;
6657
+ updated_at: string;
6658
+ user_id: string;
6659
+ version: number;
6660
+ };
6661
+ Insert: {
6662
+ created_at?: string;
6663
+ expression?: string;
6664
+ id?: string;
6665
+ notes?: string | null;
6666
+ slot: string;
6667
+ strategy_id: string;
6668
+ updated_at?: string;
6669
+ user_id: string;
6670
+ version?: number;
6671
+ };
6672
+ Update: {
6673
+ created_at?: string;
6674
+ expression?: string;
6675
+ id?: string;
6676
+ notes?: string | null;
6677
+ slot?: string;
6678
+ strategy_id?: string;
6679
+ updated_at?: string;
6680
+ user_id?: string;
6681
+ version?: number;
6682
+ };
6683
+ Relationships: [{
6684
+ foreignKeyName: "logistics_formulas_strategy_id_fkey";
6685
+ columns: ["strategy_id"];
6686
+ isOneToOne: false;
6687
+ referencedRelation: "logistics_strategies";
6688
+ referencedColumns: ["id"];
6689
+ }];
6690
+ };
6691
+ logistics_strategies: {
6692
+ Row: {
6693
+ color: string;
6694
+ created_at: string;
6695
+ description: string | null;
6696
+ id: string;
6697
+ is_active: boolean;
6698
+ name: string;
6699
+ priority: number;
6700
+ updated_at: string;
6701
+ updated_by: string | null;
6702
+ user_id: string;
6703
+ version: number;
6704
+ };
6705
+ Insert: {
6706
+ color?: string;
6707
+ created_at?: string;
6708
+ description?: string | null;
6709
+ id?: string;
6710
+ is_active?: boolean;
6711
+ name: string;
6712
+ priority?: number;
6713
+ updated_at?: string;
6714
+ updated_by?: string | null;
6715
+ user_id: string;
6716
+ version?: number;
6717
+ };
6718
+ Update: {
6719
+ color?: string;
6720
+ created_at?: string;
6721
+ description?: string | null;
6722
+ id?: string;
6723
+ is_active?: boolean;
6724
+ name?: string;
6725
+ priority?: number;
6726
+ updated_at?: string;
6727
+ updated_by?: string | null;
6728
+ user_id?: string;
6729
+ version?: number;
6730
+ };
6731
+ Relationships: [];
6732
+ };
6733
+ logistics_strategy_schedules: {
6734
+ Row: {
6735
+ condition_expression: string | null;
6736
+ created_at: string;
6737
+ end_date: string | null;
6738
+ id: string;
6739
+ is_enabled: boolean;
6740
+ priority: number;
6741
+ rule_type: string;
6742
+ start_date: string | null;
6743
+ strategy_id: string;
6744
+ updated_at: string;
6745
+ user_id: string;
6746
+ };
6747
+ Insert: {
6748
+ condition_expression?: string | null;
6749
+ created_at?: string;
6750
+ end_date?: string | null;
6751
+ id?: string;
6752
+ is_enabled?: boolean;
6753
+ priority?: number;
6754
+ rule_type: string;
6755
+ start_date?: string | null;
6756
+ strategy_id: string;
6757
+ updated_at?: string;
6758
+ user_id: string;
6759
+ };
6760
+ Update: {
6761
+ condition_expression?: string | null;
6762
+ created_at?: string;
6763
+ end_date?: string | null;
6764
+ id?: string;
6765
+ is_enabled?: boolean;
6766
+ priority?: number;
6767
+ rule_type?: string;
6768
+ start_date?: string | null;
6769
+ strategy_id?: string;
6770
+ updated_at?: string;
6771
+ user_id?: string;
6772
+ };
6773
+ Relationships: [{
6774
+ foreignKeyName: "logistics_strategy_schedules_strategy_id_fkey";
6775
+ columns: ["strategy_id"];
6776
+ isOneToOne: false;
6777
+ referencedRelation: "logistics_strategies";
6778
+ referencedColumns: ["id"];
6779
+ }];
6780
+ };
6781
+ logistics_variables: {
6782
+ Row: {
6783
+ created_at: string;
6784
+ default_value: string | null;
6785
+ description: string | null;
6786
+ id: string;
6787
+ is_builtin: boolean;
6788
+ key: string;
6789
+ label: string;
6790
+ updated_at: string;
6791
+ user_id: string;
6792
+ value_type: string;
6793
+ };
6794
+ Insert: {
6795
+ created_at?: string;
6796
+ default_value?: string | null;
6797
+ description?: string | null;
6798
+ id?: string;
6799
+ is_builtin?: boolean;
6800
+ key: string;
6801
+ label: string;
6802
+ updated_at?: string;
6803
+ user_id: string;
6804
+ value_type: string;
6805
+ };
6806
+ Update: {
6807
+ created_at?: string;
6808
+ default_value?: string | null;
6809
+ description?: string | null;
6810
+ id?: string;
6811
+ is_builtin?: boolean;
6812
+ key?: string;
6813
+ label?: string;
6814
+ updated_at?: string;
6815
+ user_id?: string;
6816
+ value_type?: string;
6817
+ };
6818
+ Relationships: [];
6819
+ };
6460
6820
  mailbox_messages: {
6461
6821
  Row: {
6462
6822
  body_html: string | null;
@@ -8230,22 +8590,154 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
8230
8590
  };
8231
8591
  Relationships: [];
8232
8592
  };
8233
- product_categories: {
8593
+ planning_item_assistants: {
8234
8594
  Row: {
8235
- color: string;
8236
8595
  created_at: string;
8237
- icon: string | null;
8238
- id: string;
8239
- name: string;
8240
- slug: string;
8241
- sort_order: number;
8242
- updated_at: string;
8596
+ created_by: string | null;
8597
+ monteur_id: string;
8598
+ planning_item_id: string;
8243
8599
  };
8244
8600
  Insert: {
8245
- color?: string;
8246
8601
  created_at?: string;
8247
- icon?: string | null;
8248
- id?: string;
8602
+ created_by?: string | null;
8603
+ monteur_id: string;
8604
+ planning_item_id: string;
8605
+ };
8606
+ Update: {
8607
+ created_at?: string;
8608
+ created_by?: string | null;
8609
+ monteur_id?: string;
8610
+ planning_item_id?: string;
8611
+ };
8612
+ Relationships: [{
8613
+ foreignKeyName: "planning_item_assistants_planning_item_id_fkey";
8614
+ columns: ["planning_item_id"];
8615
+ isOneToOne: false;
8616
+ referencedRelation: "planning_items";
8617
+ referencedColumns: ["id"];
8618
+ }];
8619
+ };
8620
+ planning_items: {
8621
+ Row: {
8622
+ assigned_monteur_id: string;
8623
+ created_at: string;
8624
+ created_by: string | null;
8625
+ end_at: string;
8626
+ id: string;
8627
+ notes: string | null;
8628
+ start_at: string;
8629
+ status: Database["public"]["Enums"]["planning_item_status"];
8630
+ updated_at: string;
8631
+ werkbon_id: string;
8632
+ };
8633
+ Insert: {
8634
+ assigned_monteur_id: string;
8635
+ created_at?: string;
8636
+ created_by?: string | null;
8637
+ end_at: string;
8638
+ id?: string;
8639
+ notes?: string | null;
8640
+ start_at: string;
8641
+ status?: Database["public"]["Enums"]["planning_item_status"];
8642
+ updated_at?: string;
8643
+ werkbon_id: string;
8644
+ };
8645
+ Update: {
8646
+ assigned_monteur_id?: string;
8647
+ created_at?: string;
8648
+ created_by?: string | null;
8649
+ end_at?: string;
8650
+ id?: string;
8651
+ notes?: string | null;
8652
+ start_at?: string;
8653
+ status?: Database["public"]["Enums"]["planning_item_status"];
8654
+ updated_at?: string;
8655
+ werkbon_id?: string;
8656
+ };
8657
+ Relationships: [{
8658
+ foreignKeyName: "planning_items_werkbon_id_fkey";
8659
+ columns: ["werkbon_id"];
8660
+ isOneToOne: false;
8661
+ referencedRelation: "werkbonnen";
8662
+ referencedColumns: ["id"];
8663
+ }];
8664
+ };
8665
+ product_bom_items: {
8666
+ Row: {
8667
+ component_product_id: string | null;
8668
+ component_trade_item_floriday_id: string | null;
8669
+ created_at: string;
8670
+ id: string;
8671
+ notes: string | null;
8672
+ packing_configuration_id: string | null;
8673
+ parent_product_id: string | null;
8674
+ parent_trade_item_floriday_id: string | null;
8675
+ quantity: number;
8676
+ sort_order: number;
8677
+ tenant_id: string;
8678
+ unit: string;
8679
+ updated_at: string;
8680
+ };
8681
+ Insert: {
8682
+ component_product_id?: string | null;
8683
+ component_trade_item_floriday_id?: string | null;
8684
+ created_at?: string;
8685
+ id?: string;
8686
+ notes?: string | null;
8687
+ packing_configuration_id?: string | null;
8688
+ parent_product_id?: string | null;
8689
+ parent_trade_item_floriday_id?: string | null;
8690
+ quantity?: number;
8691
+ sort_order?: number;
8692
+ tenant_id: string;
8693
+ unit?: string;
8694
+ updated_at?: string;
8695
+ };
8696
+ Update: {
8697
+ component_product_id?: string | null;
8698
+ component_trade_item_floriday_id?: string | null;
8699
+ created_at?: string;
8700
+ id?: string;
8701
+ notes?: string | null;
8702
+ packing_configuration_id?: string | null;
8703
+ parent_product_id?: string | null;
8704
+ parent_trade_item_floriday_id?: string | null;
8705
+ quantity?: number;
8706
+ sort_order?: number;
8707
+ tenant_id?: string;
8708
+ unit?: string;
8709
+ updated_at?: string;
8710
+ };
8711
+ Relationships: [{
8712
+ foreignKeyName: "product_bom_items_component_product_id_fkey";
8713
+ columns: ["component_product_id"];
8714
+ isOneToOne: false;
8715
+ referencedRelation: "products";
8716
+ referencedColumns: ["id"];
8717
+ }, {
8718
+ foreignKeyName: "product_bom_items_parent_product_id_fkey";
8719
+ columns: ["parent_product_id"];
8720
+ isOneToOne: false;
8721
+ referencedRelation: "products";
8722
+ referencedColumns: ["id"];
8723
+ }];
8724
+ };
8725
+ product_categories: {
8726
+ Row: {
8727
+ color: string;
8728
+ created_at: string;
8729
+ icon: string | null;
8730
+ id: string;
8731
+ name: string;
8732
+ slug: string;
8733
+ sort_order: number;
8734
+ updated_at: string;
8735
+ };
8736
+ Insert: {
8737
+ color?: string;
8738
+ created_at?: string;
8739
+ icon?: string | null;
8740
+ id?: string;
8249
8741
  name: string;
8250
8742
  slug: string;
8251
8743
  sort_order?: number;
@@ -8335,6 +8827,7 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
8335
8827
  id: string;
8336
8828
  product_group_id: string;
8337
8829
  quantity: number;
8830
+ sort_order: number;
8338
8831
  trade_item_id: string;
8339
8832
  };
8340
8833
  Insert: {
@@ -8342,6 +8835,7 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
8342
8835
  id?: string;
8343
8836
  product_group_id: string;
8344
8837
  quantity?: number;
8838
+ sort_order?: number;
8345
8839
  trade_item_id: string;
8346
8840
  };
8347
8841
  Update: {
@@ -8349,6 +8843,7 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
8349
8843
  id?: string;
8350
8844
  product_group_id?: string;
8351
8845
  quantity?: number;
8846
+ sort_order?: number;
8352
8847
  trade_item_id?: string;
8353
8848
  };
8354
8849
  Relationships: [{
@@ -8363,6 +8858,8 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
8363
8858
  Row: {
8364
8859
  created_at: string;
8365
8860
  description: string | null;
8861
+ head_product_id: string | null;
8862
+ head_trade_item_floriday_id: string | null;
8366
8863
  id: string;
8367
8864
  is_active: boolean;
8368
8865
  name: string;
@@ -8372,6 +8869,8 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
8372
8869
  Insert: {
8373
8870
  created_at?: string;
8374
8871
  description?: string | null;
8872
+ head_product_id?: string | null;
8873
+ head_trade_item_floriday_id?: string | null;
8375
8874
  id?: string;
8376
8875
  is_active?: boolean;
8377
8876
  name: string;
@@ -8381,24 +8880,134 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
8381
8880
  Update: {
8382
8881
  created_at?: string;
8383
8882
  description?: string | null;
8883
+ head_product_id?: string | null;
8884
+ head_trade_item_floriday_id?: string | null;
8384
8885
  id?: string;
8385
8886
  is_active?: boolean;
8386
8887
  name?: string;
8387
8888
  tenant_id?: string;
8388
8889
  updated_at?: string;
8389
8890
  };
8891
+ Relationships: [{
8892
+ foreignKeyName: "product_groups_head_product_id_fkey";
8893
+ columns: ["head_product_id"];
8894
+ isOneToOne: false;
8895
+ referencedRelation: "products";
8896
+ referencedColumns: ["id"];
8897
+ }];
8898
+ };
8899
+ product_load_settings: {
8900
+ Row: {
8901
+ created_at: string;
8902
+ id: string;
8903
+ is_package: boolean;
8904
+ label: string | null;
8905
+ layers_per_load_carrier: number | null;
8906
+ load_carrier: string | null;
8907
+ package_id: string | null;
8908
+ package_label: string | null;
8909
+ packages_per_layer: number | null;
8910
+ packing_configuration_id: string;
8911
+ product_id: string | null;
8912
+ tenant_id: string;
8913
+ trade_item_floriday_id: string | null;
8914
+ units_per_package: number | null;
8915
+ updated_at: string;
8916
+ };
8917
+ Insert: {
8918
+ created_at?: string;
8919
+ id?: string;
8920
+ is_package?: boolean;
8921
+ label?: string | null;
8922
+ layers_per_load_carrier?: number | null;
8923
+ load_carrier?: string | null;
8924
+ package_id?: string | null;
8925
+ package_label?: string | null;
8926
+ packages_per_layer?: number | null;
8927
+ packing_configuration_id?: string;
8928
+ product_id?: string | null;
8929
+ tenant_id: string;
8930
+ trade_item_floriday_id?: string | null;
8931
+ units_per_package?: number | null;
8932
+ updated_at?: string;
8933
+ };
8934
+ Update: {
8935
+ created_at?: string;
8936
+ id?: string;
8937
+ is_package?: boolean;
8938
+ label?: string | null;
8939
+ layers_per_load_carrier?: number | null;
8940
+ load_carrier?: string | null;
8941
+ package_id?: string | null;
8942
+ package_label?: string | null;
8943
+ packages_per_layer?: number | null;
8944
+ packing_configuration_id?: string;
8945
+ product_id?: string | null;
8946
+ tenant_id?: string;
8947
+ trade_item_floriday_id?: string | null;
8948
+ units_per_package?: number | null;
8949
+ updated_at?: string;
8950
+ };
8951
+ Relationships: [{
8952
+ foreignKeyName: "product_load_settings_package_id_fkey";
8953
+ columns: ["package_id"];
8954
+ isOneToOne: false;
8955
+ referencedRelation: "packages";
8956
+ referencedColumns: ["id"];
8957
+ }, {
8958
+ foreignKeyName: "product_load_settings_product_id_fkey";
8959
+ columns: ["product_id"];
8960
+ isOneToOne: false;
8961
+ referencedRelation: "products";
8962
+ referencedColumns: ["id"];
8963
+ }];
8964
+ };
8965
+ product_merge_log: {
8966
+ Row: {
8967
+ canonical_product_id: string | null;
8968
+ id: string;
8969
+ merged_at: string;
8970
+ merged_from_id: string;
8971
+ notes: string | null;
8972
+ snapshot: import("./types").Json;
8973
+ source_table: string;
8974
+ status: string;
8975
+ };
8976
+ Insert: {
8977
+ canonical_product_id?: string | null;
8978
+ id?: string;
8979
+ merged_at?: string;
8980
+ merged_from_id: string;
8981
+ notes?: string | null;
8982
+ snapshot?: import("./types").Json;
8983
+ source_table: string;
8984
+ status?: string;
8985
+ };
8986
+ Update: {
8987
+ canonical_product_id?: string | null;
8988
+ id?: string;
8989
+ merged_at?: string;
8990
+ merged_from_id?: string;
8991
+ notes?: string | null;
8992
+ snapshot?: import("./types").Json;
8993
+ source_table?: string;
8994
+ status?: string;
8995
+ };
8390
8996
  Relationships: [];
8391
8997
  };
8392
8998
  products: {
8393
8999
  Row: {
9000
+ article_number: string | null;
8394
9001
  barcode: string | null;
8395
9002
  batch: string;
8396
9003
  crates_per_layer: number;
8397
9004
  created_at: string;
8398
9005
  custom_fields: import("./types").Json;
9006
+ floriday_trade_item_id: string | null;
8399
9007
  id: string;
8400
9008
  image_url: string | null;
8401
9009
  incoming_quantity: number;
9010
+ is_layer: boolean;
8402
9011
  layers_per_cart: number;
8403
9012
  location: string;
8404
9013
  min_quantity: number;
@@ -8414,14 +9023,17 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
8414
9023
  weight: string | null;
8415
9024
  };
8416
9025
  Insert: {
9026
+ article_number?: string | null;
8417
9027
  barcode?: string | null;
8418
9028
  batch: string;
8419
9029
  crates_per_layer?: number;
8420
9030
  created_at?: string;
8421
9031
  custom_fields?: import("./types").Json;
9032
+ floriday_trade_item_id?: string | null;
8422
9033
  id?: string;
8423
9034
  image_url?: string | null;
8424
9035
  incoming_quantity?: number;
9036
+ is_layer?: boolean;
8425
9037
  layers_per_cart?: number;
8426
9038
  location: string;
8427
9039
  min_quantity?: number;
@@ -8437,14 +9049,17 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
8437
9049
  weight?: string | null;
8438
9050
  };
8439
9051
  Update: {
9052
+ article_number?: string | null;
8440
9053
  barcode?: string | null;
8441
9054
  batch?: string;
8442
9055
  crates_per_layer?: number;
8443
9056
  created_at?: string;
8444
9057
  custom_fields?: import("./types").Json;
9058
+ floriday_trade_item_id?: string | null;
8445
9059
  id?: string;
8446
9060
  image_url?: string | null;
8447
9061
  incoming_quantity?: number;
9062
+ is_layer?: boolean;
8448
9063
  layers_per_cart?: number;
8449
9064
  location?: string;
8450
9065
  min_quantity?: number;
@@ -8464,6 +9079,7 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
8464
9079
  profiles: {
8465
9080
  Row: {
8466
9081
  address: string | null;
9082
+ avatar_url: string | null;
8467
9083
  created_at: string;
8468
9084
  display_name: string | null;
8469
9085
  email: string | null;
@@ -8475,6 +9091,7 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
8475
9091
  };
8476
9092
  Insert: {
8477
9093
  address?: string | null;
9094
+ avatar_url?: string | null;
8478
9095
  created_at?: string;
8479
9096
  display_name?: string | null;
8480
9097
  email?: string | null;
@@ -8486,6 +9103,7 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
8486
9103
  };
8487
9104
  Update: {
8488
9105
  address?: string | null;
9106
+ avatar_url?: string | null;
8489
9107
  created_at?: string;
8490
9108
  display_name?: string | null;
8491
9109
  email?: string | null;
@@ -9352,6 +9970,7 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
9352
9970
  order_source: string | null;
9353
9971
  physical_after: number | null;
9354
9972
  physical_before: number | null;
9973
+ production_batch_id: string | null;
9355
9974
  qty_delta: number;
9356
9975
  reason: string | null;
9357
9976
  reserved_after: number | null;
@@ -9369,6 +9988,7 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
9369
9988
  order_source?: string | null;
9370
9989
  physical_after?: number | null;
9371
9990
  physical_before?: number | null;
9991
+ production_batch_id?: string | null;
9372
9992
  qty_delta: number;
9373
9993
  reason?: string | null;
9374
9994
  reserved_after?: number | null;
@@ -9386,6 +10006,7 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
9386
10006
  order_source?: string | null;
9387
10007
  physical_after?: number | null;
9388
10008
  physical_before?: number | null;
10009
+ production_batch_id?: string | null;
9389
10010
  qty_delta?: number;
9390
10011
  reason?: string | null;
9391
10012
  reserved_after?: number | null;
@@ -9712,6 +10333,48 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
9712
10333
  };
9713
10334
  Relationships: [];
9714
10335
  };
10336
+ trade_item_prices: {
10337
+ Row: {
10338
+ created_at: string;
10339
+ currency: string;
10340
+ id: string;
10341
+ last_push_error: string | null;
10342
+ last_pushed_at: string | null;
10343
+ price_group_id: string | null;
10344
+ price_per_piece: number;
10345
+ supply_line_id: string | null;
10346
+ trade_item_key: string;
10347
+ updated_at: string;
10348
+ user_id: string;
10349
+ };
10350
+ Insert: {
10351
+ created_at?: string;
10352
+ currency?: string;
10353
+ id?: string;
10354
+ last_push_error?: string | null;
10355
+ last_pushed_at?: string | null;
10356
+ price_group_id?: string | null;
10357
+ price_per_piece: number;
10358
+ supply_line_id?: string | null;
10359
+ trade_item_key: string;
10360
+ updated_at?: string;
10361
+ user_id: string;
10362
+ };
10363
+ Update: {
10364
+ created_at?: string;
10365
+ currency?: string;
10366
+ id?: string;
10367
+ last_push_error?: string | null;
10368
+ last_pushed_at?: string | null;
10369
+ price_group_id?: string | null;
10370
+ price_per_piece?: number;
10371
+ supply_line_id?: string | null;
10372
+ trade_item_key?: string;
10373
+ updated_at?: string;
10374
+ user_id?: string;
10375
+ };
10376
+ Relationships: [];
10377
+ };
9715
10378
  trade_item_stock: {
9716
10379
  Row: {
9717
10380
  connection_id: string;
@@ -10177,6 +10840,51 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
10177
10840
  referencedColumns: ["id"];
10178
10841
  }];
10179
10842
  };
10843
+ twinfield_invoice_pdf_cache: {
10844
+ Row: {
10845
+ connection_id: string;
10846
+ created_at: string;
10847
+ fetched_at: string;
10848
+ id: string;
10849
+ invoice_number: string;
10850
+ last_accessed_at: string;
10851
+ object_path: string;
10852
+ office_code: string;
10853
+ size_bytes: number;
10854
+ updated_at: string;
10855
+ };
10856
+ Insert: {
10857
+ connection_id: string;
10858
+ created_at?: string;
10859
+ fetched_at?: string;
10860
+ id?: string;
10861
+ invoice_number: string;
10862
+ last_accessed_at?: string;
10863
+ object_path: string;
10864
+ office_code: string;
10865
+ size_bytes?: number;
10866
+ updated_at?: string;
10867
+ };
10868
+ Update: {
10869
+ connection_id?: string;
10870
+ created_at?: string;
10871
+ fetched_at?: string;
10872
+ id?: string;
10873
+ invoice_number?: string;
10874
+ last_accessed_at?: string;
10875
+ object_path?: string;
10876
+ office_code?: string;
10877
+ size_bytes?: number;
10878
+ updated_at?: string;
10879
+ };
10880
+ Relationships: [{
10881
+ foreignKeyName: "twinfield_invoice_pdf_cache_connection_id_fkey";
10882
+ columns: ["connection_id"];
10883
+ isOneToOne: false;
10884
+ referencedRelation: "twinfield_connections";
10885
+ referencedColumns: ["id"];
10886
+ }];
10887
+ };
10180
10888
  twinfield_invoice_settings: {
10181
10889
  Row: {
10182
10890
  created_at: string;
@@ -10780,6 +11488,78 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
10780
11488
  };
10781
11489
  Relationships: [];
10782
11490
  };
11491
+ werkbon_package_ai_rules: {
11492
+ Row: {
11493
+ active: boolean;
11494
+ case_sensitive: boolean;
11495
+ created_at: string;
11496
+ id: string;
11497
+ package_id: string;
11498
+ priority: number;
11499
+ rule_type: string;
11500
+ updated_at: string;
11501
+ value: string;
11502
+ };
11503
+ Insert: {
11504
+ active?: boolean;
11505
+ case_sensitive?: boolean;
11506
+ created_at?: string;
11507
+ id?: string;
11508
+ package_id: string;
11509
+ priority?: number;
11510
+ rule_type: string;
11511
+ updated_at?: string;
11512
+ value: string;
11513
+ };
11514
+ Update: {
11515
+ active?: boolean;
11516
+ case_sensitive?: boolean;
11517
+ created_at?: string;
11518
+ id?: string;
11519
+ package_id?: string;
11520
+ priority?: number;
11521
+ rule_type?: string;
11522
+ updated_at?: string;
11523
+ value?: string;
11524
+ };
11525
+ Relationships: [{
11526
+ foreignKeyName: "werkbon_package_ai_rules_package_id_fkey";
11527
+ columns: ["package_id"];
11528
+ isOneToOne: false;
11529
+ referencedRelation: "werkbon_packages";
11530
+ referencedColumns: ["id"];
11531
+ }];
11532
+ };
11533
+ werkbon_package_categories: {
11534
+ Row: {
11535
+ active: boolean;
11536
+ created_at: string;
11537
+ id: string;
11538
+ kleur: string | null;
11539
+ naam: string;
11540
+ sort_order: number;
11541
+ updated_at: string;
11542
+ };
11543
+ Insert: {
11544
+ active?: boolean;
11545
+ created_at?: string;
11546
+ id?: string;
11547
+ kleur?: string | null;
11548
+ naam: string;
11549
+ sort_order?: number;
11550
+ updated_at?: string;
11551
+ };
11552
+ Update: {
11553
+ active?: boolean;
11554
+ created_at?: string;
11555
+ id?: string;
11556
+ kleur?: string | null;
11557
+ naam?: string;
11558
+ sort_order?: number;
11559
+ updated_at?: string;
11560
+ };
11561
+ Relationships: [];
11562
+ };
10783
11563
  werkbon_package_lines: {
10784
11564
  Row: {
10785
11565
  created_at: string;
@@ -10825,38 +11605,59 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
10825
11605
  werkbon_packages: {
10826
11606
  Row: {
10827
11607
  active: boolean;
11608
+ ai_tags: string[];
11609
+ category_id: string | null;
10828
11610
  code: string;
10829
11611
  created_at: string;
10830
11612
  default_quantity: number;
10831
11613
  description: string | null;
11614
+ duration_minutes: number | null;
10832
11615
  id: string;
11616
+ mandaat_type: string | null;
10833
11617
  name: string;
11618
+ sort_order: number;
10834
11619
  unit_price_cents: number;
10835
11620
  updated_at: string;
10836
11621
  };
10837
11622
  Insert: {
10838
11623
  active?: boolean;
11624
+ ai_tags?: string[];
11625
+ category_id?: string | null;
10839
11626
  code: string;
10840
11627
  created_at?: string;
10841
11628
  default_quantity?: number;
10842
11629
  description?: string | null;
11630
+ duration_minutes?: number | null;
10843
11631
  id?: string;
11632
+ mandaat_type?: string | null;
10844
11633
  name: string;
11634
+ sort_order?: number;
10845
11635
  unit_price_cents?: number;
10846
11636
  updated_at?: string;
10847
11637
  };
10848
11638
  Update: {
10849
11639
  active?: boolean;
11640
+ ai_tags?: string[];
11641
+ category_id?: string | null;
10850
11642
  code?: string;
10851
11643
  created_at?: string;
10852
11644
  default_quantity?: number;
10853
11645
  description?: string | null;
11646
+ duration_minutes?: number | null;
10854
11647
  id?: string;
11648
+ mandaat_type?: string | null;
10855
11649
  name?: string;
11650
+ sort_order?: number;
10856
11651
  unit_price_cents?: number;
10857
11652
  updated_at?: string;
10858
11653
  };
10859
- Relationships: [];
11654
+ Relationships: [{
11655
+ foreignKeyName: "werkbon_packages_category_id_fkey";
11656
+ columns: ["category_id"];
11657
+ isOneToOne: false;
11658
+ referencedRelation: "werkbon_package_categories";
11659
+ referencedColumns: ["id"];
11660
+ }];
10860
11661
  };
10861
11662
  werkbon_photos: {
10862
11663
  Row: {
@@ -10944,7 +11745,10 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
10944
11745
  scheduled_end_time: string | null;
10945
11746
  scheduled_start_time: string | null;
10946
11747
  sequence_number: number;
11748
+ source_email_meta: import("./types").Json | null;
11749
+ source_mailbox_message_id: string | null;
10947
11750
  source_pdf_path: string | null;
11751
+ source_type: string;
10948
11752
  status: string;
10949
11753
  technician_id: string | null;
10950
11754
  technician_notes: string | null;
@@ -10973,7 +11777,10 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
10973
11777
  scheduled_end_time?: string | null;
10974
11778
  scheduled_start_time?: string | null;
10975
11779
  sequence_number: number;
11780
+ source_email_meta?: import("./types").Json | null;
11781
+ source_mailbox_message_id?: string | null;
10976
11782
  source_pdf_path?: string | null;
11783
+ source_type?: string;
10977
11784
  status?: string;
10978
11785
  technician_id?: string | null;
10979
11786
  technician_notes?: string | null;
@@ -11002,7 +11809,10 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
11002
11809
  scheduled_end_time?: string | null;
11003
11810
  scheduled_start_time?: string | null;
11004
11811
  sequence_number?: number;
11812
+ source_email_meta?: import("./types").Json | null;
11813
+ source_mailbox_message_id?: string | null;
11005
11814
  source_pdf_path?: string | null;
11815
+ source_type?: string;
11006
11816
  status?: string;
11007
11817
  technician_id?: string | null;
11008
11818
  technician_notes?: string | null;
@@ -11019,10 +11829,10 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
11019
11829
  referencedRelation: "werkbonnen";
11020
11830
  referencedColumns: ["id"];
11021
11831
  }, {
11022
- foreignKeyName: "werkbonnen_technician_id_fkey";
11023
- columns: ["technician_id"];
11832
+ foreignKeyName: "werkbonnen_source_mailbox_message_id_fkey";
11833
+ columns: ["source_mailbox_message_id"];
11024
11834
  isOneToOne: false;
11025
- referencedRelation: "monteurs";
11835
+ referencedRelation: "mailbox_messages";
11026
11836
  referencedColumns: ["id"];
11027
11837
  }];
11028
11838
  };
@@ -11716,6 +12526,13 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
11716
12526
  };
11717
12527
  Returns: number;
11718
12528
  };
12529
+ _migrate_rewrite_stock_key: {
12530
+ Args: {
12531
+ _from_key: string;
12532
+ _to_key: string;
12533
+ };
12534
+ Returns: undefined;
12535
+ };
11719
12536
  afh_city_code: {
11720
12537
  Args: {
11721
12538
  _city: string;
@@ -11742,6 +12559,21 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
11742
12559
  };
11743
12560
  Returns: string;
11744
12561
  };
12562
+ ai_usage_by_module: {
12563
+ Args: {
12564
+ _from: string;
12565
+ _to: string;
12566
+ };
12567
+ Returns: {
12568
+ calls: number;
12569
+ consumer_module_id: string;
12570
+ cost_usd: number;
12571
+ errors: number;
12572
+ input_tokens: number;
12573
+ output_tokens: number;
12574
+ total_tokens: number;
12575
+ }[];
12576
+ };
11745
12577
  apply_stock_consumption: {
11746
12578
  Args: {
11747
12579
  p_order_id: string;
@@ -11799,6 +12631,12 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
11799
12631
  processed_items: number;
11800
12632
  }[];
11801
12633
  };
12634
+ calculate_layer_stock: {
12635
+ Args: {
12636
+ p_product_id: string;
12637
+ };
12638
+ Returns: number;
12639
+ };
11802
12640
  call_exact_route: {
11803
12641
  Args: {
11804
12642
  path: string;
@@ -11858,6 +12696,28 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
11858
12696
  Args: never;
11859
12697
  Returns: undefined;
11860
12698
  };
12699
+ consume_bom_for_production: {
12700
+ Args: {
12701
+ p_connection_id: string;
12702
+ p_parent_id: string;
12703
+ p_parent_key: string;
12704
+ p_parent_kind: string;
12705
+ p_quantity: number;
12706
+ p_user_id: string;
12707
+ };
12708
+ Returns: import("./types").Json;
12709
+ } | {
12710
+ Args: {
12711
+ p_batch_id?: string;
12712
+ p_connection_id: string;
12713
+ p_parent_id: string;
12714
+ p_parent_key: string;
12715
+ p_parent_kind: string;
12716
+ p_quantity: number;
12717
+ p_user_id: string;
12718
+ };
12719
+ Returns: import("./types").Json;
12720
+ };
11861
12721
  consume_floriday_rate_limit: {
11862
12722
  Args: {
11863
12723
  p_bucket: string;
@@ -11890,6 +12750,12 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
11890
12750
  Args: never;
11891
12751
  Returns: string;
11892
12752
  };
12753
+ custom_access_token_hook: {
12754
+ Args: {
12755
+ event: import("./types").Json;
12756
+ };
12757
+ Returns: import("./types").Json;
12758
+ };
11893
12759
  dashboard_alert_counts: {
11894
12760
  Args: never;
11895
12761
  Returns: import("./types").Json;
@@ -11909,6 +12775,13 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
11909
12775
  table_name: string;
11910
12776
  }[];
11911
12777
  };
12778
+ delete_samenstelling: {
12779
+ Args: {
12780
+ p_parent_id: string;
12781
+ p_parent_kind: string;
12782
+ };
12783
+ Returns: import("./types").Json;
12784
+ };
11912
12785
  dispatch_carrier_signups_sql: {
11913
12786
  Args: {
11914
12787
  _catchup?: string;
@@ -12164,6 +13037,27 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
12164
13037
  minutes_since_success: number;
12165
13038
  }[];
12166
13039
  };
13040
+ get_group_allocation_keys: {
13041
+ Args: {
13042
+ p_product_id: string;
13043
+ };
13044
+ Returns: {
13045
+ k: string;
13046
+ ord: number;
13047
+ }[];
13048
+ };
13049
+ get_group_head_key: {
13050
+ Args: {
13051
+ p_group_id: string;
13052
+ };
13053
+ Returns: string;
13054
+ };
13055
+ get_inventory_stock_for_key: {
13056
+ Args: {
13057
+ p_key: string;
13058
+ };
13059
+ Returns: number;
13060
+ };
12167
13061
  get_offer_by_link_code: {
12168
13062
  Args: {
12169
13063
  p_code: string;
@@ -12194,6 +13088,12 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
12194
13088
  };
12195
13089
  Returns: string;
12196
13090
  };
13091
+ get_product_group_available_stock: {
13092
+ Args: {
13093
+ p_group_id: string;
13094
+ };
13095
+ Returns: number;
13096
+ };
12197
13097
  get_room_busy_windows: {
12198
13098
  Args: {
12199
13099
  p_from: string;
@@ -12258,12 +13158,35 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
12258
13158
  };
12259
13159
  Returns: boolean;
12260
13160
  };
13161
+ jwt_has_role: {
13162
+ Args: {
13163
+ _role: Database["public"]["Enums"]["app_role"];
13164
+ };
13165
+ Returns: boolean;
13166
+ };
12261
13167
  list_monteurs: {
12262
13168
  Args: never;
12263
13169
  Returns: {
13170
+ avatar_url: string;
12264
13171
  display_name: string;
12265
13172
  email: string;
12266
- user_id: string;
13173
+ id: string;
13174
+ }[];
13175
+ };
13176
+ list_my_planning_items: {
13177
+ Args: {
13178
+ _from: string;
13179
+ _to: string;
13180
+ };
13181
+ Returns: {
13182
+ assigned_monteur_id: string;
13183
+ end_at: string;
13184
+ id: string;
13185
+ notes: string;
13186
+ role: string;
13187
+ start_at: string;
13188
+ status: Database["public"]["Enums"]["planning_item_status"];
13189
+ werkbon_id: string;
12267
13190
  }[];
12268
13191
  };
12269
13192
  local_effective_price: {
@@ -12282,6 +13205,22 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
12282
13205
  source_id: string;
12283
13206
  }[];
12284
13207
  };
13208
+ log_ai_call: {
13209
+ Args: {
13210
+ _consumer_module_id: string;
13211
+ _cost_usd: number;
13212
+ _duration_ms: number;
13213
+ _error_code: string;
13214
+ _error_message: string;
13215
+ _input_tokens: number;
13216
+ _model_slug: string;
13217
+ _output_tokens: number;
13218
+ _provider_slug: string;
13219
+ _status: string;
13220
+ _total_tokens: number;
13221
+ };
13222
+ Returns: string;
13223
+ };
12285
13224
  mark_offer_clicked: {
12286
13225
  Args: {
12287
13226
  p_code: string;
@@ -12294,12 +13233,32 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
12294
13233
  };
12295
13234
  Returns: undefined;
12296
13235
  };
13236
+ mark_salesorder_controlled: {
13237
+ Args: {
13238
+ p_controlled: boolean;
13239
+ p_floriday_id: string;
13240
+ };
13241
+ Returns: undefined;
13242
+ };
12297
13243
  mark_shipment_shipped: {
12298
13244
  Args: {
12299
13245
  p_shipment_id: string;
12300
13246
  };
12301
13247
  Returns: undefined;
12302
13248
  };
13249
+ merge_products: {
13250
+ Args: {
13251
+ _canonical: string;
13252
+ _loser: string;
13253
+ };
13254
+ Returns: undefined;
13255
+ };
13256
+ next_manufacture_partij: {
13257
+ Args: {
13258
+ _tenant_id: string;
13259
+ };
13260
+ Returns: string;
13261
+ };
12303
13262
  next_order_number: {
12304
13263
  Args: {
12305
13264
  p_prefix: string;
@@ -12373,6 +13332,15 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
12373
13332
  };
12374
13333
  Returns: undefined;
12375
13334
  };
13335
+ pickstation_resolve_delivery_orders: {
13336
+ Args: {
13337
+ p_sales_order_ids: string[];
13338
+ };
13339
+ Returns: {
13340
+ delivery_order_id: string;
13341
+ sales_order_id: string;
13342
+ }[];
13343
+ };
12376
13344
  pickstation_set_cart_status: {
12377
13345
  Args: {
12378
13346
  p_cart_index: number;
@@ -12382,6 +13350,14 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
12382
13350
  };
12383
13351
  Returns: undefined;
12384
13352
  };
13353
+ produce_designed_product: {
13354
+ Args: {
13355
+ p_parent_id: string;
13356
+ p_parent_kind: string;
13357
+ p_quantity: number;
13358
+ };
13359
+ Returns: import("./types").Json;
13360
+ };
12385
13361
  promote_trade_item_key: {
12386
13362
  Args: {
12387
13363
  p_new: string;
@@ -12389,6 +13365,10 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
12389
13365
  };
12390
13366
  Returns: undefined;
12391
13367
  };
13368
+ recompute_all_reserved_stock: {
13369
+ Args: never;
13370
+ Returns: undefined;
13371
+ };
12392
13372
  recompute_order_status: {
12393
13373
  Args: {
12394
13374
  p_order_id: string;
@@ -12444,18 +13424,50 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
12444
13424
  };
12445
13425
  Returns: undefined;
12446
13426
  };
13427
+ resolve_group_allocation: {
13428
+ Args: {
13429
+ _needed: number;
13430
+ _product_group_id: string;
13431
+ };
13432
+ Returns: {
13433
+ allocated: number;
13434
+ trade_item_id: string;
13435
+ }[];
13436
+ };
13437
+ resolve_group_member_stock_key: {
13438
+ Args: {
13439
+ p_trade_item_id: string;
13440
+ };
13441
+ Returns: string;
13442
+ };
12447
13443
  resolve_product_id_for_item: {
12448
13444
  Args: {
12449
13445
  p_product_name: string;
12450
13446
  };
12451
13447
  Returns: string;
12452
13448
  };
13449
+ resolve_stock_trade_item_key: {
13450
+ Args: {
13451
+ p_product_id: string;
13452
+ };
13453
+ Returns: string;
13454
+ };
12453
13455
  retry_twinfield_push: {
12454
13456
  Args: {
12455
13457
  _customer_id: string;
12456
13458
  };
12457
13459
  Returns: number;
12458
13460
  };
13461
+ reverse_production: {
13462
+ Args: {
13463
+ p_connection_id?: string;
13464
+ p_parent_key: string;
13465
+ p_quantity: number;
13466
+ p_reason?: string;
13467
+ p_user_id?: string;
13468
+ };
13469
+ Returns: import("./types").Json;
13470
+ };
12459
13471
  schedule_floriday_additional_services_sync: {
12460
13472
  Args: {
12461
13473
  p_apikey: string;
@@ -12723,6 +13735,17 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
12723
13735
  };
12724
13736
  Returns: number;
12725
13737
  };
13738
+ self_heal_floriday_links: {
13739
+ Args: never;
13740
+ Returns: number;
13741
+ };
13742
+ set_planning_status: {
13743
+ Args: {
13744
+ _id: string;
13745
+ _status: Database["public"]["Enums"]["planning_item_status"];
13746
+ };
13747
+ Returns: undefined;
13748
+ };
12726
13749
  show_limit: {
12727
13750
  Args: never;
12728
13751
  Returns: number;
@@ -12733,18 +13756,34 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
12733
13756
  };
12734
13757
  Returns: string[];
12735
13758
  };
13759
+ sync_all_layer_stocks: {
13760
+ Args: never;
13761
+ Returns: undefined;
13762
+ };
12736
13763
  sync_cached_packing_from_product: {
12737
13764
  Args: {
12738
13765
  p_product_id: string;
12739
13766
  };
12740
13767
  Returns: undefined;
12741
13768
  };
13769
+ sync_layer_stock: {
13770
+ Args: {
13771
+ p_product_id: string;
13772
+ };
13773
+ Returns: undefined;
13774
+ };
12742
13775
  sync_order_cart_item_packing_from_product: {
12743
13776
  Args: {
12744
13777
  p_product_id: string;
12745
13778
  };
12746
13779
  Returns: undefined;
12747
13780
  };
13781
+ sync_product_group_belading: {
13782
+ Args: {
13783
+ _group_id: string;
13784
+ };
13785
+ Returns: undefined;
13786
+ };
12748
13787
  sync_product_packing_from_floriday_cache: {
12749
13788
  Args: {
12750
13789
  p_floriday_id: string;
@@ -12776,11 +13815,12 @@ export declare const supabaseAdmin: import("@supabase/supabase-js").SupabaseClie
12776
13815
  };
12777
13816
  };
12778
13817
  Enums: {
12779
- app_role: "admin" | "planner" | "monteur" | "administratie";
13818
+ app_role: "admin" | "planner" | "monteur" | "administratie" | "ai_admin";
12780
13819
  exact_env: "staging" | "live";
12781
13820
  exact_push_status: "pending" | "sent" | "error";
12782
13821
  itk_customer_segment: "Business" | "Private";
12783
13822
  itk_dynamic_field_type: "text" | "select" | "date" | "checkbox";
13823
+ planning_item_status: "gepland" | "bezig" | "afgerond" | "geannuleerd" | "concept" | "vrijgegeven";
12784
13824
  quote_status: "concept" | "verzonden" | "bekeken" | "in_behandeling" | "geaccepteerd" | "afgewezen" | "verlopen" | "gearchiveerd";
12785
13825
  };
12786
13826
  CompositeTypes: { [_ in never]: never; };