using OneOf;
namespace petaverseapi;
public interface IAnimalService
{
#region [ READS ]
Task<IEnumerable<AnimalDTO>> FindAll(string consumerName, CancellationToken cancellationToken = default!);
Task<AnimalDTO?> FindById(int id, string consumerName, CancellationToken cancellationToken = default!);
Task<OneOf<IEnumerable<AnimalDTO>, ServiceError>> FindAllByUserGuid(string userGuid, string consumerName, CancellationToken cancellationToken = default!);
#endregion
#region [ MUTATES ]
Task<OneOf<ServiceSuccess, ServiceError>> Create(CreatePetDTO dto, string consumerName, CancellationToken cancellationToken = default!);
Task<OneOf<ServiceSuccess, ServiceError>> UploadAnimalMultiplePhotosAsync(int animalId, MediaTypeDTO mediaType, IFormFileCollection medias, string consumerName, CancellationToken cancellationToken = default!);
Task<OneOf<ServiceSuccess, ServiceError>> UploadAnimalAvatarPhotoAsync(int animalId, IFormFile avatar, MediaTypeDTO type, string consumerName, CancellationToken cancellationToken = default!);
Task<OneOf<ServiceSuccess, ServiceError>> UploadAnimalPhotoAsync(int animalId, IFormFile file, MediaTypeDTO type, string consumerName, CancellationToken cancellationToken = default!);
Task<OneOf<ServiceSuccess, ServiceError>> Delete(int id, string consumerName, CancellationToken cancellationToken = default!);
#endregion
}
using OneOf;
namespace petaverseapi;
public interface IAnimalService
{
#region [ READS ]
Task<IEnumerable<AnimalDTO>> FindAll(string consumerName, CancellationToken cancellationToken = default!);
Task<AnimalDTO?> FindById(int id, string consumerName, CancellationToken cancellationToken = default!);
Task<OneOf<IEnumerable<AnimalDTO>, ServiceError>> FindAllByUserGuid(string userGuid, string consumerName, CancellationToken cancellationToken = default!);
#endregion
#region [ MUTATES ]
Task<OneOf<ServiceSuccess, ServiceError>> Create(CreatePetDTO dto, string consumerName, CancellationToken cancellationToken = default!);
Task<OneOf<ServiceSuccess, ServiceError>> UploadAnimalMultiplePhotosAsync(int animalId, MediaTypeDTO mediaType, IFormFileCollection medias, string consumerName, CancellationToken cancellationToken = default!);
Task<OneOf<ServiceSuccess, ServiceError>> UploadAnimalAvatarPhotoAsync(int animalId, IFormFile avatar, MediaTypeDTO type, string consumerName, CancellationToken cancellationToken = default!);
Task<OneOf<ServiceSuccess, ServiceError>> UploadAnimalPhotoAsync(int animalId, IFormFile file, MediaTypeDTO type, string consumerName, CancellationToken cancellationToken = default!);
Task<OneOf<ServiceSuccess, ServiceError>> Delete(int id, string consumerName, CancellationToken cancellationToken = default!);
#endregion
}