@@ -6,8 +6,9 @@ module Wizard.Api.Models.BootstrapConfig exposing
66 )
77
88import Common.Api.Models.AppSwitcherItem as AppSwitcherItem exposing (AppSwitcherItem )
9- import Common.Api.Models.UserInfo as UserInfo exposing (UserInfo )
9+ import Dict exposing (Dict )
1010import Json.Decode as D exposing (Decoder )
11+ import Json.Decode.Extensions as D
1112import Json.Decode.Pipeline as D
1213import Wizard.Api.Models.BootstrapConfig.Admin as AdminConfig exposing (Admin )
1314import Wizard.Api.Models.BootstrapConfig.AuthenticationConfig as AuthenticationConfig exposing (AuthenticationConfig )
@@ -17,11 +18,13 @@ import Wizard.Api.Models.BootstrapConfig.FeaturesConfig as FeaturesConfig exposi
1718import Wizard.Api.Models.BootstrapConfig.LookAndFeelConfig as LookAndFeelConfig exposing (LookAndFeelConfig )
1819import Wizard.Api.Models.BootstrapConfig.OrganizationConfig as OrganizationConfig exposing (OrganizationConfig )
1920import Wizard.Api.Models.BootstrapConfig.OwlConfig as OwlConfig exposing (OwlConfig )
21+ import Wizard.Api.Models.BootstrapConfig.PluginInfo as PluginInfo exposing (PluginInfo )
2022import Wizard.Api.Models.BootstrapConfig.PrivacyAndSupportConfig as PrivacyAndSupportConfig exposing (PrivacyAndSupportConfig )
2123import Wizard.Api.Models.BootstrapConfig.ProjectConfig as ProjectConfig exposing (ProjectConfig )
2224import Wizard.Api.Models.BootstrapConfig.RegistryConfig as RegistryConfig exposing (RegistryConfig )
2325import Wizard.Api.Models.BootstrapConfig.SignalBridgeConfig as SignalBridgeConfig exposing (SignalBridgeConfig )
2426import Wizard.Api.Models.BootstrapConfig.SubmissionConfig as SubmissionConfig exposing (SubmissionConfig )
27+ import Wizard.Api.Models.BootstrapConfig.UserConfig as UserConfig exposing (UserConfig )
2528
2629
2730type alias BootstrapConfig =
@@ -32,6 +35,8 @@ type alias BootstrapConfig =
3235 , registry : RegistryConfig
3336 , lookAndFeel : LookAndFeelConfig
3437 , organization : OrganizationConfig
38+ , pluginSettings : Dict String String
39+ , plugins : List PluginInfo
3540 , privacyAndSupport : PrivacyAndSupportConfig
3641 , project : ProjectConfig
3742 , submission : SubmissionConfig
@@ -40,7 +45,7 @@ type alias BootstrapConfig =
4045 , modules : List AppSwitcherItem
4146 , signalBridge : SignalBridgeConfig
4247 , tours : List String
43- , user : Maybe UserInfo
48+ , user : Maybe UserConfig
4449 }
4550
4651
@@ -53,6 +58,8 @@ default =
5358 , registry = RegistryConfig . default
5459 , lookAndFeel = LookAndFeelConfig . default
5560 , organization = OrganizationConfig . default
61+ , pluginSettings = Dict . empty
62+ , plugins = []
5663 , privacyAndSupport = PrivacyAndSupportConfig . default
5764 , project = ProjectConfig . default
5865 , submission = SubmissionConfig . default
@@ -75,6 +82,8 @@ decoder =
7582 |> D . required " registry" RegistryConfig . decoder
7683 |> D . required " lookAndFeel" LookAndFeelConfig . decoder
7784 |> D . required " organization" OrganizationConfig . decoder
85+ |> D . required " pluginSettings" ( D . dict D . valueAsString)
86+ |> D . required " plugins" ( D . list PluginInfo . decoder)
7887 |> D . required " privacyAndSupport" PrivacyAndSupportConfig . decoder
7988 |> D . required " project" ProjectConfig . decoder
8089 |> D . required " submission" SubmissionConfig . decoder
@@ -83,7 +92,7 @@ decoder =
8392 |> D . required " modules" ( D . list AppSwitcherItem . decoder)
8493 |> D . required " signalBridge" SignalBridgeConfig . decoder
8594 |> D . required " tours" ( D . list D . string)
86- |> D . required " user" ( D . maybe UserInfo . decoder)
95+ |> D . required " user" ( D . maybe UserConfig . decoder)
8796
8897
8998addTour : String -> BootstrapConfig -> BootstrapConfig
0 commit comments