using Microsoft.AspNetCore.Http; using RMuseum.Models.Artifact; using RMuseum.Models.Artifact.ViewModels; using RMuseum.Models.Bookmark; using RMuseum.Models.Bookmark.ViewModels; using RMuseum.Models.GanjoorIntegration; using RMuseum.Models.GanjoorIntegration.ViewModels; using RMuseum.Models.ImportJob; using RMuseum.Models.Note; using RMuseum.Models.Note.ViewModels; using RMuseum.Models.Notification; using RSecurityBackend.Models.Generic; using System; using System.IO; using System.Threading.Tasks; namespace RMuseum.Services { /// /// Artifact Item Service /// public interface IArtifactService { /// /// get all artifacts (including CoverImage info but not items or attributes info) /// /// /// /// Task> GetAll(PagingParameterModel paging, PublishStatus[] statusArray); /// /// get tagged publish artifacts (including CoverImage info but not items or tagibutes info) /// /// /// /// /// Task> GetByTagValue(string tagUrl, string valueUrl, PublishStatus[] statusArray); /// /// gets specified artifact info (including CoverImage + images + attributes) /// /// /// /// Task> GetByFriendlyUrl(string friendlyUrl, PublishStatus[] statusArray); /// /// gets specified artifact info (including CoverImage + images + tagibutes) /// /// /// /// /// /// Task> GetByFriendlyUrlFilterItemsByTag(string friendlyUrl, PublishStatus[] statusArray, string tagFriendlyUrl, string tagValueFriendlyUrl); /// /// edit master record /// /// /// /// /// Task> EditMasterRecord(RArtifactMasterRecord edited, bool canChangeStatusToAwaiting, bool canPublish); /// /// Set Artifact Cover Item Index /// /// /// /// Task> SetArtifactCoverItemIndex(Guid artifactId, int itemIndex); /// /// get tag bundle by frindly url /// /// /// Task> GetTagBundleByFiendlyUrl(string friendlyUrl); /// /// get max lastmodified artifact date for caching purposes /// /// Task> GetMaxArtifactLastModified(); /// /// get all tags /// /// /// Task> GetAllTags(PagingParameterModel paging); /// /// get tag bu friendly url /// /// /// Task> GetTagByFriendlyUrl(string friendlyUrl); /// /// add tag /// /// Task> AddTag(string tagName); /// /// edit tag /// /// /// Task> EditTag(RTag edited); /// /// changes order of tags based on their position in artifacts /// /// /// /// true => up, false => down /// the other tag which its Order has been changed Task> EditTagOrderBasedOnArtifact(Guid tagId, Guid artifactId, bool up); /// /// changes order of tags based on their position in artifact items /// /// /// /// true => up, false => down /// the other tag which its Order has been changed Task> EditTagOrderBasedOnItem(Guid tagId, Guid itemId, bool up); /// /// add artifact tag value /// /// /// /// Task> TagArtifact(Guid artifactId, RTag tag); /// /// changes order of tag values based on their position in an artifact /// /// /// /// /// true => up, false => down /// the other tag value which its Order has been changed Task> EditTagValueOrder(Guid artifactId, Guid tagId, Guid valueId, bool up); /// /// changes order of tag values based on their position in an item /// /// /// /// /// true => up, false => down /// the other tag value which its Order has been changed Task> EditItemTagValueOrder(Guid itemId, Guid tagId, Guid valueId, bool up); /// /// get tag value bundle by frindly url /// /// /// /// Task> GetTagValueBundleByFiendlyUrl(string friendlyUrl, string valueUrl); /// /// get tag value by frindly url /// /// /// /// Task> GetTagValueByFriendlyUrl(Guid tagId, string friendlyUrl); /// /// edit artifact tagibute value /// /// /// /// apply on all same value tags /// Task> EditTagValue(Guid artifactId, RTagValue edited, bool global); /// /// remove artfiact tag value /// /// /// /// Task> UnTagArtifact(Guid artifactId, Guid tagValueId); /// /// add item tag value /// /// /// /// Task> TagItem(Guid itemId, RTag tag); /// /// edit item tag value /// /// /// /// apply on all same value tags /// Task> EditItemTagValue(Guid itemId, RTagValue edited, bool global); /// /// remove item tag value /// /// /// /// Task> UnTagItem(Guid itemId, Guid tagValueId); /// /// gets specified artifact item info (including images + attributes) /// /// /// /// /// Task> GetArtifactItemByFrienlyUrl(string artifactUrl, string itemUrl, PublishStatus[] statusArray); /// /// add new artifact /// /// /// /// /// /// /// /// /// /// Task> Add ( string name, string description, string srcurl, string pictitle, string picdescription, IFormFile file, string picsrcurl, Stream stream ); /// /// import from external resources /// /// loc/princeton/harvard/qajarwomen/hathitrust/penn/cam/bl/folder/walters/cbl /// 119 /// golestan-baysonghori /// /// Task> Import(string srcType, string resourceNumber, string friendlyUrl, string resourcePrefix); /// /// reschedule jobs /// /// Task> RescheduleJobs(); /// /// due to a bug in loc json outputs some artifacts with more than 1000 pages were downloaded incompletely /// /// Task> ReExamineLocDownloads(); /// /// import jobs /// /// /// Task> GetImportJobs(PagingParameterModel paging); /// /// Bookmark Artifact /// /// /// /// /// Task> BookmarkArtifact(Guid artifactId, Guid userId, RBookmarkType type); /// /// get artifact user bookmarks /// /// /// /// Task> GetArtifactUserBookmarks(Guid artifactId, Guid userId); /// /// Bookmark Item /// /// /// /// /// Task> BookmarkItem(Guid itemId, Guid userId, RBookmarkType type); /// /// get item user bookmarks /// /// /// /// Task> GeItemUserBookmarks(Guid itemId, Guid userId); /// /// update bookmark note /// /// /// /// Task> UpdateUserBookmark(Guid bookmarkId, string note); /// /// delete user bookmark /// /// /// /// Task> DeleteUserBookmark(Guid bookmarkId); /// /// get user bookmarks (artifacts and items) /// /// /// /// /// /// Task> GetBookmarks(PagingParameterModel paging, Guid userId, RBookmarkType type, PublishStatus[] statusArray); /// /// Add Note to Artifact /// /// /// /// /// /// /// Task> AddUserNoteToArtifact(Guid artifactId, Guid userId, RNoteType type, string noteContents, Guid? referenceNoteId); /// /// Add Note to Artifact Item /// /// /// /// /// /// /// Task> AddUserNoteToArtifactItem(Guid itemId, Guid userId, RNoteType type, string noteContents, Guid? referenceNoteId); /// /// Edit Note /// /// /// sending null here means user is a moderator /// /// Task> EditUserNote(Guid noteId, Guid? userId, string noteContents); /// /// delete note /// /// /// sending null here means user is a moderator or the note is being deleted in a recursive delete of referenced notes /// list of notes deleted Task> DeleteUserNote(Guid noteId, Guid? userId); /// /// get artifact private user notes /// /// /// /// Task> GetArtifactUserNotes(Guid artifactId, Guid userId); /// /// get artifact public user notes /// /// /// Task> GetArtifactPublicNotes(Guid artifactId); /// /// get item artifact private user notes /// /// /// /// Task> GetArtifactItemUserNotes(Guid itemId, Guid userId); /// /// get item artifact item public user notes /// /// /// Task> GetArtifactItemPublicNotes(Guid itemId); /// /// Get All USer Notes /// /// /// /// /// /// Task> GetUserNotes(Guid userId, PagingParameterModel paging, RNoteType type, PublishStatus[] statusArray); /// /// Get All Public Notes /// /// /// Task> GetAllPublicNotes(PagingParameterModel paging); /// /// suggest ganjoor link /// /// /// /// Task> SuggestGanjoorLink(Guid userId, LinkSuggestion link); /// /// get suggested ganjoor links /// /// /// /// Task> GetSuggestedLinks(ReviewResult status, bool notSynced); /// /// Review Suggested Link /// /// /// /// /// Task> ReviewSuggestedLink(Guid linkId, Guid userId, ReviewResult result); /// /// Temporary api /// /// Task> AddTOCForSuggestedLinks(); /// /// Synchronize suggested link /// /// /// Task> SynchronizeSuggestedLink(Guid linkId); /// /// get suggested pinterest links /// /// /// /// Task> GetSuggestedPinterestLinks(ReviewResult status, bool notSynced); /// /// suggest pinterest link /// /// /// Task> SuggestPinterestLink(PinterestSuggestion suggestion); /// /// Review Suggested Pinterest Link /// /// /// /// /// /// /// /// Task> ReviewSuggestedPinterestLink(Guid linkId, Guid userId, string altText, ReviewResult result, string reviewDesc, string imageUrl); /// /// Synchronize suggested pinterest link /// /// /// Task> SynchronizeSuggestedPinterestLink(Guid linkId); /// /// an incomplete prototype for removing artifacts /// /// /// /// Task> RemoveArtifactHavingNoNoteAndBookmarks(Guid artifactId, bool checkJobs); } }