[{"name":"Ginger.Category","comment":"\n\n\n# Definition\n\n@docs Category\n\n\n# Conversions\n\n@docs toString\n@docs fromString\n\n\n# Decode\n\n@docs fromJson\n\n","unions":[{"name":"Category","comment":" ","args":[],"cases":[["Agenda",[]],["Article",[]],["Artifact",[]],["Audio",[]],["Collection",[]],["Document",[]],["Event",[]],["Image",[]],["Location",[]],["Media",[]],["Meta",[]],["News",[]],["Person",[]],["Text",[]],["Video",[]],["Website",[]],["Custom",["String.String"]]]}],"aliases":[],"values":[{"name":"fromJson","comment":" ","type":"Json.Decode.Decoder (List.NonEmpty.NonEmpty Ginger.Category.Category)"},{"name":"fromString","comment":" ","type":"String.String -> Ginger.Category.Category"},{"name":"toString","comment":" ","type":"Ginger.Category.Category -> String.String"}],"binops":[]},{"name":"Ginger.Id","comment":" The Ginger resource id. We 'tag' the resource id with type `Int`\nusing [elm-tagged](https://package.elm-lang.org/packages/joneshf/elm-tagged/2.1.1/).\nThis helps us to not mix up some other `Int` with a resource id by accident.\n\n_The only way to construct a `ResourceId` is by decoding one from some json or\nparsing it out of an url path. This is rather strict and there might be some times\nyou just need to create a random `ResourceId` for whatever reason, this hasn't\ncome up so far, but file an issue if it does._\n\n\n# Definition\n\n@docs ResourceId\n\n\n# Convert\n\n@docs toInt\n@docs toString\n\n\n# Decode\n\n@docs fromUrl\n@docs fromJson\n\n","unions":[],"aliases":[{"name":"ResourceId","comment":" ","args":[],"type":"Tagged.Tagged Ginger.Id.Resource Basics.Int"}],"values":[{"name":"fromJson","comment":" ","type":"Json.Decode.Decoder Ginger.Id.ResourceId"},{"name":"fromUrl","comment":" ","type":"Url.Parser.Parser (Ginger.Id.ResourceId -> a) a"},{"name":"toInt","comment":" ","type":"Ginger.Id.ResourceId -> Basics.Int"},{"name":"toString","comment":" ","type":"Ginger.Id.ResourceId -> String.String"}],"binops":[]},{"name":"Ginger.Media","comment":"\n\n\n# Definitions\n\n@docs Media\n@docs MediaClass\n@docs VideoData\n\n\n# Build & Query\n\n@docs imageUrl\n@docs videoData\n@docs imageClassToString\n@docs empty\n\n\n# Decode\n\n@docs fromJson\n\n","unions":[{"name":"Media","comment":" ","args":[],"cases":[["Image",["Dict.Dict String.String String.String"]],["Video",["Ginger.Media.VideoData"]],["Empty",[]]]},{"name":"MediaClass","comment":" ","args":[],"cases":[["Avatar",[]],["Thumbnail",[]],["Card",[]],["Small",[]],["Medium",[]],["Large",[]],["Cinemascope",[]],["Custom",["String.String"]]]}],"aliases":[{"name":"VideoData","comment":" ","args":[],"type":"{ embedCode : String.String, width : Basics.Int, height : Basics.Int }"}],"values":[{"name":"empty","comment":" ","type":"Ginger.Media.Media"},{"name":"fromJson","comment":" Decode image and video data\n","type":"Json.Decode.Decoder Ginger.Media.Media"},{"name":"imageClassToString","comment":" ","type":"Ginger.Media.MediaClass -> String.String"},{"name":"imageUrl","comment":" The image url with a given `MediaClass`\n","type":"Ginger.Media.MediaClass -> Ginger.Media.Media -> Maybe.Maybe String.String"},{"name":"videoData","comment":" The video data.\n","type":"Ginger.Media.Media -> Maybe.Maybe Ginger.Media.VideoData"}],"binops":[]},{"name":"Ginger.Predicate","comment":"\n\n\n# Definition\n\n@docs Predicate\n\n\n# Conversions\n\n@docs toString\n@docs fromString\n\n\n# Decode\n\n@docs fromJson\n\n","unions":[{"name":"Predicate","comment":" ","args":[],"cases":[["IsAbout",[]],["HasAuthor",[]],["HasDepiction",[]],["HasDocument",[]],["HasBanner",[]],["HasPart",[]],["HasRelation",[]],["Custom",["String.String"]]]}],"aliases":[],"values":[{"name":"fromJson","comment":" ","type":"Json.Decode.Decoder Ginger.Predicate.Predicate"},{"name":"fromString","comment":" ","type":"String.String -> Ginger.Predicate.Predicate"},{"name":"toString","comment":" ","type":"Ginger.Predicate.Predicate -> String.String"}],"binops":[]},{"name":"Ginger.Request","comment":"\n\n\n# Requests\n\nHere are some examples of how you might get Ginger resources.\n\n    import Ginger.Request as Request\n        exposing\n            ( Ordering(..)\n            , QueryParam(..)\n            , SortField(..)\n            )\n\n    query : Cmd Msg\n    query =\n        Request.resourceQuery GotSearchResults\n            [ Text \"amsterdam\" ]\n\n    events : Cmd Msg\n    events =\n        Request.resourceQuery GotEvents\n            [ Upcoming\n            , HasCategory Event\n            , SortBy StartDate Asc\n            ]\n\n@docs resourceById\n@docs resourceByPath\n@docs resourceByName\n@docs resourceQuery\n@docs locationQuery\n\n\n# Search\n\n@docs Results\n\n@docs QueryParam\n@docs Ordering\n@docs SortField\n@docs Operator\n\n@docs queryParamsToBuilder\n\n","unions":[{"name":"Operator","comment":" ","args":[],"cases":[["EQ",[]],["LTE",[]],["LT",[]],["GT",[]],["GTE",[]],["MatchPhrase",[]]]},{"name":"Ordering","comment":" ","args":[],"cases":[["Asc",[]],["Desc",[]]]},{"name":"QueryParam","comment":" Some of these params only work if `mod_elasticsearch` is enabled\n","args":[],"cases":[["ExcludeCategory",["Ginger.Category.Category"]],["Facet",["String.String"]],["Filter",["String.String","Ginger.Request.Operator","String.String"]],["HasCategory",["Ginger.Category.Category"]],["IsUnfinished",[]],["IsUpcoming",[]],["Limit",["Basics.Int"]],["Offset",["Basics.Int"]],["PromoteCategory",["Ginger.Category.Category"]],["SortBy",["Ginger.Request.SortField","Ginger.Request.Ordering"]],["Text",["String.String"]],["Custom",["String.String","String.String"]]]},{"name":"SortField","comment":" ","args":[],"cases":[["PublicationDate",[]],["StartDate",[]]]}],"aliases":[{"name":"Results","comment":" ","args":["a"],"type":"{ results : List.List a, facets : Json.Decode.Value, total : Basics.Int }"}],"values":[{"name":"locationQuery","comment":" ","type":"(Result.Result Http.Error (Ginger.Request.Results Ginger.Resource.Extra.Location) -> msg) -> List.List Ginger.Request.QueryParam -> Platform.Cmd.Cmd msg"},{"name":"queryParamsToBuilder","comment":" Convert this modules `QueryParm` to elm/url `QueryParameter` values\nto use with Url.Builder.\n","type":"List.List Ginger.Request.QueryParam -> List.List Url.Builder.QueryParameter"},{"name":"resourceById","comment":"\n\n    request : (Http.Request Http.Error Resource -> msg) -> Ginger.Id.ResourceId -> Cmd msg\n    request toMsg id =\n        Request.resourceById toMsg id\n\n","type":"(Result.Result Http.Error (Ginger.Resource.Resource Ginger.Resource.WithEdges) -> msg) -> Ginger.Id.ResourceId -> Platform.Cmd.Cmd msg"},{"name":"resourceByName","comment":"\n\n    request : (Http.Request Http.Error Resource -> msg) -> Cmd msg\n    request toMsg =\n        Request.resourceByName toMsg \"home\"\n\n","type":"(Result.Result Http.Error (Ginger.Resource.Resource Ginger.Resource.WithEdges) -> msg) -> String.String -> Platform.Cmd.Cmd msg"},{"name":"resourceByPath","comment":"\n\n    request : (Http.Request Http.Error Resource -> msg) -> Cmd msg\n    request toMsg =\n        Request.resourceByPath toMsg \"/news\"\n\n","type":"(Result.Result Http.Error (Ginger.Resource.Resource Ginger.Resource.WithEdges) -> msg) -> String.String -> Platform.Cmd.Cmd msg"},{"name":"resourceQuery","comment":"\n\n    request : Http.Request Http.Error (List Resource)\n    request =\n        Request.resourceQuery [ Text \"amsterdam\" ]\n\n","type":"(Result.Result Http.Error (Ginger.Request.Results (Ginger.Resource.Resource Ginger.Resource.WithEdges)) -> msg) -> List.List Ginger.Request.QueryParam -> Platform.Cmd.Cmd msg"}],"binops":[]},{"name":"Ginger.Resource","comment":"\n\n\n# Definitions\n\n@docs Resource\n\n@docs WithEdges\n@docs Edge\n@docs Block\n@docs BlockType\n\n\n# Access data\n\n@docs category\n@docs depiction\n@docs depictions\n@docs edgesWithPredicate\n\n\n# Decode\n\n@docs fromJsonWithEdges\n@docs fromJsonWithoutEdges\n\n","unions":[{"name":"BlockType","comment":" ","args":[],"cases":[["Text",[]],["Header",[]],["Page",[]],["Custom",["String.String"]]]}],"aliases":[{"name":"Block","comment":" ","args":[],"type":"{ body : Ginger.Translation.Translation, name : String.String, type_ : Ginger.Resource.BlockType, relatedRscId : Maybe.Maybe Ginger.Id.ResourceId, properties : Json.Decode.Value }"},{"name":"Edge","comment":" A connection to a resource named by `Predicate`\n","args":[],"type":"{ predicate : Ginger.Predicate.Predicate, resource : Ginger.Resource.Resource {} }"},{"name":"Resource","comment":" An Elm representation of a Ginger resource.\n\nNote the `a` in the record definition, this an extensible record.\nThis means it includes _at least_ all of these fields but may have others\nas well. This lets us reason about whether the edges are included in the data,\ncompile time. The Ginger REST API includes edges nested only one level deep,\nbut since the edges are also resources we can re-use this datatype like\n`Resource {}`. This tells use there are _no_ other fields besides the ones here.\n\nSo you'll see this used in function signatures like:\n\n    Resource WithEdges -- has edges\n\n    Resource {} -- does not have the edges\n\n    Resource a -- might have them but the code that's using this doesn't really care\n\n_Note: the `Resource {}` might actually have edges, they are just not fetched._\n\n","args":["a"],"type":"{ a | id : Ginger.Id.ResourceId, title : Ginger.Translation.Translation, body : Ginger.Translation.Translation, subtitle : Ginger.Translation.Translation, summary : Ginger.Translation.Translation, path : String.String, category : List.NonEmpty.NonEmpty Ginger.Category.Category, properties : Json.Decode.Value, publicationDate : Maybe.Maybe Time.Posix, media : Ginger.Media.Media, blocks : List.List Ginger.Resource.Block }"},{"name":"WithEdges","comment":" The record we use to extend `Resource a`.\n\nYou can render a list of resource depictions like so:\n\n    viewDepictions : Resource WithEdges -> List (Html msg)\n    viewDepictions resource =\n        List.map viewImage <|\n            depictions Media.Medium resource\n\nThis next example won't compile because you need a `Resource WithEdges`\nand this signature indicates they are missing.\n\n    viewDepictions : Resource {} -> List (Html msg)\n    viewDepictions resource =\n        List.map viewImage <|\n            depictions Media.Medium resource\n\n","args":[],"type":"{ edges : List.List Ginger.Resource.Edge }"}],"values":[{"name":"category","comment":" The category of a `Resource`.\n\nEvery resource has _one_ category, but can be part of a hierarchy of other\ncategories. For example `news` is part of `text > article > news`. This function\nwill always return the `Category` stored with the `Resource`.\n\n_Note: there hasn't been the need to expose any of the parent categories so far,\nif there is please file an issue._\n\n","type":"Ginger.Resource.Resource a -> Ginger.Category.Category"},{"name":"depiction","comment":" The image url of the `Resource` depiction.\n\nReturns the image url if there is a depiction _and_ the mediaclass exists.\n\n","type":"Ginger.Media.MediaClass -> Ginger.Resource.Resource Ginger.Resource.WithEdges -> Maybe.Maybe String.String"},{"name":"depictions","comment":" The image urls of the `Resource` depictions\n\nReturns a list of image urls if there is a depiction _and_ the mediaclass exists.\n\n","type":"Ginger.Media.MediaClass -> Ginger.Resource.Resource Ginger.Resource.WithEdges -> List.List String.String"},{"name":"edgesWithPredicate","comment":" Return all edges with a given predicate.\n\nThe returned resources won't have any edges themselves, indicated by the `{}`\nin `Resource {}`.\n\n","type":"Ginger.Predicate.Predicate -> Ginger.Resource.Resource Ginger.Resource.WithEdges -> List.List (Ginger.Resource.Resource {})"},{"name":"fromJsonWithEdges","comment":" Decode a `Resource` that has edges.\n","type":"Json.Decode.Decoder (Ginger.Resource.Resource Ginger.Resource.WithEdges)"},{"name":"fromJsonWithoutEdges","comment":" Decode a `Resource` that does not have edges.\n","type":"Json.Decode.Decoder (Ginger.Resource.Resource {})"}],"binops":[]},{"name":"Ginger.Resource.Extra","comment":"\n\n\n# Location\n\n@docs Location\n@docs locationFromJson\n\n\n# Author\n\n@docs AuthorName\n@docs authorName\n@docs authorNameFromJson\n\n\n# Event\n\n@docs EventDate\n@docs eventDate\n@docs eventDateFromJson\n\n","unions":[],"aliases":[{"name":"AuthorName","comment":" ","args":[],"type":"{ firstName : String.String, middleName : String.String, lastNamePrefix : String.String, lastName : String.String }"},{"name":"EventDate","comment":" ","args":[],"type":"{ dateStart : Maybe.Maybe Time.Posix, dateEnd : Maybe.Maybe Time.Posix }"},{"name":"Location","comment":" ","args":[],"type":"{ id : Ginger.Id.ResourceId, lat : Basics.Float, lng : Basics.Float }"}],"values":[{"name":"authorName","comment":" ","type":"Ginger.Resource.Resource Ginger.Resource.WithEdges -> Maybe.Maybe Ginger.Resource.Extra.AuthorName"},{"name":"authorNameFromJson","comment":" ","type":"Json.Decode.Decoder Ginger.Resource.Extra.AuthorName"},{"name":"eventDate","comment":" ","type":"Ginger.Resource.Resource a -> Maybe.Maybe Ginger.Resource.Extra.EventDate"},{"name":"eventDateFromJson","comment":" ","type":"Json.Decode.Decoder Ginger.Resource.Extra.EventDate"},{"name":"locationFromJson","comment":" ","type":"Json.Decode.Decoder Ginger.Resource.Extra.Location"}],"binops":[]},{"name":"Ginger.Translation","comment":"\n\n\n# Definitions\n\n@docs Translation\n@docs Language\n\n\n# Conversion\n\n@docs toString\n@docs withDefault\n@docs fromList\n@docs toIso639\n\n\n# Html\n\n@docs text\n@docs html\n\n\n# Decode\n\n@docs fromJson\n\n","unions":[{"name":"Language","comment":" ","args":[],"cases":[["NL",[]],["EN",[]],["ZH",[]]]},{"name":"Translation","comment":" ","args":[],"cases":[]}],"aliases":[],"values":[{"name":"fromJson","comment":" ","type":"Json.Decode.Decoder Ginger.Translation.Translation"},{"name":"fromList","comment":" Construct a Translation from a list of Language and String value pairs\n","type":"List.List ( Ginger.Translation.Language, String.String ) -> Ginger.Translation.Translation"},{"name":"html","comment":" Translate and render as Html markup\n","type":"Ginger.Translation.Language -> Ginger.Translation.Translation -> Html.Html msg"},{"name":"text","comment":" Translate and render as Html text\n","type":"Ginger.Translation.Language -> Ginger.Translation.Translation -> Html.Html msg"},{"name":"toIso639","comment":" Convert a Language to an [Iso639](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) String\n","type":"Ginger.Translation.Language -> String.String"},{"name":"toString","comment":" Get the translated String value.\n\n_Defaults to an empty String._\n\n","type":"Ginger.Translation.Language -> Ginger.Translation.Translation -> String.String"},{"name":"withDefault","comment":" Get the translated String value.\n\nThe first argument is the fallback Language.\n\n_Attempt fallback if translated value is missing, defaults to an empty String._\n\n","type":"Ginger.Translation.Language -> Ginger.Translation.Language -> Ginger.Translation.Translation -> String.String"}],"binops":[]}]