musora-content-services 2.79.1 → 2.80.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/docs/Content.html +269 -0
  3. package/docs/ContentOrganization.html +2 -2
  4. package/docs/Forums.html +2 -2
  5. package/docs/Gamification.html +2 -2
  6. package/docs/TestUser.html +2 -2
  7. package/docs/UserManagementSystem.html +2 -2
  8. package/docs/api_types.js.html +2 -2
  9. package/docs/config.js.html +2 -2
  10. package/docs/content-org_content-org.js.html +2 -2
  11. package/docs/content-org_guided-courses.ts.html +2 -2
  12. package/docs/content-org_learning-paths.ts.html +21 -14
  13. package/docs/content-org_playlists-types.js.html +2 -2
  14. package/docs/content-org_playlists.js.html +2 -2
  15. package/docs/content.js.html +2 -2
  16. package/docs/content_artist.ts.html +212 -0
  17. package/docs/content_content.ts.html +77 -0
  18. package/docs/content_genre.ts.html +211 -0
  19. package/docs/content_instructor.ts.html +203 -0
  20. package/docs/forums_categories.ts.html +3 -3
  21. package/docs/forums_forums.ts.html +2 -2
  22. package/docs/forums_posts.ts.html +2 -2
  23. package/docs/forums_threads.ts.html +2 -2
  24. package/docs/gamification_awards.ts.html +2 -2
  25. package/docs/gamification_gamification.js.html +2 -2
  26. package/docs/global.html +2 -2
  27. package/docs/index.html +2 -2
  28. package/docs/liveTesting.ts.html +2 -2
  29. package/docs/module-Accounts.html +2 -2
  30. package/docs/module-Artist.html +991 -0
  31. package/docs/module-Awards.html +2 -2
  32. package/docs/module-Config.html +2 -2
  33. package/docs/module-Content-Services-V2.html +2 -2
  34. package/docs/module-Forums.html +2 -2
  35. package/docs/module-Genre.html +981 -0
  36. package/docs/module-GuidedCourses.html +2 -2
  37. package/docs/module-Instructor.html +929 -0
  38. package/docs/module-Interests.html +2 -2
  39. package/docs/module-LearningPaths.html +6 -6
  40. package/docs/module-Onboarding.html +2 -2
  41. package/docs/module-Payments.html +2 -2
  42. package/docs/module-Permissions.html +2 -2
  43. package/docs/module-Playlists.html +2 -2
  44. package/docs/module-ProgressRow.html +2 -2
  45. package/docs/module-Railcontent-Services.html +2 -2
  46. package/docs/module-Sanity-Services.html +326 -1854
  47. package/docs/module-Sessions.html +2 -2
  48. package/docs/module-UserActivity.html +2 -2
  49. package/docs/module-UserChat.html +2 -2
  50. package/docs/module-UserManagement.html +2 -2
  51. package/docs/module-UserMemberships.html +2 -2
  52. package/docs/module-UserNotifications.html +2 -2
  53. package/docs/module-UserProfile.html +2 -2
  54. package/docs/progress-row_method-card.js.html +2 -2
  55. package/docs/railcontent.js.html +2 -2
  56. package/docs/sanity.js.html +107 -268
  57. package/docs/userActivity.js.html +2 -2
  58. package/docs/user_account.ts.html +2 -2
  59. package/docs/user_chat.js.html +2 -2
  60. package/docs/user_interests.js.html +2 -2
  61. package/docs/user_management.js.html +2 -2
  62. package/docs/user_memberships.ts.html +2 -2
  63. package/docs/user_notifications.js.html +2 -2
  64. package/docs/user_onboarding.ts.html +2 -2
  65. package/docs/user_payments.ts.html +2 -2
  66. package/docs/user_permissions.js.html +2 -2
  67. package/docs/user_profile.js.html +2 -2
  68. package/docs/user_sessions.js.html +2 -2
  69. package/docs/user_types.js.html +2 -2
  70. package/docs/user_user-management-system.js.html +2 -2
  71. package/jsdoc.json +1 -0
  72. package/package.json +1 -1
  73. package/src/contentTypeConfig.js +2 -2
  74. package/src/index.d.ts +28 -5
  75. package/src/index.js +28 -5
  76. package/src/services/content/artist.ts +139 -0
  77. package/src/services/content/content.ts +38 -0
  78. package/src/services/content/genre.ts +139 -0
  79. package/src/services/content/instructor.ts +131 -0
  80. package/src/services/sanity.js +105 -266
  81. package/.claude/settings.local.json +0 -8
@@ -29,7 +29,7 @@
29
29
  <nav >
30
30
 
31
31
 
