musora-content-services 2.79.0 → 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 (211) hide show
  1. package/.coderabbit.yaml +0 -0
  2. package/.editorconfig +0 -0
  3. package/.github/pull_request_template.md +0 -0
  4. package/.github/workflows/conventional-commits.yaml +0 -0
  5. package/.github/workflows/docs.js.yml +0 -0
  6. package/.github/workflows/node.js.yml +0 -0
  7. package/.prettierignore +0 -0
  8. package/.prettierrc +0 -0
  9. package/CHANGELOG.md +14 -0
  10. package/README.md +0 -0
  11. package/babel.config.cjs +0 -0
  12. package/docs/Content.html +269 -0
  13. package/docs/ContentOrganization.html +2 -2
  14. package/docs/Forums.html +2 -2
  15. package/docs/Gamification.html +2 -2
  16. package/docs/TestUser.html +2 -2
  17. package/docs/UserManagementSystem.html +2 -2
  18. package/docs/api_types.js.html +2 -2
  19. package/docs/config.js.html +2 -2
  20. package/docs/content-org_content-org.js.html +2 -2
  21. package/docs/content-org_guided-courses.ts.html +2 -2
  22. package/docs/content-org_learning-paths.ts.html +124 -24
  23. package/docs/content-org_playlists-types.js.html +2 -2
  24. package/docs/content-org_playlists.js.html +2 -2
  25. package/docs/content.js.html +2 -2
  26. package/docs/content_artist.ts.html +212 -0
  27. package/docs/content_content.ts.html +77 -0
  28. package/docs/content_genre.ts.html +211 -0
  29. package/docs/content_instructor.ts.html +203 -0
  30. package/docs/fonts/Montserrat/Montserrat-Bold.eot +0 -0
  31. package/docs/fonts/Montserrat/Montserrat-Bold.ttf +0 -0
  32. package/docs/fonts/Montserrat/Montserrat-Bold.woff +0 -0
  33. package/docs/fonts/Montserrat/Montserrat-Bold.woff2 +0 -0
  34. package/docs/fonts/Montserrat/Montserrat-Regular.eot +0 -0
  35. package/docs/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
  36. package/docs/fonts/Montserrat/Montserrat-Regular.woff +0 -0
  37. package/docs/fonts/Montserrat/Montserrat-Regular.woff2 +0 -0
  38. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.eot +0 -0
  39. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg +0 -0
  40. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.ttf +0 -0
  41. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff +0 -0
  42. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff2 +0 -0
  43. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.eot +0 -0
  44. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.svg +0 -0
  45. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.ttf +0 -0
  46. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff +0 -0
  47. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff2 +0 -0
  48. package/docs/forums_categories.ts.html +3 -3
  49. package/docs/forums_discussions.js.html +0 -0
  50. package/docs/forums_forum.js.html +0 -0
  51. package/docs/forums_forums.ts.html +2 -2
  52. package/docs/forums_posts.ts.html +22 -3
  53. package/docs/forums_threads.ts.html +16 -3
  54. package/docs/gamification_awards.js.html +0 -0
  55. package/docs/gamification_awards.ts.html +2 -2
  56. package/docs/gamification_gamification.js.html +2 -2
  57. package/docs/gamification_types.js.html +0 -0
  58. package/docs/global.html +2 -2
  59. package/docs/index.html +2 -2
  60. package/docs/liveTesting.ts.html +2 -2
  61. package/docs/module-Accounts.html +10 -10
  62. package/docs/module-Artist.html +991 -0
  63. package/docs/module-Awards.html +2 -2
  64. package/docs/module-Categories.html +0 -0
  65. package/docs/module-Config.html +2 -2
  66. package/docs/module-Content-Services-V2.html +2 -2
  67. package/docs/module-ForumCategories.html +0 -0
  68. package/docs/module-ForumDiscussions.html +0 -0
  69. package/docs/module-Forums.html +731 -89
  70. package/docs/module-Genre.html +981 -0
  71. package/docs/module-GuidedCourses.html +2 -2
  72. package/docs/module-Instructor.html +929 -0
  73. package/docs/module-Interests.html +2 -2
  74. package/docs/module-LearningPaths.html +640 -12
  75. package/docs/module-Onboarding.html +2 -2
  76. package/docs/module-Payments.html +2 -2
  77. package/docs/module-Permissions.html +2 -2
  78. package/docs/module-Playlists.html +2 -2
  79. package/docs/module-ProgressRow.html +2 -2
  80. package/docs/module-Railcontent-Services.html +2 -2
  81. package/docs/module-Sanity-Services.html +327 -1855
  82. package/docs/module-Sessions.html +2 -2
  83. package/docs/module-Threads.html +0 -0
  84. package/docs/module-UserActivity.html +2 -2
  85. package/docs/module-UserChat.html +2 -2
  86. package/docs/module-UserManagement.html +2 -2
  87. package/docs/module-UserMemberships.html +2 -2
  88. package/docs/module-UserNotifications.html +2 -2
  89. package/docs/module-UserProfile.html +2 -2
  90. package/docs/progress-row_method-card.js.html +8 -7
  91. package/docs/railcontent.js.html +2 -2
  92. package/docs/sanity.js.html +109 -268
  93. package/docs/scripts/collapse.js +0 -0
  94. package/docs/scripts/commonNav.js +0 -0
  95. package/docs/scripts/linenumber.js +0 -0
  96. package/docs/scripts/nav.js +0 -0
  97. package/docs/scripts/polyfill.js +0 -0
  98. package/docs/scripts/prettify/Apache-License-2.0.txt +0 -0
  99. package/docs/scripts/prettify/lang-css.js +0 -0
  100. package/docs/scripts/prettify/prettify.js +0 -0
  101. package/docs/scripts/search.js +0 -0
  102. package/docs/styles/jsdoc.css +0 -0
  103. package/docs/styles/prettify.css +0 -0
  104. package/docs/userActivity.js.html +2 -2
  105. package/docs/user_account.ts.html +5 -11
  106. package/docs/user_chat.js.html +2 -2
  107. package/docs/user_interests.js.html +2 -2
  108. package/docs/user_management.js.html +2 -2
  109. package/docs/user_memberships.js.html +0 -0
  110. package/docs/user_memberships.ts.html +2 -2
  111. package/docs/user_notifications.js.html +2 -2
  112. package/docs/user_onboarding.ts.html +2 -2
  113. package/docs/user_payments.ts.html +2 -2
  114. package/docs/user_permissions.js.html +2 -2
  115. package/docs/user_profile.js.html +2 -2
  116. package/docs/user_sessions.js.html +2 -2
  117. package/docs/user_types.js.html +2 -2
  118. package/docs/user_user-management-system.js.html +2 -2
  119. package/jest.config.js +0 -0
  120. package/jsdoc.json +1 -0
  121. package/package.json +1 -1
  122. package/src/contentMetaData.js +0 -0
  123. package/src/contentTypeConfig.js +2 -2
  124. package/src/filterBuilder.js +0 -0
  125. package/src/index.d.ts +28 -5
  126. package/src/index.js +28 -5
  127. package/src/infrastructure/http/HttpClient.ts +0 -0
  128. package/src/infrastructure/http/executors/FetchRequestExecutor.ts +0 -0
  129. package/src/infrastructure/http/index.ts +0 -0
  130. package/src/infrastructure/http/interfaces/HeaderProvider.ts +0 -0
  131. package/src/infrastructure/http/interfaces/HttpError.ts +0 -0
  132. package/src/infrastructure/http/interfaces/NetworkError.ts +0 -0
  133. package/src/infrastructure/http/interfaces/RequestExecutor.ts +0 -0
  134. package/src/infrastructure/http/interfaces/RequestOptions.ts +0 -0
  135. package/src/infrastructure/http/providers/DefaultHeaderProvider.ts +0 -0
  136. package/src/lib/httpHelper.js +0 -0
  137. package/src/lib/lastUpdated.js +0 -0
  138. package/src/services/api/types.js +0 -0
  139. package/src/services/api/types.ts +0 -0
  140. package/src/services/config.js +0 -0
  141. package/src/services/content/artist.ts +139 -0
  142. package/src/services/content/content.ts +38 -0
  143. package/src/services/content/genre.ts +139 -0
  144. package/src/services/content/instructor.ts +131 -0
  145. package/src/services/content-org/content-org.js +0 -0
  146. package/src/services/content-org/guided-courses.ts +0 -0
  147. package/src/services/content-org/learning-paths.ts +35 -21
  148. package/src/services/content-org/playlists-types.js +0 -0
  149. package/src/services/content-org/playlists.js +0 -0
  150. package/src/services/content.js +0 -0
  151. package/src/services/contentLikes.js +0 -0
  152. package/src/services/contentProgress.js +0 -0
  153. package/src/services/dataContext.js +0 -0
  154. package/src/services/dateUtils.js +0 -0
  155. package/src/services/eventsAPI.js +0 -0
  156. package/src/services/forums/forums.ts +0 -0
  157. package/src/services/forums/posts.ts +0 -0
  158. package/src/services/forums/threads.ts +0 -0
  159. package/src/services/forums/types.ts +0 -0
  160. package/src/services/gamification/awards.ts +0 -0
  161. package/src/services/gamification/gamification.js +0 -0
  162. package/src/services/imageSRCBuilder.js +0 -0
  163. package/src/services/imageSRCVerify.js +0 -0
  164. package/src/services/liveTesting.ts +0 -0
  165. package/src/services/progress-row/method-card.js +0 -0
  166. package/src/services/railcontent.js +0 -0
  167. package/src/services/recommendations.js +0 -0
  168. package/src/services/sanity.js +105 -266
  169. package/src/services/types.js +0 -0
  170. package/src/services/user/account.ts +3 -9
  171. package/src/services/user/chat.js +0 -0
  172. package/src/services/user/interests.js +0 -0
  173. package/src/services/user/management.js +0 -0
  174. package/src/services/user/memberships.ts +0 -0
  175. package/src/services/user/notifications.js +0 -0
  176. package/src/services/user/onboarding.ts +0 -0
  177. package/src/services/user/payments.ts +0 -0
  178. package/src/services/user/permissions.js +0 -0
  179. package/src/services/user/profile.js +0 -0
  180. package/src/services/user/sessions.js +0 -0
  181. package/src/services/user/types.js +0 -0
  182. package/src/services/user/user-management-system.js +0 -0
  183. package/src/services/userActivity.js +0 -0
  184. package/test/HttpClient.test.js +0 -0
  185. package/test/content.test.js +0 -0
  186. package/test/contentLikes.test.js +0 -0
  187. package/test/contentProgress.test.js +0 -0
  188. package/test/dataContext.test.js +0 -0
  189. package/test/forum.test.js +0 -0
  190. package/test/imageSRCBuilder.test.js +0 -0
  191. package/test/imageSRCVerify.test.js +0 -0
  192. package/test/initializeTests.js +0 -0
  193. package/test/learningPaths.test.js +0 -0
  194. package/test/lib/lastUpdated.test.js +0 -0
  195. package/test/live/contentProgressLive.test.js +0 -0
  196. package/test/live/railcontentLive.test.js +0 -0
  197. package/test/localStorageMock.js +0 -0
  198. package/test/log.js +0 -0
  199. package/test/mockData/mockData_fetchByRailContentIds_one_content.json +0 -0
  200. package/test/mockData/mockData_progress_content.json +0 -0
  201. package/test/mockData/mockData_sanity_progress_content.json +0 -0
  202. package/test/mockData/mockData_user_practices.json +0 -0
  203. package/test/notifications.test.js +0 -0
  204. package/test/progressRows.test.js +0 -0
  205. package/test/sanityQueryService.test.js +0 -0
  206. package/test/streakMessage.test.js +0 -0
  207. package/test/user/permissions.test.js +0 -0
  208. package/test/userActivity.test.js +0 -0
  209. package/tools/generate-index.cjs +0 -0
  210. package/.claude/settings.local.json +0 -14
  211. package/.yarnrc.yml +0 -1
