[{"name":"Cqrs.Command","comment":"\n\n\n## Types\n\n@docs Response\n\n\n## Actions\n\n@docs request, requestTask\n\n\n## Constructors\n\n@docs succeed, fail\n\n\n## Helpers\n\n@docs mapError, succeeded, failed, reason\n\n\n## Codecs\n\n@docs decoder\n\n","unions":[{"name":"Response","comment":" Represents the possible response states of a command.\n","args":[],"cases":[]}],"aliases":[],"values":[{"name":"decoder","comment":" Decodes a given payload into a `Cqrs.Command.Response`.\n","type":"Json.Decode.Decoder Cqrs.Command.Response"},{"name":"fail","comment":" Constructs the `Failed` variant of a `Cqrs.Command.Response`.\n\nThis is useful for testing how your UI will respond to the sad path, without actually sending a command.\n\n","type":"String.String -> Cqrs.Command.Response"},{"name":"failed","comment":" Checks if a given `Cqrs.Command.Response` is a `Failed` variant.\n\n    failed Succeeded --> False\n\n    failed (Failed \"reason\") --> True\n\n","type":"Cqrs.Command.Response -> Basics.Bool"},{"name":"mapError","comment":" Maps the `Failed` variant of a given `Cqrs.Query.Response a`.\n","type":"(String.String -> String.String) -> Cqrs.Command.Response -> Cqrs.Command.Response"},{"name":"reason","comment":" If a given `Cqrs.Command.Response` was unsuccessful, the reason for the failure will be returned.\n\n    reason Succeeded --> Nothing\n\n    reason (Failed \"reason\") --> Just \"reason\"\n\n","type":"Cqrs.Command.Response -> Maybe.Maybe String.String"},{"name":"request","comment":" Sends a command to the given URL with the provided body and returns a parsed `Cqrs.Command.Response` in turn.\n","type":"String.String -> Maybe.Maybe (Http.Error -> String.String) -> Json.Encode.Value -> (Cqrs.Command.Response -> msg) -> Platform.Cmd.Cmd msg"},{"name":"requestTask","comment":" Sends a command to the given URL and returns a `Task` containing the parsed `Cqrs.Command.Response a`.\nThe value contained within the `Cqrs.Command.Response a`, will be the value parsed via the provided decoder.\n","type":"String.String -> Maybe.Maybe (Http.Error -> String.String) -> Json.Encode.Value -> Task.Task () Cqrs.Command.Response"},{"name":"succeed","comment":" Constructs the `Succeeded` variant of a `Cqrs.Command.Response`.\n\nThis is useful for testing how your UI will respond to the happy path, without actually sending a command.\n\n","type":"Cqrs.Command.Response"},{"name":"succeeded","comment":" Checks if a given `Cqrs.Command.Response` is a `Succeeded` variant.\n\n    succeeded Succeeded --> True\n\n    succeeded (Failed \"reason\") --> False\n\n","type":"Cqrs.Command.Response -> Basics.Bool"}],"binops":[]},{"name":"Cqrs.Query","comment":"\n\n\n## Types\n\n@docs Response\n\n\n## Actions\n\n@docs request, requestTask\n\n\n## Constructors\n\n@docs succeed, fail\n\n\n## Helpers\n\n@docs map, mapError, succeeded, failed, data, reason\n\n\n## Codecs\n\n@docs decoder\n\n","unions":[{"name":"Response","comment":" Represents the possible response states of a query.\n","args":["a"],"cases":[]}],"aliases":[],"values":[{"name":"data","comment":" If a given `Cqrs.Query.Response` was successful, the data it contains will be returned.\n\n    data (Data []) --> Just []\n\n    data (Error \"reason\") --> Nothing\n\n","type":"Cqrs.Query.Response a -> Maybe.Maybe a"},{"name":"decoder","comment":" Decodes a given payload into a `Cqrs.Query.Response a`.\n","type":"Json.Decode.Decoder a -> Json.Decode.Decoder (Cqrs.Query.Response a)"},{"name":"fail","comment":" Constructs the `Error` variant of a `Cqrs.Query.Response a`.\n\nThis is useful for testing how your UI will respond to the sad path, without actually sending a query.\n\n","type":"String.String -> Cqrs.Query.Response a"},{"name":"failed","comment":" Checks if a given `Cqrs.Query.Response` is an `Error` variant.\n\n    failed (Data []) --> False\n\n    failed (Error \"reason\") --> True\n\n","type":"Cqrs.Query.Response a -> Basics.Bool"},{"name":"map","comment":" Maps the `Data` variant of a given `Cqrs.Query.Response a` and returns a `Cqrs.Query.Response b`.\n","type":"(a -> b) -> Cqrs.Query.Response a -> Cqrs.Query.Response b"},{"name":"mapError","comment":" Maps the `Error` variant of a given `Cqrs.Query.Response a`.\n","type":"(String.String -> String.String) -> Cqrs.Query.Response a -> Cqrs.Query.Response a"},{"name":"reason","comment":" If a given `Cqrs.Query.Response` was unsuccessful, the reason for the failure will be returned.\n\n    reason (Data []) --> Nothing\n\n    reason (Error \"reason\") --> Just \"reason\"\n\n","type":"Cqrs.Query.Response a -> Maybe.Maybe String.String"},{"name":"request","comment":" Sends a query to the given URL and returns a `Cmd` for the given `msg` containing the parsed `Cqrs.Query.Response a`.\nThe value contained within the `Cqrs.Query.Response a`, will be the value parsed via the provided decoder.\n","type":"String.String -> Maybe.Maybe (Http.Error -> String.String) -> (Cqrs.Query.Response a -> msg) -> Json.Decode.Decoder a -> Platform.Cmd.Cmd msg"},{"name":"requestTask","comment":" Sends a query to the given URL and returns a `Task` which will contain the parsed `Cqrs.Query.Response a`.\nThe value contained within the `Cqrs.Query.Response a`, will be the value parsed via the provided decoder.\n","type":"String.String -> Maybe.Maybe (Http.Error -> String.String) -> Json.Decode.Decoder a -> Task.Task () (Cqrs.Query.Response a)"},{"name":"succeed","comment":" Constructs the `Data` variant of a `Cqrs.Query.Response a`.\n\nThis is useful for testing how your UI will respond to the happy path, without actually sending a query.\n\n","type":"a -> Cqrs.Query.Response a"},{"name":"succeeded","comment":" Checks if a given `Cqrs.Query.Response` is a `Data` variant.\n\n    succeeded (Data []) --> True\n\n    succeeded (Error \"reason\") --> False\n\n","type":"Cqrs.Query.Response a -> Basics.Bool"}],"binops":[]}]