using Microsoft.AspNetCore.Http; using RMuseum.Models.Ganjoor; using RMuseum.Models.Ganjoor.ViewModels; using RMuseum.Models.GanjoorAudio.ViewModels; using RMuseum.Models.GanjoorIntegration; using RSecurityBackend.Models.Generic; using System; using System.Threading.Tasks; namespace RMuseum.Services { /// /// Ganjoor Poems Content Privider Service /// public interface IGanjoorService { /// /// Get List of poets /// /// /// /// Task> GetPoets(bool published, bool includeBio = true); /// /// Get list of books (GanjoorCat entries whose CatType is Book), sorted alphabetically by name. /// Not to be confused with GetBooksAsync() below, which lists GanjoorCat entries by their /// (separate, legacy) BookName field for cover-image generation. /// /// optional, only books whose name contains this (case-insensitive) /// optional, only books belonging to this poet /// Task> GetBookCatalogAsync(string name = null, int? poetId = null); /// /// get poet by id /// /// /// /// Task> GetPoetById(int id, bool catPoems = false); /// /// get poet by url /// /// /// /// Task> GetPoetByUrl(string url, bool catPoems = false); /// /// poet image id by url /// /// /// Task> GetPoetImageIdByUrl(string url); /// /// get cat by id /// /// /// /// /// /// Task> GetCatById(int id, bool poems = false, bool mainSections = false, bool paperSources = false); /// /// get cat by url /// /// /// /// /// /// Task> GetCatByUrl(string url, bool poems = false, bool mainSections = false, bool paperSources = false); /// /// Update category extra info /// /// /// /// /// /// /// Task> SetCategoryExtraInfo(int catId, string bookName, Guid? imageId, bool sumUpSubsGeoLocations, string mapName); /// /// get list of books /// /// Task> GetBooksAsync(); /// /// generate missing book covers /// /// Task> GenerateMissingBookCoversAsync(); /// /// get page by url /// /// /// /// /// Task> GetPageByUrl(string url, bool catPoems = false, GanjoorCommentSortOrder commentSortOrder = GanjoorCommentSortOrder.TopRated); /// /// get page url by id /// /// /// Task> GetPageUrlById(int id); /// /// get redirect url for a url /// /// /// Task> GetRedirectAddressForPageUrl(string url); /// /// delete page /// /// /// Task> DeletePageAsync(int id); /// /// delete a poem /// /// /// Task> DeletePoemAsync(int id); /// /// Get Poem By Id /// /// /// /// /// /// /// /// /// /// /// /// /// /// /// Task> GetPoemById(int id, bool catInfo = true, bool catPoems = false, bool rhymes = true, bool recitations = true, bool images = true, bool songs = true, bool comments = true, bool verseDetails = true, bool navigation = true, bool relatedpoems = true, bool sections = true, GanjoorCommentSortOrder commentSortOrder = GanjoorCommentSortOrder.TopRated); /// /// get poem verses /// /// /// /// Task> GetPoemVersesAsync(int id, int coupletIndex); /// /// Get Poem By Url /// /// /// /// /// /// /// /// /// /// /// /// Task> GetPoemByUrl(string url, bool catInfo = true, bool catPoems = false, bool rhymes = true, bool recitations = true, bool images = true, bool songs = true, bool comments = true, bool verseDetails = true, bool navigation = true); /// /// get poem recitations (PlainText/HtmlText are intentionally empty) /// /// /// Task> GetPoemRecitations(int id); /// /// get poem sections /// /// /// Task> GetPoemWholeSections(int id); /// /// get user up votes for the recitations of a poem /// /// /// /// Task> GetUserPoemRecitationsUpVotes(int id, Guid userId); /// /// get poem images by id (some fields are intentionally field with blank or null), /// EntityImageId : the most important data field, image url is {WebServiceUrl.Url}/api/images/thumb/{EntityImageId}.jpg or {WebServiceUrl.Url}/api/images/norm/{EntityImageId}.jpg /// /// /// Task> GetPoemImages(int id); /// /// get poem related songs /// /// /// /// /// Task> GetPoemSongs(int id, bool approved, PoemMusicTrackType trackType = PoemMusicTrackType.All); /// /// get poem comments /// /// /// /// /// TopRated, Oldest, or Newest /// Task> GetPoemComments(int poemId, Guid userId, int? coupletIndex, GanjoorCommentSortOrder sortOrder = GanjoorCommentSortOrder.TopRated); /// /// get a single comment information (replies are not included) /// /// /// Task> GetCommentByIdAsync(int commentId); /// /// like / dislike / clear rating for a comment /// /// /// /// +1: like, -1: dislike, 0: remove previous rating /// Task> RateCommentAsync(Guid userId, int commentId, short value); /// /// get the requesting user's own rating values for all comments of a poem /// (mirrors GetUserPoemRecitationsUpVotes - meant to be merged client-side into an /// already fetched, anonymously cacheable GetPoemComments/GetPoemById result) /// /// /// /// Task> GetUserCommentRatings(int poemId, Guid userId); /// /// get a section related sections /// /// poem id /// section index /// /// if sent 0 or less returns all items /// Task> GetRelatedSections(int poemId, int sectionIndex, int skip, int itemsCount); /// /// send poem corrections /// /// /// Task> SuggestPoemCorrection(GanjoorPoemCorrectionViewModel correction); /// /// last unreviewed user correction for a poem /// /// /// /// Task> GetLastUnreviewedUserCorrectionForPoem(Guid userId, int poemId); /// /// user suggested songs /// /// /// /// Task> GetUserSuggestedSongs(Guid userId, PagingParameterModel paging); /// /// get user or all corrections /// /// if sent empty returns all corrections /// /// Task> GetUserCorrections(Guid userId, PagingParameterModel paging); /// /// effective corrections for poem /// /// /// /// Task> GetPoemEffectiveCorrections(int poemId, PagingParameterModel paging); /// /// get correction by id /// /// /// Task> GetCorrectionById(int id); /// /// delete unreviewed user corrections for a poem /// /// /// /// Task> DeletePoemCorrections(Guid userId, int poemId); /// /// get next unreviewed correction /// /// /// /// Task> GetNextUnreviewedCorrection(int skip, bool onlyUserCorrections); /// /// unreview correction count /// /// /// Task> GetUnreviewedCorrectionCount(bool onlyUserCorrections); /// /// moderate poem correction /// /// /// /// Task> ModeratePoemCorrection(Guid userId, GanjoorPoemCorrectionViewModel correction); /// /// break a poem from a verse forward /// /// /// /// /// Task> BreakPoemAsync(int poemId, int vOrder, Guid userId); /// /// update related sections /// /// /// void UpdateRelatedSections(int metreId, string rhyme); /// /// next unreviewed track /// /// /// /// Task> GetNextUnreviewedSong(int skip, Guid suggestedById); /// /// get track of user song suggestions /// /// /// Task> GetUserSongsSuggestionsStatistics(Guid userId); /// /// suggest song /// /// /// /// Task> SuggestSong(Guid userId, PoemMusicTrackViewModel song); /// /// get unreviewed count /// /// /// Task> GetUnreviewedSongsCount(Guid suggestedById); /// /// review song /// /// /// Task> ReviewSong(PoemMusicTrackViewModel song); /// /// direct insert song /// /// /// Task> DirectInsertSong(PoemMusicTrackViewModel song); /// /// get song by id /// /// /// Task> GetPoemSongById(int id); /// /// modify a published song /// /// /// Task> ModifyPublishedSong(PoemMusicTrackViewModel song); /// /// delete poem song by id /// /// /// Task> DeletePoemSongById(int id); /// /// new comment /// /// /// /// /// /// /// /// Task> NewComment(Guid userId, string ip, int poemId, string content, int? inReplyTo, int? coupletIndex); /// /// update user's own comment /// /// /// /// /// Task> EditMyComment(Guid userId, int commentId, string htmlComment); /// /// link or unlink user's own comment to a coupletIndex /// /// /// /// if null then unlinks /// couplet summary Task> LinkUnLinkMyComment(Guid userId, int commentId, int? coupletIndex); /// /// delete a reported comment /// /// /// Task> DeleteModerateComment(int reportId); /// /// delete user own comment /// /// /// /// Task> DeleteMyComment(Guid userId, int commentId); /// /// delete anybody's comment /// /// /// Task> DeleteAnybodyComment(int commentId); /// /// publish awaiting comment /// /// /// Task> PublishAwaitingComment(int commentId); /// /// get recent comments /// /// /// Guid.Empty /// /// /// /// Task> GetRecentComments(PagingParameterModel paging, Guid filterUserId, bool onlyPublished, bool onlyAwaiting = false, string term = null); /// /// report a comment /// /// /// /// id of report record Task> ReportComment(Guid userId, GanjoorPostReportCommentViewModel report); /// /// delete a report /// /// /// Task> DeleteReport(int id); /// /// Get list of reported comments /// /// /// Task> GetReportedComments(PagingParameterModel paging); /// /// Get Similar Poems accroding to prosody and rhyme informations /// /// /// /// /// /// /// /// /// /// /// /// /// Task> GetSimilarPoemsAsync(PagingParameterModel paging, string metre, string rhyme, int? poetId, int? catId, string language, GanjoorPoemFormat format , string term , int coupletCountsFrom , int coupletCountsTo , int[] exceptPoetId ); /// /// language tagged poem sections /// /// /// /// /// Task> GetLanguageTaggedPoemSections(PagingParameterModel paging, string language, int? poetId); /// /// modify page /// /// /// /// /// Task> UpdatePageAsync(int id, Guid editingUserId, GanjoorModifyPageViewModel pageData); /// /// modify poem => only these fields: NoIndex, RedirectFromFullUrl, MixedModeOrder /// /// /// /// /// Task> UpdatePoemAsync(int id, Guid editingUserId, GanjoorModifyPageViewModel pageData); /// /// modify poet /// /// /// /// Task> UpdatePoetAsync(GanjoorPoetViewModel poet, Guid editingUserId); /// /// create new poet /// /// /// /// Task> AddPoetAsync(GanjoorPoetViewModel poet, Guid editingUserId); /// /// delete poet /// /// /// RServiceResult StartDeletePoet(int id); /// /// chaneg poet image /// /// /// /// Task> ChangePoetImageAsync(int poetId, Guid imageId); /// /// returns metre list (ordered by Rhythm) /// /// /// Task> GetGanjoorMetres(bool sortOnVerseCount = false); /// /// get a random poem (2 = from hafez) /// /// /// /// Task> Faal(int poetId = 2, bool recitation = true); /// /// import from sqlite /// /// /// /// Task> ImportFromSqlite(int poetId, IFormFile file); /// /// import a catgory from sqlite /// /// /// /// Task> ImportCategoryFromSqlite(int catId, IFormFile file); /// /// Apply corrections from sqlite /// /// /// /// /// Task> ApplyCorrectionsFromSqlite(int poetId, IFormFile file, string note); /// /// export to sqlite /// /// /// Task> ExportToSqlite(int poetId); /// /// start generating gdb files /// /// RServiceResult StartBatchGenerateGDBFiles(); /// /// start exporting all published data (poets/categories/poems/verses) to the public /// git-tracked JSON data set, committing and pushing changes since the last run /// /// RServiceResult StartBatchExportPublicGitData(); /// /// (re)build local Ganjoor content (poets/categories/poems/verses/sections + their pages) /// from a public data export tree, read locally or over HTTP. Safe to re-run — existing /// entities (by id) are left untouched, only missing ones are added. /// /// true: fetch over HTTP (location is a base URL). false: read from a local folder (location is a path). /// base URL or local folder path of the exported data tree /// 0 imports every poet; a specific id imports only that poet (useful on a slow connection) /// RServiceResult StartImportFromPublicDataRepo(bool useHttp, string location, int poetId = 0); /// /// examine site pages for broken links /// /// RServiceResult HealthCheckContents(); /// /// examine comments for long links /// /// RServiceResult FindAndFixLongUrlsInComments(); /// /// start filling poems couplet indices /// /// RServiceResult StartFillingPoemsCoupletIndices(); /// /// refill couplet indices /// /// /// Task> RefillCoupletIndicesAsync(int poemId); /// /// fill section couplets count /// /// RServiceResult StartFillingSectionCoupletCounts(); /// /// regenerate poem full titles to fix an old bug /// /// RServiceResult RegeneratePoemsFullTitles(); /// /// start finding rhymes for single couplets /// /// RServiceResult StartFindingRhymesForSingleCouplets(); /// /// separate verses in poem.PlainText with Environment.NewLine instead of SPACE /// /// /// RServiceResult RegerneratePoemsPlainText(int catId); /// /// clean cache for paeg by id /// /// /// Task CacheCleanForPageById(int id); /// /// clean cache for page by url /// /// void CacheCleanForPageByUrl(string url); /// /// clean cache for page by comment /// /// /// Task CacheCleanForComment(int commentId); /// /// page modifications history /// /// /// Task> GetOlderVersionsOfPage(int pageId); /// /// get old version /// /// /// Task> GetOldVersionOfPage(int id); /// /// Search /// /// /// /// /// /// /// Task> Search(PagingParameterModel paging, string term, int? poetId, int? catId, int[] exceptPoetId); /// /// batch rename /// /// /// /// /// Task> BatchRenameCatPoemTitles(int catId, GanjoorBatchNamingModel model, Guid userId); /// /// re sulg cat poems /// /// /// Task> BatchReSlugCatPoems(int catId); /// /// find poem rhyme /// /// /// Task> FindPoemMainSectionRhyme(int id); /// /// find poem section rhyme /// /// /// Task> FindSectionRhyme(int id); /// /// find category poem rhymes /// /// /// /// RServiceResult FindCategoryPoemsRhymes(int catId, bool retag); /// /// Start finding missing rhthms /// /// /// /// /// /// RServiceResult StartFindingMissingRhythms(Guid systemUserId, Guid deletedUserId, bool onlyPoemsWithRhymes, int poemsNum = 1000); /// /// find poem rhythm /// /// /// Task> FindPoemMainSectionRhythm(int id); /// /// find category poem rhymes /// /// /// /// /// RServiceResult FindCategoryPoemsRhythms(int catId, bool retag, string rhythm = ""); /// /// generate category TOC /// /// /// /// /// Task> GenerateTableOfContents(Guid userId, int catId, GanjoorTOC options); /// /// directly insert generated TOC /// /// /// /// /// Task> DirectInsertGeneratedTableOfContents(int catId, Guid userId, GanjoorTOC options); /// /// start generating sub cats TOC /// /// /// /// /// RServiceResult StartGeneratingSubCatsTOC(Guid userId, int catId, GanjoorTOC ganjoorTOC); /// /// build sitemap /// /// RServiceResult StartBuildingSitemap(); /// /// start updating stats page /// /// RServiceResult StartUpdatingStatsPage(Guid editingUserId); /// /// start updating mundex page /// /// RServiceResult StartUpdatingMundexPage(Guid editingUserId); /// /// Switch Bookmark for couplet /// /// /// /// /// Task> SwitchCoupletBookmark(Guid userId, int poemId, int coupletIndex); /// /// Bookmark couplet if it is not /// /// /// /// /// Task> BookmarkCoupletIfNotBookmarked(Guid userId, int poemId, int coupletIndex); /// /// delete user bookmark /// /// /// /// to make sure a user can not delete another user's bookmarks /// Task> DeleteGanjoorBookmark(Guid bookmarkId, Guid userId); /// /// modify bookmark private note /// /// /// to make sure a user can not modify another user's bookmarks /// /// Task> ModifyBookmarkPrivateNoteAsync(Guid bookmarkId, Guid userId, string note); /// /// get user ganjoor bookmarks (only Id, CoupletIndex and DateTime are valid) /// /// /// /// Task> GetPoemUserBookmarks(Guid userId, int poemId); /// /// get verse bookmarks /// /// /// /// /// Task> IsCoupletBookmarked(Guid userId, int poemId, int coupletIndex); /// /// get user bookmarks (artifacts and items) /// /// /// /// /// Task> GetUserBookmarks(PagingParameterModel paging, Guid userId, string q); /// /// regenerate half centuries /// /// Task> RegenerateHalfCenturiesAsync(); /// /// get centuries with published poets /// /// Task> GetCenturiesAsync(); /// /// start generating related sections info /// /// /// RServiceResult StartGeneratingRelatedSectionsInfo(bool regenerate); /// /// get next ganjoor section probable metre /// /// Task> GetNextGanjoorPoemProbableMetre(); /// /// get a list of ganjoor poem sections probable metres /// /// /// Task> GetUnreviewedGanjoorPoemProbableMetres(PagingParameterModel paging); /// /// save ganjoor poem probable metre /// /// problable metre id /// /// Task> SaveGanjoorPoemProbableMetre(int id, string metre); /// /// return list of suggested spec lines /// /// /// Task> GetPoetSuggestedSpecLinesAsync(int poetId); /// /// returns specfic suggested line for poet /// /// /// Task> GetPoetSuggestedSpecLineAsync(int id); /// /// next unpublished suggested line for poets /// /// /// Task> GetNextUnmoderatedPoetSuggestedSpecLineAsync(int skip); /// /// npublished suggested lines count for poets /// /// Task> GetNextUnmoderatedPoetSuggestedSpecLinesCountAsync(); /// /// add a suggestion for poets spec lines /// /// /// Task> AddPoetSuggestedSpecLinesAsync(GanjoorPoetSuggestedSpecLineViewModel model); /// /// modify a suggestion for poets spec lines /// /// /// Task> ModifyPoetSuggestedSpecLinesAsync(GanjoorPoetSuggestedSpecLineViewModel model); /// /// reject a suggestion for poets spec lines /// /// /// /// /// Task> RejectPoetSuggestedSpecLinesAsync(int id, Guid deleteUserId, string rejectionCause); /// /// delete published suggested spec line /// /// /// Task> DeletePoetSuggestedSpecLinesAsync(int id); /// /// delete a category /// /// /// Task> DeleteCategoryAsync(int id); /// /// set category poems language tag /// /// /// /// Task> SetCategoryLanguageTagAsync(int catId, string language); /// /// set category poem format tag for poems consisting of a single whole poem section /// /// /// /// Task> SetCategoryPoemFormatAsync(int catId, GanjoorPoemFormat? format); /// /// regenerate TOCs /// /// /// RServiceResult StartRegeneratingTOCs(Guid userId); /// /// Finding Category Poems Duplicates /// /// /// /// /// RServiceResult StartFindingCategoryPoemsDuplicates(int srcCatId, int destCatId, bool hardTry); /// /// list of category saved duplicated poems /// /// /// Task> GetCategoryDuplicates(int catId); /// /// manually add a duplicate for a poems /// /// /// /// /// Task> AdDuplicateAsync(int srcCatId, int srcPoemId, int destPoemId); /// /// delete duplicate /// /// /// Task> DeleteDuplicateAsync(int id); /// /// start removing category duplicates /// /// /// /// RServiceResult StartRemovingCategoryDuplicates(int catId, int destCatId); /// /// sectionizing poems /// /// RServiceResult StartFillingPoemSectionsCoupletIndex(); /// /// start band couplets fix /// /// RServiceResult StartOneTimeBandCoupletsFix(); /// /// get couplet sections /// /// /// /// Task> GetCoupletSectionsAsync(int poemId, int coupletIndex); /// /// get all poem sections /// /// /// Task> GetPoemSectionsAsync(int id); /// /// regenerate poem sections (dangerous: wipes out existing data) /// /// /// Task> RegeneratePoemSections(int id); /// /// get a specific poem section /// /// /// Task> GetPoemSectionByIdAsync(int sectionId); /// /// delete a poem section /// /// /// /// /// Task> DeletePoemSectionByPoemIdAndIndexAsync(int poemId, int sectionIndex, bool convertVerses); /// /// last unreviewed user correction for a section /// /// /// /// Task> GetLastUnreviewedUserCorrectionForSection(Guid userId, int sectionId); /// /// get user section corrections /// /// if sent empty returns all corrections /// /// Task> GetUserSectionCorrections(Guid userId, PagingParameterModel paging); /// /// send a correction for a section /// /// /// Task> SuggestPoemSectionCorrection(GanjoorPoemSectionCorrectionViewModel correction); /// /// moderate poem section correction /// /// /// /// Task> ModeratePoemSectionCorrection(Guid userId, GanjoorPoemSectionCorrectionViewModel moderation); /// /// delete unreviewed user corrections for a poem section /// /// /// /// Task> DeletePoemSectionCorrections(Guid userId, int sectionId); /// /// get next unreviewed correction for a poem section /// /// /// /// Task> GetNextUnreviewedPoemSectionCorrection(int skip, bool deletedUserSections); /// /// unreviewed poem section correction count /// /// /// Task> GetUnreviewedPoemSectionCorrectionCount(bool deletedUserSections); /// /// get section correction by id /// /// /// Task> GetSectionCorrectionById(int id); /// /// effective corrections for section /// /// /// /// Task> GetSectionEffectiveCorrections(int sectionId, PagingParameterModel paging); /// /// regenerate category related sections /// /// /// RServiceResult StartRegeneratingCateoryRelatedSections(int catId); /// /// transfer poems and sections from a meter to another one /// /// /// /// Task> TransferMeterAsync(int srcMeterId, int destMeterId); /// /// add poem geo tag /// /// /// Task> AddPoemGeoDateTagAsync(PoemGeoDateTag tag); /// /// update poem tag /// /// /// Task> UpdatePoemGeoDateTagAsync(PoemGeoDateTag tag); /// /// delete poem tag /// /// /// Task> DeletePoemGeoDateTagAsync(int id); /// /// get poem tags ordered by LunarDateTotalNumber then by Id /// /// /// Task> GetPoemGeoDateTagsAsync(int poemId); /// /// get a categoty poem tags /// /// /// /// Task> GetCatPoemGeoDateTagsAsync(int catId, bool ignoreSumup = false); /// /// synchronize naskban links /// /// /// /// /// number of synched items void SynchronizeNaskbanLinks(Guid ganjoorUserId, string naskbanUserName, string naskbanPassword); /// /// justify naskban links /// /// /// void JustifyNaskbanPageNumbers(string naskbanUserName, string naskbanPassword); /// /// import naskban ganjoor matchings /// /// /// void ImportNaskbanGanjoorPoemMatchFindings(string naskbanUserName, string naskbanPassword); /// /// import paper sources from museum /// /// void ImportPaperSourcesFromMuseum(int poetid); /// /// discover poet naskban paper sources /// /// /// /// void DiscoverPoetNaskbanPaperSources(int poetid, string naskbanUserName, string naskbanPassword); /// /// category paper sources /// /// /// Task> GetCategoryPaperSourcesAsync(int categoryId); /// /// mark naskban links as human reviewed /// /// /// /// void MarkNaskbanLinksAsHumanReviewed(int bookId, int parentCatId, bool humanReviewed); /// /// mark naskban links a text original for a category /// /// /// /// void MarkNaskbanLinksAsTextOriginal(int bookId, int parentCatId, bool textOriginal); /// /// delete poem related naskban images by url /// /// /// Task> DeletePoemRelatedNaskbanImagesByNaskbanUrlAsync(string naskbanUrl); /// /// get category poem related images /// /// /// Task> GetCatPoemImagesAsync(int catId); /// /// filling poem formats /// /// RServiceResult StartFillingSectionsPoemFormats(); /// /// extracting quoted poems /// /// RServiceResult StartExtractingQuotedPoems(); /// /// regenerate related poems pages /// /// /// RServiceResult StartRegeneratingRelatedPoemsPages(Guid editingUserId); /// /// generate related poems page /// /// /// /// /// RServiceResult StartRegeneratingRelatedPoemsPageAsync(Guid editingUserId, int poetId, int relatedPoetId); /// /// discover related poems /// /// /// /// /// /// /// RServiceResult StartDiscoverRelatedPoems(int poetId, int relatedPoetId, bool breakOnFirstSimilar, int? relatedSubCatId, bool insertReverse); /// /// get quoted poems for a poem /// /// /// /// /// /// /// /// Task> GetGanjoorQuotedPoemsForPoemAsync(int poemId, int skip, int itemsCount, bool? onlyClaimedByBothPoets, bool? published, bool? chosenForMainList); /// /// two poems quoted records /// /// /// /// /// Task> GetGanjoorQuotedPoemsForRelatedAsync(int poemId, int relatedPoemId, bool? published); /// /// get quoted poems /// /// /// /// /// /// /// /// Task> GetGanjoorQuotedPoemsAsync(int? poetId, int? relatedPoetId, bool? chosen, bool? published, bool? claimed, bool? indirect); /// /// get quoted by id /// /// /// Task> GetGanjoorQuotedPoemByIdAsync(Guid id); /// /// insert quoted poem /// /// /// /// Task> InsertGanjoorQuotedPoemAsync(GanjoorQuotedPoemViewModel quoted, Guid editingUserId); /// /// update quoted poem /// /// /// /// Task> UpdateGanjoorQuotedPoemsAsync(GanjoorQuotedPoemViewModel quoted, Guid editingUserId); /// /// delete quoted by id /// /// /// /// Task> DeleteGanjoorQuotedPoemByIdAsync(Guid id, Guid editingUserId); /// /// suggest new quote /// /// /// /// Task> SuggestGanjoorQuotedPoemAsync(GanjoorQuotedPoemViewModel quoted, Guid userId); /// /// get user or all quoted suggestions /// /// if sent empty returns all suggestions /// /// Task> GetUserQuotedSuggestionsAsync(Guid userId, PagingParameterModel paging); /// /// next unmoderated quoted poem /// /// /// Task> GetNextUnmoderatedGanjoorQuotedPoemAsync(int skip); /// /// unmoderated quoted poems count /// /// Task> GetUnmoderatedGanjoorQuotedsCountAsync(); /// /// moderate quoted poems /// /// /// /// Task> ModerateGanjoorQuotedPoemAsync(GanjoorQuotedPoemModerationViewModel model, Guid userId); /// /// digital source from tag /// /// /// Task> GetDigitalSourceFromTagAsync(string sourceUrlSlug); /// /// tag with sources /// /// /// void TagCategoryWithSource(int catId, DigitalSource source); /// /// update digital sources stats /// /// void UpdateDigitalSourcesStats(Guid editingUserId); /// /// add page /// /// /// Task> AddPageAsync(GanjoorPage page); /// /// build word counts /// /// /// Task BuildCategoryWordCountsAsync(bool reset, int poetId); /// /// fill CategoryWordCounts.RowNmbrInCat /// void FillCategoryWordCountsRowNmbrInCat(); /// /// fill CategoryWordCountSummaries /// void FillCategoryWordCountSummaries(); /// /// category words count /// /// /// /// /// Task> GetCategoryWordCountsAsync(int catId, string term, PagingParameterModel paging); /// /// category words summary /// /// /// Task> GetCategoryWordCountSummaryAsync(int catId); /// /// comparison of word counts for poets /// /// /// /// /// /// Task> GetCategoryWordCountsBySubCatsAsync(string term, PagingParameterModel paging, int? parentCatId, int? poetId); /// /// get CategoryWordCount for a specific term in a category /// /// /// /// /// Task> GetCategoryWordCountByTermAsync(string term, int? catId, int? poetId); /// /// fill couplet summaries using open ai /// /// /// void OpenAIStartFillingCoupletSummaries(int startFrom, int count); /// /// fill poem summaries using open ai /// /// /// void OpenAIStartFillingPoemSummaries(int startFrom, int count); /// /// geo tag poems using AI /// /// /// void OpenAIStartFillingGeoLocations(int startFrom, int count); /// /// send cat correction /// /// /// Task> SuggestCatCorrectionAsync(GanjoorCatCorrectionViewModel correction); /// /// delete unreviewed user corrections for a cat /// /// /// /// Task> DeleteCatCorrectionsAsync(Guid userId, int catId); /// /// last unreviewed user correction for a cat /// /// /// /// Task> GetLastUnreviewedUserCorrectionForCatAsync(Guid userId, int catId); /// /// get user or all corrections for categories /// /// if sent empty returns all corrections /// /// Task> GetUserCatCorrectionsAsync(Guid userId, PagingParameterModel paging); /// /// cat effectinve corrections /// /// /// /// Task> GetCatEffectiveCorrectionsAsync(int catId, PagingParameterModel paging); /// /// get cat correction by id /// /// /// Task> GetCatCorrectionByIdAsync(int id); /// /// get next unreviewed cat correction /// /// /// /// Task> GetNextUnreviewedCatCorrectionAsync(int skip, bool onlyUserCorrections); /// /// unreviewed cat corrections count /// /// /// Task> GetUnreviewedCatCorrectionCountAsync(bool onlyUserCorrections); /// /// moderate cat correction /// /// /// /// Task> ModerateCatCorrectionAsync(Guid userId, GanjoorCatCorrectionViewModel moderation); } }