1
- module Stores.EventType exposing (EventType , EventTypeOptions , EventTypeStatistics , Model , Msg , allAudiences , allCategories , allCleanupPolicies , allModes , audiences , categories , cleanupPolicies , collectionDecoder , compatibilityModes , config , defaultStatisticDecoder , initialModel , memberDecoder , optionsDecoder , partitionStrategies , update )
1
+ module Stores.EventType exposing (EventOwnerSelector , EventType , EventTypeOptions , EventTypeStatistics , Model , Msg , allAudiences , allCategories , allCleanupPolicies , allModes , allOwnerSelectorTypes , audiences , categories , cleanupPolicies , collectionDecoder , compatibilityModes , config , defaultStatisticDecoder , emptyEventOwnerSelector , initialModel , memberDecoder , optionsDecoder , partitionStrategies , update )
2
2
3
3
import Config
4
4
import Constants
@@ -32,6 +32,7 @@ type alias EventType =
32
32
, -- enum component-internal, business-unit-internal,
33
33
-- company-internal, external-partner, external-public
34
34
audience : Maybe String
35
+ , event_owner_selector : Maybe EventOwnerSelector
35
36
, created_at : Maybe String
36
37
, updated_at : Maybe String
37
38
}
@@ -50,6 +51,37 @@ type alias EventTypeOptions =
50
51
}
51
52
52
53
54
+ type alias EventOwnerSelector =
55
+ { type_ : String
56
+ , name : String
57
+ , value : String
58
+ }
59
+
60
+
61
+ emptyEventOwnerSelector =
62
+ { type_ = " "
63
+ , name = " "
64
+ , value = " "
65
+ }
66
+
67
+
68
+ ownerSelectorTypes :
69
+ { path : String
70
+ , static : String
71
+ }
72
+ ownerSelectorTypes =
73
+ { path = " path"
74
+ , static = " static"
75
+ }
76
+
77
+
78
+ allOwnerSelectorTypes : List String
79
+ allOwnerSelectorTypes =
80
+ [ ownerSelectorTypes. path
81
+ , ownerSelectorTypes. static
82
+ ]
83
+
84
+
53
85
type alias Model =
54
86
Helpers . Store . Model EventType
55
87
@@ -198,6 +230,7 @@ memberDecoder =
198
230
|> optional " authorization" ( nullable Stores . Authorization . collectionDecoder) Nothing
199
231
|> optional " cleanup_policy" string cleanupPolicies. delete
200
232
|> optional " audience" ( nullable string) Nothing
233
+ |> optional " event_owner_selector" ( nullable eventOwnerSelectorDecoder) Nothing
201
234
|> optional " created_at" ( nullable string) Nothing
202
235
|> optional " updated_at" ( nullable string) Nothing
203
236
@@ -215,3 +248,11 @@ optionsDecoder : Decoder EventTypeOptions
215
248
optionsDecoder =
216
249
succeed EventTypeOptions
217
250
|> optional " retention_time" ( nullable int) Nothing
251
+
252
+
253
+ eventOwnerSelectorDecoder : Decoder EventOwnerSelector
254
+ eventOwnerSelectorDecoder =
255
+ succeed EventOwnerSelector
256
+ |> required " type" string
257
+ |> required " name" string
258
+ |> required " value" string
0 commit comments