32
- <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-Accounts.html">Accounts</a><ul class='methods'><li data-type='method'><a href="module-Accounts.html#~confirmEmailChange">confirmEmailChange</a></li><li data-type='method'><a href="module-Accounts.html#~deleteAccount">deleteAccount</a></li><li data-type='method'><a href="module-Accounts.html#~numberOfActiveUsers">numberOfActiveUsers</a></li><li data-type='method'><a href="module-Accounts.html#~requestEmailChange">requestEmailChange</a></li><li data-type='method'><a href="module-Accounts.html#~resetPassword">resetPassword</a></li><li data-type='method'><a href="module-Accounts.html#~sendAccountSetupEmail">sendAccountSetupEmail</a></li><li data-type='method'><a href="module-Accounts.html#~sendPasswordResetEmail">sendPasswordResetEmail</a></li><li data-type='method'><a href="module-Accounts.html#~setupAccount">setupAccount</a></li><li data-type='method'><a href="module-Accounts.html#~status">status</a></li><li data-type='method'><a href="module-Accounts.html#~toggleStudentView">toggleStudentView</a></li></ul></li><li><a href="module-Awards.html">Awards</a><ul class='methods'><li data-type='method'><a href="module-Awards.html#~fetchAwardsForUser">fetchAwardsForUser</a></li><li data-type='method'><a href="module-Awards.html#~fetchCertificate">fetchCertificate</a></li><li data-type='method'><a href="module-Awards.html#~getAwardDataForGuidedContent">getAwardDataForGuidedContent</a></li></ul></li><li><a href="module-Config.html">Config</a><ul class='methods'><li data-type='method'><a href="module-Config.html#.initializeService">initializeService</a></li></ul></li><li><a href="module-Content-Services-V2.html">Content-Services-V2</a><ul class='methods'><li data-type='method'><a href="module-Content-Services-V2.html#.getContentRows">getContentRows</a></li><li data-type='method'><a href="module-Content-Services-V2.html#.getLegacyMethods">getLegacyMethods</a></li><li data-type='method'><a href="module-Content-Services-V2.html#.getNewAndUpcoming">getNewAndUpcoming</a></li><li data-type='method'><a href="module-Content-Services-V2.html#.getRecent">getRecent</a></li><li data-type='method'><a href="module-Content-Services-V2.html#.getRecommendedForYou">getRecommendedForYou</a></li><li data-type='method'><a href="module-Content-Services-V2.html#.getScheduleContentRows">getScheduleContentRows</a></li><li data-type='method'><a href="module-Content-Services-V2.html#.getTabResults">getTabResults</a></li></ul></li><li><a href="module-Forums.html">Forums</a><ul class='methods'><li data-type='method'><a href="module-Forums.html#~createForumCategory">createForumCategory</a></li><li data-type='method'><a href="module-Forums.html#~createPost">createPost</a></li><li data-type='method'><a href="module-Forums.html#~createThread">createThread</a></li><li data-type='method'><a href="module-Forums.html#~deletePost">deletePost</a></li><li data-type='method'><a href="module-Forums.html#~deleteThread">deleteThread</a></li><li data-type='method'><a href="module-Forums.html#~fetchCommunityGuidelines">fetchCommunityGuidelines</a></li><li data-type='method'><a href="module-Forums.html#~fetchFollowedThreads">fetchFollowedThreads</a></li><li data-type='method'><a href="module-Forums.html#~fetchForumCategories">fetchForumCategories</a></li><li data-type='method'><a href="module-Forums.html#~fetchLatestThreads">fetchLatestThreads</a></li><li data-type='method'><a href="module-Forums.html#~fetchPosts">fetchPosts</a></li><li data-type='method'><a href="module-Forums.html#~fetchThreads">fetchThreads</a></li><li data-type='method'><a href="module-Forums.html#~followThread">followThread</a></li><li data-type='method'><a href="module-Forums.html#~jumpToPost">jumpToPost</a></li><li data-type='method'><a href="module-Forums.html#~likePost">likePost</a></li><li data-type='method'><a href="module-Forums.html#~lockThread">lockThread</a></li><li data-type='method'><a href="module-Forums.html#~markThreadAsRead">markThreadAsRead</a></li><li data-type='method'><a href="module-Forums.html#~pinThread">pinThread</a></li><li data-type='method'><a href="module-Forums.html#~search">search</a></li><li data-type='method'><a href="module-Forums.html#~unfollowThread">unfollowThread</a></li><li data-type='method'><a href="module-Forums.html#~unlikePost">unlikePost</a></li><li data-type='method'><a href="module-Forums.html#~unlockThread">unlockThread</a></li><li data-type='method'><a href="module-Forums.html#~unpinThread">unpinThread</a></li><li data-type='method'><a href="module-Forums.html#~updateForumCategory">updateForumCategory</a></li><li data-type='method'><a href="module-Forums.html#~updatePost">updatePost</a></li><li data-type='method'><a href="module-Forums.html#~updateThread">updateThread</a></li></ul></li><li></li><li></li><li><a href="module-GuidedCourses.html">GuidedCourses</a></li><li><a href="module-Interests.html">Interests</a><ul class='methods'><li data-type='method'><a href="module-Interests.html#.fetchInterests">fetchInterests</a></li><li data-type='method'><a href="module-Interests.html#.fetchUninterests">fetchUninterests</a></li><li data-type='method'><a href="module-Interests.html#.markContentAsInterested">markContentAsInterested</a></li><li data-type='method'><a href="module-Interests.html#.markContentAsNotInterested">markContentAsNotInterested</a></li><li data-type='method'><a href="module-Interests.html#.removeContentAsInterested">removeContentAsInterested</a></li><li data-type='method'><a href="module-Interests.html#.removeContentAsNotInterested">removeContentAsNotInterested</a></li></ul></li><li><a href="module-LearningPaths.html">LearningPaths</a><ul class='methods'><li data-type='method'><a href="module-LearningPaths.html#~completeLearningPathIntroVideo">completeLearningPathIntroVideo</a></li><li data-type='method'><a href="module-LearningPaths.html#~completeMethodIntroVideo">completeMethodIntroVideo</a></li><li data-type='method'><a href="module-LearningPaths.html#~fetchLearningPathLessons">fetchLearningPathLessons</a></li><li data-type='method'><a href="module-LearningPaths.html#~getActivePath">getActivePath</a></li><li data-type='method'><a href="module-LearningPaths.html#~getDailySession">getDailySession</a></li><li data-type='method'><a href="module-LearningPaths.html#~getEnrichedLearningPath">getEnrichedLearningPath</a></li><li data-type='method'><a href="module-LearningPaths.html#~getLearningPathLessonsByIds">getLearningPathLessonsByIds</a></li><li data-type='method'><a href="module-LearningPaths.html#~mapContentToParent">mapContentToParent</a></li><li data-type='method'><a href="module-LearningPaths.html#~resetAllLearningPaths">resetAllLearningPaths</a></li><li data-type='method'><a href="module-LearningPaths.html#~startLearningPath">startLearningPath</a></li><li data-type='method'><a href="module-LearningPaths.html#~updateActivePath">updateActivePath</a></li><li data-type='method'><a href="module-LearningPaths.html#~updateDailySession">updateDailySession</a></li></ul></li><li><a href="module-Onboarding.html">Onboarding</a><ul class='methods'><li data-type='method'><a href="module-Onboarding.html#~getOnboardingRecommendedContent">getOnboardingRecommendedContent</a></li><li data-type='method'><a href="module-Onboarding.html#~startOnboarding">startOnboarding</a></li><li data-type='method'><a href="module-Onboarding.html#~updateOnboarding">updateOnboarding</a></li><li data-type='method'><a href="module-Onboarding.html#~userOnboardingForBrand">userOnboardingForBrand</a></li></ul></li><li><a href="module-Payments.html">Payments</a><ul class='methods'><li data-type='method'><a href="module-Payments.html#~fetchCustomerPayments">fetchCustomerPayments</a></li></ul></li><li><a href="module-Permissions.html">Permissions</a><ul class='methods'><li data-type='method'><a href="module-Permissions.html#.fetchUserPermissions">fetchUserPermissions</a></li><li data-type='method'><a href="module-Permissions.html#.reset">reset</a></li></ul></li><li><a href="module-Playlists.html">Playlists</a><ul class='methods'><li data-type='method'><a href="module-Playlists.html#.addItemToPlaylist">addItemToPlaylist</a></li><li data-type='method'><a href="module-Playlists.html#.createPlaylist">createPlaylist</a></li><li data-type='method'><a href="module-Playlists.html#.deletePlaylist">deletePlaylist</a></li><li data-type='method'><a href="module-Playlists.html#.duplicatePlaylist">duplicatePlaylist</a></li><li data-type='method'><a href="module-Playlists.html#.fetchPlaylist">fetchPlaylist</a></li><li data-type='method'><a href="module-Playlists.html#.fetchPlaylistItems">fetchPlaylistItems</a></li><li data-type='method'><a href="module-Playlists.html#.fetchUserPlaylists">fetchUserPlaylists</a></li><li data-type='method'><a href="module-Playlists.html#.togglePlaylistPrivate">togglePlaylistPrivate</a></li><li data-type='method'><a href="module-Playlists.html#.undeletePlaylist">undeletePlaylist</a></li><li data-type='method'><a href="module-Playlists.html#.updatePlaylist">updatePlaylist</a></li><li data-type='method'><a href="module-Playlists.html#~deleteItemsFromPlaylist">deleteItemsFromPlaylist</a></li><li data-type='method'><a href="module-Playlists.html#~likePlaylist">likePlaylist</a></li><li data-type='method'><a href="module-Playlists.html#~reportPlaylist">reportPlaylist</a></li><li data-type='method'><a href="module-Playlists.html#~restoreItemFromPlaylist">restoreItemFromPlaylist</a></li><li data-type='method'><a href="module-Playlists.html#~unlikePlaylist">unlikePlaylist</a></li></ul></li><li><a href="module-ProgressRow.html">ProgressRow</a></li><li><a href="module-Railcontent-Services.html">Railcontent-Services</a><ul class='methods'><li data-type='method'><a href="module-Railcontent-Services.html#.assignModeratorToComment">assignModeratorToComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.closeComment">closeComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.createComment">createComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.deleteComment">deleteComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.editComment">editComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchAllCompletedStates">fetchAllCompletedStates</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchCarouselCardData">fetchCarouselCardData</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchComment">fetchComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchCommentRelies">fetchCommentRelies</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchComments">fetchComments</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchCompletedContent">fetchCompletedContent</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchCompletedState">fetchCompletedState</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchContentInProgress">fetchContentInProgress</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchContentPageUserData">fetchContentPageUserData</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchNextContentDataForParent">fetchNextContentDataForParent</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchRecentUserActivities">fetchRecentUserActivities</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchSongsInProgress">fetchSongsInProgress</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchTopComment">fetchTopComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchUserAward">fetchUserAward</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchUserBadges">fetchUserBadges</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchUserPracticeNotes">fetchUserPracticeNotes</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.likeComment">likeComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.openComment">openComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.postContentComplete">postContentComplete</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.postContentReset">postContentReset</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.postContentRestore">postContentRestore</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.postContentStart">postContentStart</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.replyToComment">replyToComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.reportComment">reportComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.restoreComment">restoreComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.setStudentViewForUser">setStudentViewForUser</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.unassignModeratorToComment">unassignModeratorToComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.unlikeComment">unlikeComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#~fetchLastInteractedChild">fetchLastInteractedChild</a></li></ul></li><li><a href="module-Sanity-Services.html">Sanity-Services</a><ul class='methods'><li data-type='method'><a href="module-Sanity-Services.html#.fetchAll">fetchAll</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchAllFilterOptions">fetchAllFilterOptions</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchAllPacks">fetchAllPacks</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchArtistLessons">fetchArtistLessons</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchArtists">fetchArtists</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchByRailContentId">fetchByRailContentId</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchByRailContentIds">fetchByRailContentIds</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchByReference">fetchByReference</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchCoachLessons">fetchCoachLessons</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchComingSoon">fetchComingSoon</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchCommentModContentData">fetchCommentModContentData</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchFoundation">fetchFoundation</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchGenreLessons">fetchGenreLessons</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchLeaving">fetchLeaving</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchLessonContent">fetchLessonContent</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchLessonsFeaturingThisContent">fetchLessonsFeaturingThisContent</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMetadata">fetchMetadata</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMethod">fetchMethod</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMethodChildren">fetchMethodChildren</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMethodChildrenIds">fetchMethodChildrenIds</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMethodPreviousNextLesson">fetchMethodPreviousNextLesson</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMethodV2IntroVideo">fetchMethodV2IntroVideo</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMethodV2Structure">fetchMethodV2Structure</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchNewReleases">fetchNewReleases</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchNextPreviousLesson">fetchNextPreviousLesson</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchOtherSongVersions">fetchOtherSongVersions</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchPackAll">fetchPackAll</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchPackData">fetchPackData</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchRelatedLessons">fetchRelatedLessons</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchRelatedRecommendedContent">fetchRelatedRecommendedContent</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchRelatedSongs">fetchRelatedSongs</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchReturning">fetchReturning</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchSanity">fetchSanity</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchScheduledReleases">fetchScheduledReleases</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchShowsData">fetchShowsData</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchSiblingContent">fetchSiblingContent</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchSongArtistCount">fetchSongArtistCount</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchSongById">fetchSongById</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchUpcomingEvents">fetchUpcomingEvents</a></li><li data-type='method'><a href="module-Sanity-Services.html#.jumpToContinueContent">jumpToContinueContent</a></li><li data-type='method'><a href="module-Sanity-Services.html#~fetchRelatedByLicense">fetchRelatedByLicense</a></li><li data-type='method'><a href="module-Sanity-Services.html#~getQueryFromPage">getQueryFromPage</a></li></ul></li><li><a href="module-Sessions.html">Sessions</a><ul class='methods'><li data-type='method'><a href="module-Sessions.html#.login">login</a></li><li data-type='method'><a href="module-Sessions.html#.logout">logout</a></li></ul></li><li><a href="module-UserActivity.html">UserActivity</a><ul class='methods'><li data-type='method'><a href="module-UserActivity.html#.calculateLongestStreaks">calculateLongestStreaks</a></li><li data-type='method'><a href="module-UserActivity.html#.createPracticeNotes">createPracticeNotes</a></li><li data-type='method'><a href="module-UserActivity.html#.deletePracticeSession">deletePracticeSession</a></li><li data-type='method'><a href="module-UserActivity.html#.deleteUserActivity">deleteUserActivity</a></li><li data-type='method'><a href="module-UserActivity.html#.getPracticeNotes">getPracticeNotes</a></li><li data-type='method'><a href="module-UserActivity.html#.getPracticeSessions">getPracticeSessions</a></li><li data-type='method'><a href="module-UserActivity.html#.getProgressRows">getProgressRows</a></li><li data-type='method'><a href="module-UserActivity.html#.getRecentActivity">getRecentActivity</a></li><li data-type='method'><a href="module-UserActivity.html#.getUserMonthlyStats">getUserMonthlyStats</a></li><li data-type='method'><a href="module-UserActivity.html#.getUserWeeklyStats">getUserWeeklyStats</a></li><li data-type='method'><a href="module-UserActivity.html#.pinProgressRow">pinProgressRow</a></li><li data-type='method'><a href="module-UserActivity.html#.recordUserActivity">recordUserActivity</a></li><li data-type='method'><a href="module-UserActivity.html#.recordUserPractice">recordUserPractice</a></li><li data-type='method'><a href="module-UserActivity.html#.removeUserPractice">removeUserPractice</a></li><li data-type='method'><a href="module-UserActivity.html#.restorePracticeSession">restorePracticeSession</a></li><li data-type='method'><a href="module-UserActivity.html#.restoreUserActivity">restoreUserActivity</a></li><li data-type='method'><a href="module-UserActivity.html#.restoreUserPractice">restoreUserPractice</a></li><li data-type='method'><a href="module-UserActivity.html#.unpinProgressRow">unpinProgressRow</a></li><li data-type='method'><a href="module-UserActivity.html#.updatePracticeNotes">updatePracticeNotes</a></li><li data-type='method'><a href="module-UserActivity.html#.updateUserPractice">updateUserPractice</a></li></ul></li><li><a href="module-UserChat.html">UserChat</a><ul class='methods'><li data-type='method'><a href="module-UserChat.html#.fetchChatSettings">fetchChatSettings</a></li></ul></li><li><a href="module-UserManagement.html">UserManagement</a><ul class='methods'><li data-type='method'><a href="module-UserManagement.html#.blockUser">blockUser</a></li><li data-type='method'><a href="module-UserManagement.html#.blockedUsers">blockedUsers</a></li><li data-type='method'><a href="module-UserManagement.html#.deletePicture">deletePicture</a></li><li data-type='method'><a href="module-UserManagement.html#.getUserData">getUserData</a></li><li data-type='method'><a href="module-UserManagement.html#.getUserSignature">getUserSignature</a></li><li data-type='method'><a href="module-UserManagement.html#.isUsernameAvailable">isUsernameAvailable</a></li><li data-type='method'><a href="module-UserManagement.html#.setUserSignature">setUserSignature</a></li><li data-type='method'><a href="module-UserManagement.html#.toggleSignaturePrivate">toggleSignaturePrivate</a></li><li data-type='method'><a href="module-UserManagement.html#.unblockUser">unblockUser</a></li><li data-type='method'><a href="module-UserManagement.html#.updateDisplayName">updateDisplayName</a></li><li data-type='method'><a href="module-UserManagement.html#.uploadPicture">uploadPicture</a></li><li data-type='method'><a href="module-UserManagement.html#.uploadPictureFromS3">uploadPictureFromS3</a></li></ul></li><li><a href="module-UserMemberships.html">UserMemberships</a><ul class='methods'><li data-type='method'><a href="module-UserMemberships.html#~fetchMemberships">fetchMemberships</a></li><li data-type='method'><a href="module-UserMemberships.html#~fetchRechargeTokens">fetchRechargeTokens</a></li><li data-type='method'><a href="module-UserMemberships.html#~restorePurchases">restorePurchases</a></li><li data-type='method'><a href="module-UserMemberships.html#~upgradeSubscription">upgradeSubscription</a></li></ul></li><li><a href="module-UserNotifications.html">UserNotifications</a><ul class='methods'><li data-type='method'><a href="module-UserNotifications.html#.deleteNotification">deleteNotification</a></li><li data-type='method'><a href="module-UserNotifications.html#.fetchLiveEventPollingState">fetchLiveEventPollingState</a></li><li data-type='method'><a href="module-UserNotifications.html#.fetchNotificationSettings">fetchNotificationSettings</a></li><li data-type='method'><a href="module-UserNotifications.html#.fetchNotifications">fetchNotifications</a></li><li data-type='method'><a href="module-UserNotifications.html#.fetchUnreadCount">fetchUnreadCount</a></li><li data-type='method'><a href="module-UserNotifications.html#.markAllNotificationsAsRead">markAllNotificationsAsRead</a></li><li data-type='method'><a href="module-UserNotifications.html#.markNotificationAsRead">markNotificationAsRead</a></li><li data-type='method'><a href="module-UserNotifications.html#.markNotificationAsUnread">markNotificationAsUnread</a></li><li data-type='method'><a href="module-UserNotifications.html#.pauseLiveEventPolling">pauseLiveEventPolling</a></li><li data-type='method'><a href="module-UserNotifications.html#.restoreNotification">restoreNotification</a></li><li data-type='method'><a href="module-UserNotifications.html#.startLiveEventPolling">startLiveEventPolling</a></li><li data-type='method'><a href="module-UserNotifications.html#.updateNotificationSetting">updateNotificationSetting</a></li></ul></li><li><a href="module-UserProfile.html">UserProfile</a><ul class='methods'><li data-type='method'><a href="module-UserProfile.html#.deleteProfilePicture">deleteProfilePicture</a></li><li data-type='method'><a href="module-UserProfile.html#.otherStats">otherStats</a></li></ul></li></ul><h3>Namespaces</h3><ul><li><a href="ContentOrganization.html">ContentOrganization</a></li><li><a href="Forums.html">Forums</a></li><li><a href="Gamification.html">Gamification</a></li><li><a href="UserManagementSystem.html">UserManagementSystem</a></li></ul><h3>Interfaces</h3><ul><li><a href="TestUser.html">TestUser</a></li></ul><h3>Global</h3><ul><li><a href="global.html#createTestUser">createTestUser</a></li></ul>
32
+ <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-Accounts.html">Accounts</a><ul class='methods'><li data-type='method'><a href="module-Accounts.html#~confirmEmailChange">confirmEmailChange</a></li><li data-type='method'><a href="module-Accounts.html#~deleteAccount">deleteAccount</a></li><li data-type='method'><a href="module-Accounts.html#~numberOfActiveUsers">numberOfActiveUsers</a></li><li data-type='method'><a href="module-Accounts.html#~requestEmailChange">requestEmailChange</a></li><li data-type='method'><a href="module-Accounts.html#~resetPassword">resetPassword</a></li><li data-type='method'><a href="module-Accounts.html#~sendAccountSetupEmail">sendAccountSetupEmail</a></li><li data-type='method'><a href="module-Accounts.html#~sendPasswordResetEmail">sendPasswordResetEmail</a></li><li data-type='method'><a href="module-Accounts.html#~setupAccount">setupAccount</a></li><li data-type='method'><a href="module-Accounts.html#~status">status</a></li><li data-type='method'><a href="module-Accounts.html#~toggleStudentView">toggleStudentView</a></li></ul></li><li><a href="module-Artist.html">Artist</a><ul class='methods'><li data-type='method'><a href="module-Artist.html#~fetchArtistBySlug">fetchArtistBySlug</a></li><li data-type='method'><a href="module-Artist.html#~fetchArtistLessons">fetchArtistLessons</a></li><li data-type='method'><a href="module-Artist.html#~fetchArtists">fetchArtists</a></li></ul></li><li><a href="module-Awards.html">Awards</a><ul class='methods'><li data-type='method'><a href="module-Awards.html#~fetchAwardsForUser">fetchAwardsForUser</a></li><li data-type='method'><a href="module-Awards.html#~fetchCertificate">fetchCertificate</a></li><li data-type='method'><a href="module-Awards.html#~getAwardDataForGuidedContent">getAwardDataForGuidedContent</a></li></ul></li><li><a href="module-Config.html">Config</a><ul class='methods'><li data-type='method'><a href="module-Config.html#.initializeService">initializeService</a></li></ul></li><li><a href="module-Content-Services-V2.html">Content-Services-V2</a><ul class='methods'><li data-type='method'><a href="module-Content-Services-V2.html#.getContentRows">getContentRows</a></li><li data-type='method'><a href="module-Content-Services-V2.html#.getLegacyMethods">getLegacyMethods</a></li><li data-type='method'><a href="module-Content-Services-V2.html#.getNewAndUpcoming">getNewAndUpcoming</a></li><li data-type='method'><a href="module-Content-Services-V2.html#.getRecent">getRecent</a></li><li data-type='method'><a href="module-Content-Services-V2.html#.getRecommendedForYou">getRecommendedForYou</a></li><li data-type='method'><a href="module-Content-Services-V2.html#.getScheduleContentRows">getScheduleContentRows</a></li><li data-type='method'><a href="module-Content-Services-V2.html#.getTabResults">getTabResults</a></li></ul></li><li><a href="module-Forums.html">Forums</a><ul class='methods'><li data-type='method'><a href="module-Forums.html#~createForumCategory">createForumCategory</a></li><li data-type='method'><a href="module-Forums.html#~createPost">createPost</a></li><li data-type='method'><a href="module-Forums.html#~createThread">createThread</a></li><li data-type='method'><a href="module-Forums.html#~deletePost">deletePost</a></li><li data-type='method'><a href="module-Forums.html#~deleteThread">deleteThread</a></li><li data-type='method'><a href="module-Forums.html#~fetchCommunityGuidelines">fetchCommunityGuidelines</a></li><li data-type='method'><a href="module-Forums.html#~fetchFollowedThreads">fetchFollowedThreads</a></li><li data-type='method'><a href="module-Forums.html#~fetchForumCategories">fetchForumCategories</a></li><li data-type='method'><a href="module-Forums.html#~fetchLatestThreads">fetchLatestThreads</a></li><li data-type='method'><a href="module-Forums.html#~fetchPosts">fetchPosts</a></li><li data-type='method'><a href="module-Forums.html#~fetchThreads">fetchThreads</a></li><li data-type='method'><a href="module-Forums.html#~followThread">followThread</a></li><li data-type='method'><a href="module-Forums.html#~jumpToPost">jumpToPost</a></li><li data-type='method'><a href="module-Forums.html#~likePost">likePost</a></li><li data-type='method'><a href="module-Forums.html#~lockThread">lockThread</a></li><li data-type='method'><a href="module-Forums.html#~markThreadAsRead">markThreadAsRead</a></li><li data-type='method'><a href="module-Forums.html#~pinThread">pinThread</a></li><li data-type='method'><a href="module-Forums.html#~search">search</a></li><li data-type='method'><a href="module-Forums.html#~unfollowThread">unfollowThread</a></li><li data-type='method'><a href="module-Forums.html#~unlikePost">unlikePost</a></li><li data-type='method'><a href="module-Forums.html#~unlockThread">unlockThread</a></li><li data-type='method'><a href="module-Forums.html#~unpinThread">unpinThread</a></li><li data-type='method'><a href="module-Forums.html#~updateForumCategory">updateForumCategory</a></li><li data-type='method'><a href="module-Forums.html#~updatePost">updatePost</a></li><li data-type='method'><a href="module-Forums.html#~updateThread">updateThread</a></li></ul></li><li></li><li></li><li><a href="module-Genre.html">Genre</a><ul class='methods'><li data-type='method'><a href="module-Genre.html#~fetchGenreBySlug">fetchGenreBySlug</a></li><li data-type='method'><a href="module-Genre.html#~fetchGenreLessons">fetchGenreLessons</a></li><li data-type='method'><a href="module-Genre.html#~fetchGenres">fetchGenres</a></li></ul></li><li><a href="module-GuidedCourses.html">GuidedCourses</a></li><li><a href="module-Instructor.html">Instructor</a><ul class='methods'><li data-type='method'><a href="module-Instructor.html#~fetchInstructorBySlug">fetchInstructorBySlug</a></li><li data-type='method'><a href="module-Instructor.html#~fetchInstructorLessons">fetchInstructorLessons</a></li><li data-type='method'><a href="module-Instructor.html#~fetchInstructors">fetchInstructors</a></li></ul></li><li><a href="module-Interests.html">Interests</a><ul class='methods'><li data-type='method'><a href="module-Interests.html#.fetchInterests">fetchInterests</a></li><li data-type='method'><a href="module-Interests.html#.fetchUninterests">fetchUninterests</a></li><li data-type='method'><a href="module-Interests.html#.markContentAsInterested">markContentAsInterested</a></li><li data-type='method'><a href="module-Interests.html#.markContentAsNotInterested">markContentAsNotInterested</a></li><li data-type='method'><a href="module-Interests.html#.removeContentAsInterested">removeContentAsInterested</a></li><li data-type='method'><a href="module-Interests.html#.removeContentAsNotInterested">removeContentAsNotInterested</a></li></ul></li><li><a href="module-LearningPaths.html">LearningPaths</a><ul class='methods'><li data-type='method'><a href="module-LearningPaths.html#~completeLearningPathIntroVideo">completeLearningPathIntroVideo</a></li><li data-type='method'><a href="module-LearningPaths.html#~completeMethodIntroVideo">completeMethodIntroVideo</a></li><li data-type='method'><a href="module-LearningPaths.html#~fetchLearningPathLessons">fetchLearningPathLessons</a></li><li data-type='method'><a href="module-LearningPaths.html#~getActivePath">getActivePath</a></li><li data-type='method'><a href="module-LearningPaths.html#~getDailySession">getDailySession</a></li><li data-type='method'><a href="module-LearningPaths.html#~getEnrichedLearningPath">getEnrichedLearningPath</a></li><li data-type='method'><a href="module-LearningPaths.html#~getLearningPathLessonsByIds">getLearningPathLessonsByIds</a></li><li data-type='method'><a href="module-LearningPaths.html#~mapContentToParent">mapContentToParent</a></li><li data-type='method'><a href="module-LearningPaths.html#~resetAllLearningPaths">resetAllLearningPaths</a></li><li data-type='method'><a href="module-LearningPaths.html#~startLearningPath">startLearningPath</a></li><li data-type='method'><a href="module-LearningPaths.html#~updateActivePath">updateActivePath</a></li><li data-type='method'><a href="module-LearningPaths.html#~updateDailySession">updateDailySession</a></li></ul></li><li><a href="module-Onboarding.html">Onboarding</a><ul class='methods'><li data-type='method'><a href="module-Onboarding.html#~getOnboardingRecommendedContent">getOnboardingRecommendedContent</a></li><li data-type='method'><a href="module-Onboarding.html#~startOnboarding">startOnboarding</a></li><li data-type='method'><a href="module-Onboarding.html#~updateOnboarding">updateOnboarding</a></li><li data-type='method'><a href="module-Onboarding.html#~userOnboardingForBrand">userOnboardingForBrand</a></li></ul></li><li><a href="module-Payments.html">Payments</a><ul class='methods'><li data-type='method'><a href="module-Payments.html#~fetchCustomerPayments">fetchCustomerPayments</a></li></ul></li><li><a href="module-Permissions.html">Permissions</a><ul class='methods'><li data-type='method'><a href="module-Permissions.html#.fetchUserPermissions">fetchUserPermissions</a></li><li data-type='method'><a href="module-Permissions.html#.reset">reset</a></li></ul></li><li><a href="module-Playlists.html">Playlists</a><ul class='methods'><li data-type='method'><a href="module-Playlists.html#.addItemToPlaylist">addItemToPlaylist</a></li><li data-type='method'><a href="module-Playlists.html#.createPlaylist">createPlaylist</a></li><li data-type='method'><a href="module-Playlists.html#.deletePlaylist">deletePlaylist</a></li><li data-type='method'><a href="module-Playlists.html#.duplicatePlaylist">duplicatePlaylist</a></li><li data-type='method'><a href="module-Playlists.html#.fetchPlaylist">fetchPlaylist</a></li><li data-type='method'><a href="module-Playlists.html#.fetchPlaylistItems">fetchPlaylistItems</a></li><li data-type='method'><a href="module-Playlists.html#.fetchUserPlaylists">fetchUserPlaylists</a></li><li data-type='method'><a href="module-Playlists.html#.togglePlaylistPrivate">togglePlaylistPrivate</a></li><li data-type='method'><a href="module-Playlists.html#.undeletePlaylist">undeletePlaylist</a></li><li data-type='method'><a href="module-Playlists.html#.updatePlaylist">updatePlaylist</a></li><li data-type='method'><a href="module-Playlists.html#~deleteItemsFromPlaylist">deleteItemsFromPlaylist</a></li><li data-type='method'><a href="module-Playlists.html#~likePlaylist">likePlaylist</a></li><li data-type='method'><a href="module-Playlists.html#~reportPlaylist">reportPlaylist</a></li><li data-type='method'><a href="module-Playlists.html#~restoreItemFromPlaylist">restoreItemFromPlaylist</a></li><li data-type='method'><a href="module-Playlists.html#~unlikePlaylist">unlikePlaylist</a></li></ul></li><li><a href="module-ProgressRow.html">ProgressRow</a></li><li><a href="module-Railcontent-Services.html">Railcontent-Services</a><ul class='methods'><li data-type='method'><a href="module-Railcontent-Services.html#.assignModeratorToComment">assignModeratorToComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.closeComment">closeComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.createComment">createComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.deleteComment">deleteComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.editComment">editComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchAllCompletedStates">fetchAllCompletedStates</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchCarouselCardData">fetchCarouselCardData</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchComment">fetchComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchCommentRelies">fetchCommentRelies</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchComments">fetchComments</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchCompletedContent">fetchCompletedContent</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchCompletedState">fetchCompletedState</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchContentInProgress">fetchContentInProgress</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchContentPageUserData">fetchContentPageUserData</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchNextContentDataForParent">fetchNextContentDataForParent</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchRecentUserActivities">fetchRecentUserActivities</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchSongsInProgress">fetchSongsInProgress</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchTopComment">fetchTopComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchUserAward">fetchUserAward</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchUserBadges">fetchUserBadges</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchUserPracticeNotes">fetchUserPracticeNotes</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.likeComment">likeComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.openComment">openComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.postContentComplete">postContentComplete</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.postContentReset">postContentReset</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.postContentRestore">postContentRestore</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.postContentStart">postContentStart</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.replyToComment">replyToComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.reportComment">reportComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.restoreComment">restoreComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.setStudentViewForUser">setStudentViewForUser</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.unassignModeratorToComment">unassignModeratorToComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.unlikeComment">unlikeComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#~fetchLastInteractedChild">fetchLastInteractedChild</a></li></ul></li><li><a href="module-Sanity-Services.html">Sanity-Services</a><ul class='methods'><li data-type='method'><a href="module-Sanity-Services.html#.fetchAll">fetchAll</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchAllFilterOptions">fetchAllFilterOptions</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchAllPacks">fetchAllPacks</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchByRailContentId">fetchByRailContentId</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchByRailContentIds">fetchByRailContentIds</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchByReference">fetchByReference</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchComingSoon">fetchComingSoon</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchCommentModContentData">fetchCommentModContentData</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchFoundation">fetchFoundation</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchLeaving">fetchLeaving</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchLessonContent">fetchLessonContent</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchLessonsFeaturingThisContent">fetchLessonsFeaturingThisContent</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMetadata">fetchMetadata</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMethod">fetchMethod</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMethodChildren">fetchMethodChildren</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMethodChildrenIds">fetchMethodChildrenIds</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMethodPreviousNextLesson">fetchMethodPreviousNextLesson</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMethodV2IntroVideo">fetchMethodV2IntroVideo</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMethodV2Structure">fetchMethodV2Structure</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchNewReleases">fetchNewReleases</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchNextPreviousLesson">fetchNextPreviousLesson</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchOtherSongVersions">fetchOtherSongVersions</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchPackAll">fetchPackAll</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchPackData">fetchPackData</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchRelatedLessons">fetchRelatedLessons</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchRelatedRecommendedContent">fetchRelatedRecommendedContent</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchRelatedSongs">fetchRelatedSongs</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchReturning">fetchReturning</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchSanity">fetchSanity</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchScheduledReleases">fetchScheduledReleases</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchShowsData">fetchShowsData</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchSiblingContent">fetchSiblingContent</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchSongArtistCount">fetchSongArtistCount</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchSongById">fetchSongById</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchUpcomingEvents">fetchUpcomingEvents</a></li><li data-type='method'><a href="module-Sanity-Services.html#.jumpToContinueContent">jumpToContinueContent</a></li><li data-type='method'><a href="module-Sanity-Services.html#~fetchRelatedByLicense">fetchRelatedByLicense</a></li><li data-type='method'><a href="module-Sanity-Services.html#~getQueryFromPage">getQueryFromPage</a></li></ul></li><li><a href="module-Sessions.html">Sessions</a><ul class='methods'><li data-type='method'><a href="module-Sessions.html#.login">login</a></li><li data-type='method'><a href="module-Sessions.html#.logout">logout</a></li></ul></li><li><a href="module-UserActivity.html">UserActivity</a><ul class='methods'><li data-type='method'><a href="module-UserActivity.html#.calculateLongestStreaks">calculateLongestStreaks</a></li><li data-type='method'><a href="module-UserActivity.html#.createPracticeNotes">createPracticeNotes</a></li><li data-type='method'><a href="module-UserActivity.html#.deletePracticeSession">deletePracticeSession</a></li><li data-type='method'><a href="module-UserActivity.html#.deleteUserActivity">deleteUserActivity</a></li><li data-type='method'><a href="module-UserActivity.html#.getPracticeNotes">getPracticeNotes</a></li><li data-type='method'><a href="module-UserActivity.html#.getPracticeSessions">getPracticeSessions</a></li><li data-type='method'><a href="module-UserActivity.html#.getProgressRows">getProgressRows</a></li><li data-type='method'><a href="module-UserActivity.html#.getRecentActivity">getRecentActivity</a></li><li data-type='method'><a href="module-UserActivity.html#.getUserMonthlyStats">getUserMonthlyStats</a></li><li data-type='method'><a href="module-UserActivity.html#.getUserWeeklyStats">getUserWeeklyStats</a></li><li data-type='method'><a href="module-UserActivity.html#.pinProgressRow">pinProgressRow</a></li><li data-type='method'><a href="module-UserActivity.html#.recordUserActivity">recordUserActivity</a></li><li data-type='method'><a href="module-UserActivity.html#.recordUserPractice">recordUserPractice</a></li><li data-type='method'><a href="module-UserActivity.html#.removeUserPractice">removeUserPractice</a></li><li data-type='method'><a href="module-UserActivity.html#.restorePracticeSession">restorePracticeSession</a></li><li data-type='method'><a href="module-UserActivity.html#.restoreUserActivity">restoreUserActivity</a></li><li data-type='method'><a href="module-UserActivity.html#.restoreUserPractice">restoreUserPractice</a></li><li data-type='method'><a href="module-UserActivity.html#.unpinProgressRow">unpinProgressRow</a></li><li data-type='method'><a href="module-UserActivity.html#.updatePracticeNotes">updatePracticeNotes</a></li><li data-type='method'><a href="module-UserActivity.html#.updateUserPractice">updateUserPractice</a></li></ul></li><li><a href="module-UserChat.html">UserChat</a><ul class='methods'><li data-type='method'><a href="module-UserChat.html#.fetchChatSettings">fetchChatSettings</a></li></ul></li><li><a href="module-UserManagement.html">UserManagement</a><ul class='methods'><li data-type='method'><a href="module-UserManagement.html#.blockUser">blockUser</a></li><li data-type='method'><a href="module-UserManagement.html#.blockedUsers">blockedUsers</a></li><li data-type='method'><a href="module-UserManagement.html#.deletePicture">deletePicture</a></li><li data-type='method'><a href="module-UserManagement.html#.getUserData">getUserData</a></li><li data-type='method'><a href="module-UserManagement.html#.getUserSignature">getUserSignature</a></li><li data-type='method'><a href="module-UserManagement.html#.isUsernameAvailable">isUsernameAvailable</a></li><li data-type='method'><a href="module-UserManagement.html#.setUserSignature">setUserSignature</a></li><li data-type='method'><a href="module-UserManagement.html#.toggleSignaturePrivate">toggleSignaturePrivate</a></li><li data-type='method'><a href="module-UserManagement.html#.unblockUser">unblockUser</a></li><li data-type='method'><a href="module-UserManagement.html#.updateDisplayName">updateDisplayName</a></li><li data-type='method'><a href="module-UserManagement.html#.uploadPicture">uploadPicture</a></li><li data-type='method'><a href="module-UserManagement.html#.uploadPictureFromS3">uploadPictureFromS3</a></li></ul></li><li><a href="module-UserMemberships.html">UserMemberships</a><ul class='methods'><li data-type='method'><a href="module-UserMemberships.html#~fetchMemberships">fetchMemberships</a></li><li data-type='method'><a href="module-UserMemberships.html#~fetchRechargeTokens">fetchRechargeTokens</a></li><li data-type='method'><a href="module-UserMemberships.html#~restorePurchases">restorePurchases</a></li><li data-type='method'><a href="module-UserMemberships.html#~upgradeSubscription">upgradeSubscription</a></li></ul></li><li><a href="module-UserNotifications.html">UserNotifications</a><ul class='methods'><li data-type='method'><a href="module-UserNotifications.html#.deleteNotification">deleteNotification</a></li><li data-type='method'><a href="module-UserNotifications.html#.fetchLiveEventPollingState">fetchLiveEventPollingState</a></li><li data-type='method'><a href="module-UserNotifications.html#.fetchNotificationSettings">fetchNotificationSettings</a></li><li data-type='method'><a href="module-UserNotifications.html#.fetchNotifications">fetchNotifications</a></li><li data-type='method'><a href="module-UserNotifications.html#.fetchUnreadCount">fetchUnreadCount</a></li><li data-type='method'><a href="module-UserNotifications.html#.markAllNotificationsAsRead">markAllNotificationsAsRead</a></li><li data-type='method'><a href="module-UserNotifications.html#.markNotificationAsRead">markNotificationAsRead</a></li><li data-type='method'><a href="module-UserNotifications.html#.markNotificationAsUnread">markNotificationAsUnread</a></li><li data-type='method'><a href="module-UserNotifications.html#.pauseLiveEventPolling">pauseLiveEventPolling</a></li><li data-type='method'><a href="module-UserNotifications.html#.restoreNotification">restoreNotification</a></li><li data-type='method'><a href="module-UserNotifications.html#.startLiveEventPolling">startLiveEventPolling</a></li><li data-type='method'><a href="module-UserNotifications.html#.updateNotificationSetting">updateNotificationSetting</a></li></ul></li><li><a href="module-UserProfile.html">UserProfile</a><ul class='methods'><li data-type='method'><a href="module-UserProfile.html#.deleteProfilePicture">deleteProfilePicture</a></li><li data-type='method'><a href="module-UserProfile.html#.otherStats">otherStats</a></li></ul></li></ul><h3>Namespaces</h3><ul><li><a href="ContentOrganization.html">ContentOrganization</a></li><li><a href="Forums.html">Forums</a></li><li><a href="Gamification.html">Gamification</a></li><li><a href="UserManagementSystem.html">UserManagementSystem</a></li></ul><h3>Interfaces</h3><ul><li><a href="TestUser.html">TestUser</a></li></ul><h3>Global</h3><ul><li><a href="global.html#createTestUser">createTestUser</a></li></ul>
33
33
 
