Configuration for requests resulting in a Task
Configuration settings for a Cqrs.Command.request
Configuration settings for a Cqrs.Command.requestWithConfig
Configuration settings for a Cqrs.Command.requestTask
Configuration settings for a Cqrs.Command.requestTaskWithConfig
Represents the possible types of query which can be executed depending on your needs.
Represents the possible states of a command.
Sends a command to the given URL with the provided body and returns a parsed Cqrs.Command.CommandResponse error in turn.
Similar to request but a StandardRequestConfig can be passed in for cases where customisation of the request headers, etc are desired.
Sends a command to the given URL and returns a Task containing the parsed Cqrs.Command.CommandResponse error.
The value contained within the Cqrs.Command.CommandResponse error, will be the value parsed via the provided decoder.
Similar to requestTask but a TaskRequestConfig can be passed in for cases where customisation of the request headers, etc are desired.
Constructs the Succeeded variant of a Cqrs.Command.CommandResponse error.
This is useful for testing how your UI will respond to the happy path, without actually sending a command.
Constructs the Failed variant of a Cqrs.Command.CommandResponse error.
This is useful for testing how your UI will respond to the sad path, without actually sending a command.
Converts a Result error data to a Cqrs.Command.CommandResponse error
Converts a given WebData (CommandResponse error) into a Cqrs.Command.CommandResponse error.
If a given Cqrs.Command.CommandResponse error was unsuccessful, the reason for the failure will be returned.
reason succeed --> Nothing
reason (fail "reason") --> Just "reason"Maps the Failed variant of a given Cqrs.Command.CommandResponse error.
Convert a CommandResponse error to a value by applying a function if the CommandResponse error is a Succeeded variant or using the provided default value if it is an Failed variant.
Convert a CommandResponse error to a value by applying either the first function if the CommandResponse error is an Failed variant or the second function if the CommandResponse error is a Succeeded variant.
Partitions a series of CommandResponse error instances into a tuple of successful and unsuccessful responses.
Converts a Cqrs.Command.CommandResponse error to a Result error data
Converts a Cqrs.Command.CommandResponse error to a Maybe ()
Checks if a given Cqrs.Command.CommandResponse error is a Succeeded variant.
succeeded succeed --> True
succeeded (fail "reason") --> FalseChecks if a given Cqrs.Command.CommandResponse error is a Failed variant.
failed succeed --> False
failed (fail "reason") --> TrueDecodes a given payload into a Cqrs.Command.CommandResponse error.
Configuration for requests resulting in a
Cmd