Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
WikiMusic.Servant.ApiSpec
Documentation
type PrivateAPI = ArtistsAPI :<|> (GenresAPI :<|> (SongsAPI :<|> AuthAPI)) Source #
type PublicAPI = ("login" :> (ReqBody '[JSON] LoginRequest :> LoginRespondWithAuth)) :<|> (("reset-password" :> (("email" :> (Capture "email" Text :> Post '[JSON] MakeResetPasswordLinkResponse)) :<|> ("do" :> (ReqBody '[JSON] DoPasswordResetRequest :> Verb 'POST 204 '[JSON] ())))) :<|> ("system-information" :> Get '[JSON] SystemInformationResponse)) Source #
type WikiMusicAPIServer = PrivateAPI :<|> (SwaggerAPI :<|> PublicAPI) Source #
type APIDocsServer = PublicAPI :<|> PrivateAPI Source #
type ArtistsAPI = "artists" :> (WithBaseEntityRoutes :<|> (PageGet GetArtistsQueryResponse :<|> (SearchGet GetArtistsQueryResponse :<|> (WithDetailsFromIdentifier GetArtistsQueryResponse :<|> ((WithAuth :> (ReqBody '[JSON] InsertArtistsRequest :> Post '[JSON] InsertArtistsCommandResponse)) :<|> (WithComments InsertArtistCommentsRequest InsertArtistCommentsCommandResponse :<|> (WithOpinions UpsertArtistOpinionsRequest UpsertArtistOpinionsCommandResponse :<|> (WithArtworks InsertArtistArtworksRequest InsertArtistArtworksCommandResponse :<|> (WithArtworkOrders ArtistArtworkOrderUpdateRequest :<|> ("edit" :> (WithAuth :> (ReqBody '[JSON] ArtistDeltaRequest :> Patch '[JSON] ())))))))))))) Source #
type SongsAPI = "songs" :> (WithBaseEntityRoutes :<|> (PageGet GetSongsQueryResponse :<|> (SearchGet GetSongsQueryResponse :<|> (WithDetailsFromIdentifier GetSongsQueryResponse :<|> ((WithAuth :> (ReqBody '[JSON] InsertSongsRequest :> Post '[JSON] InsertSongsCommandResponse)) :<|> (WithComments InsertSongCommentsRequest InsertSongCommentsCommandResponse :<|> (WithOpinions UpsertSongOpinionsRequest UpsertSongOpinionsCommandResponse :<|> (WithArtworks InsertSongArtworksRequest InsertSongArtworksCommandResponse :<|> (("artists" :> (WithAuth :> (ReqBody '[JSON] InsertArtistsOfSongsRequest :> Post '[JSON] InsertArtistsOfSongCommandResponse))) :<|> (("artists" :> (WithAuth :> (ReqBody '[JSON] InsertArtistsOfSongsRequest :> Delete '[JSON] ()))) :<|> (WithArtworkOrders SongArtworkOrderUpdateRequest :<|> (("edit" :> (WithAuth :> (ReqBody '[JSON] SongDeltaRequest :> Patch '[JSON] ()))) :<|> (("contents" :> (WithAuth :> (ReqBody '[JSON] InsertSongContentsRequest :> Post '[JSON] InsertSongContentsCommandResponse))) :<|> (("contents" :> (WithAuth :> (WithIdentifier :> Delete '[JSON] ()))) :<|> ("contents" :> (WithAuth :> (ReqBody '[JSON] SongContentDeltaRequest :> Patch '[JSON] ()))))))))))))))))) Source #
type AuthAPI = ("me" :> (WithAuth :> Get '[JSON] GetMeQueryResponse)) :<|> ("users" :> (("invite" :> (WithAuth :> (ReqBody '[JSON] InviteUsersRequest :> Post '[JSON] MakeResetPasswordLinkResponse))) :<|> ("delete" :> (WithAuth :> (ReqBody '[JSON] DeleteUsersRequest :> Post '[JSON] ()))))) Source #
type GenresAPI = "genres" :> (WithBaseEntityRoutes :<|> (PageGet GetGenresQueryResponse :<|> (SearchGet GetGenresQueryResponse :<|> (WithDetailsFromIdentifier GetGenresQueryResponse :<|> ((WithAuth :> (ReqBody '[JSON] InsertGenresRequest :> Post '[JSON] InsertGenresCommandResponse)) :<|> (WithComments InsertGenreCommentsRequest InsertGenreCommentsCommandResponse :<|> (WithOpinions UpsertGenreOpinionsRequest UpsertGenreOpinionsCommandResponse :<|> (WithArtworks InsertGenreArtworksRequest InsertGenreArtworksCommandResponse :<|> (WithArtworkOrders GenreArtworkOrderUpdateRequest :<|> ("edit" :> (WithAuth :> (ReqBody '[JSON] GenreDeltaRequest :> Patch '[JSON] ())))))))))))) Source #
type WithBaseEntityRoutes = (WithAuth :> (WithIdentifier :> Delete '[JSON] ())) :<|> (("comments" :> (WithAuth :> (WithIdentifier :> Delete '[JSON] ()))) :<|> (("opinions" :> (WithAuth :> (WithIdentifier :> Delete '[JSON] ()))) :<|> ("artworks" :> (WithAuth :> (WithIdentifier :> Delete '[JSON] ()))))) Source #
type WithArtworkOrders a = "artworks" :> ("order" :> (WithAuth :> (ReqBody '[JSON] a :> Patch '[JSON] ()))) Source #
type WithSearch = Capture "searchInput" Text Source #
type WithIdentifier = Capture "identifier" UUID Source #