module LinkedIn.JobsUnifiedTopCard where import Control.Alt import Prelude import Data.Either (Either(..), hush) import Data.Generic.Rep (class Generic) import Data.List.Types (NonEmptyList) import Data.Maybe (Maybe) import Data.Show.Generic (genericShow) import LinkedIn (DetachedNode(..)) import LinkedIn.Types (ParseError(..), Parser) import LinkedIn.Utils (detachNonEmptyTextChild, parseDetachedNode, queryAndDetachMany, queryAndDetachOne, queryManyAndParse, queryOneAndParse) data JobsUnifiedTopCardElement a = JobsUnifiedTopCardElement { header :: a, primaryDescription :: TopCardPrimaryDescription a, insights :: Maybe (NonEmptyList (TopCardInsight a)), actions :: Maybe (NonEmptyList (TopCardAction a)) } data TopCardPrimaryDescription a = TopCardPrimaryDescription { link :: a, text :: a, tvmText :: Maybe (NonEmptyList a) } data TopCardInsight a = TopCardInsight { icon :: a, content :: TopCardInsightContent a } data TopCardInsightContent a = TopCardInsightContentSingle a | TopCardInsightContentSecondary {primary :: a, secondary :: NonEmptyList (TopCardSecondaryInsight a)} | TopCardInsightContentButton a data TopCardSecondaryInsight a = TopCardSecondaryInsightNested a | TopCardSecondaryInsightPlain a -- External application :