{-# LANGUAGE OverloadedLabels #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE NoFieldSelectors #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module WikiMusic.SSR.Backend.Rest () where
import Data.Text (pack)
import Data.UUID (UUID)
import Free.AlaCarte
import Optics
import Relude
import Servant
import Servant.Client
import WikiMusic.Interaction.Model.Artist
import WikiMusic.Interaction.Model.Auth
import WikiMusic.Interaction.Model.Genre
import WikiMusic.Interaction.Model.Song
import WikiMusic.Interaction.Model.User
import WikiMusic.Model.Auth
import WikiMusic.Model.Other
import WikiMusic.SSR.Free.Backend
import WikiMusic.SSR.Model.Api
import WikiMusic.SSR.Model.Env
import WikiMusic.Servant.ApiSpec
instance Exec Backend where
execAlgebra :: forall a. Backend (IO a) -> IO a
execAlgebra (GetArtists Env
env AuthToken
authToken Limit
limit Offset
offset SortOrder
sortOrder Include
include Either Text GetArtistsQueryResponse -> IO a
next) =
Either Text GetArtistsQueryResponse -> IO a
next (Either Text GetArtistsQueryResponse -> IO a)
-> IO (Either Text GetArtistsQueryResponse) -> IO a
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< Env
-> AuthToken
-> Limit
-> Offset
-> SortOrder
-> Include
-> IO (Either Text GetArtistsQueryResponse)
forall (m :: * -> *).
MonadIO m =>
Env
-> AuthToken
-> Limit
-> Offset
-> SortOrder
-> Include
-> m (Either Text GetArtistsQueryResponse)
getArtists' Env
env AuthToken
authToken Limit
limit Offset
offset SortOrder
sortOrder Include
include
execAlgebra (SearchArtists Env
env AuthToken
authToken Text
search Limit
limit Offset
offset SortOrder
sortOrder Include
include Either Text GetArtistsQueryResponse -> IO a
next) =
Either Text GetArtistsQueryResponse -> IO a
next (Either Text GetArtistsQueryResponse -> IO a)
-> IO (Either Text GetArtistsQueryResponse) -> IO a
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< Env
-> AuthToken
-> Text
-> Limit
-> Offset
-> SortOrder
-> Include
-> IO (Either Text GetArtistsQueryResponse)
forall (m :: * -> *).
MonadIO m =>
Env
-> AuthToken
-> Text
-> Limit
-> Offset
-> SortOrder
-> Include
-> m (Either Text GetArtistsQueryResponse)
searchArtists' Env
env AuthToken
authToken Text
search Limit
limit Offset
offset SortOrder
sortOrder Include
include
execAlgebra (GetArtist Env
env AuthToken
authToken UUID
identifier Include
include Either Text GetArtistsQueryResponse -> IO a
next) =
Either Text GetArtistsQueryResponse -> IO a
next (Either Text GetArtistsQueryResponse -> IO a)
-> IO (Either Text GetArtistsQueryResponse) -> IO a
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< Env
-> AuthToken
-> UUID
-> Include
-> IO (Either Text GetArtistsQueryResponse)
forall (m :: * -> *).
MonadIO m =>
Env
-> AuthToken
-> UUID
-> Include
-> m (Either Text GetArtistsQueryResponse)
getArtist' Env
env AuthToken
authToken UUID
identifier Include
include
execAlgebra (CreateArtist Env
env AuthToken
authToken InsertArtistsRequest
r Either Text InsertArtistsCommandResponse -> IO a
next) =
Either Text InsertArtistsCommandResponse -> IO a
next (Either Text InsertArtistsCommandResponse -> IO a)
-> IO (Either Text InsertArtistsCommandResponse) -> IO a
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< Env
-> AuthToken
-> InsertArtistsRequest
-> IO (Either Text InsertArtistsCommandResponse)
forall (m :: * -> *).
MonadIO m =>
Env
-> AuthToken
-> InsertArtistsRequest
-> m (Either Text InsertArtistsCommandResponse)
createArtist' Env
env AuthToken
authToken InsertArtistsRequest
r
execAlgebra (CreateArtistComment Env
env AuthToken
authToken InsertArtistCommentsRequest
r Either Text InsertArtistCommentsCommandResponse -> IO a
next) =
Either Text InsertArtistCommentsCommandResponse -> IO a
next (Either Text InsertArtistCommentsCommandResponse -> IO a)
-> IO (Either Text InsertArtistCommentsCommandResponse) -> IO a
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< Env
-> AuthToken
-> InsertArtistCommentsRequest
-> IO (Either Text InsertArtistCommentsCommandResponse)
forall (m :: * -> *).
MonadIO m =>
Env
-> AuthToken
-> InsertArtistCommentsRequest
-> m (Either Text InsertArtistCommentsCommandResponse)
createArtistComment' Env
env AuthToken
authToken InsertArtistCommentsRequest
r
execAlgebra (UpsertArtistOpinion Env
env AuthToken
authToken UpsertArtistOpinionsRequest
r Either Text UpsertArtistOpinionsCommandResponse -> IO a
next) =
Either Text UpsertArtistOpinionsCommandResponse -> IO a
next (Either Text UpsertArtistOpinionsCommandResponse -> IO a)
-> IO (Either Text UpsertArtistOpinionsCommandResponse) -> IO a
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< Env
-> AuthToken
-> UpsertArtistOpinionsRequest
-> IO (Either Text UpsertArtistOpinionsCommandResponse)
forall (m :: * -> *).
MonadIO m =>
Env
-> AuthToken
-> UpsertArtistOpinionsRequest
-> m (Either Text UpsertArtistOpinionsCommandResponse)
upsertArtistOpinion' Env
env AuthToken
authToken UpsertArtistOpinionsRequest
r
execAlgebra (CreateArtistArtwork Env
env AuthToken
authToken InsertArtistArtworksRequest
r Either Text InsertArtistArtworksCommandResponse -> IO a
next) =
Either Text InsertArtistArtworksCommandResponse -> IO a
next (Either Text InsertArtistArtworksCommandResponse -> IO a)
-> IO (Either Text InsertArtistArtworksCommandResponse) -> IO a
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< Env
-> AuthToken
-> InsertArtistArtworksRequest
-> IO (Either Text InsertArtistArtworksCommandResponse)
forall (m :: * -> *).
MonadIO m =>
Env
-> AuthToken
-> InsertArtistArtworksRequest
-> m (Either Text InsertArtistArtworksCommandResponse)
createArtistArtwork' Env
env AuthToken
authToken InsertArtistArtworksRequest
r
execAlgebra (DeleteArtist Env
env AuthToken
authToken UUID
identifier Either Text () -> IO a
next) =
Either Text () -> IO a
next (Either Text () -> IO a) -> IO (Either Text ()) -> IO a
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< Env -> AuthToken -> UUID -> IO (Either Text ())
forall (m :: * -> *).
MonadIO m =>
Env -> AuthToken -> UUID -> m (Either Text ())
deleteArtist' Env
env AuthToken
authToken UUID
identifier
execAlgebra (DeleteArtistComment Env
env AuthToken
authToken UUID
identifier Either Text () -> IO a
next) =
Either Text () -> IO a
next (Either Text () -> IO a) -> IO (Either Text ()) -> IO a
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< Env -> AuthToken -> UUID -> IO (Either Text ())
forall (m :: * -> *).
MonadIO m =>
Env -> AuthToken -> UUID -> m (Either Text ())
deleteArtistComment' Env
env AuthToken
authToken UUID
identifier
execAlgebra (DeleteArtistOpinion Env
env AuthToken
authToken UUID
identifier Either Text () -> IO a
next) =
Either Text () -> IO a
next (Either Text () -> IO a) -> IO (Either Text ()) -> IO a
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< Env -> AuthToken -> UUID -> IO (Either Text ())
forall (m :: * -> *).
MonadIO m =>
Env -> AuthToken -> UUID -> m (Either Text ())
deleteArtistOpinion' Env
env AuthToken
authToken UUID
identifier
execAlgebra (DeleteArtistArtwork Env
env AuthToken
authToken UUID
identifier Either Text () -> IO a
next) =
Either Text () -> IO a
next (Either Text () -> IO a) -> IO (Either Text ()) -> IO a
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< Env -> AuthToken -> UUID -> IO (Either Text ())
forall (m :: * -> *).
MonadIO m =>
Env -> AuthToken -> UUID -> m (Either Text ())
deleteArtistArtwork' Env
env AuthToken
authToken UUID
identifier
execAlgebra (UpdateArtistArtworkOrder Env
env AuthToken
authToken ArtistArtworkOrderUpdateRequest
r Either Text () -> IO a
next) =
Either Text () -> IO a
next (Either Text () -> IO a) -> IO (Either Text ()) -> IO a
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< Env
-> AuthToken
-> ArtistArtworkOrderUpdateRequest
-> IO (Either Text ())
forall (m :: * -> *).
MonadIO m =>
Env
-> AuthToken
-> ArtistArtworkOrderUpdateRequest
-> m (Either Text ())
updateArtistArtworkOrder' Env
env AuthToken
authToken ArtistArtworkOrderUpdateRequest
r
execAlgebra (EditArtist Env
env AuthToken
authToken ArtistDeltaRequest
r Either Text () -> IO a
next) =
Either Text () -> IO a
next (Either Text () -> IO a) -> IO (Either Text ()) -> IO a
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< Env -> AuthToken -> ArtistDeltaRequest -> IO (Either Text ())
forall (m :: * -> *).
MonadIO m =>
Env -> AuthToken -> ArtistDeltaRequest -> m (Either Text ())
editArtist' Env
env AuthToken
authToken ArtistDeltaRequest
r
execAlgebra (GetGenres Env
env AuthToken
authToken Limit
limit Offset
offset SortOrder
sortOrder Include
include Either Text GetGenresQueryResponse -> IO a
next) =
Either Text GetGenresQueryResponse -> IO a
next (Either Text GetGenresQueryResponse -> IO a)
-> IO (Either Text GetGenresQueryResponse) -> IO a
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< Env
-> AuthToken
-> Limit
-> Offset
-> SortOrder
-> Include
-> IO (Either Text GetGenresQueryResponse)
forall (m :: * -> *).
MonadIO m =>
Env
-> AuthToken
-> Limit
-> Offset
-> SortOrder
-> Include
-> m (Either Text GetGenresQueryResponse)
getGenres' Env
env AuthToken
authToken Limit
limit Offset
offset SortOrder
sortOrder Include
include
execAlgebra (SearchGenres Env
env AuthToken
authToken Text
search Limit
limit Offset
offset SortOrder
sortOrder Include
include Either Text GetGenresQueryResponse -> IO a
next) =
Either Text GetGenresQueryResponse -> IO a
next (Either Text GetGenresQueryResponse -> IO a)
-> IO (Either Text GetGenresQueryResponse) -> IO a
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< Env
-> AuthToken
-> Text
-> Limit
-> Offset
-> SortOrder
-> Include
-> IO (Either Text GetGenresQueryResponse)
forall (m :: * -> *).
MonadIO m =>
Env
-> AuthToken
-> Text
-> Limit
-> Offset
-> SortOrder
-> Include
-> m (Either Text GetGenresQueryResponse)
searchGenres' Env
env AuthToken
authToken Text
search Limit
limit Offset
offset SortOrder
sortOrder Include
include
execAlgebra (GetGenre Env
env AuthToken
authToken UUID
identifier Include
include Either Text GetGenresQueryResponse -> IO a
next) =
Either Text GetGenresQueryResponse -> IO a
next (Either Text GetGenresQueryResponse -> IO a)
-> IO (Either Text GetGenresQueryResponse) -> IO a
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< Env
-> AuthToken
-> UUID
-> Include
-> IO (Either Text GetGenresQueryResponse)
forall (m :: * -> *).
MonadIO m =>
Env
-> AuthToken
-> UUID
-> Include
-> m (Either Text GetGenresQueryResponse)
getGenre' Env
env AuthToken
authToken UUID
identifier Include
include
execAlgebra (CreateGenre Env
env AuthToken
authToken InsertGenresRequest
r Either Text InsertGenresCommandResponse -> IO a
next) =
Either Text InsertGenresCommandResponse -> IO a
next (Either Text InsertGenresCommandResponse -> IO a)
-> IO (Either Text InsertGenresCommandResponse) -> IO a
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< Env
-> AuthToken
-> InsertGenresRequest
-> IO (Either Text InsertGenresCommandResponse)
forall (m :: * -> *).
MonadIO m =>
Env
-> AuthToken
-> InsertGenresRequest
-> m (Either Text InsertGenresCommandResponse)
createGenre' Env
env AuthToken
authToken InsertGenresRequest
r
execAlgebra (CreateGenreComment Env
env AuthToken
authToken InsertGenreCommentsRequest
r Either Text InsertGenreCommentsCommandResponse -> IO a
next) =
Either Text InsertGenreCommentsCommandResponse -> IO a
next (Either Text InsertGenreCommentsCommandResponse -> IO a)
-> IO (Either Text InsertGenreCommentsCommandResponse) -> IO a
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< Env
-> AuthToken
-> InsertGenreCommentsRequest
-> IO (Either Text InsertGenreCommentsCommandResponse)
forall (m :: * -> *).
MonadIO m =>
Env
-> AuthToken
-> InsertGenreCommentsRequest
-> m (Either Text InsertGenreCommentsCommandResponse)
createGenreComment' Env
env AuthToken
authToken InsertGenreCommentsRequest
r
execAlgebra (UpsertGenreOpinion Env
env AuthToken
authToken UpsertGenreOpinionsRequest
r Either Text UpsertGenreOpinionsCommandResponse -> IO a
next) =
Either Text UpsertGenreOpinionsCommandResponse -> IO a
next (Either Text UpsertGenreOpinionsCommandResponse -> IO a)
-> IO (Either Text UpsertGenreOpinionsCommandResponse) -> IO a
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< Env
-> AuthToken
-> UpsertGenreOpinionsRequest
-> IO (Either Text UpsertGenreOpinionsCommandResponse)
forall (m :: * -> *).
MonadIO m =>
Env
-> AuthToken
-> UpsertGenreOpinionsRequest
-> m (Either Text UpsertGenreOpinionsCommandResponse)
upsertGenreOpinion' Env
env AuthToken
authToken UpsertGenreOpinionsRequest
r
execAlgebra (CreateGenreArtwork Env
env AuthToken
authToken InsertGenreArtworksRequest
r Either Text InsertGenreArtworksCommandResponse -> IO a
next) =
Either Text InsertGenreArtworksCommandResponse -> IO a
next (Either Text InsertGenreArtworksCommandResponse -> IO a)
-> IO (Either Text InsertGenreArtworksCommandResponse) -> IO a
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< Env
-> AuthToken
-> InsertGenreArtworksRequest
-> IO (Either Text InsertGenreArtworksCommandResponse)
forall (m :: * -> *).
MonadIO m =>
Env
-> AuthToken
-> InsertGenreArtworksRequest
-> m (Either Text InsertGenreArtworksCommandResponse)
createGenreArtwork' Env
env AuthToken
authToken InsertGenreArtworksRequest
r
execAlgebra (DeleteGenre Env
env AuthToken
authToken UUID
identifier Either Text () -> IO a
next) =
Either Text () -> IO a
next (Either Text () -> IO a) -> IO (Either Text ()) -> IO a
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< Env -> AuthToken -> UUID -> IO (Either Text ())
forall (m :: * -> *).
MonadIO m =>
Env -> AuthToken -> UUID -> m (Either Text ())
deleteGenre' Env
env AuthToken
authToken UUID
identifier
execAlgebra (DeleteGenreComment Env
env AuthToken
authToken UUID
identifier Either Text () -> IO a
next) =
Either Text () -> IO a
next (Either Text () -> IO a) -> IO (Either Text ()) -> IO a
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< Env -> AuthToken -> UUID -> IO (Either Text ())
forall (m :: * -> *).
MonadIO m =>
Env -> AuthToken -> UUID -> m (Either Text ())
deleteGenreComment' Env
env AuthToken
authToken UUID
identifier
execAlgebra (DeleteGenreOpinion Env
env AuthToken
authToken UUID
identifier Either Text () -> IO a
next) =
Either Text () -> IO a
next (Either Text () -> IO a) -> IO (Either Text ()) -> IO a
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< Env -> AuthToken -> UUID -> IO (Either Text ())
forall (m :: * -> *).
MonadIO m =>
Env -> AuthToken -> UUID -> m (Either Text ())
deleteGenreOpinion' Env
env AuthToken
authToken UUID
identifier
execAlgebra (DeleteGenreArtwork Env
env AuthToken
authToken UUID
identifier Either Text () -> IO a
next) =
Either Text () -> IO a
next (Either Text () -> IO a) -> IO (Either Text ()) -> IO a
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< Env -> AuthToken -> UUID -> IO (Either Text ())
forall (m :: * -> *).
MonadIO m =>
Env -> AuthToken -> UUID -> m (Either Text ())
deleteGenreArtwork' Env
env AuthToken
authToken UUID
identifier
execAlgebra (UpdateGenreArtworkOrder Env
env AuthToken
authToken GenreArtworkOrderUpdateRequest
r Either Text () -> IO a
next) =
Either Text () -> IO a
next (Either Text () -> IO a) -> IO (Either Text ()) -> IO a
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< Env
-> AuthToken
-> GenreArtworkOrderUpdateRequest
-> IO (Either Text ())
forall (m :: * -> *).
MonadIO m =>
Env
-> AuthToken
-> GenreArtworkOrderUpdateRequest
-> m (Either Text ())
updateGenreArtworkOrder' Env
env AuthToken
authToken GenreArtworkOrderUpdateRequest
r
execAlgebra (EditGenre Env
env AuthToken
authToken GenreDeltaRequest
r Either Text () -> IO a
next) =
Either Text () -> IO a
next (Either Text () -> IO a) -> IO (Either Text ()) -> IO a
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< Env -> AuthToken -> GenreDeltaRequest -> IO (Either Text ())
forall (m :: * -> *).
MonadIO m =>
Env -> AuthToken -> GenreDeltaRequest -> m (Either Text ())
editGenre' Env
env AuthToken
authToken GenreDeltaRequest
r
execAlgebra (GetSongs Env
env AuthToken
authToken Limit
limit Offset
offset SortOrder
sortOrder Include
include Either Text GetSongsQueryResponse -> IO a
next) =
Either Text GetSongsQueryResponse -> IO a
next (Either Text GetSongsQueryResponse -> IO a)
-> IO (Either Text GetSongsQueryResponse) -> IO a
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< Env
-> AuthToken
-> Limit
-> Offset
-> SortOrder
-> Include
-> IO (Either Text GetSongsQueryResponse)
forall (m :: * -> *).
MonadIO m =>
Env
-> AuthToken
-> Limit
-> Offset
-> SortOrder
-> Include
-> m (Either Text GetSongsQueryResponse)
getSongs' Env
env AuthToken
authToken Limit
limit Offset
offset SortOrder
sortOrder Include
include
execAlgebra (SearchSongs Env
env AuthToken
authToken Text
search Limit
limit Offset
offset SortOrder
sortOrder Include
include Either Text GetSongsQueryResponse -> IO a
next) =
Either Text GetSongsQueryResponse -> IO a
next (Either Text GetSongsQueryResponse -> IO a)
-> IO (Either Text GetSongsQueryResponse) -> IO a
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< Env
-> AuthToken
-> Text
-> Limit
-> Offset
-> SortOrder
-> Include
-> IO (Either Text GetSongsQueryResponse)
forall (m :: * -> *).
MonadIO m =>
Env
-> AuthToken
-> Text
-> Limit
-> Offset
-> SortOrder
-> Include
-> m (Either Text GetSongsQueryResponse)
searchSongs' Env
env AuthToken
authToken Text
search Limit
limit Offset
offset SortOrder
sortOrder Include
include
execAlgebra (GetSong Env
env AuthToken
authToken UUID
identifier Include
include Either Text GetSongsQueryResponse -> IO a
next) =
Either Text GetSongsQueryResponse -> IO a
next (Either Text GetSongsQueryResponse -> IO a)
-> IO (Either Text GetSongsQueryResponse) -> IO a
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< Env
-> AuthToken
-> UUID
-> Include
-> IO (Either Text GetSongsQueryResponse)
forall (m :: * -> *).
MonadIO m =>
Env
-> AuthToken
-> UUID
-> Include
-> m (Either Text GetSongsQueryResponse)
getSong' Env
env AuthToken
authToken UUID
identifier Include
include
execAlgebra (CreateSong Env
env AuthToken
authToken InsertSongsRequest
r Either Text InsertSongsCommandResponse -> IO a
next) =
Either Text InsertSongsCommandResponse -> IO a
next (Either Text InsertSongsCommandResponse -> IO a)
-> IO (Either Text InsertSongsCommandResponse) -> IO a
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< Env
-> AuthToken
-> InsertSongsRequest
-> IO (Either Text InsertSongsCommandResponse)
forall (m :: * -> *).
MonadIO m =>
Env
-> AuthToken
-> InsertSongsRequest
-> m (Either Text InsertSongsCommandResponse)
createSong' Env
env AuthToken
authToken InsertSongsRequest
r
execAlgebra (CreateSongComment Env
env AuthToken
authToken InsertSongCommentsRequest
r Either Text InsertSongCommentsCommandResponse -> IO a
next) =
Either Text InsertSongCommentsCommandResponse -> IO a
next (Either Text InsertSongCommentsCommandResponse -> IO a)
-> IO (Either Text InsertSongCommentsCommandResponse) -> IO a
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< Env
-> AuthToken
-> InsertSongCommentsRequest
-> IO (Either Text InsertSongCommentsCommandResponse)
forall (m :: * -> *).
MonadIO m =>
Env
-> AuthToken
-> InsertSongCommentsRequest
-> m (Either Text InsertSongCommentsCommandResponse)
createSongComment' Env
env AuthToken
authToken InsertSongCommentsRequest
r
execAlgebra (UpsertSongOpinion Env
env AuthToken
authToken UpsertSongOpinionsRequest
r Either Text UpsertSongOpinionsCommandResponse -> IO a
next) =
Either Text UpsertSongOpinionsCommandResponse -> IO a
next (Either Text UpsertSongOpinionsCommandResponse -> IO a)
-> IO (Either Text UpsertSongOpinionsCommandResponse) -> IO a
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< Env
-> AuthToken
-> UpsertSongOpinionsRequest
-> IO (Either Text UpsertSongOpinionsCommandResponse)
forall (m :: * -> *).
MonadIO m =>
Env
-> AuthToken
-> UpsertSongOpinionsRequest
-> m (Either Text UpsertSongOpinionsCommandResponse)
upsertSongOpinion' Env
env AuthToken
authToken UpsertSongOpinionsRequest
r
execAlgebra (CreateSongArtwork Env
env AuthToken
authToken InsertSongArtworksRequest
r Either Text InsertSongArtworksCommandResponse -> IO a
next) =
Either Text InsertSongArtworksCommandResponse -> IO a
next (Either Text InsertSongArtworksCommandResponse -> IO a)
-> IO (Either Text InsertSongArtworksCommandResponse) -> IO a
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< Env
-> AuthToken
-> InsertSongArtworksRequest
-> IO (Either Text InsertSongArtworksCommandResponse)
forall (m :: * -> *).
MonadIO m =>
Env
-> AuthToken
-> InsertSongArtworksRequest
-> m (Either Text InsertSongArtworksCommandResponse)
createSongArtwork' Env
env AuthToken
authToken InsertSongArtworksRequest
r
execAlgebra (CreateArtistOfSong Env
env AuthToken
authToken InsertArtistsOfSongsRequest
r Either Text InsertArtistsOfSongCommandResponse -> IO a
next) =
Either Text InsertArtistsOfSongCommandResponse -> IO a
next (Either Text InsertArtistsOfSongCommandResponse -> IO a)
-> IO (Either Text InsertArtistsOfSongCommandResponse) -> IO a
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< Env
-> AuthToken
-> InsertArtistsOfSongsRequest
-> IO (Either Text InsertArtistsOfSongCommandResponse)
forall (m :: * -> *).
MonadIO m =>
Env
-> AuthToken
-> InsertArtistsOfSongsRequest
-> m (Either Text InsertArtistsOfSongCommandResponse)
createArtistOfSong' Env
env AuthToken
authToken InsertArtistsOfSongsRequest
r
execAlgebra (DeleteArtistOfSong Env
env AuthToken
authToken InsertArtistsOfSongsRequest
r Either Text () -> IO a
next) =
Either Text () -> IO a
next (Either Text () -> IO a) -> IO (Either Text ()) -> IO a
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< Env
-> AuthToken -> InsertArtistsOfSongsRequest -> IO (Either Text ())
forall (m :: * -> *).
MonadIO m =>
Env
-> AuthToken -> InsertArtistsOfSongsRequest -> m (Either Text ())
deleteArtistOfSong' Env
env AuthToken
authToken InsertArtistsOfSongsRequest
r
execAlgebra (DeleteSong Env
env AuthToken
authToken UUID
identifier Either Text () -> IO a
next) =
Either Text () -> IO a
next (Either Text () -> IO a) -> IO (Either Text ()) -> IO a
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< Env -> AuthToken -> UUID -> IO (Either Text ())
forall (m :: * -> *).
MonadIO m =>
Env -> AuthToken -> UUID -> m (Either Text ())
deleteSong' Env
env AuthToken
authToken UUID
identifier
execAlgebra (DeleteSongComment Env
env AuthToken
authToken UUID
identifier Either Text () -> IO a
next) =
Either Text () -> IO a
next (Either Text () -> IO a) -> IO (Either Text ()) -> IO a
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< Env -> AuthToken -> UUID -> IO (Either Text ())
forall (m :: * -> *).
MonadIO m =>
Env -> AuthToken -> UUID -> m (Either Text ())
deleteSongComment' Env
env AuthToken
authToken UUID
identifier
execAlgebra (DeleteSongOpinion Env
env AuthToken
authToken UUID
identifier Either Text () -> IO a
next) =
Either Text () -> IO a
next (Either Text () -> IO a) -> IO (Either Text ()) -> IO a
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< Env -> AuthToken -> UUID -> IO (Either Text ())
forall (m :: * -> *).
MonadIO m =>
Env -> AuthToken -> UUID -> m (Either Text ())
deleteSongOpinion' Env
env AuthToken
authToken UUID
identifier
execAlgebra (DeleteSongArtwork Env
env AuthToken
authToken UUID
identifier Either Text () -> IO a
next) =
Either Text () -> IO a
next (Either Text () -> IO a) -> IO (Either Text ()) -> IO a
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< Env -> AuthToken -> UUID -> IO (Either Text ())
forall (m :: * -> *).
MonadIO m =>
Env -> AuthToken -> UUID -> m (Either Text ())
deleteSongArtwork' Env
env AuthToken
authToken UUID
identifier
execAlgebra (UpdateSongArtworkOrder Env
env AuthToken
authToken SongArtworkOrderUpdateRequest
r Either Text () -> IO a
next) =
Either Text () -> IO a
next (Either Text () -> IO a) -> IO (Either Text ()) -> IO a
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< Env
-> AuthToken
-> SongArtworkOrderUpdateRequest
-> IO (Either Text ())
forall (m :: * -> *).
MonadIO m =>
Env
-> AuthToken -> SongArtworkOrderUpdateRequest -> m (Either Text ())
updateSongArtworkOrder' Env
env AuthToken
authToken SongArtworkOrderUpdateRequest
r
execAlgebra (EditSong Env
env AuthToken
authToken SongDeltaRequest
r Either Text () -> IO a
next) =
Either Text () -> IO a
next (Either Text () -> IO a) -> IO (Either Text ()) -> IO a
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< Env -> AuthToken -> SongDeltaRequest -> IO (Either Text ())
forall (m :: * -> *).
MonadIO m =>
Env -> AuthToken -> SongDeltaRequest -> m (Either Text ())
editSong' Env
env AuthToken
authToken SongDeltaRequest
r
execAlgebra (CreateSongContents Env
env AuthToken
authToken InsertSongContentsRequest
r Either Text InsertSongContentsCommandResponse -> IO a
next) =
Either Text InsertSongContentsCommandResponse -> IO a
next (Either Text InsertSongContentsCommandResponse -> IO a)
-> IO (Either Text InsertSongContentsCommandResponse) -> IO a
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< Env
-> AuthToken
-> InsertSongContentsRequest
-> IO (Either Text InsertSongContentsCommandResponse)
forall (m :: * -> *).
MonadIO m =>
Env
-> AuthToken
-> InsertSongContentsRequest
-> m (Either Text InsertSongContentsCommandResponse)
createSongContents' Env
env AuthToken
authToken InsertSongContentsRequest
r
execAlgebra (DeleteSongContents Env
env AuthToken
authToken UUID
identifier Either Text () -> IO a
next) =
Either Text () -> IO a
next (Either Text () -> IO a) -> IO (Either Text ()) -> IO a
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< Env -> AuthToken -> UUID -> IO (Either Text ())
forall (m :: * -> *).
MonadIO m =>
Env -> AuthToken -> UUID -> m (Either Text ())
deleteSongContents' Env
env AuthToken
authToken UUID
identifier
execAlgebra (EditSongContents Env
env AuthToken
authToken SongContentDeltaRequest
r Either Text () -> IO a
next) =
Either Text () -> IO a
next (Either Text () -> IO a) -> IO (Either Text ()) -> IO a
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< Env -> AuthToken -> SongContentDeltaRequest -> IO (Either Text ())
forall (m :: * -> *).
MonadIO m =>
Env -> AuthToken -> SongContentDeltaRequest -> m (Either Text ())
editSongContents' Env
env AuthToken
authToken SongContentDeltaRequest
r
execAlgebra (Me Env
env AuthToken
authToken Either Text GetMeQueryResponse -> IO a
next) =
Either Text GetMeQueryResponse -> IO a
next (Either Text GetMeQueryResponse -> IO a)
-> IO (Either Text GetMeQueryResponse) -> IO a
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< Env -> AuthToken -> IO (Either Text GetMeQueryResponse)
forall (m :: * -> *).
MonadIO m =>
Env -> AuthToken -> m (Either Text GetMeQueryResponse)
me' Env
env AuthToken
authToken
execAlgebra (UserInvite Env
env AuthToken
authToken InviteUsersRequest
r Either Text MakeResetPasswordLinkResponse -> IO a
next) =
Either Text MakeResetPasswordLinkResponse -> IO a
next (Either Text MakeResetPasswordLinkResponse -> IO a)
-> IO (Either Text MakeResetPasswordLinkResponse) -> IO a
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< Env
-> AuthToken
-> InviteUsersRequest
-> IO (Either Text MakeResetPasswordLinkResponse)
forall (m :: * -> *).
MonadIO m =>
Env
-> AuthToken
-> InviteUsersRequest
-> m (Either Text MakeResetPasswordLinkResponse)
userInvite' Env
env AuthToken
authToken InviteUsersRequest
r
execAlgebra (UserDelete Env
env AuthToken
authToken DeleteUsersRequest
r Either Text () -> IO a
next) =
Either Text () -> IO a
next (Either Text () -> IO a) -> IO (Either Text ()) -> IO a
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< Env -> AuthToken -> DeleteUsersRequest -> IO (Either Text ())
forall (m :: * -> *).
MonadIO m =>
Env -> AuthToken -> DeleteUsersRequest -> m (Either Text ())
userDelete' Env
env AuthToken
authToken DeleteUsersRequest
r
execAlgebra (Login Env
env LoginRequest
loginRequest Either Text Text -> IO a
next) =
Either Text Text -> IO a
next (Either Text Text -> IO a) -> IO (Either Text Text) -> IO a
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< Env -> LoginRequest -> IO (Either Text Text)
forall (m :: * -> *).
MonadIO m =>
Env -> LoginRequest -> m (Either Text Text)
login' Env
env LoginRequest
loginRequest
execAlgebra (ResetPassword Env
env Text
r Either Text MakeResetPasswordLinkResponse -> IO a
next) =
Either Text MakeResetPasswordLinkResponse -> IO a
next (Either Text MakeResetPasswordLinkResponse -> IO a)
-> IO (Either Text MakeResetPasswordLinkResponse) -> IO a
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< Env -> Text -> IO (Either Text MakeResetPasswordLinkResponse)
forall (m :: * -> *).
MonadIO m =>
Env -> Text -> m (Either Text MakeResetPasswordLinkResponse)
resetPassword' Env
env Text
r
execAlgebra (ResetPasswordDo Env
env DoPasswordResetRequest
r Either Text () -> IO a
next) =
Either Text () -> IO a
next (Either Text () -> IO a) -> IO (Either Text ()) -> IO a
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< Env -> DoPasswordResetRequest -> IO (Either Text ())
forall (m :: * -> *).
MonadIO m =>
Env -> DoPasswordResetRequest -> m (Either Text ())
resetPasswordDo' Env
env DoPasswordResetRequest
r
execAlgebra (SystemInformation Env
env Either Text SystemInformationResponse -> IO a
next) =
Either Text SystemInformationResponse -> IO a
next (Either Text SystemInformationResponse -> IO a)
-> IO (Either Text SystemInformationResponse) -> IO a
forall (m :: * -> *) a b. Monad m => (a -> m b) -> m a -> m b
=<< Env -> IO (Either Text SystemInformationResponse)
forall (m :: * -> *).
MonadIO m =>
Env -> m (Either Text SystemInformationResponse)
systemInformation' Env
env
getArtists' :: (MonadIO m) => Env -> AuthToken -> Limit -> Offset -> SortOrder -> Include -> m (Either Text GetArtistsQueryResponse)
getArtists' :: forall (m :: * -> *).
MonadIO m =>
Env
-> AuthToken
-> Limit
-> Offset
-> SortOrder
-> Include
-> m (Either Text GetArtistsQueryResponse)
getArtists' Env
env AuthToken
authToken (Limit Int
limit) (Offset Int
offset) SortOrder
sortOrder Include
include = do
Env
-> ClientM GetArtistsQueryResponse
-> m (Either Text GetArtistsQueryResponse)
forall (m :: * -> *) r.
MonadIO m =>
Env -> ClientM r -> m (Either Text r)
doRest Env
env
(ClientM GetArtistsQueryResponse
-> m (Either Text GetArtistsQueryResponse))
-> ClientM GetArtistsQueryResponse
-> m (Either Text GetArtistsQueryResponse)
forall a b. (a -> b) -> a -> b
$ Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> ClientM GetArtistsQueryResponse
getArtistsHTTP (Text -> Maybe Text
forall a. a -> Maybe a
Just (Text -> Maybe Text) -> Text -> Maybe Text
forall a b. (a -> b) -> a -> b
$ AuthToken
authToken AuthToken -> Optic' An_Iso NoIx AuthToken Text -> Text
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. Optic' An_Iso NoIx AuthToken Text
#value) (Int -> Maybe Int
forall a. a -> Maybe a
Just Int
limit) (Int -> Maybe Int
forall a. a -> Maybe a
Just Int
offset) (Text -> Maybe Text
forall a. a -> Maybe a
Just (Text -> Maybe Text) -> Text -> Maybe Text
forall a b. (a -> b) -> a -> b
$ SortOrder
sortOrder SortOrder -> Optic' An_Iso NoIx SortOrder Text -> Text
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. Optic' An_Iso NoIx SortOrder Text
#value) (Text -> Maybe Text
forall a. a -> Maybe a
Just (Text -> Maybe Text) -> Text -> Maybe Text
forall a b. (a -> b) -> a -> b
$ Include
include Include -> Optic' An_Iso NoIx Include Text -> Text
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. Optic' An_Iso NoIx Include Text
#value)
searchArtists' :: (MonadIO m) => Env -> AuthToken -> Text -> Limit -> Offset -> SortOrder -> Include -> m (Either Text GetArtistsQueryResponse)
searchArtists' :: forall (m :: * -> *).
MonadIO m =>
Env
-> AuthToken
-> Text
-> Limit
-> Offset
-> SortOrder
-> Include
-> m (Either Text GetArtistsQueryResponse)
searchArtists' Env
env AuthToken
authToken Text
search (Limit Int
limit) (Offset Int
offset) SortOrder
sortOrder Include
include = do
Env
-> ClientM GetArtistsQueryResponse
-> m (Either Text GetArtistsQueryResponse)
forall (m :: * -> *) r.
MonadIO m =>
Env -> ClientM r -> m (Either Text r)
doRest Env
env
(ClientM GetArtistsQueryResponse
-> m (Either Text GetArtistsQueryResponse))
-> ClientM GetArtistsQueryResponse
-> m (Either Text GetArtistsQueryResponse)
forall a b. (a -> b) -> a -> b
$ Maybe Text
-> Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> ClientM GetArtistsQueryResponse
searchArtistsHTTP (Text -> Maybe Text
forall a. a -> Maybe a
Just (Text -> Maybe Text) -> Text -> Maybe Text
forall a b. (a -> b) -> a -> b
$ AuthToken
authToken AuthToken -> Optic' An_Iso NoIx AuthToken Text -> Text
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. Optic' An_Iso NoIx AuthToken Text
#value) Text
search (Int -> Maybe Int
forall a. a -> Maybe a
Just Int
limit) (Int -> Maybe Int
forall a. a -> Maybe a
Just Int
offset) (Text -> Maybe Text
forall a. a -> Maybe a
Just (Text -> Maybe Text) -> Text -> Maybe Text
forall a b. (a -> b) -> a -> b
$ SortOrder
sortOrder SortOrder -> Optic' An_Iso NoIx SortOrder Text -> Text
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. Optic' An_Iso NoIx SortOrder Text
#value) (Text -> Maybe Text
forall a. a -> Maybe a
Just (Text -> Maybe Text) -> Text -> Maybe Text
forall a b. (a -> b) -> a -> b
$ Include
include Include -> Optic' An_Iso NoIx Include Text -> Text
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. Optic' An_Iso NoIx Include Text
#value)
getArtist' :: (MonadIO m) => Env -> AuthToken -> UUID -> Include -> m (Either Text GetArtistsQueryResponse)
getArtist' :: forall (m :: * -> *).
MonadIO m =>
Env
-> AuthToken
-> UUID
-> Include
-> m (Either Text GetArtistsQueryResponse)
getArtist' Env
env AuthToken
authToken UUID
identifier Include
include = do
Env
-> ClientM GetArtistsQueryResponse
-> m (Either Text GetArtistsQueryResponse)
forall (m :: * -> *) r.
MonadIO m =>
Env -> ClientM r -> m (Either Text r)
doRest Env
env
(ClientM GetArtistsQueryResponse
-> m (Either Text GetArtistsQueryResponse))
-> ClientM GetArtistsQueryResponse
-> m (Either Text GetArtistsQueryResponse)
forall a b. (a -> b) -> a -> b
$ Maybe Text
-> UUID
-> Maybe Text
-> Maybe Text
-> ClientM GetArtistsQueryResponse
getArtistHTTP (Text -> Maybe Text
forall a. a -> Maybe a
Just (Text -> Maybe Text) -> Text -> Maybe Text
forall a b. (a -> b) -> a -> b
$ AuthToken
authToken AuthToken -> Optic' An_Iso NoIx AuthToken Text -> Text
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. Optic' An_Iso NoIx AuthToken Text
#value) UUID
identifier Maybe Text
forall a. Maybe a
Nothing (Text -> Maybe Text
forall a. a -> Maybe a
Just (Text -> Maybe Text) -> Text -> Maybe Text
forall a b. (a -> b) -> a -> b
$ Include
include Include -> Optic' An_Iso NoIx Include Text -> Text
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. Optic' An_Iso NoIx Include Text
#value)
createArtist' :: (MonadIO m) => Env -> AuthToken -> InsertArtistsRequest -> m (Either Text InsertArtistsCommandResponse)
createArtist' :: forall (m :: * -> *).
MonadIO m =>
Env
-> AuthToken
-> InsertArtistsRequest
-> m (Either Text InsertArtistsCommandResponse)
createArtist' Env
env AuthToken
authToken InsertArtistsRequest
r = do
Env
-> ClientM InsertArtistsCommandResponse
-> m (Either Text InsertArtistsCommandResponse)
forall (m :: * -> *) r.
MonadIO m =>
Env -> ClientM r -> m (Either Text r)
doRest Env
env
(ClientM InsertArtistsCommandResponse
-> m (Either Text InsertArtistsCommandResponse))
-> ClientM InsertArtistsCommandResponse
-> m (Either Text InsertArtistsCommandResponse)
forall a b. (a -> b) -> a -> b
$ Maybe Text
-> InsertArtistsRequest -> ClientM InsertArtistsCommandResponse
createArtistHTTP (Text -> Maybe Text
forall a. a -> Maybe a
Just (Text -> Maybe Text) -> Text -> Maybe Text
forall a b. (a -> b) -> a -> b
$ AuthToken
authToken AuthToken -> Optic' An_Iso NoIx AuthToken Text -> Text
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. Optic' An_Iso NoIx AuthToken Text
#value) InsertArtistsRequest
r
createArtistComment' :: (MonadIO m) => Env -> AuthToken -> InsertArtistCommentsRequest -> m (Either Text InsertArtistCommentsCommandResponse)
Env
env AuthToken
authToken InsertArtistCommentsRequest
r = do
Env
-> ClientM InsertArtistCommentsCommandResponse
-> m (Either Text InsertArtistCommentsCommandResponse)
forall (m :: * -> *) r.
MonadIO m =>
Env -> ClientM r -> m (Either Text r)
doRest Env
env
(ClientM InsertArtistCommentsCommandResponse
-> m (Either Text InsertArtistCommentsCommandResponse))
-> ClientM InsertArtistCommentsCommandResponse
-> m (Either Text InsertArtistCommentsCommandResponse)
forall a b. (a -> b) -> a -> b
$ Maybe Text
-> InsertArtistCommentsRequest
-> ClientM InsertArtistCommentsCommandResponse
createArtistCommentHTTP (Text -> Maybe Text
forall a. a -> Maybe a
Just (Text -> Maybe Text) -> Text -> Maybe Text
forall a b. (a -> b) -> a -> b
$ AuthToken
authToken AuthToken -> Optic' An_Iso NoIx AuthToken Text -> Text
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. Optic' An_Iso NoIx AuthToken Text
#value) InsertArtistCommentsRequest
r
upsertArtistOpinion' :: (MonadIO m) => Env -> AuthToken -> UpsertArtistOpinionsRequest -> m (Either Text UpsertArtistOpinionsCommandResponse)
upsertArtistOpinion' :: forall (m :: * -> *).
MonadIO m =>
Env
-> AuthToken
-> UpsertArtistOpinionsRequest
-> m (Either Text UpsertArtistOpinionsCommandResponse)
upsertArtistOpinion' Env
env AuthToken
authToken UpsertArtistOpinionsRequest
r = do
Env
-> ClientM UpsertArtistOpinionsCommandResponse
-> m (Either Text UpsertArtistOpinionsCommandResponse)
forall (m :: * -> *) r.
MonadIO m =>
Env -> ClientM r -> m (Either Text r)
doRest Env
env
(ClientM UpsertArtistOpinionsCommandResponse
-> m (Either Text UpsertArtistOpinionsCommandResponse))
-> ClientM UpsertArtistOpinionsCommandResponse
-> m (Either Text UpsertArtistOpinionsCommandResponse)
forall a b. (a -> b) -> a -> b
$ Maybe Text
-> UpsertArtistOpinionsRequest
-> ClientM UpsertArtistOpinionsCommandResponse
upsertArtistOpinionHTTP (Text -> Maybe Text
forall a. a -> Maybe a
Just (Text -> Maybe Text) -> Text -> Maybe Text
forall a b. (a -> b) -> a -> b
$ AuthToken
authToken AuthToken -> Optic' An_Iso NoIx AuthToken Text -> Text
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. Optic' An_Iso NoIx AuthToken Text
#value) UpsertArtistOpinionsRequest
r
createArtistArtwork' :: (MonadIO m) => Env -> AuthToken -> InsertArtistArtworksRequest -> m (Either Text InsertArtistArtworksCommandResponse)
createArtistArtwork' :: forall (m :: * -> *).
MonadIO m =>
Env
-> AuthToken
-> InsertArtistArtworksRequest
-> m (Either Text InsertArtistArtworksCommandResponse)
createArtistArtwork' Env
env AuthToken
authToken InsertArtistArtworksRequest
r = do
Env
-> ClientM InsertArtistArtworksCommandResponse
-> m (Either Text InsertArtistArtworksCommandResponse)
forall (m :: * -> *) r.
MonadIO m =>
Env -> ClientM r -> m (Either Text r)
doRest Env
env
(ClientM InsertArtistArtworksCommandResponse
-> m (Either Text InsertArtistArtworksCommandResponse))
-> ClientM InsertArtistArtworksCommandResponse
-> m (Either Text InsertArtistArtworksCommandResponse)
forall a b. (a -> b) -> a -> b
$ Maybe Text
-> InsertArtistArtworksRequest
-> ClientM InsertArtistArtworksCommandResponse
createArtistArtworkHTTP (Text -> Maybe Text
forall a. a -> Maybe a
Just (Text -> Maybe Text) -> Text -> Maybe Text
forall a b. (a -> b) -> a -> b
$ AuthToken
authToken AuthToken -> Optic' An_Iso NoIx AuthToken Text -> Text
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. Optic' An_Iso NoIx AuthToken Text
#value) InsertArtistArtworksRequest
r
deleteArtist' :: (MonadIO m) => Env -> AuthToken -> UUID -> m (Either Text ())
deleteArtist' :: forall (m :: * -> *).
MonadIO m =>
Env -> AuthToken -> UUID -> m (Either Text ())
deleteArtist' Env
env AuthToken
authToken UUID
identifier = do
Env -> ClientM () -> m (Either Text ())
forall (m :: * -> *) r.
MonadIO m =>
Env -> ClientM r -> m (Either Text r)
doRest Env
env
(ClientM () -> m (Either Text ()))
-> ClientM () -> m (Either Text ())
forall a b. (a -> b) -> a -> b
$ Maybe Text -> UUID -> ClientM ()
deleteArtistHTTP (Text -> Maybe Text
forall a. a -> Maybe a
Just (Text -> Maybe Text) -> Text -> Maybe Text
forall a b. (a -> b) -> a -> b
$ AuthToken
authToken AuthToken -> Optic' An_Iso NoIx AuthToken Text -> Text
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. Optic' An_Iso NoIx AuthToken Text
#value) UUID
identifier
deleteArtistComment' :: (MonadIO m) => Env -> AuthToken -> UUID -> m (Either Text ())
Env
env AuthToken
authToken UUID
identifier = do
Env -> ClientM () -> m (Either Text ())
forall (m :: * -> *) r.
MonadIO m =>
Env -> ClientM r -> m (Either Text r)
doRest Env
env
(ClientM () -> m (Either Text ()))
-> ClientM () -> m (Either Text ())
forall a b. (a -> b) -> a -> b
$ Maybe Text -> UUID -> ClientM ()
deleteArtistCommentHTTP (Text -> Maybe Text
forall a. a -> Maybe a
Just (Text -> Maybe Text) -> Text -> Maybe Text
forall a b. (a -> b) -> a -> b
$ AuthToken
authToken AuthToken -> Optic' An_Iso NoIx AuthToken Text -> Text
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. Optic' An_Iso NoIx AuthToken Text
#value) UUID
identifier
deleteArtistOpinion' :: (MonadIO m) => Env -> AuthToken -> UUID -> m (Either Text ())
deleteArtistOpinion' :: forall (m :: * -> *).
MonadIO m =>
Env -> AuthToken -> UUID -> m (Either Text ())
deleteArtistOpinion' Env
env AuthToken
authToken UUID
identifier = do
Env -> ClientM () -> m (Either Text ())
forall (m :: * -> *) r.
MonadIO m =>
Env -> ClientM r -> m (Either Text r)
doRest Env
env
(ClientM () -> m (Either Text ()))
-> ClientM () -> m (Either Text ())
forall a b. (a -> b) -> a -> b
$ Maybe Text -> UUID -> ClientM ()
deleteArtistOpinionHTTP (Text -> Maybe Text
forall a. a -> Maybe a
Just (Text -> Maybe Text) -> Text -> Maybe Text
forall a b. (a -> b) -> a -> b
$ AuthToken
authToken AuthToken -> Optic' An_Iso NoIx AuthToken Text -> Text
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. Optic' An_Iso NoIx AuthToken Text
#value) UUID
identifier
deleteArtistArtwork' :: (MonadIO m) => Env -> AuthToken -> UUID -> m (Either Text ())
deleteArtistArtwork' :: forall (m :: * -> *).
MonadIO m =>
Env -> AuthToken -> UUID -> m (Either Text ())
deleteArtistArtwork' Env
env AuthToken
authToken UUID
identifier = do
Env -> ClientM () -> m (Either Text ())
forall (m :: * -> *) r.
MonadIO m =>
Env -> ClientM r -> m (Either Text r)
doRest Env
env
(ClientM () -> m (Either Text ()))
-> ClientM () -> m (Either Text ())
forall a b. (a -> b) -> a -> b
$ Maybe Text -> UUID -> ClientM ()
deleteArtistArtworkHTTP (Text -> Maybe Text
forall a. a -> Maybe a
Just (Text -> Maybe Text) -> Text -> Maybe Text
forall a b. (a -> b) -> a -> b
$ AuthToken
authToken AuthToken -> Optic' An_Iso NoIx AuthToken Text -> Text
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. Optic' An_Iso NoIx AuthToken Text
#value) UUID
identifier
updateArtistArtworkOrder' :: (MonadIO m) => Env -> AuthToken -> ArtistArtworkOrderUpdateRequest -> m (Either Text ())
updateArtistArtworkOrder' :: forall (m :: * -> *).
MonadIO m =>
Env
-> AuthToken
-> ArtistArtworkOrderUpdateRequest
-> m (Either Text ())
updateArtistArtworkOrder' Env
env AuthToken
authToken ArtistArtworkOrderUpdateRequest
r = do
Env -> ClientM () -> m (Either Text ())
forall (m :: * -> *) r.
MonadIO m =>
Env -> ClientM r -> m (Either Text r)
doRest Env
env
(ClientM () -> m (Either Text ()))
-> ClientM () -> m (Either Text ())
forall a b. (a -> b) -> a -> b
$ Maybe Text -> ArtistArtworkOrderUpdateRequest -> ClientM ()
updateArtistArtworkOrderHTTP (Text -> Maybe Text
forall a. a -> Maybe a
Just (Text -> Maybe Text) -> Text -> Maybe Text
forall a b. (a -> b) -> a -> b
$ AuthToken
authToken AuthToken -> Optic' An_Iso NoIx AuthToken Text -> Text
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. Optic' An_Iso NoIx AuthToken Text
#value) ArtistArtworkOrderUpdateRequest
r
editArtist' :: (MonadIO m) => Env -> AuthToken -> ArtistDeltaRequest -> m (Either Text ())
editArtist' :: forall (m :: * -> *).
MonadIO m =>
Env -> AuthToken -> ArtistDeltaRequest -> m (Either Text ())
editArtist' Env
env AuthToken
authToken ArtistDeltaRequest
r = do
Env -> ClientM () -> m (Either Text ())
forall (m :: * -> *) r.
MonadIO m =>
Env -> ClientM r -> m (Either Text r)
doRest Env
env
(ClientM () -> m (Either Text ()))
-> ClientM () -> m (Either Text ())
forall a b. (a -> b) -> a -> b
$ Maybe Text -> ArtistDeltaRequest -> ClientM ()
editArtistHTTP (Text -> Maybe Text
forall a. a -> Maybe a
Just (Text -> Maybe Text) -> Text -> Maybe Text
forall a b. (a -> b) -> a -> b
$ AuthToken
authToken AuthToken -> Optic' An_Iso NoIx AuthToken Text -> Text
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. Optic' An_Iso NoIx AuthToken Text
#value) ArtistDeltaRequest
r
getGenres' :: (MonadIO m) => Env -> AuthToken -> Limit -> Offset -> SortOrder -> Include -> m (Either Text GetGenresQueryResponse)
getGenres' :: forall (m :: * -> *).
MonadIO m =>
Env
-> AuthToken
-> Limit
-> Offset
-> SortOrder
-> Include
-> m (Either Text GetGenresQueryResponse)
getGenres' Env
env AuthToken
authToken (Limit Int
limit) (Offset Int
offset) SortOrder
sortOrder Include
include = do
Env
-> ClientM GetGenresQueryResponse
-> m (Either Text GetGenresQueryResponse)
forall (m :: * -> *) r.
MonadIO m =>
Env -> ClientM r -> m (Either Text r)
doRest Env
env
(ClientM GetGenresQueryResponse
-> m (Either Text GetGenresQueryResponse))
-> ClientM GetGenresQueryResponse
-> m (Either Text GetGenresQueryResponse)
forall a b. (a -> b) -> a -> b
$ Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> ClientM GetGenresQueryResponse
getGenresHTTP (Text -> Maybe Text
forall a. a -> Maybe a
Just (Text -> Maybe Text) -> Text -> Maybe Text
forall a b. (a -> b) -> a -> b
$ AuthToken
authToken AuthToken -> Optic' An_Iso NoIx AuthToken Text -> Text
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. Optic' An_Iso NoIx AuthToken Text
#value) (Int -> Maybe Int
forall a. a -> Maybe a
Just Int
limit) (Int -> Maybe Int
forall a. a -> Maybe a
Just Int
offset) (Text -> Maybe Text
forall a. a -> Maybe a
Just (Text -> Maybe Text) -> Text -> Maybe Text
forall a b. (a -> b) -> a -> b
$ SortOrder
sortOrder SortOrder -> Optic' An_Iso NoIx SortOrder Text -> Text
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. Optic' An_Iso NoIx SortOrder Text
#value) (Text -> Maybe Text
forall a. a -> Maybe a
Just (Text -> Maybe Text) -> Text -> Maybe Text
forall a b. (a -> b) -> a -> b
$ Include
include Include -> Optic' An_Iso NoIx Include Text -> Text
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. Optic' An_Iso NoIx Include Text
#value)
searchGenres' :: (MonadIO m) => Env -> AuthToken -> Text -> Limit -> Offset -> SortOrder -> Include -> m (Either Text GetGenresQueryResponse)
searchGenres' :: forall (m :: * -> *).
MonadIO m =>
Env
-> AuthToken
-> Text
-> Limit
-> Offset
-> SortOrder
-> Include
-> m (Either Text GetGenresQueryResponse)
searchGenres' Env
env AuthToken
authToken Text
search (Limit Int
limit) (Offset Int
offset) SortOrder
sortOrder Include
include = do
Env
-> ClientM GetGenresQueryResponse
-> m (Either Text GetGenresQueryResponse)
forall (m :: * -> *) r.
MonadIO m =>
Env -> ClientM r -> m (Either Text r)
doRest Env
env
(ClientM GetGenresQueryResponse
-> m (Either Text GetGenresQueryResponse))
-> ClientM GetGenresQueryResponse
-> m (Either Text GetGenresQueryResponse)
forall a b. (a -> b) -> a -> b
$ Maybe Text
-> Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> ClientM GetGenresQueryResponse
searchGenresHTTP (Text -> Maybe Text
forall a. a -> Maybe a
Just (Text -> Maybe Text) -> Text -> Maybe Text
forall a b. (a -> b) -> a -> b
$ AuthToken
authToken AuthToken -> Optic' An_Iso NoIx AuthToken Text -> Text
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. Optic' An_Iso NoIx AuthToken Text
#value) Text
search (Int -> Maybe Int
forall a. a -> Maybe a
Just Int
limit) (Int -> Maybe Int
forall a. a -> Maybe a
Just Int
offset) (Text -> Maybe Text
forall a. a -> Maybe a
Just (Text -> Maybe Text) -> Text -> Maybe Text
forall a b. (a -> b) -> a -> b
$ SortOrder
sortOrder SortOrder -> Optic' An_Iso NoIx SortOrder Text -> Text
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. Optic' An_Iso NoIx SortOrder Text
#value) (Text -> Maybe Text
forall a. a -> Maybe a
Just (Text -> Maybe Text) -> Text -> Maybe Text
forall a b. (a -> b) -> a -> b
$ Include
include Include -> Optic' An_Iso NoIx Include Text -> Text
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. Optic' An_Iso NoIx Include Text
#value)
getGenre' :: (MonadIO m) => Env -> AuthToken -> UUID -> Include -> m (Either Text GetGenresQueryResponse)
getGenre' :: forall (m :: * -> *).
MonadIO m =>
Env
-> AuthToken
-> UUID
-> Include
-> m (Either Text GetGenresQueryResponse)
getGenre' Env
env AuthToken
authToken UUID
identifier Include
include = do
Env
-> ClientM GetGenresQueryResponse
-> m (Either Text GetGenresQueryResponse)
forall (m :: * -> *) r.
MonadIO m =>
Env -> ClientM r -> m (Either Text r)
doRest Env
env
(ClientM GetGenresQueryResponse
-> m (Either Text GetGenresQueryResponse))
-> ClientM GetGenresQueryResponse
-> m (Either Text GetGenresQueryResponse)
forall a b. (a -> b) -> a -> b
$ Maybe Text
-> UUID
-> Maybe Text
-> Maybe Text
-> ClientM GetGenresQueryResponse
getGenreHTTP (Text -> Maybe Text
forall a. a -> Maybe a
Just (Text -> Maybe Text) -> Text -> Maybe Text
forall a b. (a -> b) -> a -> b
$ AuthToken
authToken AuthToken -> Optic' An_Iso NoIx AuthToken Text -> Text
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. Optic' An_Iso NoIx AuthToken Text
#value) UUID
identifier Maybe Text
forall a. Maybe a
Nothing (Text -> Maybe Text
forall a. a -> Maybe a
Just (Text -> Maybe Text) -> Text -> Maybe Text
forall a b. (a -> b) -> a -> b
$ Include
include Include -> Optic' An_Iso NoIx Include Text -> Text
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. Optic' An_Iso NoIx Include Text
#value)
createGenre' :: (MonadIO m) => Env -> AuthToken -> InsertGenresRequest -> m (Either Text InsertGenresCommandResponse)
createGenre' :: forall (m :: * -> *).
MonadIO m =>
Env
-> AuthToken
-> InsertGenresRequest
-> m (Either Text InsertGenresCommandResponse)
createGenre' Env
env AuthToken
authToken InsertGenresRequest
r = do
Env
-> ClientM InsertGenresCommandResponse
-> m (Either Text InsertGenresCommandResponse)
forall (m :: * -> *) r.
MonadIO m =>
Env -> ClientM r -> m (Either Text r)
doRest Env
env
(ClientM InsertGenresCommandResponse
-> m (Either Text InsertGenresCommandResponse))
-> ClientM InsertGenresCommandResponse
-> m (Either Text InsertGenresCommandResponse)
forall a b. (a -> b) -> a -> b
$ Maybe Text
-> InsertGenresRequest -> ClientM InsertGenresCommandResponse
createGenreHTTP (Text -> Maybe Text
forall a. a -> Maybe a
Just (Text -> Maybe Text) -> Text -> Maybe Text
forall a b. (a -> b) -> a -> b
$ AuthToken
authToken AuthToken -> Optic' An_Iso NoIx AuthToken Text -> Text
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. Optic' An_Iso NoIx AuthToken Text
#value) InsertGenresRequest
r
createGenreComment' :: (MonadIO m) => Env -> AuthToken -> InsertGenreCommentsRequest -> m (Either Text InsertGenreCommentsCommandResponse)
Env
env AuthToken
authToken InsertGenreCommentsRequest
r = do
Env
-> ClientM InsertGenreCommentsCommandResponse
-> m (Either Text InsertGenreCommentsCommandResponse)
forall (m :: * -> *) r.
MonadIO m =>
Env -> ClientM r -> m (Either Text r)
doRest Env
env
(ClientM InsertGenreCommentsCommandResponse
-> m (Either Text InsertGenreCommentsCommandResponse))
-> ClientM InsertGenreCommentsCommandResponse
-> m (Either Text InsertGenreCommentsCommandResponse)
forall a b. (a -> b) -> a -> b
$ Maybe Text
-> InsertGenreCommentsRequest
-> ClientM InsertGenreCommentsCommandResponse
createGenreCommentHTTP (Text -> Maybe Text
forall a. a -> Maybe a
Just (Text -> Maybe Text) -> Text -> Maybe Text
forall a b. (a -> b) -> a -> b
$ AuthToken
authToken AuthToken -> Optic' An_Iso NoIx AuthToken Text -> Text
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. Optic' An_Iso NoIx AuthToken Text
#value) InsertGenreCommentsRequest
r
upsertGenreOpinion' :: (MonadIO m) => Env -> AuthToken -> UpsertGenreOpinionsRequest -> m (Either Text UpsertGenreOpinionsCommandResponse)
upsertGenreOpinion' :: forall (m :: * -> *).
MonadIO m =>
Env
-> AuthToken
-> UpsertGenreOpinionsRequest
-> m (Either Text UpsertGenreOpinionsCommandResponse)
upsertGenreOpinion' Env
env AuthToken
authToken UpsertGenreOpinionsRequest
r = do
Env
-> ClientM UpsertGenreOpinionsCommandResponse
-> m (Either Text UpsertGenreOpinionsCommandResponse)
forall (m :: * -> *) r.
MonadIO m =>
Env -> ClientM r -> m (Either Text r)
doRest Env
env
(ClientM UpsertGenreOpinionsCommandResponse
-> m (Either Text UpsertGenreOpinionsCommandResponse))
-> ClientM UpsertGenreOpinionsCommandResponse
-> m (Either Text UpsertGenreOpinionsCommandResponse)
forall a b. (a -> b) -> a -> b
$ Maybe Text
-> UpsertGenreOpinionsRequest
-> ClientM UpsertGenreOpinionsCommandResponse
upsertGenreOpinionHTTP (Text -> Maybe Text
forall a. a -> Maybe a
Just (Text -> Maybe Text) -> Text -> Maybe Text
forall a b. (a -> b) -> a -> b
$ AuthToken
authToken AuthToken -> Optic' An_Iso NoIx AuthToken Text -> Text
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. Optic' An_Iso NoIx AuthToken Text
#value) UpsertGenreOpinionsRequest
r
createGenreArtwork' :: (MonadIO m) => Env -> AuthToken -> InsertGenreArtworksRequest -> m (Either Text InsertGenreArtworksCommandResponse)
createGenreArtwork' :: forall (m :: * -> *).
MonadIO m =>
Env
-> AuthToken
-> InsertGenreArtworksRequest
-> m (Either Text InsertGenreArtworksCommandResponse)
createGenreArtwork' Env
env AuthToken
authToken InsertGenreArtworksRequest
r = do
Env
-> ClientM InsertGenreArtworksCommandResponse
-> m (Either Text InsertGenreArtworksCommandResponse)
forall (m :: * -> *) r.
MonadIO m =>
Env -> ClientM r -> m (Either Text r)
doRest Env
env
(ClientM InsertGenreArtworksCommandResponse
-> m (Either Text InsertGenreArtworksCommandResponse))
-> ClientM InsertGenreArtworksCommandResponse
-> m (Either Text InsertGenreArtworksCommandResponse)
forall a b. (a -> b) -> a -> b
$ Maybe Text
-> InsertGenreArtworksRequest
-> ClientM InsertGenreArtworksCommandResponse
createGenreArtworkHTTP (Text -> Maybe Text
forall a. a -> Maybe a
Just (Text -> Maybe Text) -> Text -> Maybe Text
forall a b. (a -> b) -> a -> b
$ AuthToken
authToken AuthToken -> Optic' An_Iso NoIx AuthToken Text -> Text
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. Optic' An_Iso NoIx AuthToken Text
#value) InsertGenreArtworksRequest
r
deleteGenre' :: (MonadIO m) => Env -> AuthToken -> UUID -> m (Either Text ())
deleteGenre' :: forall (m :: * -> *).
MonadIO m =>
Env -> AuthToken -> UUID -> m (Either Text ())
deleteGenre' Env
env AuthToken
authToken UUID
identifier = do
Env -> ClientM () -> m (Either Text ())
forall (m :: * -> *) r.
MonadIO m =>
Env -> ClientM r -> m (Either Text r)
doRest Env
env
(ClientM () -> m (Either Text ()))
-> ClientM () -> m (Either Text ())
forall a b. (a -> b) -> a -> b
$ Maybe Text -> UUID -> ClientM ()
deleteGenreHTTP (Text -> Maybe Text
forall a. a -> Maybe a
Just (Text -> Maybe Text) -> Text -> Maybe Text
forall a b. (a -> b) -> a -> b
$ AuthToken
authToken AuthToken -> Optic' An_Iso NoIx AuthToken Text -> Text
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. Optic' An_Iso NoIx AuthToken Text
#value) UUID
identifier
deleteGenreComment' :: (MonadIO m) => Env -> AuthToken -> UUID -> m (Either Text ())
Env
env AuthToken
authToken UUID
identifier = do
Env -> ClientM () -> m (Either Text ())
forall (m :: * -> *) r.
MonadIO m =>
Env -> ClientM r -> m (Either Text r)
doRest Env
env
(ClientM () -> m (Either Text ()))
-> ClientM () -> m (Either Text ())
forall a b. (a -> b) -> a -> b
$ Maybe Text -> UUID -> ClientM ()
deleteGenreCommentHTTP (Text -> Maybe Text
forall a. a -> Maybe a
Just (Text -> Maybe Text) -> Text -> Maybe Text
forall a b. (a -> b) -> a -> b
$ AuthToken
authToken AuthToken -> Optic' An_Iso NoIx AuthToken Text -> Text
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. Optic' An_Iso NoIx AuthToken Text
#value) UUID
identifier
deleteGenreOpinion' :: (MonadIO m) => Env -> AuthToken -> UUID -> m (Either Text ())
deleteGenreOpinion' :: forall (m :: * -> *).
MonadIO m =>
Env -> AuthToken -> UUID -> m (Either Text ())
deleteGenreOpinion' Env
env AuthToken
authToken UUID
identifier = do
Env -> ClientM () -> m (Either Text ())
forall (m :: * -> *) r.
MonadIO m =>
Env -> ClientM r -> m (Either Text r)
doRest Env
env
(ClientM () -> m (Either Text ()))
-> ClientM () -> m (Either Text ())
forall a b. (a -> b) -> a -> b
$ Maybe Text -> UUID -> ClientM ()
deleteGenreOpinionHTTP (Text -> Maybe Text
forall a. a -> Maybe a
Just (Text -> Maybe Text) -> Text -> Maybe Text
forall a b. (a -> b) -> a -> b
$ AuthToken
authToken AuthToken -> Optic' An_Iso NoIx AuthToken Text -> Text
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. Optic' An_Iso NoIx AuthToken Text
#value) UUID
identifier
deleteGenreArtwork' :: (MonadIO m) => Env -> AuthToken -> UUID -> m (Either Text ())
deleteGenreArtwork' :: forall (m :: * -> *).
MonadIO m =>
Env -> AuthToken -> UUID -> m (Either Text ())
deleteGenreArtwork' Env
env AuthToken
authToken UUID
identifier = do
Env -> ClientM () -> m (Either Text ())
forall (m :: * -> *) r.
MonadIO m =>
Env -> ClientM r -> m (Either Text r)
doRest Env
env
(ClientM () -> m (Either Text ()))
-> ClientM () -> m (Either Text ())
forall a b. (a -> b) -> a -> b
$ Maybe Text -> UUID -> ClientM ()
deleteGenreArtworkHTTP (Text -> Maybe Text
forall a. a -> Maybe a
Just (Text -> Maybe Text) -> Text -> Maybe Text
forall a b. (a -> b) -> a -> b
$ AuthToken
authToken AuthToken -> Optic' An_Iso NoIx AuthToken Text -> Text
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. Optic' An_Iso NoIx AuthToken Text
#value) UUID
identifier
updateGenreArtworkOrder' :: (MonadIO m) => Env -> AuthToken -> GenreArtworkOrderUpdateRequest -> m (Either Text ())
updateGenreArtworkOrder' :: forall (m :: * -> *).
MonadIO m =>
Env
-> AuthToken
-> GenreArtworkOrderUpdateRequest
-> m (Either Text ())
updateGenreArtworkOrder' Env
env AuthToken
authToken GenreArtworkOrderUpdateRequest
r = do
Env -> ClientM () -> m (Either Text ())
forall (m :: * -> *) r.
MonadIO m =>
Env -> ClientM r -> m (Either Text r)
doRest Env
env
(ClientM () -> m (Either Text ()))
-> ClientM () -> m (Either Text ())
forall a b. (a -> b) -> a -> b
$ Maybe Text -> GenreArtworkOrderUpdateRequest -> ClientM ()
updateGenreArtworkOrderHTTP (Text -> Maybe Text
forall a. a -> Maybe a
Just (Text -> Maybe Text) -> Text -> Maybe Text
forall a b. (a -> b) -> a -> b
$ AuthToken
authToken AuthToken -> Optic' An_Iso NoIx AuthToken Text -> Text
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. Optic' An_Iso NoIx AuthToken Text
#value) GenreArtworkOrderUpdateRequest
r
editGenre' :: (MonadIO m) => Env -> AuthToken -> GenreDeltaRequest -> m (Either Text ())
editGenre' :: forall (m :: * -> *).
MonadIO m =>
Env -> AuthToken -> GenreDeltaRequest -> m (Either Text ())
editGenre' Env
env AuthToken
authToken GenreDeltaRequest
r = do
Env -> ClientM () -> m (Either Text ())
forall (m :: * -> *) r.
MonadIO m =>
Env -> ClientM r -> m (Either Text r)
doRest Env
env
(ClientM () -> m (Either Text ()))
-> ClientM () -> m (Either Text ())
forall a b. (a -> b) -> a -> b
$ Maybe Text -> GenreDeltaRequest -> ClientM ()
editGenreHTTP (Text -> Maybe Text
forall a. a -> Maybe a
Just (Text -> Maybe Text) -> Text -> Maybe Text
forall a b. (a -> b) -> a -> b
$ AuthToken
authToken AuthToken -> Optic' An_Iso NoIx AuthToken Text -> Text
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. Optic' An_Iso NoIx AuthToken Text
#value) GenreDeltaRequest
r
getSongs' :: (MonadIO m) => Env -> AuthToken -> Limit -> Offset -> SortOrder -> Include -> m (Either Text GetSongsQueryResponse)
getSongs' :: forall (m :: * -> *).
MonadIO m =>
Env
-> AuthToken
-> Limit
-> Offset
-> SortOrder
-> Include
-> m (Either Text GetSongsQueryResponse)
getSongs' Env
env AuthToken
authToken (Limit Int
limit) (Offset Int
offset) SortOrder
sortOrder Include
include = do
Env
-> ClientM GetSongsQueryResponse
-> m (Either Text GetSongsQueryResponse)
forall (m :: * -> *) r.
MonadIO m =>
Env -> ClientM r -> m (Either Text r)
doRest Env
env
(ClientM GetSongsQueryResponse
-> m (Either Text GetSongsQueryResponse))
-> ClientM GetSongsQueryResponse
-> m (Either Text GetSongsQueryResponse)
forall a b. (a -> b) -> a -> b
$ Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> ClientM GetSongsQueryResponse
getSongsHTTP (Text -> Maybe Text
forall a. a -> Maybe a
Just (Text -> Maybe Text) -> Text -> Maybe Text
forall a b. (a -> b) -> a -> b
$ AuthToken
authToken AuthToken -> Optic' An_Iso NoIx AuthToken Text -> Text
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. Optic' An_Iso NoIx AuthToken Text
#value) (Int -> Maybe Int
forall a. a -> Maybe a
Just Int
limit) (Int -> Maybe Int
forall a. a -> Maybe a
Just Int
offset) (Text -> Maybe Text
forall a. a -> Maybe a
Just (Text -> Maybe Text) -> Text -> Maybe Text
forall a b. (a -> b) -> a -> b
$ SortOrder
sortOrder SortOrder -> Optic' An_Iso NoIx SortOrder Text -> Text
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. Optic' An_Iso NoIx SortOrder Text
#value) (Text -> Maybe Text
forall a. a -> Maybe a
Just (Text -> Maybe Text) -> Text -> Maybe Text
forall a b. (a -> b) -> a -> b
$ Include
include Include -> Optic' An_Iso NoIx Include Text -> Text
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. Optic' An_Iso NoIx Include Text
#value)
searchSongs' :: (MonadIO m) => Env -> AuthToken -> Text -> Limit -> Offset -> SortOrder -> Include -> m (Either Text GetSongsQueryResponse)
searchSongs' :: forall (m :: * -> *).
MonadIO m =>
Env
-> AuthToken
-> Text
-> Limit
-> Offset
-> SortOrder
-> Include
-> m (Either Text GetSongsQueryResponse)
searchSongs' Env
env AuthToken
authToken Text
search (Limit Int
limit) (Offset Int
offset) SortOrder
sortOrder Include
include = do
Env
-> ClientM GetSongsQueryResponse
-> m (Either Text GetSongsQueryResponse)
forall (m :: * -> *) r.
MonadIO m =>
Env -> ClientM r -> m (Either Text r)
doRest Env
env
(ClientM GetSongsQueryResponse
-> m (Either Text GetSongsQueryResponse))
-> ClientM GetSongsQueryResponse
-> m (Either Text GetSongsQueryResponse)
forall a b. (a -> b) -> a -> b
$ Maybe Text
-> Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> ClientM GetSongsQueryResponse
searchSongsHTTP (Text -> Maybe Text
forall a. a -> Maybe a
Just (Text -> Maybe Text) -> Text -> Maybe Text
forall a b. (a -> b) -> a -> b
$ AuthToken
authToken AuthToken -> Optic' An_Iso NoIx AuthToken Text -> Text
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. Optic' An_Iso NoIx AuthToken Text
#value) Text
search (Int -> Maybe Int
forall a. a -> Maybe a
Just Int
limit) (Int -> Maybe Int
forall a. a -> Maybe a
Just Int
offset) (Text -> Maybe Text
forall a. a -> Maybe a
Just (Text -> Maybe Text) -> Text -> Maybe Text
forall a b. (a -> b) -> a -> b
$ SortOrder
sortOrder SortOrder -> Optic' An_Iso NoIx SortOrder Text -> Text
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. Optic' An_Iso NoIx SortOrder Text
#value) (Text -> Maybe Text
forall a. a -> Maybe a
Just (Text -> Maybe Text) -> Text -> Maybe Text
forall a b. (a -> b) -> a -> b
$ Include
include Include -> Optic' An_Iso NoIx Include Text -> Text
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. Optic' An_Iso NoIx Include Text
#value)
getSong' :: (MonadIO m) => Env -> AuthToken -> UUID -> Include -> m (Either Text GetSongsQueryResponse)
getSong' :: forall (m :: * -> *).
MonadIO m =>
Env
-> AuthToken
-> UUID
-> Include
-> m (Either Text GetSongsQueryResponse)
getSong' Env
env AuthToken
authToken UUID
identifier Include
include = do
Env
-> ClientM GetSongsQueryResponse
-> m (Either Text GetSongsQueryResponse)
forall (m :: * -> *) r.
MonadIO m =>
Env -> ClientM r -> m (Either Text r)
doRest Env
env
(ClientM GetSongsQueryResponse
-> m (Either Text GetSongsQueryResponse))
-> ClientM GetSongsQueryResponse
-> m (Either Text GetSongsQueryResponse)
forall a b. (a -> b) -> a -> b
$ Maybe Text
-> UUID
-> Maybe Text
-> Maybe Text
-> ClientM GetSongsQueryResponse
getSongHTTP (Text -> Maybe Text
forall a. a -> Maybe a
Just (Text -> Maybe Text) -> Text -> Maybe Text
forall a b. (a -> b) -> a -> b
$ AuthToken
authToken AuthToken -> Optic' An_Iso NoIx AuthToken Text -> Text
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. Optic' An_Iso NoIx AuthToken Text
#value) UUID
identifier Maybe Text
forall a. Maybe a
Nothing (Text -> Maybe Text
forall a. a -> Maybe a
Just (Text -> Maybe Text) -> Text -> Maybe Text
forall a b. (a -> b) -> a -> b
$ Include
include Include -> Optic' An_Iso NoIx Include Text -> Text
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. Optic' An_Iso NoIx Include Text
#value)
createSong' :: (MonadIO m) => Env -> AuthToken -> InsertSongsRequest -> m (Either Text InsertSongsCommandResponse)
createSong' :: forall (m :: * -> *).
MonadIO m =>
Env
-> AuthToken
-> InsertSongsRequest
-> m (Either Text InsertSongsCommandResponse)
createSong' Env
env AuthToken
authToken InsertSongsRequest
r = do
Env
-> ClientM InsertSongsCommandResponse
-> m (Either Text InsertSongsCommandResponse)
forall (m :: * -> *) r.
MonadIO m =>
Env -> ClientM r -> m (Either Text r)
doRest Env
env
(ClientM InsertSongsCommandResponse
-> m (Either Text InsertSongsCommandResponse))
-> ClientM InsertSongsCommandResponse
-> m (Either Text InsertSongsCommandResponse)
forall a b. (a -> b) -> a -> b
$ Maybe Text
-> InsertSongsRequest -> ClientM InsertSongsCommandResponse
createSongHTTP (Text -> Maybe Text
forall a. a -> Maybe a
Just (Text -> Maybe Text) -> Text -> Maybe Text
forall a b. (a -> b) -> a -> b
$ AuthToken
authToken AuthToken -> Optic' An_Iso NoIx AuthToken Text -> Text
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. Optic' An_Iso NoIx AuthToken Text
#value) InsertSongsRequest
r
createSongComment' :: (MonadIO m) => Env -> AuthToken -> InsertSongCommentsRequest -> m (Either Text InsertSongCommentsCommandResponse)
Env
env AuthToken
authToken InsertSongCommentsRequest
r = do
Env
-> ClientM InsertSongCommentsCommandResponse
-> m (Either Text InsertSongCommentsCommandResponse)
forall (m :: * -> *) r.
MonadIO m =>
Env -> ClientM r -> m (Either Text r)
doRest Env
env
(ClientM InsertSongCommentsCommandResponse
-> m (Either Text InsertSongCommentsCommandResponse))
-> ClientM InsertSongCommentsCommandResponse
-> m (Either Text InsertSongCommentsCommandResponse)
forall a b. (a -> b) -> a -> b
$ Maybe Text
-> InsertSongCommentsRequest
-> ClientM InsertSongCommentsCommandResponse
createSongCommentHTTP (Text -> Maybe Text
forall a. a -> Maybe a
Just (Text -> Maybe Text) -> Text -> Maybe Text
forall a b. (a -> b) -> a -> b
$ AuthToken
authToken AuthToken -> Optic' An_Iso NoIx AuthToken Text -> Text
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. Optic' An_Iso NoIx AuthToken Text
#value) InsertSongCommentsRequest
r
upsertSongOpinion' :: (MonadIO m) => Env -> AuthToken -> UpsertSongOpinionsRequest -> m (Either Text UpsertSongOpinionsCommandResponse)
upsertSongOpinion' :: forall (m :: * -> *).
MonadIO m =>
Env
-> AuthToken
-> UpsertSongOpinionsRequest
-> m (Either Text UpsertSongOpinionsCommandResponse)
upsertSongOpinion' Env
env AuthToken
authToken UpsertSongOpinionsRequest
r = do
Env
-> ClientM UpsertSongOpinionsCommandResponse
-> m (Either Text UpsertSongOpinionsCommandResponse)
forall (m :: * -> *) r.
MonadIO m =>
Env -> ClientM r -> m (Either Text r)
doRest Env
env
(ClientM UpsertSongOpinionsCommandResponse
-> m (Either Text UpsertSongOpinionsCommandResponse))
-> ClientM UpsertSongOpinionsCommandResponse
-> m (Either Text UpsertSongOpinionsCommandResponse)
forall a b. (a -> b) -> a -> b
$ Maybe Text
-> UpsertSongOpinionsRequest
-> ClientM UpsertSongOpinionsCommandResponse
upsertSongOpinionHTTP (Text -> Maybe Text
forall a. a -> Maybe a
Just (Text -> Maybe Text) -> Text -> Maybe Text
forall a b. (a -> b) -> a -> b
$ AuthToken
authToken AuthToken -> Optic' An_Iso NoIx AuthToken Text -> Text
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. Optic' An_Iso NoIx AuthToken Text
#value) UpsertSongOpinionsRequest
r
createSongArtwork' :: (MonadIO m) => Env -> AuthToken -> InsertSongArtworksRequest -> m (Either Text InsertSongArtworksCommandResponse)
createSongArtwork' :: forall (m :: * -> *).
MonadIO m =>
Env
-> AuthToken
-> InsertSongArtworksRequest
-> m (Either Text InsertSongArtworksCommandResponse)
createSongArtwork' Env
env AuthToken
authToken InsertSongArtworksRequest
r = do
Env
-> ClientM InsertSongArtworksCommandResponse
-> m (Either Text InsertSongArtworksCommandResponse)
forall (m :: * -> *) r.
MonadIO m =>
Env -> ClientM r -> m (Either Text r)
doRest Env
env
(ClientM InsertSongArtworksCommandResponse
-> m (Either Text InsertSongArtworksCommandResponse))
-> ClientM InsertSongArtworksCommandResponse
-> m (Either Text InsertSongArtworksCommandResponse)
forall a b. (a -> b) -> a -> b
$ Maybe Text
-> InsertSongArtworksRequest
-> ClientM InsertSongArtworksCommandResponse
createSongArtworkHTTP (Text -> Maybe Text
forall a. a -> Maybe a
Just (Text -> Maybe Text) -> Text -> Maybe Text
forall a b. (a -> b) -> a -> b
$ AuthToken
authToken AuthToken -> Optic' An_Iso NoIx AuthToken Text -> Text
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. Optic' An_Iso NoIx AuthToken Text
#value) InsertSongArtworksRequest
r
deleteSong' :: (MonadIO m) => Env -> AuthToken -> UUID -> m (Either Text ())
deleteSong' :: forall (m :: * -> *).
MonadIO m =>
Env -> AuthToken -> UUID -> m (Either Text ())
deleteSong' Env
env AuthToken
authToken UUID
identifier = do
Env -> ClientM () -> m (Either Text ())
forall (m :: * -> *) r.
MonadIO m =>
Env -> ClientM r -> m (Either Text r)
doRest Env
env
(ClientM () -> m (Either Text ()))
-> ClientM () -> m (Either Text ())
forall a b. (a -> b) -> a -> b
$ Maybe Text -> UUID -> ClientM ()
deleteSongHTTP (Text -> Maybe Text
forall a. a -> Maybe a
Just (Text -> Maybe Text) -> Text -> Maybe Text
forall a b. (a -> b) -> a -> b
$ AuthToken
authToken AuthToken -> Optic' An_Iso NoIx AuthToken Text -> Text
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. Optic' An_Iso NoIx AuthToken Text
#value) UUID
identifier
deleteSongComment' :: (MonadIO m) => Env -> AuthToken -> UUID -> m (Either Text ())
Env
env AuthToken
authToken UUID
identifier = do
Env -> ClientM () -> m (Either Text ())
forall (m :: * -> *) r.
MonadIO m =>
Env -> ClientM r -> m (Either Text r)
doRest Env
env
(ClientM () -> m (Either Text ()))
-> ClientM () -> m (Either Text ())
forall a b. (a -> b) -> a -> b
$ Maybe Text -> UUID -> ClientM ()
deleteSongCommentHTTP (Text -> Maybe Text
forall a. a -> Maybe a
Just (Text -> Maybe Text) -> Text -> Maybe Text
forall a b. (a -> b) -> a -> b
$ AuthToken
authToken AuthToken -> Optic' An_Iso NoIx AuthToken Text -> Text
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. Optic' An_Iso NoIx AuthToken Text
#value) UUID
identifier
deleteSongOpinion' :: (MonadIO m) => Env -> AuthToken -> UUID -> m (Either Text ())
deleteSongOpinion' :: forall (m :: * -> *).
MonadIO m =>
Env -> AuthToken -> UUID -> m (Either Text ())
deleteSongOpinion' Env
env AuthToken
authToken UUID
identifier = do
Env -> ClientM () -> m (Either Text ())
forall (m :: * -> *) r.
MonadIO m =>
Env -> ClientM r -> m (Either Text r)
doRest Env
env
(ClientM () -> m (Either Text ()))
-> ClientM () -> m (Either Text ())
forall a b. (a -> b) -> a -> b
$ Maybe Text -> UUID -> ClientM ()
deleteSongOpinionHTTP (Text -> Maybe Text
forall a. a -> Maybe a
Just (Text -> Maybe Text) -> Text -> Maybe Text
forall a b. (a -> b) -> a -> b
$ AuthToken
authToken AuthToken -> Optic' An_Iso NoIx AuthToken Text -> Text
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. Optic' An_Iso NoIx AuthToken Text
#value) UUID
identifier
deleteSongArtwork' :: (MonadIO m) => Env -> AuthToken -> UUID -> m (Either Text ())
deleteSongArtwork' :: forall (m :: * -> *).
MonadIO m =>
Env -> AuthToken -> UUID -> m (Either Text ())
deleteSongArtwork' Env
env AuthToken
authToken UUID
identifier = do
Env -> ClientM () -> m (Either Text ())
forall (m :: * -> *) r.
MonadIO m =>
Env -> ClientM r -> m (Either Text r)
doRest Env
env
(ClientM () -> m (Either Text ()))
-> ClientM () -> m (Either Text ())
forall a b. (a -> b) -> a -> b
$ Maybe Text -> UUID -> ClientM ()
deleteSongArtworkHTTP (Text -> Maybe Text
forall a. a -> Maybe a
Just (Text -> Maybe Text) -> Text -> Maybe Text
forall a b. (a -> b) -> a -> b
$ AuthToken
authToken AuthToken -> Optic' An_Iso NoIx AuthToken Text -> Text
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. Optic' An_Iso NoIx AuthToken Text
#value) UUID
identifier
updateSongArtworkOrder' :: (MonadIO m) => Env -> AuthToken -> SongArtworkOrderUpdateRequest -> m (Either Text ())
updateSongArtworkOrder' :: forall (m :: * -> *).
MonadIO m =>
Env
-> AuthToken -> SongArtworkOrderUpdateRequest -> m (Either Text ())
updateSongArtworkOrder' Env
env AuthToken
authToken SongArtworkOrderUpdateRequest
r = do
Env -> ClientM () -> m (Either Text ())
forall (m :: * -> *) r.
MonadIO m =>
Env -> ClientM r -> m (Either Text r)
doRest Env
env
(ClientM () -> m (Either Text ()))
-> ClientM () -> m (Either Text ())
forall a b. (a -> b) -> a -> b
$ Maybe Text -> SongArtworkOrderUpdateRequest -> ClientM ()
updateSongArtworkOrderHTTP (Text -> Maybe Text
forall a. a -> Maybe a
Just (Text -> Maybe Text) -> Text -> Maybe Text
forall a b. (a -> b) -> a -> b
$ AuthToken
authToken AuthToken -> Optic' An_Iso NoIx AuthToken Text -> Text
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. Optic' An_Iso NoIx AuthToken Text
#value) SongArtworkOrderUpdateRequest
r
editSong' :: (MonadIO m) => Env -> AuthToken -> SongDeltaRequest -> m (Either Text ())
editSong' :: forall (m :: * -> *).
MonadIO m =>
Env -> AuthToken -> SongDeltaRequest -> m (Either Text ())
editSong' Env
env AuthToken
authToken SongDeltaRequest
r = do
Env -> ClientM () -> m (Either Text ())
forall (m :: * -> *) r.
MonadIO m =>
Env -> ClientM r -> m (Either Text r)
doRest Env
env
(ClientM () -> m (Either Text ()))
-> ClientM () -> m (Either Text ())
forall a b. (a -> b) -> a -> b
$ Maybe Text -> SongDeltaRequest -> ClientM ()
editSongHTTP (Text -> Maybe Text
forall a. a -> Maybe a
Just (Text -> Maybe Text) -> Text -> Maybe Text
forall a b. (a -> b) -> a -> b
$ AuthToken
authToken AuthToken -> Optic' An_Iso NoIx AuthToken Text -> Text
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. Optic' An_Iso NoIx AuthToken Text
#value) SongDeltaRequest
r
createArtistOfSong' :: (MonadIO m) => Env -> AuthToken -> InsertArtistsOfSongsRequest -> m (Either Text InsertArtistsOfSongCommandResponse)
createArtistOfSong' :: forall (m :: * -> *).
MonadIO m =>
Env
-> AuthToken
-> InsertArtistsOfSongsRequest
-> m (Either Text InsertArtistsOfSongCommandResponse)
createArtistOfSong' Env
env AuthToken
authToken InsertArtistsOfSongsRequest
r = do
Env
-> ClientM InsertArtistsOfSongCommandResponse
-> m (Either Text InsertArtistsOfSongCommandResponse)
forall (m :: * -> *) r.
MonadIO m =>
Env -> ClientM r -> m (Either Text r)
doRest Env
env
(ClientM InsertArtistsOfSongCommandResponse
-> m (Either Text InsertArtistsOfSongCommandResponse))
-> ClientM InsertArtistsOfSongCommandResponse
-> m (Either Text InsertArtistsOfSongCommandResponse)
forall a b. (a -> b) -> a -> b
$ Maybe Text
-> InsertArtistsOfSongsRequest
-> ClientM InsertArtistsOfSongCommandResponse
createArtistOfSongHTTP (Text -> Maybe Text
forall a. a -> Maybe a
Just (Text -> Maybe Text) -> Text -> Maybe Text
forall a b. (a -> b) -> a -> b
$ AuthToken
authToken AuthToken -> Optic' An_Iso NoIx AuthToken Text -> Text
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. Optic' An_Iso NoIx AuthToken Text
#value) InsertArtistsOfSongsRequest
r
deleteArtistOfSong' :: (MonadIO m) => Env -> AuthToken -> InsertArtistsOfSongsRequest -> m (Either Text ())
deleteArtistOfSong' :: forall (m :: * -> *).
MonadIO m =>
Env
-> AuthToken -> InsertArtistsOfSongsRequest -> m (Either Text ())
deleteArtistOfSong' Env
env AuthToken
authToken InsertArtistsOfSongsRequest
r = do
Env -> ClientM () -> m (Either Text ())
forall (m :: * -> *) r.
MonadIO m =>
Env -> ClientM r -> m (Either Text r)
doRest Env
env
(ClientM () -> m (Either Text ()))
-> ClientM () -> m (Either Text ())
forall a b. (a -> b) -> a -> b
$ Maybe Text -> InsertArtistsOfSongsRequest -> ClientM ()
deleteArtistOfSongHTTP (Text -> Maybe Text
forall a. a -> Maybe a
Just (Text -> Maybe Text) -> Text -> Maybe Text
forall a b. (a -> b) -> a -> b
$ AuthToken
authToken AuthToken -> Optic' An_Iso NoIx AuthToken Text -> Text
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. Optic' An_Iso NoIx AuthToken Text
#value) InsertArtistsOfSongsRequest
r
createSongContents' :: (MonadIO m) => Env -> AuthToken -> InsertSongContentsRequest -> m (Either Text InsertSongContentsCommandResponse)
createSongContents' :: forall (m :: * -> *).
MonadIO m =>
Env
-> AuthToken
-> InsertSongContentsRequest
-> m (Either Text InsertSongContentsCommandResponse)
createSongContents' Env
env AuthToken
authToken InsertSongContentsRequest
r = do
Env
-> ClientM InsertSongContentsCommandResponse
-> m (Either Text InsertSongContentsCommandResponse)
forall (m :: * -> *) r.
MonadIO m =>
Env -> ClientM r -> m (Either Text r)
doRest Env
env
(ClientM InsertSongContentsCommandResponse
-> m (Either Text InsertSongContentsCommandResponse))
-> ClientM InsertSongContentsCommandResponse
-> m (Either Text InsertSongContentsCommandResponse)
forall a b. (a -> b) -> a -> b
$ Maybe Text
-> InsertSongContentsRequest
-> ClientM InsertSongContentsCommandResponse
createSongContentsHTTP (Text -> Maybe Text
forall a. a -> Maybe a
Just (Text -> Maybe Text) -> Text -> Maybe Text
forall a b. (a -> b) -> a -> b
$ AuthToken
authToken AuthToken -> Optic' An_Iso NoIx AuthToken Text -> Text
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. Optic' An_Iso NoIx AuthToken Text
#value) InsertSongContentsRequest
r
deleteSongContents' :: (MonadIO m) => Env -> AuthToken -> UUID -> m (Either Text ())
deleteSongContents' :: forall (m :: * -> *).
MonadIO m =>
Env -> AuthToken -> UUID -> m (Either Text ())
deleteSongContents' Env
env AuthToken
authToken UUID
identifier = do
Env -> ClientM () -> m (Either Text ())
forall (m :: * -> *) r.
MonadIO m =>
Env -> ClientM r -> m (Either Text r)
doRest Env
env
(ClientM () -> m (Either Text ()))
-> ClientM () -> m (Either Text ())
forall a b. (a -> b) -> a -> b
$ Maybe Text -> UUID -> ClientM ()
deleteSongContentsHTTP (Text -> Maybe Text
forall a. a -> Maybe a
Just (Text -> Maybe Text) -> Text -> Maybe Text
forall a b. (a -> b) -> a -> b
$ AuthToken
authToken AuthToken -> Optic' An_Iso NoIx AuthToken Text -> Text
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. Optic' An_Iso NoIx AuthToken Text
#value) UUID
identifier
editSongContents' :: (MonadIO m) => Env -> AuthToken -> SongContentDeltaRequest -> m (Either Text ())
editSongContents' :: forall (m :: * -> *).
MonadIO m =>
Env -> AuthToken -> SongContentDeltaRequest -> m (Either Text ())
editSongContents' Env
env AuthToken
authToken SongContentDeltaRequest
r = do
Env -> ClientM () -> m (Either Text ())
forall (m :: * -> *) r.
MonadIO m =>
Env -> ClientM r -> m (Either Text r)
doRest Env
env
(ClientM () -> m (Either Text ()))
-> ClientM () -> m (Either Text ())
forall a b. (a -> b) -> a -> b
$ Maybe Text -> SongContentDeltaRequest -> ClientM ()
editSongContentsHTTP (Text -> Maybe Text
forall a. a -> Maybe a
Just (Text -> Maybe Text) -> Text -> Maybe Text
forall a b. (a -> b) -> a -> b
$ AuthToken
authToken AuthToken -> Optic' An_Iso NoIx AuthToken Text -> Text
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. Optic' An_Iso NoIx AuthToken Text
#value) SongContentDeltaRequest
r
me' :: (MonadIO m) => Env -> AuthToken -> m (Either Text GetMeQueryResponse)
me' :: forall (m :: * -> *).
MonadIO m =>
Env -> AuthToken -> m (Either Text GetMeQueryResponse)
me' Env
env AuthToken
authToken = Env
-> ClientM GetMeQueryResponse -> m (Either Text GetMeQueryResponse)
forall (m :: * -> *) r.
MonadIO m =>
Env -> ClientM r -> m (Either Text r)
doRest Env
env (ClientM GetMeQueryResponse -> m (Either Text GetMeQueryResponse))
-> ClientM GetMeQueryResponse -> m (Either Text GetMeQueryResponse)
forall a b. (a -> b) -> a -> b
$ Maybe Text -> ClientM GetMeQueryResponse
meHTTP (Text -> Maybe Text
forall a. a -> Maybe a
Just (Text -> Maybe Text) -> Text -> Maybe Text
forall a b. (a -> b) -> a -> b
$ AuthToken
authToken AuthToken -> Optic' An_Iso NoIx AuthToken Text -> Text
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. Optic' An_Iso NoIx AuthToken Text
#value)
userInvite' :: (MonadIO m) => Env -> AuthToken -> InviteUsersRequest -> m (Either Text MakeResetPasswordLinkResponse)
userInvite' :: forall (m :: * -> *).
MonadIO m =>
Env
-> AuthToken
-> InviteUsersRequest
-> m (Either Text MakeResetPasswordLinkResponse)
userInvite' Env
env AuthToken
authToken InviteUsersRequest
r = Env
-> ClientM MakeResetPasswordLinkResponse
-> m (Either Text MakeResetPasswordLinkResponse)
forall (m :: * -> *) r.
MonadIO m =>
Env -> ClientM r -> m (Either Text r)
doRest Env
env (ClientM MakeResetPasswordLinkResponse
-> m (Either Text MakeResetPasswordLinkResponse))
-> ClientM MakeResetPasswordLinkResponse
-> m (Either Text MakeResetPasswordLinkResponse)
forall a b. (a -> b) -> a -> b
$ Maybe Text
-> InviteUsersRequest -> ClientM MakeResetPasswordLinkResponse
userInviteHTTP (Text -> Maybe Text
forall a. a -> Maybe a
Just (Text -> Maybe Text) -> Text -> Maybe Text
forall a b. (a -> b) -> a -> b
$ AuthToken
authToken AuthToken -> Optic' An_Iso NoIx AuthToken Text -> Text
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. Optic' An_Iso NoIx AuthToken Text
#value) InviteUsersRequest
r
userDelete' :: (MonadIO m) => Env -> AuthToken -> DeleteUsersRequest -> m (Either Text ())
userDelete' :: forall (m :: * -> *).
MonadIO m =>
Env -> AuthToken -> DeleteUsersRequest -> m (Either Text ())
userDelete' Env
env AuthToken
authToken DeleteUsersRequest
r = Env -> ClientM () -> m (Either Text ())
forall (m :: * -> *) r.
MonadIO m =>
Env -> ClientM r -> m (Either Text r)
doRest Env
env (ClientM () -> m (Either Text ()))
-> ClientM () -> m (Either Text ())
forall a b. (a -> b) -> a -> b
$ Maybe Text -> DeleteUsersRequest -> ClientM ()
userDeleteHTTP (Text -> Maybe Text
forall a. a -> Maybe a
Just (Text -> Maybe Text) -> Text -> Maybe Text
forall a b. (a -> b) -> a -> b
$ AuthToken
authToken AuthToken -> Optic' An_Iso NoIx AuthToken Text -> Text
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. Optic' An_Iso NoIx AuthToken Text
#value) DeleteUsersRequest
r
login' :: (MonadIO m) => Env -> LoginRequest -> m (Either Text Text)
login' :: forall (m :: * -> *).
MonadIO m =>
Env -> LoginRequest -> m (Either Text Text)
login' Env
env LoginRequest
loginRequest = do
Either
Text (Headers (Header "x-wikimusic-auth" Text : NoIx) NoContent)
eitherResponse <- Env
-> ClientM
(Headers (Header "x-wikimusic-auth" Text : NoIx) NoContent)
-> m (Either
Text (Headers (Header "x-wikimusic-auth" Text : NoIx) NoContent))
forall (m :: * -> *) r.
MonadIO m =>
Env -> ClientM r -> m (Either Text r)
doRest Env
env (ClientM
(Headers (Header "x-wikimusic-auth" Text : NoIx) NoContent)
-> m (Either
Text (Headers (Header "x-wikimusic-auth" Text : NoIx) NoContent)))
-> ClientM
(Headers (Header "x-wikimusic-auth" Text : NoIx) NoContent)
-> m (Either
Text (Headers (Header "x-wikimusic-auth" Text : NoIx) NoContent))
forall a b. (a -> b) -> a -> b
$ LoginRequest
-> ClientM
(Headers (Header "x-wikimusic-auth" Text : NoIx) NoContent)
loginHTTP LoginRequest
loginRequest
let maybeParsedHeaders :: Either Text (Maybe (NonEmpty ByteString))
maybeParsedHeaders = (Headers (Header "x-wikimusic-auth" Text : NoIx) NoContent
-> Maybe (NonEmpty ByteString))
-> Either
Text (Headers (Header "x-wikimusic-auth" Text : NoIx) NoContent)
-> Either Text (Maybe (NonEmpty ByteString))
forall b c a. (b -> c) -> Either a b -> Either a c
forall (p :: * -> * -> *) b c a.
Bifunctor p =>
(b -> c) -> p a b -> p a c
second ([ByteString] -> Maybe (NonEmpty ByteString)
forall a. [a] -> Maybe (NonEmpty a)
nonEmpty ([ByteString] -> Maybe (NonEmpty ByteString))
-> (Headers (Header "x-wikimusic-auth" Text : NoIx) NoContent
-> [ByteString])
-> Headers (Header "x-wikimusic-auth" Text : NoIx) NoContent
-> Maybe (NonEmpty ByteString)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((HeaderName, ByteString) -> ByteString)
-> [(HeaderName, ByteString)] -> [ByteString]
forall a b. (a -> b) -> [a] -> [b]
map (HeaderName, ByteString) -> ByteString
forall a b. (a, b) -> b
snd ([(HeaderName, ByteString)] -> [ByteString])
-> (Headers (Header "x-wikimusic-auth" Text : NoIx) NoContent
-> [(HeaderName, ByteString)])
-> Headers (Header "x-wikimusic-auth" Text : NoIx) NoContent
-> [ByteString]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ((HeaderName, ByteString) -> Bool)
-> [(HeaderName, ByteString)] -> [(HeaderName, ByteString)]
forall a. (a -> Bool) -> [a] -> [a]
filter (\(HeaderName
name, ByteString
_) -> HeaderName
name HeaderName -> HeaderName -> Bool
forall a. Eq a => a -> a -> Bool
== HeaderName
"x-wikimusic-auth") ([(HeaderName, ByteString)] -> [(HeaderName, ByteString)])
-> (Headers (Header "x-wikimusic-auth" Text : NoIx) NoContent
-> [(HeaderName, ByteString)])
-> Headers (Header "x-wikimusic-auth" Text : NoIx) NoContent
-> [(HeaderName, ByteString)]
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Headers (Header "x-wikimusic-auth" Text : NoIx) NoContent
-> [(HeaderName, ByteString)]
forall ls. GetHeaders ls => ls -> [(HeaderName, ByteString)]
getHeaders) Either
Text (Headers (Header "x-wikimusic-auth" Text : NoIx) NoContent)
eitherResponse
case Either Text (Maybe (NonEmpty ByteString))
maybeParsedHeaders of
Left Text
e -> Either Text Text -> m (Either Text Text)
forall a. a -> m a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Either Text Text -> m (Either Text Text))
-> (Text -> Either Text Text) -> Text -> m (Either Text Text)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Text -> Either Text Text
forall a b. a -> Either a b
Left (Text -> m (Either Text Text)) -> Text -> m (Either Text Text)
forall a b. (a -> b) -> a -> b
$ Text
e
Right Maybe (NonEmpty ByteString)
Nothing -> Either Text Text -> m (Either Text Text)
forall a. a -> m a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Either Text Text -> m (Either Text Text))
-> (Text -> Either Text Text) -> Text -> m (Either Text Text)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Text -> Either Text Text
forall a b. a -> Either a b
Left (Text -> m (Either Text Text)) -> Text -> m (Either Text Text)
forall a b. (a -> b) -> a -> b
$ Text
"No x-wikimusic-auth header was found!"
Right (Just NonEmpty ByteString
h) -> Either Text Text -> m (Either Text Text)
forall a. a -> m a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Either Text Text -> m (Either Text Text))
-> (NonEmpty ByteString -> Either Text Text)
-> NonEmpty ByteString
-> m (Either Text Text)
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Text -> Either Text Text
forall a b. b -> Either a b
Right (Text -> Either Text Text)
-> (NonEmpty ByteString -> Text)
-> NonEmpty ByteString
-> Either Text Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ByteString -> Text
forall a b. ConvertUtf8 a b => b -> a
decodeUtf8 (ByteString -> Text)
-> (NonEmpty ByteString -> ByteString)
-> NonEmpty ByteString
-> Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
. NonEmpty ByteString -> ByteString
forall (f :: * -> *) a. IsNonEmpty f a a "head" => f a -> a
head (NonEmpty ByteString -> m (Either Text Text))
-> NonEmpty ByteString -> m (Either Text Text)
forall a b. (a -> b) -> a -> b
$ NonEmpty ByteString
h
resetPassword' :: (MonadIO m) => Env -> Text -> m (Either Text MakeResetPasswordLinkResponse)
resetPassword' :: forall (m :: * -> *).
MonadIO m =>
Env -> Text -> m (Either Text MakeResetPasswordLinkResponse)
resetPassword' Env
env Text
r = Env
-> ClientM MakeResetPasswordLinkResponse
-> m (Either Text MakeResetPasswordLinkResponse)
forall (m :: * -> *) r.
MonadIO m =>
Env -> ClientM r -> m (Either Text r)
doRest Env
env (ClientM MakeResetPasswordLinkResponse
-> m (Either Text MakeResetPasswordLinkResponse))
-> ClientM MakeResetPasswordLinkResponse
-> m (Either Text MakeResetPasswordLinkResponse)
forall a b. (a -> b) -> a -> b
$ Text -> ClientM MakeResetPasswordLinkResponse
resetPasswordHTTP Text
r
resetPasswordDo' :: (MonadIO m) => Env -> DoPasswordResetRequest -> m (Either Text ())
resetPasswordDo' :: forall (m :: * -> *).
MonadIO m =>
Env -> DoPasswordResetRequest -> m (Either Text ())
resetPasswordDo' Env
env DoPasswordResetRequest
r = Env -> ClientM () -> m (Either Text ())
forall (m :: * -> *) r.
MonadIO m =>
Env -> ClientM r -> m (Either Text r)
doRest Env
env (ClientM () -> m (Either Text ()))
-> ClientM () -> m (Either Text ())
forall a b. (a -> b) -> a -> b
$ DoPasswordResetRequest -> ClientM ()
resetPasswordDoHTTP DoPasswordResetRequest
r
systemInformation' :: (MonadIO m) => Env -> m (Either Text SystemInformationResponse)
systemInformation' :: forall (m :: * -> *).
MonadIO m =>
Env -> m (Either Text SystemInformationResponse)
systemInformation' Env
env = Env
-> ClientM SystemInformationResponse
-> m (Either Text SystemInformationResponse)
forall (m :: * -> *) r.
MonadIO m =>
Env -> ClientM r -> m (Either Text r)
doRest Env
env ClientM SystemInformationResponse
systemInformationHTTP
doRest :: (MonadIO m) => Env -> ClientM r -> m (Either Text r)
doRest :: forall (m :: * -> *) r.
MonadIO m =>
Env -> ClientM r -> m (Either Text r)
doRest Env
env ClientM r
restCall = do
Either ClientError r
eff <- IO (Either ClientError r) -> m (Either ClientError r)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Either ClientError r) -> m (Either ClientError r))
-> IO (Either ClientError r) -> m (Either ClientError r)
forall a b. (a -> b) -> a -> b
$ ClientM r -> ClientEnv -> IO (Either ClientError r)
forall a. ClientM a -> ClientEnv -> IO (Either ClientError a)
runClientM ClientM r
restCall (Env
env Env -> Optic' A_Lens NoIx Env ClientEnv -> ClientEnv
forall k s (is :: IxList) a.
Is k A_Getter =>
s -> Optic' k is s a -> a
^. Optic' A_Lens NoIx Env ClientEnv
#clientEnv)
Either Text r -> m (Either Text r)
forall a. a -> m a
forall (f :: * -> *) a. Applicative f => a -> f a
pure (Either Text r -> m (Either Text r))
-> Either Text r -> m (Either Text r)
forall a b. (a -> b) -> a -> b
$ (ClientError -> Text) -> Either ClientError r -> Either Text r
forall a b c. (a -> b) -> Either a c -> Either b c
forall (p :: * -> * -> *) a b c.
Bifunctor p =>
(a -> b) -> p a c -> p b c
first (String -> Text
pack (String -> Text) -> (ClientError -> String) -> ClientError -> Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ClientError -> String
forall b a. (Show a, IsString b) => a -> b
Relude.show) Either ClientError r
eff
backendAPI :: Proxy BackendAPI
backendAPI :: Proxy BackendAPI
backendAPI = Proxy BackendAPI
forall {k} (t :: k). Proxy t
Proxy
type BackendAPI =
WikiMusicPrivateArtistsAPI
:<|> WikiMusicPrivateGenresAPI
:<|> WikiMusicPrivateSongsAPI
:<|> WikiMusicPrivateAuthAPI
:<|> WikiMusicPublicAPI
getArtistsHTTP :: Maybe Text -> Maybe Int -> Maybe Int -> Maybe Text -> Maybe Text -> ClientM GetArtistsQueryResponse
searchArtistsHTTP :: Maybe Text -> Text -> Maybe Int -> Maybe Int -> Maybe Text -> Maybe Text -> ClientM GetArtistsQueryResponse
getArtistHTTP :: Maybe Text -> UUID -> Maybe Text -> Maybe Text -> ClientM GetArtistsQueryResponse
createArtistHTTP :: Maybe Text -> InsertArtistsRequest -> ClientM InsertArtistsCommandResponse
createArtistCommentHTTP :: Maybe Text -> InsertArtistCommentsRequest -> ClientM InsertArtistCommentsCommandResponse
upsertArtistOpinionHTTP :: Maybe Text -> UpsertArtistOpinionsRequest -> ClientM UpsertArtistOpinionsCommandResponse
createArtistArtworkHTTP :: Maybe Text -> InsertArtistArtworksRequest -> ClientM InsertArtistArtworksCommandResponse
deleteArtistHTTP :: Maybe Text -> UUID -> ClientM ()
deleteArtistCommentHTTP :: Maybe Text -> UUID -> ClientM ()
deleteArtistOpinionHTTP :: Maybe Text -> UUID -> ClientM ()
deleteArtistArtworkHTTP :: Maybe Text -> UUID -> ClientM ()
updateArtistArtworkOrderHTTP :: Maybe Text -> ArtistArtworkOrderUpdateRequest -> ClientM ()
editArtistHTTP :: Maybe Text -> ArtistDeltaRequest -> ClientM ()
getGenresHTTP :: Maybe Text -> Maybe Int -> Maybe Int -> Maybe Text -> Maybe Text -> ClientM GetGenresQueryResponse
searchGenresHTTP :: Maybe Text -> Text -> Maybe Int -> Maybe Int -> Maybe Text -> Maybe Text -> ClientM GetGenresQueryResponse
getGenreHTTP :: Maybe Text -> UUID -> Maybe Text -> Maybe Text -> ClientM GetGenresQueryResponse
createGenreHTTP :: Maybe Text -> InsertGenresRequest -> ClientM InsertGenresCommandResponse
createGenreCommentHTTP :: Maybe Text -> InsertGenreCommentsRequest -> ClientM InsertGenreCommentsCommandResponse
upsertGenreOpinionHTTP :: Maybe Text -> UpsertGenreOpinionsRequest -> ClientM UpsertGenreOpinionsCommandResponse
createGenreArtworkHTTP :: Maybe Text -> InsertGenreArtworksRequest -> ClientM InsertGenreArtworksCommandResponse
deleteGenreHTTP :: Maybe Text -> UUID -> ClientM ()
deleteGenreCommentHTTP :: Maybe Text -> UUID -> ClientM ()
deleteGenreOpinionHTTP :: Maybe Text -> UUID -> ClientM ()
deleteGenreArtworkHTTP :: Maybe Text -> UUID -> ClientM ()
updateGenreArtworkOrderHTTP :: Maybe Text -> GenreArtworkOrderUpdateRequest -> ClientM ()
editGenreHTTP :: Maybe Text -> GenreDeltaRequest -> ClientM ()
getSongsHTTP :: Maybe Text -> Maybe Int -> Maybe Int -> Maybe Text -> Maybe Text -> ClientM GetSongsQueryResponse
searchSongsHTTP :: Maybe Text -> Text -> Maybe Int -> Maybe Int -> Maybe Text -> Maybe Text -> ClientM GetSongsQueryResponse
getSongHTTP :: Maybe Text -> UUID -> Maybe Text -> Maybe Text -> ClientM GetSongsQueryResponse
createSongHTTP :: Maybe Text -> InsertSongsRequest -> ClientM InsertSongsCommandResponse
createSongCommentHTTP :: Maybe Text -> InsertSongCommentsRequest -> ClientM InsertSongCommentsCommandResponse
upsertSongOpinionHTTP :: Maybe Text -> UpsertSongOpinionsRequest -> ClientM UpsertSongOpinionsCommandResponse
createSongArtworkHTTP :: Maybe Text -> InsertSongArtworksRequest -> ClientM InsertSongArtworksCommandResponse
createArtistOfSongHTTP :: Maybe Text -> InsertArtistsOfSongsRequest -> ClientM InsertArtistsOfSongCommandResponse
deleteArtistOfSongHTTP :: Maybe Text -> InsertArtistsOfSongsRequest -> ClientM ()
deleteSongHTTP :: Maybe Text -> UUID -> ClientM ()
deleteSongCommentHTTP :: Maybe Text -> UUID -> ClientM ()
deleteSongOpinionHTTP :: Maybe Text -> UUID -> ClientM ()
deleteSongArtworkHTTP :: Maybe Text -> UUID -> ClientM ()
updateSongArtworkOrderHTTP :: Maybe Text -> SongArtworkOrderUpdateRequest -> ClientM ()
editSongHTTP :: Maybe Text -> SongDeltaRequest -> ClientM ()
createSongContentsHTTP :: Maybe Text -> InsertSongContentsRequest -> ClientM InsertSongContentsCommandResponse
deleteSongContentsHTTP :: Maybe Text -> UUID -> ClientM ()
editSongContentsHTTP :: Maybe Text -> SongContentDeltaRequest -> ClientM ()
meHTTP :: Maybe Text -> ClientM GetMeQueryResponse
userInviteHTTP :: Maybe Text -> InviteUsersRequest -> ClientM MakeResetPasswordLinkResponse
userDeleteHTTP :: Maybe Text -> DeleteUsersRequest -> ClientM ()
loginHTTP ::
LoginRequest ->
ClientM
( Headers
'[Header "x-wikimusic-auth" Text]
NoContent
)
resetPasswordHTTP :: Text -> ClientM MakeResetPasswordLinkResponse
resetPasswordDoHTTP :: DoPasswordResetRequest -> ClientM ()
systemInformationHTTP :: ClientM SystemInformationResponse
( Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> ClientM GetArtistsQueryResponse
getArtistsHTTP
:<|> Maybe Text
-> Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> ClientM GetArtistsQueryResponse
searchArtistsHTTP
:<|> Maybe Text
-> UUID
-> Maybe Text
-> Maybe Text
-> ClientM GetArtistsQueryResponse
getArtistHTTP
:<|> Maybe Text
-> InsertArtistsRequest -> ClientM InsertArtistsCommandResponse
createArtistHTTP
:<|>
:<|> Maybe Text
-> UpsertArtistOpinionsRequest
-> ClientM UpsertArtistOpinionsCommandResponse
upsertArtistOpinionHTTP
:<|> Maybe Text
-> InsertArtistArtworksRequest
-> ClientM InsertArtistArtworksCommandResponse
createArtistArtworkHTTP
:<|> Maybe Text -> UUID -> ClientM ()
deleteArtistHTTP
:<|>
:<|> Maybe Text -> UUID -> ClientM ()
deleteArtistOpinionHTTP
:<|> Maybe Text -> UUID -> ClientM ()
deleteArtistArtworkHTTP
:<|> Maybe Text -> ArtistArtworkOrderUpdateRequest -> ClientM ()
updateArtistArtworkOrderHTTP
:<|> Maybe Text -> ArtistDeltaRequest -> ClientM ()
editArtistHTTP
)
:<|> ( Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> ClientM GetGenresQueryResponse
getGenresHTTP
:<|> Maybe Text
-> Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> ClientM GetGenresQueryResponse
searchGenresHTTP
:<|> Maybe Text
-> UUID
-> Maybe Text
-> Maybe Text
-> ClientM GetGenresQueryResponse
getGenreHTTP
:<|> Maybe Text
-> InsertGenresRequest -> ClientM InsertGenresCommandResponse
createGenreHTTP
:<|>
:<|> Maybe Text
-> UpsertGenreOpinionsRequest
-> ClientM UpsertGenreOpinionsCommandResponse
upsertGenreOpinionHTTP
:<|> Maybe Text
-> InsertGenreArtworksRequest
-> ClientM InsertGenreArtworksCommandResponse
createGenreArtworkHTTP
:<|> Maybe Text -> UUID -> ClientM ()
deleteGenreHTTP
:<|>
:<|> Maybe Text -> UUID -> ClientM ()
deleteGenreOpinionHTTP
:<|> Maybe Text -> UUID -> ClientM ()
deleteGenreArtworkHTTP
:<|> Maybe Text -> GenreArtworkOrderUpdateRequest -> ClientM ()
updateGenreArtworkOrderHTTP
:<|> Maybe Text -> GenreDeltaRequest -> ClientM ()
editGenreHTTP
)
:<|> ( Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> ClientM GetSongsQueryResponse
getSongsHTTP
:<|> Maybe Text
-> Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> ClientM GetSongsQueryResponse
searchSongsHTTP
:<|> Maybe Text
-> UUID
-> Maybe Text
-> Maybe Text
-> ClientM GetSongsQueryResponse
getSongHTTP
:<|> Maybe Text
-> InsertSongsRequest -> ClientM InsertSongsCommandResponse
createSongHTTP
:<|>
:<|> Maybe Text
-> UpsertSongOpinionsRequest
-> ClientM UpsertSongOpinionsCommandResponse
upsertSongOpinionHTTP
:<|> Maybe Text
-> InsertSongArtworksRequest
-> ClientM InsertSongArtworksCommandResponse
createSongArtworkHTTP
:<|> Maybe Text
-> InsertArtistsOfSongsRequest
-> ClientM InsertArtistsOfSongCommandResponse
createArtistOfSongHTTP
:<|> Maybe Text -> InsertArtistsOfSongsRequest -> ClientM ()
deleteArtistOfSongHTTP
:<|> Maybe Text -> UUID -> ClientM ()
deleteSongHTTP
:<|>
:<|> Maybe Text -> UUID -> ClientM ()
deleteSongOpinionHTTP
:<|> Maybe Text -> UUID -> ClientM ()
deleteSongArtworkHTTP
:<|> Maybe Text -> SongArtworkOrderUpdateRequest -> ClientM ()
updateSongArtworkOrderHTTP
:<|> Maybe Text -> SongDeltaRequest -> ClientM ()
editSongHTTP
:<|> Maybe Text
-> InsertSongContentsRequest
-> ClientM InsertSongContentsCommandResponse
createSongContentsHTTP
:<|> Maybe Text -> UUID -> ClientM ()
deleteSongContentsHTTP
:<|> Maybe Text -> SongContentDeltaRequest -> ClientM ()
editSongContentsHTTP
)
:<|> (Maybe Text -> ClientM GetMeQueryResponse
meHTTP :<|> Maybe Text
-> InviteUsersRequest -> ClientM MakeResetPasswordLinkResponse
userInviteHTTP :<|> Maybe Text -> DeleteUsersRequest -> ClientM ()
userDeleteHTTP)
:<|> (LoginRequest
-> ClientM
(Headers (Header "x-wikimusic-auth" Text : NoIx) NoContent)
loginHTTP :<|> Text -> ClientM MakeResetPasswordLinkResponse
resetPasswordHTTP :<|> DoPasswordResetRequest -> ClientM ()
resetPasswordDoHTTP :<|> ClientM SystemInformationResponse
systemInformationHTTP) =
Proxy BackendAPI -> Client ClientM BackendAPI
forall api.
HasClient ClientM api =>
Proxy api -> Client ClientM api
client Proxy BackendAPI
backendAPI