34
34
  </nav>
35
35
 
@@ -69,19 +69,16 @@ import {
69
69
  SONG_TYPES,
70
70
  SONG_TYPES_WITH_CHILDREN,
71
71
  } from '../contentTypeConfig.js'
72
- import {fetchSimilarItems, recommendations} from './recommendations.js'
72
+ import { fetchSimilarItems, recommendations } from './recommendations.js'
73
73
  import { processMetadata, typeWithSortOrder } from '../contentMetaData.js'
74
74
 
75
75
  import { globalConfig } from './config.js'
76
76
 
77
- import {
78
- fetchNextContentDataForParent,
79
- fetchHandler,
80
- } from './railcontent.js'
77
+ import { fetchNextContentDataForParent, fetchHandler } from './railcontent.js'
81
78
  import { arrayToStringRepresentation, FilterBuilder } from '../filterBuilder.js'
82
79
  import { fetchUserPermissions } from './user/permissions.js'
83
80
  import { getAllCompleted, getAllStarted, getAllStartedOrCompleted } from './contentProgress.js'
84
- import {fetchRecentActivitiesActiveTabs} from "./userActivity.js";
81
+ import { fetchRecentActivitiesActiveTabs } from './userActivity.js'
85
82
 
86
83
  /**
87
84
  * Exported functions that are excluded from index generation.
@@ -209,30 +206,6 @@ function getQueryFromPage(pageNumber, contentPerPage) {
209
206
  return result
210
207
  }
211
208
 
212
- /**
213
- * Fetch all artists with lessons available for a specific brand.
214
- *
215
- * @param {string} brand - The brand for which to fetch artists.
216
- * @returns {Promise&lt;Object|null>} - A promise that resolves to an array of artist objects or null if not found.
217
- *
218
- * @example
219
- * fetchArtists('drumeo')
220
- * .then(artists => console.log(artists))
221
- * .catch(error => console.error(error));
222
- */
223
- export async function fetchArtists(brand) {
224
- const filter = await new FilterBuilder(
225
- `_type == "song" &amp;&amp; brand == "${brand}" &amp;&amp; references(^._id)`,
226
- { bypassPermissions: true }
227
- ).buildFilter()
228
- const query = `
229
- *[_type == "artist"]{
230
- name,
231
- "lessonsCount": count(*[${filter}])
232
- }[lessonsCount > 0] |order(lower(name)) `
233
- return fetchSanity(query, true, { processNeedAccess: false })
234
- }
235
-
236
209
  /**
237
210
  * Fetch current number of artists for songs within a brand.
238
211
  * @param {string} brand - The current brand.
@@ -382,7 +355,7 @@ export async function fetchNewReleases(
382
355
  web_url_path,
383
356
  "permission_id": permission[]->railcontent_id,
384
357
  `
385
- const query = buildRawQuery(filter, fields, {sortOrder: sortOrder, start, end: end})
358
+ const query = buildRawQuery(filter, fields, { sortOrder: sortOrder, start, end: end })
386
359
  return fetchSanity(query, true)
387
360
  }
388
361
 
@@ -523,17 +496,26 @@ export async function fetchByRailContentId(id, contentType) {
523
496
  * .then(contents => console.log(contents))
524
497
  * .catch(error => console.error(error));
525
498
  */
