using System.Collections.Generic;
using System.Threading.Tasks;
using Timeline.Services.Timeline;
using Timeline.Services.User;
namespace Timeline.Services.Api
{
///
/// Service interface that manages timeline bookmarks.
///
public interface IBookmarkTimelineService
{
///
/// Get bookmarks of a user.
///
/// User id of bookmark owner.
/// Id of Bookmark timelines in order.
/// Thrown when user does not exist.
Task> GetBookmarksAsync(long userId);
///
/// Check if a timeline is a bookmark.
///
/// The user id.
/// Timeline id.
/// If true it will throw when user does not exist.
/// If true it will throw when timeline does not exist.
/// True if timeline is a bookmark. Otherwise false.
/// Throw if user does not exist and is true.
/// Thrown if timeline does not exist and is true.
Task IsBookmarkAsync(long userId, long timelineId, bool checkUserExistence = true, bool checkTimelineExistence = true);
///
/// Add a bookmark to tail to a user.
///
/// User id of bookmark owner.
/// Timeline id.
/// True if timeline is added to bookmark. False if it already is.
/// Thrown when user does not exist.
/// Thrown when timeline does not exist.
Task AddBookmarkAsync(long userId, long timelineId);
///
/// Remove a bookmark from a user.
///
/// User id of bookmark owner.
/// Timeline id.
/// True if deletion is performed. False if bookmark does not exist.
/// Thrown when user does not exist.
/// Thrown when timeline does not exist.
Task RemoveBookmarkAsync(long userId, long timelineId);
///
/// Move bookmark to a new position.
///
/// User id of bookmark owner.
/// Timeline name.
/// New position. Starts at 1.
/// Thrown when user does not exist.
/// Thrown when timeline does not exist.
/// Thrown when the timeline is not a bookmark.
Task MoveBookmarkAsync(long userId, long timelineId, long newPosition);
}
}