musora-content-services 2.74.1 → 2.76.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.
- package/CHANGELOG.md +22 -0
- package/docs/ContentOrganization.html +2 -2
- package/docs/Forums.html +2 -2
- package/docs/Gamification.html +2 -2
- package/docs/TestUser.html +2 -2
- package/docs/UserManagementSystem.html +2 -2
- package/docs/api_types.js.html +2 -2
- package/docs/config.js.html +2 -2
- package/docs/content-org_content-org.js.html +2 -2
- package/docs/content-org_guided-courses.ts.html +2 -2
- package/docs/content-org_learning-paths.ts.html +95 -31
- package/docs/content-org_playlists-types.js.html +2 -2
- package/docs/content-org_playlists.js.html +2 -2
- package/docs/content.js.html +2 -2
- package/docs/forums_categories.ts.html +2 -2
- package/docs/forums_forums.ts.html +2 -2
- package/docs/forums_posts.ts.html +2 -2
- package/docs/forums_threads.ts.html +2 -2
- package/docs/gamification_awards.ts.html +2 -2
- package/docs/gamification_gamification.js.html +2 -2
- package/docs/global.html +56 -8
- package/docs/index.html +2 -2
- package/docs/liveTesting.ts.html +2 -2
- package/docs/module-Accounts.html +191 -2
- package/docs/module-Awards.html +2 -2
- package/docs/module-Config.html +2 -2
- package/docs/module-Content-Services-V2.html +2 -2
- package/docs/module-Forums.html +2 -2
- package/docs/module-GuidedCourses.html +2 -2
- package/docs/module-Interests.html +2 -2
- package/docs/module-LearningPaths.html +602 -9
- package/docs/module-Onboarding.html +2 -2
- package/docs/module-Payments.html +2 -2
- package/docs/module-Permissions.html +2 -2
- package/docs/module-Playlists.html +2 -2
- package/docs/module-ProgressRow.html +108 -0
- package/docs/module-Railcontent-Services.html +2 -2
- package/docs/module-Sanity-Services.html +2 -2
- package/docs/module-Sessions.html +2 -2
- package/docs/module-UserActivity.html +22 -22
- package/docs/module-UserChat.html +2 -2
- package/docs/module-UserManagement.html +2 -2
- package/docs/module-UserMemberships.html +2 -2
- package/docs/module-UserNotifications.html +2 -2
- package/docs/module-UserProfile.html +2 -2
- package/docs/progress-row_method-card.js.html +182 -0
- package/docs/railcontent.js.html +2 -2
- package/docs/sanity.js.html +3 -3
- package/docs/userActivity.js.html +120 -65
- package/docs/user_account.ts.html +29 -2
- package/docs/user_chat.js.html +2 -2
- package/docs/user_interests.js.html +2 -2
- package/docs/user_management.js.html +2 -2
- package/docs/user_memberships.ts.html +2 -2
- package/docs/user_notifications.js.html +2 -2
- package/docs/user_onboarding.ts.html +2 -2
- package/docs/user_payments.ts.html +2 -2
- package/docs/user_permissions.js.html +2 -2
- package/docs/user_profile.js.html +2 -2
- package/docs/user_sessions.js.html +2 -2
- package/docs/user_types.js.html +4 -2
- package/docs/user_user-management-system.js.html +2 -2
- package/jsdoc.json +1 -0
- package/package.json +1 -1
- package/src/contentTypeConfig.js +18 -8
- package/src/index.d.ts +20 -1
- package/src/index.js +20 -1
- package/src/infrastructure/http/HttpClient.ts +5 -5
- package/src/services/content-org/learning-paths.ts +77 -28
- package/src/services/contentAggregator.js +56 -45
- package/src/services/contentProgress.js +7 -5
- package/src/services/dateUtils.js +25 -22
- package/src/services/progress-row/method-card.js +110 -0
- package/src/services/sanity.js +1 -1
- package/src/services/user/account.ts +27 -0
- package/src/services/user/types.js +2 -0
- package/src/services/userActivity.js +118 -63
- package/test/learningPaths.test.js +5 -3
|
@@ -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></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#~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-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-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>
|
|
33
33
|
|
|
34
34
|
</nav>
|
|
35
35
|
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
<br class="clear">
|
|
67
67
|
|
|
68
68
|
<footer>
|
|
69
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on
|
|
69
|
+
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.
|
|
70
70
|
</footer>
|
|
71
71
|
|
|
72
72
|
<script>prettyPrint();</script>
|
package/jsdoc.json
CHANGED
package/package.json
CHANGED
package/src/contentTypeConfig.js
CHANGED
|
@@ -277,6 +277,7 @@ export const getNextLessonLessonParentTypes = [
|
|
|
277
277
|
'pack',
|
|
278
278
|
'pack-bundle',
|
|
279
279
|
'song-tutorial',
|
|
280
|
+
'learning-path-v2',
|
|
280
281
|
]
|
|
281
282
|
|
|
282
283
|
export const progressTypesMapping = {
|
|
@@ -297,7 +298,8 @@ export const progressTypesMapping = {
|
|
|
297
298
|
'play along': playAlongLessonTypes,
|
|
298
299
|
'guided course': ['guided-course'],
|
|
299
300
|
pack: ['pack', 'semester-pack'],
|
|
300
|
-
method: ['
|
|
301
|
+
method: ['method-card', 'method-intro'],
|
|
302
|
+
'learning path': ['learning-path'],
|
|
301
303
|
'jam track': jamTrackLessonTypes,
|
|
302
304
|
'course video': ['course-part'],
|
|
303
305
|
}
|
|
@@ -478,7 +480,7 @@ export let contentTypeConfig = {
|
|
|
478
480
|
},
|
|
479
481
|
'learning-path-v2': {
|
|
480
482
|
fields: [
|
|
481
|
-
|
|
483
|
+
`"intro_video": intro_video->{ ${getIntroVideoFields('learning-path').join(', ')} }`,
|
|
482
484
|
'total_skills',
|
|
483
485
|
`"resource": ${resourcesField}`,
|
|
484
486
|
`"badge": *[
|
|
@@ -677,7 +679,7 @@ export let contentTypeConfig = {
|
|
|
677
679
|
`"type":_type`,
|
|
678
680
|
'title',
|
|
679
681
|
'brand',
|
|
680
|
-
`"intro_video": intro_video->{ ${getIntroVideoFields().join(', ')} }`,
|
|
682
|
+
`"intro_video": intro_video->{ ${getIntroVideoFields('method').join(', ')} }`,
|
|
681
683
|
`child[]->{
|
|
682
684
|
"resource": ${resourcesField},
|
|
683
685
|
total_skills,
|
|
@@ -695,19 +697,27 @@ export let contentTypeConfig = {
|
|
|
695
697
|
}
|
|
696
698
|
}`,
|
|
697
699
|
],
|
|
698
|
-
'method-intro': getIntroVideoFields(),
|
|
699
700
|
}
|
|
700
701
|
|
|
701
|
-
export function getIntroVideoFields() {
|
|
702
|
-
|
|
702
|
+
export function getIntroVideoFields(type) {
|
|
703
|
+
const fields = [
|
|
704
|
+
`"id": railcontent_id`,
|
|
703
705
|
'title',
|
|
704
706
|
'brand',
|
|
707
|
+
`"type": _type`,
|
|
708
|
+
'brand',
|
|
705
709
|
`"description": ${descriptionField}`,
|
|
706
710
|
`"thumbnail": thumbnail.asset->url`,
|
|
707
711
|
'length_in_seconds',
|
|
708
|
-
'video_desktop',
|
|
709
|
-
'video_mobile',
|
|
710
712
|
]
|
|
713
|
+
|
|
714
|
+
if (type === 'method') {
|
|
715
|
+
fields.push(...['video_desktop', 'video_mobile'])
|
|
716
|
+
} else if (type === 'learning-path') {
|
|
717
|
+
fields.push('video')
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
return fields
|
|
711
721
|
}
|
|
712
722
|
|
|
713
723
|
export const plusMembershipPermissions = 92
|
package/src/index.d.ts
CHANGED
|
@@ -16,6 +16,11 @@ import {
|
|
|
16
16
|
fetchLearningPathLessons,
|
|
17
17
|
getActivePath,
|
|
18
18
|
getDailySession,
|
|
19
|
+
getLearningPath,
|
|
20
|
+
getLearningPathLessonsByIds,
|
|
21
|
+
mapContentToParent,
|
|
22
|
+
resetAllLearningPaths,
|
|
23
|
+
startLearningPath,
|
|
19
24
|
updateActivePath,
|
|
20
25
|
updateDailySession
|
|
21
26
|
} from './services/content-org/learning-paths.ts';
|
|
@@ -90,6 +95,7 @@ import {
|
|
|
90
95
|
convertToTimeZone,
|
|
91
96
|
getMonday,
|
|
92
97
|
getTimeRemainingUntilLocal,
|
|
98
|
+
getToday,
|
|
93
99
|
getWeekNumber,
|
|
94
100
|
isNextDay,
|
|
95
101
|
isSameDate,
|
|
@@ -155,6 +161,10 @@ import {
|
|
|
155
161
|
createTestUser
|
|
156
162
|
} from './services/liveTesting.ts';
|
|
157
163
|
|
|
164
|
+
import {
|
|
165
|
+
getMethodCard
|
|
166
|
+
} from './services/progress-row/method-card.js';
|
|
167
|
+
|
|
158
168
|
import {
|
|
159
169
|
assignModeratorToComment,
|
|
160
170
|
closeComment,
|
|
@@ -274,7 +284,8 @@ import {
|
|
|
274
284
|
sendAccountSetupEmail,
|
|
275
285
|
sendPasswordResetEmail,
|
|
276
286
|
setupAccount,
|
|
277
|
-
status
|
|
287
|
+
status,
|
|
288
|
+
toggleStudentView
|
|
278
289
|
} from './services/user/account.ts';
|
|
279
290
|
|
|
280
291
|
import {
|
|
@@ -532,8 +543,11 @@ declare module 'musora-content-services' {
|
|
|
532
543
|
getContentRows,
|
|
533
544
|
getDailySession,
|
|
534
545
|
getLastInteractedOf,
|
|
546
|
+
getLearningPath,
|
|
547
|
+
getLearningPathLessonsByIds,
|
|
535
548
|
getLegacyMethods,
|
|
536
549
|
getLessonContentRows,
|
|
550
|
+
getMethodCard,
|
|
537
551
|
getMonday,
|
|
538
552
|
getNavigateTo,
|
|
539
553
|
getNavigateToForPlaylists,
|
|
@@ -558,6 +572,7 @@ declare module 'musora-content-services' {
|
|
|
558
572
|
getStartedOrCompletedProgressOnly,
|
|
559
573
|
getTabResults,
|
|
560
574
|
getTimeRemainingUntilLocal,
|
|
575
|
+
getToday,
|
|
561
576
|
getUserData,
|
|
562
577
|
getUserMonthlyStats,
|
|
563
578
|
getUserPractices,
|
|
@@ -583,6 +598,7 @@ declare module 'musora-content-services' {
|
|
|
583
598
|
logUserPractice,
|
|
584
599
|
login,
|
|
585
600
|
logout,
|
|
601
|
+
mapContentToParent,
|
|
586
602
|
markAllNotificationsAsRead,
|
|
587
603
|
markContentAsInterested,
|
|
588
604
|
markContentAsNotInterested,
|
|
@@ -616,6 +632,7 @@ declare module 'musora-content-services' {
|
|
|
616
632
|
reportPlaylist,
|
|
617
633
|
requestEmailChange,
|
|
618
634
|
reset,
|
|
635
|
+
resetAllLearningPaths,
|
|
619
636
|
resetPassword,
|
|
620
637
|
restoreComment,
|
|
621
638
|
restoreItemFromPlaylist,
|
|
@@ -630,12 +647,14 @@ declare module 'musora-content-services' {
|
|
|
630
647
|
setStudentViewForUser,
|
|
631
648
|
setUserSignature,
|
|
632
649
|
setupAccount,
|
|
650
|
+
startLearningPath,
|
|
633
651
|
startLiveEventPolling,
|
|
634
652
|
startOnboarding,
|
|
635
653
|
status,
|
|
636
654
|
toDayjs,
|
|
637
655
|
togglePlaylistPrivate,
|
|
638
656
|
toggleSignaturePrivate,
|
|
657
|
+
toggleStudentView,
|
|
639
658
|
unEnrollUserInGuidedCourse,
|
|
640
659
|
unassignModeratorToComment,
|
|
641
660
|
unblockUser,
|
package/src/index.js
CHANGED
|
@@ -16,6 +16,11 @@ import {
|
|
|
16
16
|
fetchLearningPathLessons,
|
|
17
17
|
getActivePath,
|
|
18
18
|
getDailySession,
|
|
19
|
+
getLearningPath,
|
|
20
|
+
getLearningPathLessonsByIds,
|
|
21
|
+
mapContentToParent,
|
|
22
|
+
resetAllLearningPaths,
|
|
23
|
+
startLearningPath,
|
|
19
24
|
updateActivePath,
|
|
20
25
|
updateDailySession
|
|
21
26
|
} from './services/content-org/learning-paths.ts';
|
|
@@ -90,6 +95,7 @@ import {
|
|
|
90
95
|
convertToTimeZone,
|
|
91
96
|
getMonday,
|
|
92
97
|
getTimeRemainingUntilLocal,
|
|
98
|
+
getToday,
|
|
93
99
|
getWeekNumber,
|
|
94
100
|
isNextDay,
|
|
95
101
|
isSameDate,
|
|
@@ -155,6 +161,10 @@ import {
|
|
|
155
161
|
createTestUser
|
|
156
162
|
} from './services/liveTesting.ts';
|
|
157
163
|
|
|
164
|
+
import {
|
|
165
|
+
getMethodCard
|
|
166
|
+
} from './services/progress-row/method-card.js';
|
|
167
|
+
|
|
158
168
|
import {
|
|
159
169
|
assignModeratorToComment,
|
|
160
170
|
closeComment,
|
|
@@ -274,7 +284,8 @@ import {
|
|
|
274
284
|
sendAccountSetupEmail,
|
|
275
285
|
sendPasswordResetEmail,
|
|
276
286
|
setupAccount,
|
|
277
|
-
status
|
|
287
|
+
status,
|
|
288
|
+
toggleStudentView
|
|
278
289
|
} from './services/user/account.ts';
|
|
279
290
|
|
|
280
291
|
import {
|
|
@@ -531,8 +542,11 @@ export {
|
|
|
531
542
|
getContentRows,
|
|
532
543
|
getDailySession,
|
|
533
544
|
getLastInteractedOf,
|
|
545
|
+
getLearningPath,
|
|
546
|
+
getLearningPathLessonsByIds,
|
|
534
547
|
getLegacyMethods,
|
|
535
548
|
getLessonContentRows,
|
|
549
|
+
getMethodCard,
|
|
536
550
|
getMonday,
|
|
537
551
|
getNavigateTo,
|
|
538
552
|
getNavigateToForPlaylists,
|
|
@@ -557,6 +571,7 @@ export {
|
|
|
557
571
|
getStartedOrCompletedProgressOnly,
|
|
558
572
|
getTabResults,
|
|
559
573
|
getTimeRemainingUntilLocal,
|
|
574
|
+
getToday,
|
|
560
575
|
getUserData,
|
|
561
576
|
getUserMonthlyStats,
|
|
562
577
|
getUserPractices,
|
|
@@ -582,6 +597,7 @@ export {
|
|
|
582
597
|
logUserPractice,
|
|
583
598
|
login,
|
|
584
599
|
logout,
|
|
600
|
+
mapContentToParent,
|
|
585
601
|
markAllNotificationsAsRead,
|
|
586
602
|
markContentAsInterested,
|
|
587
603
|
markContentAsNotInterested,
|
|
@@ -615,6 +631,7 @@ export {
|
|
|
615
631
|
reportPlaylist,
|
|
616
632
|
requestEmailChange,
|
|
617
633
|
reset,
|
|
634
|
+
resetAllLearningPaths,
|
|
618
635
|
resetPassword,
|
|
619
636
|
restoreComment,
|
|
620
637
|
restoreItemFromPlaylist,
|
|
@@ -629,12 +646,14 @@ export {
|
|
|
629
646
|
setStudentViewForUser,
|
|
630
647
|
setUserSignature,
|
|
631
648
|
setupAccount,
|
|
649
|
+
startLearningPath,
|
|
632
650
|
startLiveEventPolling,
|
|
633
651
|
startOnboarding,
|
|
634
652
|
status,
|
|
635
653
|
toDayjs,
|
|
636
654
|
togglePlaylistPrivate,
|
|
637
655
|
toggleSignaturePrivate,
|
|
656
|
+
toggleStudentView,
|
|
638
657
|
unEnrollUserInGuidedCourse,
|
|
639
658
|
unassignModeratorToComment,
|
|
640
659
|
unblockUser,
|
|
@@ -30,23 +30,23 @@ export class HttpClient {
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
public async get<T>(url: string, dataVersion: string | null = null): Promise<T> {
|
|
33
|
-
return this.request<T>(url, '
|
|
33
|
+
return this.request<T>(url, 'GET', dataVersion)
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
public async post<T>(url: string, data: any, dataVersion: string | null = null): Promise<T> {
|
|
37
|
-
return this.request<T>(url, '
|
|
37
|
+
return this.request<T>(url, 'POST', dataVersion, data)
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
public async put<T>(url: string, data: any, dataVersion: string | null = null): Promise<T> {
|
|
41
|
-
return this.request<T>(url, '
|
|
41
|
+
return this.request<T>(url, 'PUT', dataVersion, data)
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
public async patch<T>(url: string, data: any, dataVersion: string | null = null): Promise<T> {
|
|
45
|
-
return this.request<T>(url, '
|
|
45
|
+
return this.request<T>(url, 'PATCH', dataVersion, data)
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
public async delete<T>(url: string, dataVersion: string | null = null): Promise<T> {
|
|
49
|
-
return this.request<T>(url, '
|
|
49
|
+
return this.request<T>(url, 'DELETE', dataVersion)
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
private async request<T>(
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module LearningPaths
|
|
3
|
+
*/
|
|
4
|
+
|
|
1
5
|
import { fetchHandler } from '../railcontent.js'
|
|
2
6
|
import { fetchByRailContentId, fetchByRailContentIds, fetchMethodV2Structure } from '../sanity.js'
|
|
3
7
|
import { addContextToContent } from '../contentAggregator.js'
|
|
4
8
|
import { getProgressStateByIds } from '../contentProgress.js'
|
|
5
|
-
|
|
6
|
-
* @module LearningPaths
|
|
7
|
-
*/
|
|
9
|
+
|
|
8
10
|
const BASE_PATH: string = `/api/content-org`
|
|
9
11
|
|
|
10
12
|
/**
|
|
@@ -56,6 +58,67 @@ export async function updateActivePath(brand: string) {
|
|
|
56
58
|
return await fetchHandler(url, 'POST', null, body)
|
|
57
59
|
}
|
|
58
60
|
|
|
61
|
+
/**
|
|
62
|
+
* Starts a new learning path for the user.
|
|
63
|
+
* @param brand
|
|
64
|
+
* @param learningPathId
|
|
65
|
+
*/
|
|
66
|
+
export async function startLearningPath(brand: string, learningPathId: number) {
|
|
67
|
+
const url: string = `${BASE_PATH}/v1/user/learning-paths/start`
|
|
68
|
+
const body = { brand: brand, learning_path_id: learningPathId }
|
|
69
|
+
return await fetchHandler(url, 'POST', null, body)
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Resets the user's learning path.
|
|
74
|
+
*/
|
|
75
|
+
export async function resetAllLearningPaths() {
|
|
76
|
+
const url: string = `${BASE_PATH}/v1/user/learning-paths/reset`
|
|
77
|
+
return await fetchHandler(url, 'POST', null, {})
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Returns learning path with lessons and progress data
|
|
82
|
+
* @param {number} learningPathId - The learning path ID
|
|
83
|
+
* @returns {Promise<Object>} Learning path with enriched lesson data
|
|
84
|
+
*/
|
|
85
|
+
export async function getLearningPath(learningPathId) {
|
|
86
|
+
//TODO: must be a cleaner way to do this
|
|
87
|
+
let learningPath = await fetchByRailContentId(learningPathId, 'learning-path-v2')
|
|
88
|
+
learningPath.children = mapContentToParent(
|
|
89
|
+
learningPath.children,
|
|
90
|
+
'learning-path-lesson-v2',
|
|
91
|
+
learningPathId
|
|
92
|
+
)
|
|
93
|
+
|
|
94
|
+
learningPath.children = await addContextToContent(() => learningPath.children, {
|
|
95
|
+
addProgressStatus: true,
|
|
96
|
+
addProgressPercentage: true,
|
|
97
|
+
addProgressTimestamp: true,
|
|
98
|
+
})
|
|
99
|
+
learningPath = await addContextToContent(() => learningPath, { addNextLesson: true })
|
|
100
|
+
return learningPath
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Get specific learning path lessons by content IDs
|
|
105
|
+
* @param {number[]} contentIds - Array of content IDs to filter
|
|
106
|
+
* @param {number} learningPathId - The learning path ID
|
|
107
|
+
* @returns {Promise<Array>} Filtered lessons
|
|
108
|
+
*/
|
|
109
|
+
export async function getLearningPathLessonsByIds(contentIds, learningPathId) {
|
|
110
|
+
// It is more efficient to load the entire learning path than individual lessons
|
|
111
|
+
// Also adds reliability check whether content is actually in the learning path
|
|
112
|
+
const learningPath = await getLearningPath(learningPathId)
|
|
113
|
+
return learningPath.children.filter((lesson) => contentIds.includes(lesson.id))
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export function mapContentToParent(lessons, parentContentType, parentContentId) {
|
|
117
|
+
return lessons.map((lesson: any) => {
|
|
118
|
+
return { ...lesson, type: parentContentType, parent_id: parentContentId }
|
|
119
|
+
})
|
|
120
|
+
}
|
|
121
|
+
|
|
59
122
|
/** Fetches and organizes learning path lessons.
|
|
60
123
|
*
|
|
61
124
|
* @param {number} learningPathId - The learning path ID.
|
|
@@ -79,37 +142,28 @@ export async function fetchLearningPathLessons(
|
|
|
79
142
|
userDate: Date
|
|
80
143
|
) {
|
|
81
144
|
const [learningPath, dailySession] = await Promise.all([
|
|
82
|
-
|
|
145
|
+
getLearningPath(learningPathId),
|
|
83
146
|
getDailySession(brand, userDate),
|
|
84
147
|
])
|
|
85
148
|
|
|
86
|
-
const addContextParameters = {
|
|
87
|
-
addProgressStatus: true,
|
|
88
|
-
addProgressPercentage: true,
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
const lessons = await addContextToContent(() => learningPath.children, addContextParameters)
|
|
92
149
|
const isActiveLearningPath = (dailySession?.active_learning_path_id || 0) == learningPathId
|
|
93
|
-
const manipulatedLessons = lessons.map((lesson: any) => {
|
|
94
|
-
return { ...lesson, type: 'learning-path-lesson-v2', parent_id: learningPathId }
|
|
95
|
-
})
|
|
96
|
-
|
|
97
150
|
if (!isActiveLearningPath) {
|
|
98
151
|
return {
|
|
99
152
|
...learningPath,
|
|
100
153
|
is_active_learning_path: isActiveLearningPath,
|
|
101
|
-
children: manipulatedLessons,
|
|
102
154
|
}
|
|
103
155
|
}
|
|
104
|
-
|
|
105
156
|
const todayContentIds = dailySession.daily_session[0]?.content_ids || []
|
|
157
|
+
const previousLearningPathId = dailySession.daily_session[0]?.learning_path_id
|
|
106
158
|
const nextContentIds = dailySession.daily_session[1]?.content_ids || []
|
|
159
|
+
const nextLearningPathId = dailySession.daily_session[1]?.learning_path_id
|
|
107
160
|
const completedLessons = []
|
|
108
161
|
let todaysLessons = []
|
|
109
162
|
let nextLPLessons = []
|
|
163
|
+
let previousLearningPathTodays = []
|
|
110
164
|
const upcomingLessons = []
|
|
111
165
|
|
|
112
|
-
|
|
166
|
+
learningPath.children.forEach((lesson: any) => {
|
|
113
167
|
if (todayContentIds.includes(lesson.id)) {
|
|
114
168
|
todaysLessons.push(lesson)
|
|
115
169
|
} else if (lesson.progressStatus === 'completed') {
|
|
@@ -119,14 +173,12 @@ export async function fetchLearningPathLessons(
|
|
|
119
173
|
}
|
|
120
174
|
})
|
|
121
175
|
|
|
122
|
-
let previousLearnigPathTodays = []
|
|
123
176
|
if (todaysLessons.length == 0) {
|
|
124
177
|
// Daily sessions first lessons are not part of the active learning path, but next lessons are
|
|
125
178
|
// load todays lessons from previous learning path
|
|
126
|
-
|
|
127
|
-
fetchByRailContentIds,
|
|
179
|
+
previousLearningPathTodays = await getLearningPathLessonsByIds(
|
|
128
180
|
todayContentIds,
|
|
129
|
-
|
|
181
|
+
previousLearningPathId
|
|
130
182
|
)
|
|
131
183
|
} else if (
|
|
132
184
|
nextContentIds.length > 0 &&
|
|
@@ -135,21 +187,18 @@ export async function fetchLearningPathLessons(
|
|
|
135
187
|
) {
|
|
136
188
|
// Daily sessions first lessons are the active learning path and the next lessons are not
|
|
137
189
|
// load next lessons from next learning path
|
|
138
|
-
nextLPLessons = await
|
|
139
|
-
fetchByRailContentIds,
|
|
140
|
-
nextContentIds,
|
|
141
|
-
addContextParameters
|
|
142
|
-
)
|
|
190
|
+
nextLPLessons = await getLearningPathLessonsByIds(nextContentIds, nextLearningPathId)
|
|
143
191
|
}
|
|
144
192
|
|
|
145
193
|
return {
|
|
146
194
|
...learningPath,
|
|
147
195
|
is_active_learning_path: isActiveLearningPath,
|
|
148
|
-
|
|
196
|
+
active_learning_path_id: dailySession?.active_learning_path_id,
|
|
197
|
+
active_learning_path_created_at: dailySession?.active_learning_path_created_at,
|
|
149
198
|
upcoming_lessons: upcomingLessons,
|
|
150
199
|
todays_lessons: todaysLessons,
|
|
151
200
|
next_learning_path_lessons: nextLPLessons,
|
|
152
201
|
completed_lessons: completedLessons,
|
|
153
|
-
previous_learning_path_todays:
|
|
202
|
+
previous_learning_path_todays: previousLearningPathTodays,
|
|
154
203
|
}
|
|
155
204
|
}
|