@@ -291,15 +291,8 @@ public enum DTOv2 {
291
291
}
292
292
293
293
/// Defines an insight as saved to the database, no calculation results
294
+ @available ( * , deprecated, message: " Use V3InsightsController.Insight instead " )
294
295
public struct Insight : Codable , Hashable , Identifiable {
295
- public enum InsightType : String , Codable , Hashable {
296
- case timeseries
297
- case topN
298
- case customQuery
299
- case funnel
300
- case experiment
301
- }
302
-
303
296
public var id : UUID
304
297
public var groupID : UUID
305
298
@@ -308,7 +301,7 @@ public enum DTOv2 {
308
301
public var title : String
309
302
310
303
/// What kind of insight is this?
311
- public var type : InsightType
304
+ public var type : String
312
305
313
306
/// If set, display the chart with this accent color, otherwise fall back to default color
314
307
public var accentColor : String ?
@@ -348,7 +341,7 @@ public enum DTOv2 {
348
341
groupID: UUID ,
349
342
order: Double ? ,
350
343
title: String ,
351
- type: InsightType ,
344
+ type: String ,
352
345
accentColor: String ? = nil ,
353
346
widgetable _: Bool ? = false ,
354
347
customQuery: CustomQuery ? = nil ,
@@ -577,7 +570,7 @@ public extension DTOv2.Insight {
577
570
groupID: groupID,
578
571
order: nil ,
579
572
title: " New Time Series Insight " ,
580
- type: . timeseries,
573
+ type: " timeseries " ,
581
574
customQuery: nil ,
582
575
signalType: nil ,
583
576
uniqueUser: false ,
@@ -597,7 +590,7 @@ public extension DTOv2.Insight {
597
590
groupID: groupID,
598
591
order: nil ,
599
592
title: title ?? " New Breakdown Insight " ,
600
- type: . topN,
593
+ type: " topN " ,
601
594
customQuery: nil ,
602
595
signalType: nil ,
603
596
uniqueUser: false ,
@@ -617,7 +610,7 @@ public extension DTOv2.Insight {
617
610
groupID: groupID,
618
611
order: nil ,
619
612
title: " Daily Active Users " ,
620
- type: . timeseries,
613
+ type: " timeseries " ,
621
614
customQuery: nil ,
622
615
signalType: nil ,
623
616
uniqueUser: true ,
@@ -637,7 +630,7 @@ public extension DTOv2.Insight {
637
630
groupID: groupID,
638
631
order: nil ,
639
632
title: " Weekly Active Users " ,
640
- type: . timeseries,
633
+ type: " timeseries " ,
641
634
customQuery: nil ,
642
635
signalType: nil ,
643
636
uniqueUser: true ,
@@ -657,7 +650,7 @@ public extension DTOv2.Insight {
657
650
groupID: groupID,
658
651
order: nil ,
659
652
title: " Active Users this Month " ,
660
- type: . timeseries,
653
+ type: " timeseries " ,
661
654
customQuery: nil ,
662
655
signalType: nil ,
663
656
uniqueUser: true ,
@@ -677,7 +670,7 @@ public extension DTOv2.Insight {
677
670
groupID: groupID,
678
671
order: nil ,
679
672
title: " Signals by Day " ,
680
- type: . timeseries,
673
+ type: " timeseries " ,
681
674
customQuery: nil ,
682
675
signalType: nil ,
683
676
uniqueUser: false ,
@@ -707,7 +700,7 @@ public extension DTOv2.Insight {
707
700
groupID: groupID,
708
701
order: nil ,
709
702
title: " Custom Query " ,
710
- type: . customQuery ,
703
+ type: " timeseries " ,
711
704
customQuery: customQuery,
712
705
signalType: nil ,
713
706
uniqueUser: false ,
0 commit comments