using Refit; using WatchIt.Database.Model.Media; using WatchIt.DTO.Models.Controllers.Accounts.Account; using WatchIt.DTO.Models.Controllers.Accounts.AccountBackgroundPicture; using WatchIt.DTO.Models.Controllers.Accounts.AccountEmail; using WatchIt.DTO.Models.Controllers.Accounts.AccountLogout; using WatchIt.DTO.Models.Controllers.Accounts.AccountPassword; using WatchIt.DTO.Models.Controllers.Accounts.AccountProfileInfo; using WatchIt.DTO.Models.Controllers.Accounts.AccountUsername; using WatchIt.DTO.Models.Controllers.Media.Medium.Query; using WatchIt.DTO.Models.Controllers.Media.Medium.Response; using WatchIt.DTO.Models.Controllers.People.Person; using WatchIt.DTO.Models.Controllers.People.Person.Query; using WatchIt.DTO.Models.Controllers.Photos.Photo; using WatchIt.DTO.Models.Generics.Image; using WatchIt.DTO.Query; namespace WatchIt.Website.Clients; public interface IAccountsClient { #region Main [Get("/")] Task>> GetAccounts([Query] AccountFilterQuery? filterQuery = null, [Query] OrderQuery? orderQuery = null, [Query] PagingQuery? pagingQuery = null, [Query][AliasAs("include_profile_pictures")] bool includeProfilePictures = false); [Get("/{id}")] Task> GetAccount(long id, [Query][AliasAs("include_profile_pictures")] bool includeProfilePictures = false); [Post("/")] Task> PostAccount([Body] AccountRequest body); #endregion #region Profile picture [Get("/{id}/profile_picture")] Task> GetAccountProfilePicture(long id); [Put("/profile_picture")] Task> PutAccountProfilePicture([Authorize]string token, [Body] ImageRequest body); [Delete("/profile_picture")] Task DeleteAccountProfilePicture([Authorize]string token); #endregion #region Background picture [Get("/{id}/background_picture")] Task> GetAccountBackgroundPicture(long id); [Put("/background_picture")] Task> PutAccountBackgroundPicture([Authorize]string token, [Body] AccountBackgroundPictureRequest body); [Delete("/background_picture")] Task DeleteAccountBackgroundPicture([Authorize]string token); #endregion #region Profile edit [Patch("/profile_info")] Task PatchAccountProfileInfo([Authorize]string token, [Body] AccountProfileInfoRequest body); [Patch("/username")] Task PatchAccountUsername([Authorize]string token, [Body] AccountUsernameRequest body); [Patch("/email")] Task PatchAccountEmail([Authorize]string token, [Body] AccountEmailRequest body); [Patch("/password")] Task PatchAccountPassword([Authorize]string token, [Body] AccountPasswordRequest body); #endregion #region Log out [Delete("/logout")] Task Logout([Body] AccountLogoutRequest body); [Delete("/logout_all")] Task LogoutAll([Authorize]string token); #endregion #region Follows [Get("/{id}/follows")] Task>> GetAccountFollows(long id, [Query] AccountFilterQuery? filterQuery = null, [Query] OrderQuery? orderQuery = null, [Query] PagingQuery? pagingQuery = null); [Get("/{id}/followers")] Task>> GetAccountFollowers(long id, [Query] AccountFilterQuery? filterQuery = null, [Query] OrderQuery? orderQuery = null, [Query] PagingQuery? pagingQuery = null); [Post("/follows/{followed_account_id}")] Task PostAccountFollow([Authorize]string token, [AliasAs("followed_account_id")] long followedAccountId); [Delete("/follows/{followed_account_id}")] Task DeleteAccountFollow([Authorize]string token, [AliasAs("followed_account_id")] long followedAccountId); #endregion #region Ratings [Get("/{id}/media")] Task>> GetAccountRatedMedia(long id, [Query] MediumFilterQuery? filterQuery = null, [Query] MediumUserRatedFilterQuery? userRatedFilterQuery = null, [Query] OrderQuery? orderQuery = null, [Query] PagingQuery? pagingQuery = null, [Query][AliasAs("include_pictures")] bool includePictures = false); [Get("/{id}/media/movies")] Task>> GetAccountRatedMediaMovies(long id, [Query] MediumMovieFilterQuery? filterQuery = null, [Query] MediumUserRatedFilterQuery? userRatedFilterQuery = null, [Query] OrderQuery? orderQuery = null, [Query] PagingQuery? pagingQuery = null, [Query][AliasAs("include_pictures")] bool includePictures = false); [Get("/{id}/media/series")] Task>> GetAccountRatedMediaSeries(long id, [Query] MediumSeriesFilterQuery? filterQuery = null, [Query] MediumUserRatedFilterQuery? userRatedFilterQuery = null, [Query] OrderQuery? orderQuery = null, [Query] PagingQuery? pagingQuery = null, [Query][AliasAs("include_pictures")] bool includePictures = false); [Get("/{id}/people")] Task>> GetAccountRatedPeople(long id, [Query] PersonFilterQuery? filterQuery = null, [Query] PersonUserRatedFilterQuery? userRatedFilterQuery = null, [Query] OrderQuery? orderQuery = null, [Query] PagingQuery? pagingQuery = null, [Query][AliasAs("include_pictures")] bool includePictures = false); #endregion }