@@ -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#~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#~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#~getLearningPath">getLearningPath</a></li><li data-type='method'><a href="module-LearningPaths.html#~getLearningPathLessonsByIds">getLearningPathLessonsByIds</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:
@@ -925,6 +902,7 @@ export async function fetchAllFilterOptions(
925
902
  return includeTabs ? { ...results, tabs, catalogName } : results
926
903
  }
927
904
 
905
+ //Daniel Nov 14 2025 note - keeping this for when we migrate foundations to packs, so we know what fields to use.
928
906
  /**
929
907
  * Fetch the Foundations 2019.
930
908
  * @param {string} slug - The slug of the method.
@@ -950,6 +928,7 @@ export async function fetchFoundation(slug) {
950
928
  * @param {string} slug - The slug of the method.
951
929
  * @returns {Promise&lt;Object|null>} - The fetched methods data or null if not found.
952
930
  */
931
+ //todo BEH-1446 depreciated. remove all old method functions
953
932
  export async function fetchMethod(brand, slug) {
954
933
  const childrenFilter = await new FilterBuilder(``, { isChildrenFilter: true }).buildFilter()
955
934
 
@@ -1293,7 +1272,7 @@ async function fetchRelatedByLicense(railcontentId, brand, onlyUseSongTypes, cou
1293
1272
  *[${filterSongTypesWithSameLicense}]->{${queryFields}}|order(published_on desc, title asc)[0...${count}],
1294
1273
  }[0...1]`
1295
1274
  const results = await fetchSanity(query, false)
1296
- return results ? results['related_by_license'] ?? [] : []
1275
+ return results ? (results['related_by_license'] ?? []) : []
1297
1276
  }
1298
1277
 
1299
1278
  /**
@@ -1302,15 +1281,17 @@ async function fetchRelatedByLicense(railcontentId, brand, onlyUseSongTypes, cou
1302
1281
  * @param {string} brand - The current brand.
1303
1282
  * @returns {Promise&lt;Array&lt;Object>|null>} - The fetched related lessons data or null if not found.
1304
1283
  */
1305
- export async function fetchSiblingContent(railContentId, brand= null)
1306
- {
1284
+ export async function fetchSiblingContent(railContentId, brand = null) {
1307
1285
  const filterGetParent = await new FilterBuilder(`references(^._id) &amp;&amp; _type == ^.parent_type`, {
1308
- pullFutureContent: true
1309
- }).buildFilter()
1310
- const filterForParentList = await new FilterBuilder(`references(^._id) &amp;&amp; _type == ^.parent_type`, {
1311
1286
  pullFutureContent: true,
1312
- isParentFilter: true,
1313
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()
1314
1295
 
1315
1296
  const childrenFilter = await new FilterBuilder(``, { isChildrenFilter: true }).buildFilter()
1316
1297
 
@@ -1350,8 +1331,7 @@ export async function fetchSiblingContent(railContentId, brand= null)
1350
1331
  * @param {string} railContentId - The RailContent ID of the current lesson.
1351
1332
  * @returns {Promise&lt;Array&lt;Object>|null>} - The fetched related lessons data or null if not found.
1352
1333
  */
1353
- export async function fetchRelatedLessons(railContentId)
1354
- {
1334
+ export async function fetchRelatedLessons(railContentId) {
1355
1335
  const defaultFilterFields = `_type==^._type &amp;&amp; brand == ^.brand &amp;&amp; railcontent_id != ${railContentId}`
1356
1336
 
1357
1337
  const filterSameArtist = await new FilterBuilder(
@@ -1395,11 +1375,16 @@ export async function fetchAllPacks(
1395
1375
  const start = (page - 1) * limit
1396
1376
  const end = start + limit
1397
1377
 
1398
- const query = await buildQuery(filter, filterParams, await getFieldsForContentTypeWithFilteredChildren('pack'), {
1399
- sortOrder: sortOrder,
1400
- start,
1401
- end,
1402
- })
1378
+ const query = await buildQuery(
1379
+ filter,
1380
+ filterParams,
1381
+ await getFieldsForContentTypeWithFilteredChildren('pack'),
1382
+ {
1383
+ sortOrder: sortOrder,
1384
+ start,
1385
+ end,
1386
+ }
1387
+ )
1403
1388
  return fetchSanity(query, true)
1404
1389
  }
1405
1390
 
@@ -1505,45 +1490,6 @@ export async function fetchPackData(id) {
1505
1490
  return fetchSanity(query, false)
1506
1491
  }
1507
1492
 
1508
- /**
1509
- * Fetch the data needed for the coach screen.
1510
- * @param {string} brand - The brand for which to fetch coach lessons
1511
- * @param {string} id - The Railcontent ID of the coach
1512
- * @returns {Promise&lt;Object|null>} - The lessons for the instructor or null if not found.
1513
- * @param {Object} params - Parameters for pagination, filtering and sorting.
1514
- * @param {string} [params.sortOrder="-published_on"] - The field to sort the lessons by.
1515
- * @param {string} [params.searchTerm=""] - The search term to filter content by title.
1516
- * @param {number} [params.page=1] - The page number for pagination.
1517
- * @param {number} [params.limit=10] - The number of items per page.
1518
- * @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'].
1519
- *
1520
- * @example
1521
- * fetchCoachLessons('coach123')
1522
- * .then(lessons => console.log(lessons))
1523
- * .catch(error => console.error(error));
1524
- */
1525
- export async function fetchCoachLessons(
1526
- brand,
1527
- id,
1528
- { sortOrder = '-published_on', searchTerm = '', page = 1, limit = 20, includedFields = [] } = {}
1529
- ) {
1530
- const fieldsString = getFieldsForContentType()
1531
- const start = (page - 1) * limit
1532
- const end = start + limit
1533
- const searchFilter = searchTerm ? `&amp;&amp; title match "${searchTerm}*"` : ''
1534
- const includedFieldsFilter = includedFields.length > 0 ? filtersToGroq(includedFields) : ''
1535
- const filter = `brand == '${brand}' ${searchFilter} ${includedFieldsFilter} &amp;&amp; references(*[_type=='instructor' &amp;&amp; railcontent_id == ${id}]._id)`
1536
- const filterWithRestrictions = await new FilterBuilder(filter).buildFilter()
1537
-
1538
- sortOrder = getSortOrder(sortOrder, brand)
1539
- const query = buildEntityAndTotalQuery(filterWithRestrictions, fieldsString, {
1540
- sortOrder: sortOrder,
1541
- start: start,
1542
- end: end,
1543
- })
1544
- return fetchSanity(query, true)
1545
- }
1546
-
1547
1493
  /**
1548
1494
  * Fetch the data needed for the coach screen.
1549
1495
  * @param {string} id - The Railcontent ID of the coach
@@ -1575,121 +1521,6 @@ export async function fetchByReference(
1575
1521
  return fetchSanity(query, true)
1576
1522
  }
1577
1523
 
1578
- /**
1579
- * Fetch the artist's lessons.
1580
- * @param {string} brand - The brand for which to fetch lessons.
1581
- * @param {string} name - The name of the artist
1582
- * @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
1583
- * @param {Object} params - Parameters for sorting, searching, pagination and filtering.
1584
- * @param {string} [params.sort="-published_on"] - The field to sort the lessons by.
1585
- * @param {string} [params.searchTerm=""] - The search term to filter the lessons.
1586
- * @param {number} [params.page=1] - The page number for pagination.
1587
- * @param {number} [params.limit=10] - The number of items per page.
1588
- * @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'].
1589
- * @param {Array&lt;number>} [params.progressIds] - The ids of the lessons that are in progress or completed
1590
- * @returns {Promise&lt;Object|null>} - The lessons for the artist and some details about the artist (name and thumbnail).
1591
- *
1592
- * @example
1593
- * fetchArtistLessons('drumeo', '10 Years', 'song', {'-published_on', '', 1, 10, ["difficulty,Intermediate"], [232168, 232824, 303375, 232194, 393125]})
1594
- * .then(lessons => console.log(lessons))
1595
- * .catch(error => console.error(error));
1596
- */
1597
- export async function fetchArtistLessons(
1598
- brand,
1599
- name,
1600
- contentType,
1601
- {
1602
- sort = '-published_on',
1603
- searchTerm = '',
1604
- page = 1,
1605
- limit = 10,
1606
- includedFields = [],
1607
- progressIds = undefined,
1608
- } = {}
1609
- ) {
1610
- const fieldsString = DEFAULT_FIELDS.join(',')
1611
- const start = (page - 1) * limit
1612
- const end = start + limit
1613
- const searchFilter = searchTerm ? `&amp;&amp; title match "${searchTerm}*"` : ''
1614
- const sortOrder = getSortOrder(sort, brand)
1615
- const addType =
1616
- contentType &amp;&amp; Array.isArray(contentType)
1617
- ? `_type in ['${contentType.join("', '")}'] &amp;&amp;`
1618
- : contentType
1619
- ? `_type == '${contentType}' &amp;&amp; `
1620
- : ''
1621
- const includedFieldsFilter = includedFields.length > 0 ? filtersToGroq(includedFields) : ''
1622
-
1623
- // limits the results to supplied progressIds for started &amp; completed filters
1624
- const progressFilter =
1625
- progressIds !== undefined ? `&amp;&amp; railcontent_id in [${progressIds.join(',')}]` : ''
1626
- const now = getSanityDate(new Date())
1627
- const query = `{
1628
- "entity":
1629
- *[_type == 'artist' &amp;&amp; name == '${name}']
1630
- {'type': _type, name, 'thumbnail':thumbnail_url.asset->url,
1631
- 'lessons_count': count(*[${addType} brand == '${brand}' &amp;&amp; references(^._id)]),
1632
- '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}}
1633
- [${start}...${end}]}
1634
- |order(${sortOrder})f
1635
- }`
1636
- return fetchSanity(query, true)
1637
- }
1638
-
1639
- /**
1640
- * Fetch the genre's lessons.
1641
- * @param {string} brand - The brand for which to fetch lessons.
1642
- * @param {string} name - The name of the genre
1643
- * @param {Object} params - Parameters for sorting, searching, pagination and filtering.
1644
- * @param {string} [params.sort="-published_on"] - The field to sort the lessons by.
1645
- * @param {string} [params.searchTerm=""] - The search term to filter the lessons.
1646
- * @param {number} [params.page=1] - The page number for pagination.
1647
- * @param {number} [params.limit=10] - The number of items per page.
1648
- * @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'].
1649
- * @param {Array&lt;number>} [params.progressIds] - The ids of the lessons that are in progress or completed
1650
- * @returns {Promise&lt;Object|null>} - The lessons for the artist and some details about the artist (name and thumbnail).
1651
- *
1652
- * @example
1653
- * fetchGenreLessons('drumeo', 'Blues', 'song', {'-published_on', '', 1, 10, ["difficulty,Intermediate"], [232168, 232824, 303375, 232194, 393125]})
1654
- * .then(lessons => console.log(lessons))
1655
- * .catch(error => console.error(error));
1656
- */
1657
- export async function fetchGenreLessons(
1658
- brand,
1659
- name,
1660
- contentType,
1661
- {
1662
- sort = '-published_on',
1663
- searchTerm = '',
1664
- page = 1,
1665
- limit = 10,
1666
- includedFields = [],
1667
- progressIds = undefined,
1668
- } = {}
1669
- ) {
1670
- const fieldsString = DEFAULT_FIELDS.join(',')
1671
- const start = (page - 1) * limit
1672
- const end = start + limit
1673
- const searchFilter = searchTerm ? `&amp;&amp; title match "${searchTerm}*"` : ''
1674
- const sortOrder = getSortOrder(sort, brand)
1675
- const addType = contentType ? `_type == '${contentType}' &amp;&amp; ` : ''
1676
- const includedFieldsFilter = includedFields.length > 0 ? filtersToGroq(includedFields) : ''
1677
- // limits the results to supplied progressIds for started &amp; completed filters
1678
- const progressFilter =
1679
- progressIds !== undefined ? `&amp;&amp; railcontent_id in [${progressIds.join(',')}]` : ''
1680
- const now = getSanityDate(new Date())
1681
- const query = `{
1682
- "entity":
1683
- *[_type == 'genre' &amp;&amp; name == '${name}']
1684
- {'type': _type, name, 'thumbnail':thumbnail_url.asset->url,
1685
- 'lessons_count': count(*[${addType} brand == '${brand}' &amp;&amp; references(^._id)]),
1686
- '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}}
1687
- [${start}...${end}]}
1688
- |order(${sortOrder})
1689
- }`
1690
- return fetchSanity(query, true)
1691
- }
1692
-
1693
1524
  export async function fetchTopLevelParentId(railcontentId) {
1694
1525
  const statusFilter = "&amp;&amp; status in ['scheduled', 'published', 'archived', 'unlisted']"
1695
1526
 
@@ -1811,8 +1642,10 @@ export async function fetchCommentModContentData(ids) {
1811
1642
  *
1812
1643
  * @param {string} query - The GROQ query to execute against the Sanity API.
1813
1644
  * @param {boolean} isList - Whether to return an array or a single result.
1814
- * @param {Function} [customPostProcess=null] - custom post process callback
1815
- * @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
1816
1649
  * @returns {Promise&lt;*|null>} - A promise that resolves to the fetched data or null if an error occurs or no results are found.
1817
1650
  *
1818
1651
  * @example
@@ -1825,7 +1658,7 @@ export async function fetchCommentModContentData(ids) {
1825
1658
  export async function fetchSanity(
1826
1659
  query,
1827
1660
  isList,
1828
- { customPostProcess = null, processNeedAccess = true } = {}
1661
+ { customPostProcess = null, processNeedAccess = true, processPageType = true } = {}
1829
1662
  ) {
1830
1663
  // Check the config object before proceeding
1831
1664
  if (!checkSanityConfig(globalConfig)) {
@@ -1867,19 +1700,20 @@ export async function fetchSanity(
1867
1700
  results = processNeedAccess
1868
1701
  ? await needsAccessDecorator(results, userPermissions, isAdmin)
1869
1702
  : results
1870
- results = pageTypeDecorator(results)
1703
+ results = processPageType
1704
+ ? pageTypeDecorator(results)
1705
+ : results
1871
1706
  return customPostProcess ? customPostProcess(results) : results
1872
1707
  } else {
1873
1708
  throw new Error('No results found')
1874
1709
  }
1875
1710
  } catch (error) {
1876
- console.error('fetchSanity: Fetch error:', {error, query})
1711
+ console.error('fetchSanity: Fetch error:', { error, query })
1877
1712
  return null
1878
1713
  }
1879
1714
  }
1880
1715
 
1881
- function contentResultsDecorator(results, fieldName, callback)
1882
- {
1716
+ function contentResultsDecorator(results, fieldName, callback) {
1883
1717
  if (Array.isArray(results)) {
1884
1718
  results.forEach((result) => {
1885
1719
  result[fieldName] = callback(result)
@@ -1906,16 +1740,18 @@ function contentResultsDecorator(results, fieldName, callback)
1906
1740
  return results
1907
1741
  }
1908
1742
 
1909
- function pageTypeDecorator(results)
1910
- {
1911
- 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
+ })
1912
1747
  }
1913
1748
 
1914
-
1915
1749
  function needsAccessDecorator(results, userPermissions, isAdmin) {
1916
1750
  if (globalConfig.sanityConfig.useDummyRailContentMethods) return results
1917
1751
  userPermissions = new Set(userPermissions)
1918
- 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
+ })
1919
1755
  }
1920
1756
 
1921
1757
  function doesUserNeedAccessToContent(result, userPermissions, isAdmin) {
@@ -1973,8 +1809,8 @@ export async function fetchShowsData(brand) {
1973
1809
  * .catch(error => console.error(error));
1974
1810
  */
1975
1811
  export async function fetchMetadata(brand, type) {
1976
- let processedData = processMetadata(brand, type, true)
1977
- if(processedData?.onlyAvailableTabs === true) {
1812
+ let processedData = processMetadata(brand, type, true)
1813
+ if (processedData?.onlyAvailableTabs === true) {
1978
1814
  const activeTabs = await fetchRecentActivitiesActiveTabs()
1979
1815
  processedData.tabs = activeTabs
1980
1816
  }
@@ -2000,7 +1836,7 @@ function arrayJoinWithQuotes(array, delimiter = ',') {
2000
1836
  return wrapped.join(delimiter)
2001
1837
  }
2002
1838
 
2003
- function getSanityDate(date, roundToHourForCaching = true) {
1839
+ export function getSanityDate(date, roundToHourForCaching = true) {
2004
1840
  if (roundToHourForCaching) {
2005
1841
  // We need to set the published on filter date to be a round time so that it doesn't bypass the query cache
2006
1842
  // with every request by changing the filter date every second. I've set it to one minute past the current hour
@@ -2074,13 +1910,19 @@ async function buildQuery(
2074
1910
  return buildRawQuery(filter, fields, { sortOrder, start, end, isSingle })
2075
1911
  }
2076
1912
 
2077
- function buildEntityAndTotalQuery(
1913
+ export function buildEntityAndTotalQuery(
2078
1914
  filter = '',
2079
1915
  fields = '...',
2080
- { 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
+ }
2081
1923
  ) {
2082
1924
  const sortString = sortOrder ? ` | order(${sortOrder})` : ''
2083
- const countString = isSingle ? '[0...1]' : (withoutPagination ? ``: `[${start}...${end}]`)
1925
+ const countString = isSingle ? '[0...1]' : withoutPagination ? `` : `[${start}...${end}]`
2084
1926
  const query = `{
2085
1927
  "entity": *[${filter}] ${sortString}${countString}
2086
1928
  {
@@ -2209,22 +2051,22 @@ export async function fetchTabData(
2209
2051
 
2210
2052
  switch (progress) {
2211
2053
  case 'recent':
2212
- progressIds = await getAllStartedOrCompleted({ brand, onlyIds: true });
2213
- sortOrder = null;
2214
- break;
2054
+ progressIds = await getAllStartedOrCompleted({ brand, onlyIds: true })
2055
+ sortOrder = null
2056
+ break
2215
2057
  case 'incomplete':
2216
- progressIds = await getAllStarted();
2217
- sortOrder = null;
2218
- break;
2058
+ progressIds = await getAllStarted()
2059
+ sortOrder = null
2060
+ break
2219
2061
  case 'completed':
2220
- progressIds = await getAllCompleted();
2221
- sortOrder = null;
2222
- break;
2062
+ progressIds = await getAllCompleted()
2063
+ sortOrder = null
2064
+ break
2223
2065
  }
2224
2066
 
2225
2067
  // limits the results to supplied progressIds for started &amp; completed filters
2226
2068
  const progressFilter = await getProgressFilter(progress, progressIds)
2227
- const fieldsString = getFieldsForContentType('tab-data');
2069
+ const fieldsString = getFieldsForContentType('tab-data')
2228
2070
  const now = getSanityDate(new Date())
2229
2071
 
2230
2072
  // Determine the group by clause
@@ -2236,8 +2078,7 @@ export async function fetchTabData(
2236
2078
  const childrenFilter = await new FilterBuilder(``, { isChildrenFilter: true }).buildFilter()
2237
2079
  const childrenFields = await getChildFieldsForContentType('tab-data')
2238
2080
  const lessonCountFilter = await new FilterBuilder(`_id in ^.child[]._ref`).buildFilter()
2239
- entityFieldsString =
2240
- ` ${fieldsString}
2081
+ entityFieldsString = ` ${fieldsString}
2241
2082
  'children': child[${childrenFilter}]->{ ${childrenFields} 'children': child[${childrenFilter}]->{ ${childrenFields} }, },
2242
2083
  'isLive': live_event_start_time &lt;= "${now}" &amp;&amp; live_event_end_time >= "${now}",
2243
2084
  'lesson_count': coalesce(count(*[${lessonCountFilter}]), 0),
@@ -2253,23 +2094,23 @@ export async function fetchTabData(
2253
2094
  query = buildEntityAndTotalQuery(filterWithRestrictions, entityFieldsString, {
2254
2095
  sortOrder: sortOrder,
2255
2096
  start: start,
2256
- end: end
2097
+ end: end,
2257
2098
  })
2258
2099
 
2259
- let results = await fetchSanity(query, true);
2100
+ let results = await fetchSanity(query, true)
2260
2101
 
2261
2102
  if (['recent', 'incomplete', 'completed'].includes(progress) &amp;&amp; results.entity.length > 1) {
2262
2103
  const orderMap = new Map(progressIds.map((id, index) => [id, index]))
2263
2104
  results.entity = results.entity
2264
2105
  .sort((a, b) => {
2265
- const aIdx = orderMap.get(a.id) ?? Number.MAX_SAFE_INTEGER;
2266
- const bIdx = orderMap.get(b.id) ?? Number.MAX_SAFE_INTEGER;
2267
- 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)
2268
2109
  })
2269
- .slice(start, end);
2110
+ .slice(start, end)
2270
2111
  }
2271
2112
 
2272
- return results;
2113
+ return results
2273
2114
  }
2274
2115
 
2275
2116
  export async function fetchRecent(
@@ -2344,12 +2185,12 @@ export async function fetchShows(brand, type, sort = 'sort') {
2344
2185
  * @returns {Promise&lt;*|null>}
2345
2186
  */
2346
2187
  export async function fetchMethodV2IntroVideo(brand) {
2347
- const type = "method-intro";
2348
- const filter = `_type == '${type}' &amp;&amp; brand == '${brand}'`;
2349
- const fields = getIntroVideoFields('method');
2188
+ const type = 'method-intro'
2189
+ const filter = `_type == '${type}' &amp;&amp; brand == '${brand}'`
2190
+ const fields = getIntroVideoFields('method-v2')
2350
2191
 
2351
- const query = `*[${filter}] { ${fields.join(", ")} }`;
2352
- return fetchSanity(query, false);
2192
+ const query = `*[${filter}] { ${fields.join(', ')} }`
2193
+ return fetchSanity(query, false)
2353
2194
  }
2354
2195
 
2355
2196
  /**
@@ -2358,15 +2199,15 @@ export async function fetchMethodV2IntroVideo(brand) {
2358
2199
  * @returns {Promise&lt;*|null>}
2359
2200
  */
2360
2201
  export async function fetchMethodV2Structure(brand) {
2361
- const _type = "method-v2";
2202
+ const _type = 'method-v2'
2362
2203
  const query = `*[_type == '${_type}' &amp;&amp; brand == '${brand}'][0...1]{
2363
2204
  'sanity_id': _id,
2364
2205
  'learningPaths': child[]->{
2365
2206
  'id': railcontent_id,
2366
2207
  'children': child[]->railcontent_id
2367
2208
  }
2368
- }`;
2369
- return await fetchSanity(query, false);
2209
+ }`
2210
+ return await fetchSanity(query, false)
2370
2211
  }
2371
2212
  </code></pre>
2372
2213
  </article>
@@ -2382,7 +2223,7 @@ export async function fetchMethodV2Structure(brand) {
2382
2223
  <br class="clear">
2383
2224
 
2384
2225
  <footer>
2385
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Wed Nov 12 2025 23:37: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.
2386
2227
  </footer>
2387
2228
 
2388
2229
  <script>prettyPrint();</script>