526
- export async function fetchByRailContentIds(ids, contentType = undefined, brand = undefined, includePermissionsAndStatusFilter = false) {
499
+ export async function fetchByRailContentIds(
500
+ ids,
501
+ contentType = undefined,
502
+ brand = undefined,
503
+ includePermissionsAndStatusFilter = false
504
+ ) {
527
505
  if (!ids?.length) {
528
506
  return []
529
507
  }
530
- ids = [...new Set(ids.filter(item => item !== null &amp;&amp; item !== undefined))];
508
+ ids = [...new Set(ids.filter((item) => item !== null &amp;&amp; item !== undefined))]
531
509
  const idsString = ids.join(',')
532
510
  const brandFilter = brand ? ` &amp;&amp; brand == "${brand}"` : ''
533
- const lessonCountFilter = await new FilterBuilder(`_id in ^.child[]._ref`, {pullFutureContent: true}).buildFilter()
511
+ const lessonCountFilter = await new FilterBuilder(`_id in ^.child[]._ref`, {
512
+ pullFutureContent: true,
513
+ }).buildFilter()
534
514
  const fields = await getFieldsForContentTypeWithFilteredChildren(contentType, true)
535
515
  const baseFilter = `railcontent_id in [${idsString}]${brandFilter}`
536
- const finalFilter = includePermissionsAndStatusFilter ? await new FilterBuilder(baseFilter).buildFilter() : baseFilter
516
+ const finalFilter = includePermissionsAndStatusFilter
517
+ ? await new FilterBuilder(baseFilter).buildFilter()
518
+ : baseFilter
537
519
  const query = `*[
538
520
  ${finalFilter}
539
521
  ]{
@@ -545,18 +527,16 @@ export async function fetchByRailContentIds(ids, contentType = undefined, brand
545
527
 
546
528
  console.log('ids query', query)
547
529
  const customPostProcess = (results) => {
548
- const now = getSanityDate(new Date(), false);
530
+ const now = getSanityDate(new Date(), false)
549
531
  const liveProcess = (result) => {
550
532
  if (result.live_event_start_time &amp;&amp; result.live_event_end_time) {
551
- result.isLive =
552
- result.live_event_start_time &lt;= now &amp;&amp;
553
- result.live_event_end_time >= now;
533
+ result.isLive = result.live_event_start_time &lt;= now &amp;&amp; result.live_event_end_time >= now
554
534
  } else {
555
- result.isLive = false;
535
+ result.isLive = false
556
536
  }
557
- return result;
558
- };
559
- return results.map(liveProcess);
537
+ return result
538
+ }
539
+ return results.map(liveProcess)
560
540
  }
561
541
  const results = await fetchSanity(query, true, { customPostProcess: customPostProcess })
562
542
 
@@ -574,13 +554,14 @@ export async function fetchByRailContentIds(ids, contentType = undefined, brand
574
554
  return sortedResults
575
555
  }
576
556
 
577
- export async function fetchContentRows(brand, pageName, contentRowSlug)
578
- {
557
+ export async function fetchContentRows(brand, pageName, contentRowSlug) {
579
558
  if (pageName === 'lessons') pageName = 'lesson'
580
559
  if (pageName === 'songs') pageName = 'song'
581
560
  const rowString = contentRowSlug ? ` &amp;&amp; slug.current == "${contentRowSlug.toLowerCase()}"` : ''
582
- const lessonCountFilter = await new FilterBuilder(`_id in ^.child[]._ref`, {pullFutureContent: true}).buildFilter()
583
- const childFilter = await new FilterBuilder('', {isChildrenFilter: true}).buildFilter()
561
+ const lessonCountFilter = await new FilterBuilder(`_id in ^.child[]._ref`, {
562
+ pullFutureContent: true,
563
+ }).buildFilter()
564
+ const childFilter = await new FilterBuilder('', { isChildrenFilter: true }).buildFilter()
584
565
  const query = `*[_type == 'recommended-content-row' &amp;&amp; brand == '${brand}' &amp;&amp; type == '${pageName}'${rowString}]{
585
566
  brand,
586
567
  name,
@@ -596,8 +577,6 @@ export async function fetchContentRows(brand, pageName, contentRowSlug)
596
577
  return fetchSanity(query, true)
597
578
  }
598
579
 
599
-
600
-
601
580
  /**
602
581
  * Fetch all content for a specific brand and type with pagination, search, and grouping options.
603
582
  * @param {string} brand - The brand for which to fetch content.
@@ -666,9 +645,7 @@ export async function fetchAll(
666
645
  } else if (type === 'pack') {
667
646
  typeFilter = `&amp;&amp; (_type == 'pack' || _type == 'semester-pack')`
668
647
  } else {
669
- typeFilter = type
670
- ? `&amp;&amp; _type == '${type}'`
671
- : ''
648
+ typeFilter = type ? `&amp;&amp; _type == '${type}'` : ''
672
649
  }
673
650
 
674
651
  // Construct the search filter
@@ -787,7 +764,7 @@ async function getProgressFilter(progress, progressIds) {
787
764
  return `&amp;&amp; (railcontent_id in [${ids.join(',')}])`
788
765
  }
789
766
  case 'incomplete': {
790
- const ids = progressIds !== undefined ? progressIds :await getAllStarted()
767
+ const ids = progressIds !== undefined ? progressIds : await getAllStarted()
791
768
  return `&amp;&amp; railcontent_id in [${ids.join(',')}]`
792
769
  }
793
770
  default:
@@ -1295,7 +1272,7 @@ async function fetchRelatedByLicense(railcontentId, brand, onlyUseSongTypes, cou
1295
1272
  *[${filterSongTypesWithSameLicense}]->{${queryFields}}|order(published_on desc, title asc)[0...${count}],
1296
1273
  }[0...1]`
1297
1274
  const results = await fetchSanity(query, false)
1298
- return results ? results['related_by_license'] ?? [] : []
1275
+ return results ? (results['related_by_license'] ?? []) : []
1299
1276
  }
1300
1277
 
1301
1278
  /**
@@ -1304,15 +1281,17 @@ async function fetchRelatedByLicense(railcontentId, brand, onlyUseSongTypes, cou
1304
1281
  * @param {string} brand - The current brand.
1305
1282
  * @returns {Promise&lt;Array&lt;Object>|null>} - The fetched related lessons data or null if not found.
1306
1283
  */
1307
- export async function fetchSiblingContent(railContentId, brand= null)
1308
- {
1284
+ export async function fetchSiblingContent(railContentId, brand = null) {
1309
1285
  const filterGetParent = await new FilterBuilder(`references(^._id) &amp;&amp; _type == ^.parent_type`, {
1310
- pullFutureContent: true
1311
- }).buildFilter()
1312
- const filterForParentList = await new FilterBuilder(`references(^._id) &amp;&amp; _type == ^.parent_type`, {
1313
1286
  pullFutureContent: true,
1314
- isParentFilter: true,
1315
1287
  }).buildFilter()
1288
+ const filterForParentList = await new FilterBuilder(
1289
+ `references(^._id) &amp;&amp; _type == ^.parent_type`,
1290
+ {
1291
+ pullFutureContent: true,
1292
+ isParentFilter: true,
1293
+ }
1294
+ ).buildFilter()
1316
1295
 
1317
1296
  const childrenFilter = await new FilterBuilder(``, { isChildrenFilter: true }).buildFilter()
1318
1297
 
@@ -1352,8 +1331,7 @@ export async function fetchSiblingContent(railContentId, brand= null)
1352
1331
  * @param {string} railContentId - The RailContent ID of the current lesson.
1353
1332
  * @returns {Promise&lt;Array&lt;Object>|null>} - The fetched related lessons data or null if not found.
1354
1333
  */
1355
- export async function fetchRelatedLessons(railContentId)
1356
- {
1334
+ export async function fetchRelatedLessons(railContentId) {
1357
1335
  const defaultFilterFields = `_type==^._type &amp;&amp; brand == ^.brand &amp;&amp; railcontent_id != ${railContentId}`
1358
1336
 
1359
1337
  const filterSameArtist = await new FilterBuilder(
@@ -1397,11 +1375,16 @@ export async function fetchAllPacks(
1397
1375
  const start = (page - 1) * limit
1398
1376
  const end = start + limit
1399
1377
 
1400
- const query = await buildQuery(filter, filterParams, await getFieldsForContentTypeWithFilteredChildren('pack'), {
1401
- sortOrder: sortOrder,
1402
- start,
1403
- end,
1404
- })
1378
+ const query = await buildQuery(
1379
+ filter,
1380
+ filterParams,
1381
+ await getFieldsForContentTypeWithFilteredChildren('pack'),
1382
+ {
1383
+ sortOrder: sortOrder,
1384
+ start,
1385
+ end,
1386
+ }
1387
+ )
1405
1388
  return fetchSanity(query, true)
1406
1389
  }
1407
1390
 
@@ -1507,45 +1490,6 @@ export async function fetchPackData(id) {
1507
1490
  return fetchSanity(query, false)
1508
1491
  }
1509
1492
 
1510
- /**
1511
- * Fetch the data needed for the coach screen.
1512
- * @param {string} brand - The brand for which to fetch coach lessons
1513
- * @param {string} id - The Railcontent ID of the coach
1514
- * @returns {Promise&lt;Object|null>} - The lessons for the instructor or null if not found.
1515
- * @param {Object} params - Parameters for pagination, filtering and sorting.
1516
- * @param {string} [params.sortOrder="-published_on"] - The field to sort the lessons by.
1517
- * @param {string} [params.searchTerm=""] - The search term to filter content by title.
1518
- * @param {number} [params.page=1] - The page number for pagination.
1519
- * @param {number} [params.limit=10] - The number of items per page.
1520
- * @param {Array&lt;string>} [params.includedFields=[]] - Additional filters to apply to the query in the format of a key,value array. eg. ['difficulty,Intermediate', 'genre,rock'].
1521
- *
1522
- * @example
1523
- * fetchCoachLessons('coach123')
1524
- * .then(lessons => console.log(lessons))
1525
- * .catch(error => console.error(error));
1526
- */
1527
- export async function fetchCoachLessons(
1528
- brand,
1529
- id,
1530
- { sortOrder = '-published_on', searchTerm = '', page = 1, limit = 20, includedFields = [] } = {}
1531
- ) {
1532
- const fieldsString = getFieldsForContentType()
1533
- const start = (page - 1) * limit
1534
- const end = start + limit
1535
- const searchFilter = searchTerm ? `&amp;&amp; title match "${searchTerm}*"` : ''
1536
- const includedFieldsFilter = includedFields.length > 0 ? filtersToGroq(includedFields) : ''
1537
- const filter = `brand == '${brand}' ${searchFilter} ${includedFieldsFilter} &amp;&amp; references(*[_type=='instructor' &amp;&amp; railcontent_id == ${id}]._id)`
1538
- const filterWithRestrictions = await new FilterBuilder(filter).buildFilter()
1539
-
1540
- sortOrder = getSortOrder(sortOrder, brand)
1541
- const query = buildEntityAndTotalQuery(filterWithRestrictions, fieldsString, {
1542
- sortOrder: sortOrder,
1543
- start: start,
1544
- end: end,
1545
- })
1546
- return fetchSanity(query, true)
1547
- }
1548
-
1549
1493
  /**
1550
1494
  * Fetch the data needed for the coach screen.
1551
1495
  * @param {string} id - The Railcontent ID of the coach
@@ -1577,121 +1521,6 @@ export async function fetchByReference(
1577
1521
  return fetchSanity(query, true)
1578
1522
  }
1579
1523
 
1580
- /**
1581
- * Fetch the artist's lessons.
1582
- * @param {string} brand - The brand for which to fetch lessons.
1583
- * @param {string} name - The name of the artist
1584
- * @param {string} contentType - The type of the lessons we need to get from the artist. If not defined, groq will get lessons from all content types
1585
- * @param {Object} params - Parameters for sorting, searching, pagination and filtering.
1586
- * @param {string} [params.sort="-published_on"] - The field to sort the lessons by.
1587
- * @param {string} [params.searchTerm=""] - The search term to filter the lessons.
1588
- * @param {number} [params.page=1] - The page number for pagination.
1589
- * @param {number} [params.limit=10] - The number of items per page.
1590
- * @param {Array&lt;string>} [params.includedFields=[]] - Additional filters to apply to the query in the format of a key,value array. eg. ['difficulty,Intermediate', 'genre,rock'].
1591
- * @param {Array&lt;number>} [params.progressIds] - The ids of the lessons that are in progress or completed
1592
- * @returns {Promise&lt;Object|null>} - The lessons for the artist and some details about the artist (name and thumbnail).
1593
- *
1594
- * @example
1595
- * fetchArtistLessons('drumeo', '10 Years', 'song', {'-published_on', '', 1, 10, ["difficulty,Intermediate"], [232168, 232824, 303375, 232194, 393125]})
1596
- * .then(lessons => console.log(lessons))
1597
- * .catch(error => console.error(error));
1598
- */
1599
- export async function fetchArtistLessons(
1600
- brand,
1601
- name,
1602
- contentType,
1603
- {
1604
- sort = '-published_on',
1605
- searchTerm = '',
1606
- page = 1,
1607
- limit = 10,
1608
- includedFields = [],
1609
- progressIds = undefined,
1610
- } = {}
1611
- ) {
1612
- const fieldsString = DEFAULT_FIELDS.join(',')
1613
- const start = (page - 1) * limit
1614
- const end = start + limit
1615
- const searchFilter = searchTerm ? `&amp;&amp; title match "${searchTerm}*"` : ''
1616
- const sortOrder = getSortOrder(sort, brand)
1617
- const addType =
1618
- contentType &amp;&amp; Array.isArray(contentType)
1619
- ? `_type in ['${contentType.join("', '")}'] &amp;&amp;`
1620
- : contentType
1621
- ? `_type == '${contentType}' &amp;&amp; `
1622
- : ''
1623
- const includedFieldsFilter = includedFields.length > 0 ? filtersToGroq(includedFields) : ''
1624
-
1625
- // limits the results to supplied progressIds for started &amp; completed filters
1626
- const progressFilter =
1627
- progressIds !== undefined ? `&amp;&amp; railcontent_id in [${progressIds.join(',')}]` : ''
1628
- const now = getSanityDate(new Date())
1629
- const query = `{
1630
- "entity":
1631
- *[_type == 'artist' &amp;&amp; name == '${name}']
1632
- {'type': _type, name, 'thumbnail':thumbnail_url.asset->url,
1633
- 'lessons_count': count(*[${addType} brand == '${brand}' &amp;&amp; references(^._id)]),
1634
- 'lessons': *[${addType} brand == '${brand}' &amp;&amp; references(^._id) &amp;&amp; (status in ['published'] || (status == 'scheduled' &amp;&amp; defined(published_on) &amp;&amp; published_on >= '${now}')) ${searchFilter} ${includedFieldsFilter} ${progressFilter}]{${fieldsString}}
1635
- [${start}...${end}]}
1636
- |order(${sortOrder})f
1637
- }`
1638
- return fetchSanity(query, true)
1639
- }
1640
-
1641
- /**
1642
- * Fetch the genre's lessons.
1643
- * @param {string} brand - The brand for which to fetch lessons.
1644
- * @param {string} name - The name of the genre
1645
- * @param {Object} params - Parameters for sorting, searching, pagination and filtering.
1646
- * @param {string} [params.sort="-published_on"] - The field to sort the lessons by.
1647
- * @param {string} [params.searchTerm=""] - The search term to filter the lessons.
1648
- * @param {number} [params.page=1] - The page number for pagination.
1649
- * @param {number} [params.limit=10] - The number of items per page.
1650
- * @param {Array&lt;string>} [params.includedFields=[]] - Additional filters to apply to the query in the format of a key,value array. eg. ['difficulty,Intermediate', 'genre,rock'].
1651
- * @param {Array&lt;number>} [params.progressIds] - The ids of the lessons that are in progress or completed
1652
- * @returns {Promise&lt;Object|null>} - The lessons for the artist and some details about the artist (name and thumbnail).
1653
- *
1654
- * @example
1655
- * fetchGenreLessons('drumeo', 'Blues', 'song', {'-published_on', '', 1, 10, ["difficulty,Intermediate"], [232168, 232824, 303375, 232194, 393125]})
1656
- * .then(lessons => console.log(lessons))
1657
- * .catch(error => console.error(error));
1658
- */
1659
- export async function fetchGenreLessons(
1660
- brand,
1661
- name,
1662
- contentType,
1663
- {
1664
- sort = '-published_on',
1665
- searchTerm = '',
1666
- page = 1,
1667
- limit = 10,
1668
- includedFields = [],
1669
- progressIds = undefined,
1670
- } = {}
1671
- ) {
1672
- const fieldsString = DEFAULT_FIELDS.join(',')
1673
- const start = (page - 1) * limit
1674
- const end = start + limit
1675
- const searchFilter = searchTerm ? `&amp;&amp; title match "${searchTerm}*"` : ''
1676
- const sortOrder = getSortOrder(sort, brand)
1677
- const addType = contentType ? `_type == '${contentType}' &amp;&amp; ` : ''
1678
- const includedFieldsFilter = includedFields.length > 0 ? filtersToGroq(includedFields) : ''
1679
- // limits the results to supplied progressIds for started &amp; completed filters
1680
- const progressFilter =
1681
- progressIds !== undefined ? `&amp;&amp; railcontent_id in [${progressIds.join(',')}]` : ''
1682
- const now = getSanityDate(new Date())
1683
- const query = `{
1684
- "entity":
1685
- *[_type == 'genre' &amp;&amp; name == '${name}']
1686
- {'type': _type, name, 'thumbnail':thumbnail_url.asset->url,
1687
- 'lessons_count': count(*[${addType} brand == '${brand}' &amp;&amp; references(^._id)]),
1688
- 'lessons': *[${addType} brand == '${brand}' &amp;&amp; references(^._id) &amp;&amp; (status in ['published'] || (status == 'scheduled' &amp;&amp; defined(published_on) &amp;&amp; published_on >= '${now}')) ${searchFilter} ${includedFieldsFilter} ${progressFilter}]{${fieldsString}}
1689
- [${start}...${end}]}
1690
- |order(${sortOrder})
1691
- }`
1692
- return fetchSanity(query, true)
1693
- }
1694
-
1695
1524
  export async function fetchTopLevelParentId(railcontentId) {
1696
1525
  const statusFilter = "&amp;&amp; status in ['scheduled', 'published', 'archived', 'unlisted']"
1697
1526
 
@@ -1813,8 +1642,10 @@ export async function fetchCommentModContentData(ids) {
1813
1642
  *
1814
1643
  * @param {string} query - The GROQ query to execute against the Sanity API.
1815
1644
  * @param {boolean} isList - Whether to return an array or a single result.
1816
- * @param {Function} [customPostProcess=null] - custom post process callback
1817
- * @param {boolean} [processNeedAccess=true] - execute the needs_access callback
1645
+ * @param {Object} options - Additional options for fetching data.
1646
+ * @param {Function} [options.customPostProcess=null] - custom post process callback
1647
+ * @param {boolean} [options.processNeedAccess=true] - execute the needs_access callback
1648
+ * @param {boolean} [options.processPageType=true] - execute the page_type callback
1818
1649
  * @returns {Promise&lt;*|null>} - A promise that resolves to the fetched data or null if an error occurs or no results are found.
1819
1650
  *
1820
1651
  * @example
@@ -1827,7 +1658,7 @@ export async function fetchCommentModContentData(ids) {
1827
1658
  export async function fetchSanity(
1828
1659
  query,
1829
1660
  isList,
1830
- { customPostProcess = null, processNeedAccess = true } = {}
1661
+ { customPostProcess = null, processNeedAccess = true, processPageType = true } = {}
1831
1662
  ) {
1832
1663
  // Check the config object before proceeding
1833
1664
  if (!checkSanityConfig(globalConfig)) {
@@ -1869,19 +1700,20 @@ export async function fetchSanity(
1869
1700
  results = processNeedAccess
1870
1701
  ? await needsAccessDecorator(results, userPermissions, isAdmin)
1871
1702
  : results
1872
- results = pageTypeDecorator(results)
1703
+ results = processPageType
1704
+ ? pageTypeDecorator(results)
1705
+ : results
1873
1706
  return customPostProcess ? customPostProcess(results) : results
1874
1707
  } else {
1875
1708
  throw new Error('No results found')
1876
1709
  }
1877
1710
  } catch (error) {
1878
- console.error('fetchSanity: Fetch error:', {error, query})
1711
+ console.error('fetchSanity: Fetch error:', { error, query })
1879
1712
  return null
1880
1713
  }
1881
1714
  }
1882
1715
 
1883
- function contentResultsDecorator(results, fieldName, callback)
1884
- {
1716
+ function contentResultsDecorator(results, fieldName, callback) {
1885
1717
  if (Array.isArray(results)) {
1886
1718
  results.forEach((result) => {
1887
1719
  result[fieldName] = callback(result)
@@ -1908,16 +1740,18 @@ function contentResultsDecorator(results, fieldName, callback)
1908
1740
  return results
1909
1741
  }
1910
1742
 
1911
- function pageTypeDecorator(results)
1912
- {
1913
- return contentResultsDecorator(results, 'page_type', function(content) { return SONG_TYPES_WITH_CHILDREN.includes(content['type']) ? 'song' : 'lesson'})
1743
+ function pageTypeDecorator(results) {
1744
+ return contentResultsDecorator(results, 'page_type', function (content) {
1745
+ return SONG_TYPES_WITH_CHILDREN.includes(content['type']) ? 'song' : 'lesson'
1746
+ })
1914
1747
  }
1915
1748
 
1916
-
1917
1749
  function needsAccessDecorator(results, userPermissions, isAdmin) {
1918
1750
  if (globalConfig.sanityConfig.useDummyRailContentMethods) return results
1919
1751
  userPermissions = new Set(userPermissions)
1920
- return contentResultsDecorator(results, 'need_access', function (content) { return doesUserNeedAccessToContent(content, userPermissions, isAdmin) })
1752
+ return contentResultsDecorator(results, 'need_access', function (content) {
1753
+ return doesUserNeedAccessToContent(content, userPermissions, isAdmin)
1754
+ })
1921
1755
  }
1922
1756
 
1923
1757
  function doesUserNeedAccessToContent(result, userPermissions, isAdmin) {
@@ -1975,8 +1809,8 @@ export async function fetchShowsData(brand) {
1975
1809
  * .catch(error => console.error(error));
1976
1810
  */
1977
1811
  export async function fetchMetadata(brand, type) {
1978
- let processedData = processMetadata(brand, type, true)
1979
- if(processedData?.onlyAvailableTabs === true) {
1812
+ let processedData = processMetadata(brand, type, true)
1813
+ if (processedData?.onlyAvailableTabs === true) {
1980
1814
  const activeTabs = await fetchRecentActivitiesActiveTabs()
1981
1815
  processedData.tabs = activeTabs
1982
1816
  }
@@ -2002,7 +1836,7 @@ function arrayJoinWithQuotes(array, delimiter = ',') {
2002
1836
  return wrapped.join(delimiter)
2003
1837
  }
2004
1838
 
2005
- function getSanityDate(date, roundToHourForCaching = true) {
1839
+ export function getSanityDate(date, roundToHourForCaching = true) {
2006
1840
  if (roundToHourForCaching) {
2007
1841
  // We need to set the published on filter date to be a round time so that it doesn't bypass the query cache
2008
1842
  // with every request by changing the filter date every second. I've set it to one minute past the current hour
@@ -2076,13 +1910,19 @@ async function buildQuery(
2076
1910
  return buildRawQuery(filter, fields, { sortOrder, start, end, isSingle })
2077
1911
  }
2078
1912
 
2079
- function buildEntityAndTotalQuery(
1913
+ export function buildEntityAndTotalQuery(
2080
1914
  filter = '',
2081
1915
  fields = '...',
2082
- { sortOrder = 'published_on desc', start = 0, end = 10, isSingle = false, withoutPagination = false }
1916
+ {
1917
+ sortOrder = 'published_on desc',
1918
+ start = 0,
1919
+ end = 10,
1920
+ isSingle = false,
1921
+ withoutPagination = false,
1922
+ }
2083
1923
  ) {
2084
1924
  const sortString = sortOrder ? ` | order(${sortOrder})` : ''
2085
- const countString = isSingle ? '[0...1]' : (withoutPagination ? ``: `[${start}...${end}]`)
1925
+ const countString = isSingle ? '[0...1]' : withoutPagination ? `` : `[${start}...${end}]`
2086
1926
  const query = `{
2087
1927
  "entity": *[${filter}] ${sortString}${countString}
2088
1928
  {
@@ -2211,22 +2051,22 @@ export async function fetchTabData(
2211
2051
 
2212
2052
  switch (progress) {
2213
2053
  case 'recent':
2214
- progressIds = await getAllStartedOrCompleted({ brand, onlyIds: true });
2215
- sortOrder = null;
2216
- break;
2054
+ progressIds = await getAllStartedOrCompleted({ brand, onlyIds: true })
2055
+ sortOrder = null
2056
+ break
2217
2057
  case 'incomplete':
2218
- progressIds = await getAllStarted();
2219
- sortOrder = null;
2220
- break;
2058
+ progressIds = await getAllStarted()
2059
+ sortOrder = null
2060
+ break
2221
2061
  case 'completed':
2222
- progressIds = await getAllCompleted();
2223
- sortOrder = null;
2224
- break;
2062
+ progressIds = await getAllCompleted()
2063
+ sortOrder = null
2064
+ break
2225
2065
  }
2226
2066
 
2227
2067
  // limits the results to supplied progressIds for started &amp; completed filters
2228
2068
  const progressFilter = await getProgressFilter(progress, progressIds)
2229
- const fieldsString = getFieldsForContentType('tab-data');
2069
+ const fieldsString = getFieldsForContentType('tab-data')
2230
2070
  const now = getSanityDate(new Date())
2231
2071
 
2232
2072
  // Determine the group by clause
@@ -2238,8 +2078,7 @@ export async function fetchTabData(
2238
2078
  const childrenFilter = await new FilterBuilder(``, { isChildrenFilter: true }).buildFilter()
2239
2079
  const childrenFields = await getChildFieldsForContentType('tab-data')
2240
2080
  const lessonCountFilter = await new FilterBuilder(`_id in ^.child[]._ref`).buildFilter()
2241
- entityFieldsString =
2242
- ` ${fieldsString}
2081
+ entityFieldsString = ` ${fieldsString}
2243
2082
  'children': child[${childrenFilter}]->{ ${childrenFields} 'children': child[${childrenFilter}]->{ ${childrenFields} }, },
2244
2083
  'isLive': live_event_start_time &lt;= "${now}" &amp;&amp; live_event_end_time >= "${now}",
2245
2084
  'lesson_count': coalesce(count(*[${lessonCountFilter}]), 0),
@@ -2255,23 +2094,23 @@ export async function fetchTabData(
2255
2094
  query = buildEntityAndTotalQuery(filterWithRestrictions, entityFieldsString, {
2256
2095
  sortOrder: sortOrder,
2257
2096
  start: start,
2258
- end: end
2097
+ end: end,
2259
2098
  })
2260
2099
 
2261
- let results = await fetchSanity(query, true);
2100
+ let results = await fetchSanity(query, true)
2262
2101
 
2263
2102
  if (['recent', 'incomplete', 'completed'].includes(progress) &amp;&amp; results.entity.length > 1) {
2264
2103
  const orderMap = new Map(progressIds.map((id, index) => [id, index]))
2265
2104
  results.entity = results.entity
2266
2105
  .sort((a, b) => {
2267
- const aIdx = orderMap.get(a.id) ?? Number.MAX_SAFE_INTEGER;
2268
- const bIdx = orderMap.get(b.id) ?? Number.MAX_SAFE_INTEGER;
2269
- return aIdx - bIdx || new Date(b.published_on) - new Date(a.published_on);
2106
+ const aIdx = orderMap.get(a.id) ?? Number.MAX_SAFE_INTEGER
2107
+ const bIdx = orderMap.get(b.id) ?? Number.MAX_SAFE_INTEGER
2108
+ return aIdx - bIdx || new Date(b.published_on) - new Date(a.published_on)
2270
2109
  })
2271
- .slice(start, end);
2110
+ .slice(start, end)
2272
2111
  }
2273
2112
 
2274
- return results;
2113
+ return results
2275
2114
  }
2276
2115
 
2277
2116
  export async function fetchRecent(
@@ -2346,12 +2185,12 @@ export async function fetchShows(brand, type, sort = 'sort') {
2346
2185
  * @returns {Promise&lt;*|null>}
2347
2186
  */
2348
2187
  export async function fetchMethodV2IntroVideo(brand) {
2349
- const type = "method-intro";
2350
- const filter = `_type == '${type}' &amp;&amp; brand == '${brand}'`;
2351
- const fields = getIntroVideoFields('method-v2');
2188
+ const type = 'method-intro'
2189
+ const filter = `_type == '${type}' &amp;&amp; brand == '${brand}'`
2190
+ const fields = getIntroVideoFields('method-v2')
2352
2191
 
2353
- const query = `*[${filter}] { ${fields.join(", ")} }`;
2354
- return fetchSanity(query, false);
2192
+ const query = `*[${filter}] { ${fields.join(', ')} }`
2193
+ return fetchSanity(query, false)
2355
2194
  }
2356
2195
 
2357
2196
  /**
@@ -2360,15 +2199,15 @@ export async function fetchMethodV2IntroVideo(brand) {
2360
2199
  * @returns {Promise&lt;*|null>}
2361
2200
  */
2362
2201
  export async function fetchMethodV2Structure(brand) {
2363
- const _type = "method-v2";
2202
+ const _type = 'method-v2'
2364
2203
  const query = `*[_type == '${_type}' &amp;&amp; brand == '${brand}'][0...1]{
2365
2204
  'sanity_id': _id,
2366
2205
  'learningPaths': child[]->{
2367
2206
  'id': railcontent_id,
2368
2207
  'children': child[]->railcontent_id
2369
2208
  }
2370
- }`;
2371
- return await fetchSanity(query, false);
2209
+ }`
2210
+ return await fetchSanity(query, false)
2372
2211
  }
2373
2212
  </code></pre>
2374
2213
  </article>
@@ -2384,7 +2223,7 @@ export async function fetchMethodV2Structure(brand) {
2384
2223
  <br class="clear">
2385
2224
 
2386
2225
  <footer>
2387
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Mon Nov 17 2025 22:03:50 GMT+0000 (Coordinated Universal Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
2226
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Wed Nov 19 2025 23:31:21 GMT+0000 (Coordinated Universal Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
2388
2227
  </footer>
2389
2228
 
2390
2229
  <script>prettyPrint();</script>