musora-content-services 2.3.11 → 2.3.13

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 (134) hide show
  1. package/.coderabbit.yaml +0 -0
  2. package/.editorconfig +0 -0
  3. package/.github/workflows/node.js.yml +0 -0
  4. package/.prettierignore +0 -0
  5. package/.prettierrc +0 -0
  6. package/CHANGELOG.md +4 -0
  7. package/README.md +0 -0
  8. package/babel.config.cjs +0 -0
  9. package/docs/Content-Organization.html +0 -0
  10. package/docs/ContentOrganization.html +2 -2
  11. package/docs/Gamification.html +2 -2
  12. package/docs/UserManagement.html +0 -0
  13. package/docs/UserManagementSystem.html +2 -2
  14. package/docs/api_types.js.html +2 -2
  15. package/docs/config.js.html +2 -3
  16. package/docs/content-org_content-org.js.html +2 -2
  17. package/docs/content-org_playlists-types.js.html +2 -2
  18. package/docs/content-org_playlists.js.html +2 -2
  19. package/docs/content.js.html +2 -2
  20. package/docs/fonts/Montserrat/Montserrat-Bold.eot +0 -0
  21. package/docs/fonts/Montserrat/Montserrat-Bold.ttf +0 -0
  22. package/docs/fonts/Montserrat/Montserrat-Bold.woff +0 -0
  23. package/docs/fonts/Montserrat/Montserrat-Bold.woff2 +0 -0
  24. package/docs/fonts/Montserrat/Montserrat-Regular.eot +0 -0
  25. package/docs/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
  26. package/docs/fonts/Montserrat/Montserrat-Regular.woff +0 -0
  27. package/docs/fonts/Montserrat/Montserrat-Regular.woff2 +0 -0
  28. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.eot +0 -0
  29. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg +0 -0
  30. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.ttf +0 -0
  31. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff +0 -0
  32. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff2 +0 -0
  33. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.eot +0 -0
  34. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.svg +0 -0
  35. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.ttf +0 -0
  36. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff +0 -0
  37. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff2 +0 -0
  38. package/docs/gamification_awards.js.html +2 -2
  39. package/docs/gamification_gamification.js.html +2 -2
  40. package/docs/gamification_types.js.html +2 -2
  41. package/docs/global.html +2 -2
  42. package/docs/global.html#User +0 -0
  43. package/docs/index.html +2 -2
  44. package/docs/module-Awards.html +2 -2
  45. package/docs/module-Config.html +2 -2
  46. package/docs/module-Content-Services-V2.html +2 -2
  47. package/docs/module-Permissions.html +2 -2
  48. package/docs/module-Playlists.html +2 -2
  49. package/docs/module-Railcontent-Services.html +222 -57
  50. package/docs/module-Sanity-Services.html +19 -19
  51. package/docs/module-Session-Management.html +0 -0
  52. package/docs/module-Sessions.html +2 -2
  53. package/docs/module-User-Activity.html +2849 -0
  54. package/docs/module-User-Management.html +0 -0
  55. package/docs/module-User-Permissions.html +0 -0
  56. package/docs/module-UserManagement.html +2 -2
  57. package/docs/railcontent.js.html +47 -20
  58. package/docs/sanity.js.html +3 -2
  59. package/docs/scripts/collapse.js +0 -0
  60. package/docs/scripts/commonNav.js +0 -0
  61. package/docs/scripts/linenumber.js +0 -0
  62. package/docs/scripts/nav.js +0 -0
  63. package/docs/scripts/polyfill.js +0 -0
  64. package/docs/scripts/prettify/Apache-License-2.0.txt +0 -0
  65. package/docs/scripts/prettify/lang-css.js +0 -0
  66. package/docs/scripts/prettify/prettify.js +0 -0
  67. package/docs/scripts/search.js +0 -0
  68. package/docs/styles/jsdoc.css +0 -0
  69. package/docs/styles/prettify.css +0 -0
  70. package/docs/types.js.html +0 -0
  71. package/docs/userActivity.js.html +742 -0
  72. package/docs/user_management.js.html +2 -2
  73. package/docs/user_permissions.js.html +2 -2
  74. package/docs/user_sessions.js.html +2 -2
  75. package/docs/user_types.js.html +2 -2
  76. package/docs/user_user-management-system.js.html +2 -2
  77. package/docs/user_user-management.js.html +0 -0
  78. package/jest.config.js +0 -0
  79. package/jsdoc.json +1 -0
  80. package/link_mcs.sh +0 -0
  81. package/package.json +1 -1
  82. package/src/contentMetaData.js +0 -0
  83. package/src/filterBuilder.js +0 -0
  84. package/src/index.d.ts +8 -0
  85. package/src/index.js +8 -0
  86. package/src/lib/httpHelper.js +0 -0
  87. package/src/lib/lastUpdated.js +0 -0
  88. package/src/services/api/types.js +0 -0
  89. package/src/services/config.js +0 -0
  90. package/src/services/content-org/content-org.js +0 -0
  91. package/src/services/content-org/playlists-types.js +0 -0
  92. package/src/services/content-org/playlists.js +0 -0
  93. package/src/services/content.js +0 -0
  94. package/src/services/contentProgress.js +0 -0
  95. package/src/services/dataContext.js +0 -0
  96. package/src/services/dateUtils.js +0 -0
  97. package/src/services/forum.js +0 -0
  98. package/src/services/gamification/awards.js +0 -0
  99. package/src/services/gamification/gamification.js +0 -0
  100. package/src/services/gamification/types.js +0 -0
  101. package/src/services/imageSRCBuilder.js +0 -0
  102. package/src/services/imageSRCVerify.js +0 -0
  103. package/src/services/railcontent.js +15 -0
  104. package/src/services/recommendations.js +9 -7
  105. package/src/services/sanity.js +4 -2
  106. package/src/services/types.js +0 -0
  107. package/src/services/user/management.js +0 -0
  108. package/src/services/user/permissions.js +0 -0
  109. package/src/services/user/sessions.js +0 -0
  110. package/src/services/user/types.js +0 -0
  111. package/src/services/user/user-management-system.js +0 -0
  112. package/src/services/userActivity.js +103 -6
  113. package/test/content.test.js +0 -0
  114. package/test/contentLikes.test.js +0 -0
  115. package/test/contentProgress.test.js +0 -0
  116. package/test/dataContext.test.js +0 -0
  117. package/test/forum.test.js +0 -0
  118. package/test/imageSRCBuilder.test.js +0 -0
  119. package/test/imageSRCVerify.test.js +0 -0
  120. package/test/initializeTests.js +0 -0
  121. package/test/lib/lastUpdated.test.js +0 -0
  122. package/test/live/contentProgressLive.test.js +0 -0
  123. package/test/live/railcontentLive.test.js +0 -0
  124. package/test/localStorageMock.js +0 -0
  125. package/test/log.js +0 -0
  126. package/test/mockData/mockData_fetchByRailContentIds_one_content.json +0 -0
  127. package/test/mockData/mockData_user_practices.json +0 -0
  128. package/test/sanityQueryService.test.js +0 -0
  129. package/test/streakMessage.test.js +0 -0
  130. package/test/user/permissions.test.js +0 -0
  131. package/test/userActivity.test.js +0 -0
  132. package/tools/generate-index.cjs +0 -0
  133. package/.yarnrc.yml +0 -1
  134. package/docs/module-Content-Services.html +0 -763
@@ -0,0 +1,2849 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+
5
+ <meta charset="utf-8">
6
+ <title>User-Activity - Documentation</title>
7
+
8
+
9
+ <script src="scripts/prettify/prettify.js"></script>
10
+ <script src="scripts/prettify/lang-css.js"></script>
11
+ <!--[if lt IE 9]>
12
+ <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
13
+ <![endif]-->
14
+ <link type="text/css" rel="stylesheet" href="styles/prettify.css">
15
+ <link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
16
+ <script src="scripts/nav.js" defer></script>
17
+
18
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
19
+ </head>
20
+ <body>
21
+
22
+ <input type="checkbox" id="nav-trigger" class="nav-trigger" />
23
+ <label for="nav-trigger" class="navicon-button x">
24
+ <div class="navicon"></div>
25
+ </label>
26
+
27
+ <label for="nav-trigger" class="overlay"></label>
28
+
29
+ <nav >
30
+
31
+
32
+ <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-Awards.html">Awards</a><ul class='methods'><li data-type='method'><a href="module-Awards.html#.fetchAwardsForUser">fetchAwardsForUser</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#.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-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#.fetchUserPlaylists">fetchUserPlaylists</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#.countAssignmentsAndLessons">countAssignmentsAndLessons</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#.deletePlaylist">deletePlaylist</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.deletePlaylistItem">deletePlaylistItem</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.deletePlaylistLike">deletePlaylistLike</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.duplicatePlaylist">duplicatePlaylist</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#.fetchChallengeIndexMetadata">fetchChallengeIndexMetadata</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchChallengeLessonData">fetchChallengeLessonData</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchChallengeMetadata">fetchChallengeMetadata</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchChallengeUserActiveChallenges">fetchChallengeUserActiveChallenges</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#.fetchCompletedChallenges">fetchCompletedChallenges</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#.fetchOwnedChallenges">fetchOwnedChallenges</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchPinnedPlaylists">fetchPinnedPlaylists</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchPlaylist">fetchPlaylist</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchPlaylistItem">fetchPlaylistItem</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchPlaylistItems">fetchPlaylistItems</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#.fetchUserChallengeProgress">fetchUserChallengeProgress</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#.likePlaylist">likePlaylist</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#.pinPlaylist">pinPlaylist</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.postChallengesCommunityNotification">postChallengesCommunityNotification</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.postChallengesEnroll">postChallengesEnroll</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.postChallengesEnrollmentNotification">postChallengesEnrollmentNotification</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.postChallengesHideCompletedBanner">postChallengesHideCompletedBanner</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.postChallengesLeave">postChallengesLeave</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.postChallengesSetStartDate">postChallengesSetStartDate</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.postChallengesSoloNotification">postChallengesSoloNotification</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.postChallengesUnlock">postChallengesUnlock</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#.reportPlaylist">reportPlaylist</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#.unpinPlaylist">unpinPlaylist</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.updatePlaylist">updatePlaylist</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.updatePlaylistItem">updatePlaylistItem</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#.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#.fetchParentForDownload">fetchParentForDownload</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#.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#~getNextAndPreviousQuarterDates">getNextAndPreviousQuarterDates</a></li><li data-type='method'><a href="module-Sanity-Services.html#~getQueryFromPage">getQueryFromPage</a></li><li data-type='method'><a href="module-Sanity-Services.html#~handleCustomFetchAll">handleCustomFetchAll</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-User-Activity.html">User-Activity</a><ul class='methods'><li data-type='method'><a href="module-User-Activity.html#.createPracticeNotes">createPracticeNotes</a></li><li data-type='method'><a href="module-User-Activity.html#.deletePracticeSession">deletePracticeSession</a></li><li data-type='method'><a href="module-User-Activity.html#.getPracticeNotes">getPracticeNotes</a></li><li data-type='method'><a href="module-User-Activity.html#.getPracticeSessions">getPracticeSessions</a></li><li data-type='method'><a href="module-User-Activity.html#.getRecentActivity">getRecentActivity</a></li><li data-type='method'><a href="module-User-Activity.html#.getUserMonthlyStats">getUserMonthlyStats</a></li><li data-type='method'><a href="module-User-Activity.html#.getUserWeeklyStats">getUserWeeklyStats</a></li><li data-type='method'><a href="module-User-Activity.html#.recordUserPractice">recordUserPractice</a></li><li data-type='method'><a href="module-User-Activity.html#.removeUserPractice">removeUserPractice</a></li><li data-type='method'><a href="module-User-Activity.html#.restorePracticeSession">restorePracticeSession</a></li><li data-type='method'><a href="module-User-Activity.html#.restoreUserPractice">restoreUserPractice</a></li><li data-type='method'><a href="module-User-Activity.html#.updatePracticeNotes">updatePracticeNotes</a></li><li data-type='method'><a href="module-User-Activity.html#.updateUserPractice">updateUserPractice</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#.unblockUser">unblockUser</a></li></ul></li></ul><h3>Namespaces</h3><ul><li><a href="ContentOrganization.html">ContentOrganization</a></li><li><a href="Gamification.html">Gamification</a></li><li><a href="UserManagementSystem.html">UserManagementSystem</a></li></ul><h3><a href="global.html">Global</a></h3>
33
+
34
+ </nav>
35
+
36
+ <div id="main">
37
+
38
+ <h1 class="page-title">User-Activity</h1>
39
+
40
+
41
+
42
+
43
+
44
+
45
+
46
+ <section>
47
+
48
+ <header>
49
+
50
+
51
+
52
+ </header>
53
+
54
+ <article>
55
+
56
+ <div class="container-overview">
57
+
58
+
59
+
60
+
61
+
62
+ </div>
63
+
64
+
65
+
66
+
67
+
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+ <h3 class="subsection-title">Methods</h3>
81
+
82
+
83
+
84
+
85
+
86
+
87
+ <h4 class="name" id=".createPracticeNotes"><span class="type-signature type-signature-static">(static) </span>createPracticeNotes<span class="signature">(payload)</span><span class="type-signature"> &rarr; {Promise.&lt;Object>}</span></h4>
88
+
89
+
90
+
91
+
92
+
93
+
94
+ <dl class="details">
95
+
96
+ <dt class="tag-description">Description:</dt>
97
+ <dd class="tag-description"><ul class="dummy"><li>Creates practice notes for a specific date.</li></ul></dd>
98
+
99
+
100
+
101
+ <dt class="tag-source">Source:</dt>
102
+ <dd class="tag-source"><ul class="dummy"><li>
103
+ <a href="userActivity.js.html">userActivity.js</a>, <a href="userActivity.js.html#line519">line 519</a>
104
+ </li></ul></dd>
105
+
106
+
107
+
108
+
109
+
110
+
111
+
112
+
113
+
114
+
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+
134
+
135
+
136
+ </dl>
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+
146
+
147
+
148
+ <h5 class="h5-examples">Example</h5>
149
+
150
+ <pre class="prettyprint"><code>createPracticeNotes({ date: '2025-04-10', notes: 'Worked on scales and arpeggios' })
151
+ .then(response => console.log(response))
152
+ .catch(error => console.error(error));</code></pre>
153
+
154
+
155
+
156
+
157
+ <h5 class="h5-parameters">Parameters:</h5>
158
+
159
+
160
+ <table class="params">
161
+ <thead>
162
+ <tr>
163
+
164
+ <th>Name</th>
165
+
166
+
167
+ <th>Type</th>
168
+
169
+
170
+
171
+
172
+
173
+ <th class="last">Description</th>
174
+ </tr>
175
+ </thead>
176
+
177
+ <tbody>
178
+
179
+
180
+ <tr>
181
+
182
+ <td class="name"><code>payload</code></td>
183
+
184
+
185
+ <td class="type">
186
+
187
+
188
+ <span class="param-type">Object</span>
189
+
190
+
191
+
192
+
193
+ </td>
194
+
195
+
196
+
197
+
198
+
199
+ <td class="description last">The data required to create practice notes.
200
+ <h6>Properties</h6>
201
+
202
+
203
+ <table class="params">
204
+ <thead>
205
+ <tr>
206
+
207
+ <th>Name</th>
208
+
209
+
210
+ <th>Type</th>
211
+
212
+
213
+
214
+
215
+
216
+ <th class="last">Description</th>
217
+ </tr>
218
+ </thead>
219
+
220
+ <tbody>
221
+
222
+
223
+ <tr>
224
+
225
+ <td class="name"><code>date</code></td>
226
+
227
+
228
+ <td class="type">
229
+
230
+
231
+ <span class="param-type">string</span>
232
+
233
+
234
+
235
+
236
+ </td>
237
+
238
+
239
+
240
+
241
+
242
+ <td class="description last">The date for which to create notes (format: YYYY-MM-DD).</td>
243
+ </tr>
244
+
245
+
246
+
247
+ <tr>
248
+
249
+ <td class="name"><code>notes</code></td>
250
+
251
+
252
+ <td class="type">
253
+
254
+
255
+ <span class="param-type">string</span>
256
+
257
+
258
+
259
+
260
+ </td>
261
+
262
+
263
+
264
+
265
+
266
+ <td class="description last">The notes content to be saved.</td>
267
+ </tr>
268
+
269
+
270
+ </tbody>
271
+ </table>
272
+
273
+ </td>
274
+ </tr>
275
+
276
+
277
+ </tbody>
278
+ </table>
279
+
280
+
281
+
282
+
283
+
284
+
285
+
286
+
287
+
288
+
289
+
290
+
291
+
292
+
293
+
294
+
295
+ <h5 class="h5-returns">Returns:</h5>
296
+
297
+
298
+ <div class="param-desc">
299
+ - A promise that resolves to the API response after creating the notes.
300
+ </div>
301
+
302
+
303
+
304
+ <dl class="param-type">
305
+ <dt>
306
+ Type
307
+ </dt>
308
+ <dd>
309
+
310
+ <span class="param-type">Promise.&lt;Object></span>
311
+
312
+
313
+
314
+ </dd>
315
+ </dl>
316
+
317
+
318
+
319
+
320
+
321
+
322
+
323
+
324
+
325
+
326
+ <h4 class="name" id=".deletePracticeSession"><span class="type-signature type-signature-async, static">(async, static) </span>deletePracticeSession<span class="signature">(day)</span><span class="type-signature"> &rarr; {Promise.&lt;Array.&lt;string>>}</span></h4>
327
+
328
+
329
+
330
+
331
+
332
+
333
+ <dl class="details">
334
+
335
+ <dt class="tag-description">Description:</dt>
336
+ <dd class="tag-description"><ul class="dummy"><li>Deletes all practice sessions for a specific day.
337
+
338
+ This function retrieves all user practice session IDs for a given day and sends a DELETE request
339
+ to remove them from the server. It also updates the local context to reflect the deletion.</li></ul></dd>
340
+
341
+
342
+
343
+ <dt class="tag-source">Source:</dt>
344
+ <dd class="tag-source"><ul class="dummy"><li>
345
+ <a href="userActivity.js.html">userActivity.js</a>, <a href="userActivity.js.html#line359">line 359</a>
346
+ </li></ul></dd>
347
+
348
+
349
+
350
+
351
+
352
+
353
+
354
+
355
+
356
+
357
+
358
+
359
+
360
+
361
+
362
+
363
+
364
+
365
+
366
+
367
+
368
+
369
+
370
+
371
+
372
+
373
+
374
+
375
+
376
+
377
+
378
+ </dl>
379
+
380
+
381
+
382
+
383
+
384
+
385
+
386
+
387
+
388
+
389
+
390
+
391
+
392
+ <h5 class="h5-parameters">Parameters:</h5>
393
+
394
+
395
+ <table class="params">
396
+ <thead>
397
+ <tr>
398
+
399
+ <th>Name</th>
400
+
401
+
402
+ <th>Type</th>
403
+
404
+
405
+
406
+
407
+
408
+ <th class="last">Description</th>
409
+ </tr>
410
+ </thead>
411
+
412
+ <tbody>
413
+
414
+
415
+ <tr>
416
+
417
+ <td class="name"><code>day</code></td>
418
+
419
+
420
+ <td class="type">
421
+
422
+
423
+ <span class="param-type">string</span>
424
+
425
+
426
+
427
+
428
+ </td>
429
+
430
+
431
+
432
+
433
+
434
+ <td class="description last">The day (in `YYYY-MM-DD` format) for which practice sessions should be deleted.</td>
435
+ </tr>
436
+
437
+
438
+ </tbody>
439
+ </table>
440
+
441
+
442
+
443
+
444
+
445
+
446
+
447
+
448
+
449
+
450
+
451
+
452
+
453
+
454
+
455
+
456
+ <h5 class="h5-returns">Returns:</h5>
457
+
458
+
459
+ <div class="param-desc">
460
+ - A promise that resolves once the practice session is removed.
461
+
462
+ * @example
463
+ // Delete practice sessions for April 10, 2025
464
+ deletePracticeSession("2025-04-10")
465
+ .then(deletedIds => console.log("Deleted sessions:", response))
466
+ .catch(error => console.error("Delete failed:", error));
467
+ </div>
468
+
469
+
470
+
471
+ <dl class="param-type">
472
+ <dt>
473
+ Type
474
+ </dt>
475
+ <dd>
476
+
477
+ <span class="param-type">Promise.&lt;Array.&lt;string>></span>
478
+
479
+
480
+
481
+ </dd>
482
+ </dl>
483
+
484
+
485
+
486
+
487
+
488
+
489
+
490
+
491
+
492
+
493
+ <h4 class="name" id=".getPracticeNotes"><span class="type-signature type-signature-async, static">(async, static) </span>getPracticeNotes<span class="signature">(day)</span><span class="type-signature"> &rarr; {Promise.&lt;{data: Array.&lt;Object>}>}</span></h4>
494
+
495
+
496
+
497
+
498
+
499
+
500
+ <dl class="details">
501
+
502
+ <dt class="tag-description">Description:</dt>
503
+ <dd class="tag-description"><ul class="dummy"><li>Retrieves user practice notes for a specific day.</li></ul></dd>
504
+
505
+
506
+
507
+ <dt class="tag-source">Source:</dt>
508
+ <dd class="tag-source"><ul class="dummy"><li>
509
+ <a href="userActivity.js.html">userActivity.js</a>, <a href="userActivity.js.html#line483">line 483</a>
510
+ </li></ul></dd>
511
+
512
+
513
+
514
+
515
+
516
+
517
+
518
+
519
+
520
+
521
+
522
+
523
+
524
+
525
+
526
+
527
+
528
+
529
+
530
+
531
+
532
+
533
+
534
+
535
+
536
+
537
+
538
+
539
+
540
+
541
+
542
+ </dl>
543
+
544
+
545
+
546
+
547
+
548
+
549
+
550
+
551
+
552
+
553
+
554
+ <h5 class="h5-examples">Example</h5>
555
+
556
+ <pre class="prettyprint"><code>// Get notes for April 10, 2025
557
+ getPracticeNotes("2025-04-10")
558
+ .then(({ data }) => console.log("Practice notes:", data))
559
+ .catch(error => console.error("Failed to get notes:", error));</code></pre>
560
+
561
+
562
+
563
+
564
+ <h5 class="h5-parameters">Parameters:</h5>
565
+
566
+
567
+ <table class="params">
568
+ <thead>
569
+ <tr>
570
+
571
+ <th>Name</th>
572
+
573
+
574
+ <th>Type</th>
575
+
576
+
577
+
578
+
579
+
580
+ <th class="last">Description</th>
581
+ </tr>
582
+ </thead>
583
+
584
+ <tbody>
585
+
586
+
587
+ <tr>
588
+
589
+ <td class="name"><code>day</code></td>
590
+
591
+
592
+ <td class="type">
593
+
594
+
595
+ <span class="param-type">string</span>
596
+
597
+
598
+
599
+
600
+ </td>
601
+
602
+
603
+
604
+
605
+
606
+ <td class="description last">The day (in `YYYY-MM-DD` format) to fetch practice notes for.</td>
607
+ </tr>
608
+
609
+
610
+ </tbody>
611
+ </table>
612
+
613
+
614
+
615
+
616
+
617
+
618
+
619
+
620
+
621
+
622
+
623
+
624
+
625
+
626
+
627
+
628
+ <h5 class="h5-returns">Returns:</h5>
629
+
630
+
631
+ <div class="param-desc">
632
+ - A promise that resolves to an object containing the practice notes.
633
+ </div>
634
+
635
+
636
+
637
+ <dl class="param-type">
638
+ <dt>
639
+ Type
640
+ </dt>
641
+ <dd>
642
+
643
+ <span class="param-type">Promise.&lt;{data: Array.&lt;Object>}></span>
644
+
645
+
646
+
647
+ </dd>
648
+ </dl>
649
+
650
+
651
+
652
+
653
+
654
+
655
+
656
+
657
+
658
+
659
+ <h4 class="name" id=".getPracticeSessions"><span class="type-signature type-signature-static">(static) </span>getPracticeSessions<span class="signature">(day)</span><span class="type-signature"> &rarr; {Promise.&lt;Object>}</span></h4>
660
+
661
+
662
+
663
+
664
+
665
+
666
+ <dl class="details">
667
+
668
+ <dt class="tag-description">Description:</dt>
669
+ <dd class="tag-description"><ul class="dummy"><li>Retrieves and formats a user's practice sessions for a specific day.</li></ul></dd>
670
+
671
+
672
+
673
+ <dt class="tag-source">Source:</dt>
674
+ <dd class="tag-source"><ul class="dummy"><li>
675
+ <a href="userActivity.js.html">userActivity.js</a>, <a href="userActivity.js.html#line428">line 428</a>
676
+ </li></ul></dd>
677
+
678
+
679
+
680
+
681
+
682
+
683
+
684
+
685
+
686
+
687
+
688
+
689
+
690
+
691
+
692
+
693
+
694
+
695
+
696
+
697
+
698
+
699
+
700
+
701
+
702
+
703
+
704
+
705
+
706
+
707
+
708
+ </dl>
709
+
710
+
711
+
712
+
713
+
714
+
715
+
716
+
717
+
718
+
719
+
720
+ <h5 class="h5-examples">Example</h5>
721
+
722
+ <pre class="prettyprint"><code>// Get practice sessions for a specific day
723
+ getPracticeSessions("2025-03-31")
724
+ .then(response => console.log(response))
725
+ .catch(error => console.error(error));</code></pre>
726
+
727
+
728
+
729
+
730
+ <h5 class="h5-parameters">Parameters:</h5>
731
+
732
+
733
+ <table class="params">
734
+ <thead>
735
+ <tr>
736
+
737
+ <th>Name</th>
738
+
739
+
740
+ <th>Type</th>
741
+
742
+
743
+
744
+
745
+
746
+ <th class="last">Description</th>
747
+ </tr>
748
+ </thead>
749
+
750
+ <tbody>
751
+
752
+
753
+ <tr>
754
+
755
+ <td class="name"><code>day</code></td>
756
+
757
+
758
+ <td class="type">
759
+
760
+
761
+ <span class="param-type">string</span>
762
+
763
+
764
+
765
+
766
+ </td>
767
+
768
+
769
+
770
+
771
+
772
+ <td class="description last">The date for which practice sessions should be retrieved (format: YYYY-MM-DD).</td>
773
+ </tr>
774
+
775
+
776
+ </tbody>
777
+ </table>
778
+
779
+
780
+
781
+
782
+
783
+
784
+
785
+
786
+
787
+
788
+
789
+
790
+
791
+
792
+
793
+
794
+ <h5 class="h5-returns">Returns:</h5>
795
+
796
+
797
+ <div class="param-desc">
798
+ - A promise that resolves to an object containing the practice sessions and total practice duration.
799
+ </div>
800
+
801
+
802
+
803
+ <dl class="param-type">
804
+ <dt>
805
+ Type
806
+ </dt>
807
+ <dd>
808
+
809
+ <span class="param-type">Promise.&lt;Object></span>
810
+
811
+
812
+
813
+ </dd>
814
+ </dl>
815
+
816
+
817
+
818
+
819
+
820
+
821
+
822
+
823
+
824
+
825
+ <h4 class="name" id=".getRecentActivity"><span class="type-signature type-signature-async, static">(async, static) </span>getRecentActivity<span class="signature">()</span><span class="type-signature"> &rarr; {Promise.&lt;{data: Array.&lt;Object>}>}</span></h4>
826
+
827
+
828
+
829
+
830
+
831
+
832
+ <dl class="details">
833
+
834
+ <dt class="tag-description">Description:</dt>
835
+ <dd class="tag-description"><ul class="dummy"><li>Retrieves the user's recent activity.
836
+
837
+ Returns an object containing recent practice activity.</li></ul></dd>
838
+
839
+
840
+
841
+ <dt class="tag-source">Source:</dt>
842
+ <dd class="tag-source"><ul class="dummy"><li>
843
+ <a href="userActivity.js.html">userActivity.js</a>, <a href="userActivity.js.html#line502">line 502</a>
844
+ </li></ul></dd>
845
+
846
+
847
+
848
+
849
+
850
+
851
+
852
+
853
+
854
+
855
+
856
+
857
+
858
+
859
+
860
+
861
+
862
+
863
+
864
+
865
+
866
+
867
+
868
+
869
+
870
+
871
+
872
+
873
+
874
+
875
+
876
+ </dl>
877
+
878
+
879
+
880
+
881
+
882
+
883
+
884
+
885
+
886
+
887
+
888
+ <h5 class="h5-examples">Example</h5>
889
+
890
+ <pre class="prettyprint"><code>// Fetch recent practice activity
891
+ getRecentActivity()
892
+ .then(({ data }) => console.log("Recent activity:", data))
893
+ .catch(error => console.error("Failed to get recent activity:", error));</code></pre>
894
+
895
+
896
+
897
+
898
+
899
+
900
+
901
+
902
+
903
+
904
+
905
+
906
+
907
+
908
+
909
+
910
+
911
+
912
+ <h5 class="h5-returns">Returns:</h5>
913
+
914
+
915
+ <div class="param-desc">
916
+ - A promise that resolves to an object containing recent activity items.
917
+ </div>
918
+
919
+
920
+
921
+ <dl class="param-type">
922
+ <dt>
923
+ Type
924
+ </dt>
925
+ <dd>
926
+
927
+ <span class="param-type">Promise.&lt;{data: Array.&lt;Object>}></span>
928
+
929
+
930
+
931
+ </dd>
932
+ </dl>
933
+
934
+
935
+
936
+
937
+
938
+
939
+
940
+
941
+
942
+
943
+ <h4 class="name" id=".getUserMonthlyStats"><span class="type-signature type-signature-static">(static) </span>getUserMonthlyStats<span class="signature">(year<span class="signature-attributes">opt</span>, month<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Promise.&lt;Object>}</span></h4>
944
+
945
+
946
+
947
+
948
+
949
+
950
+ <dl class="details">
951
+
952
+ <dt class="tag-description">Description:</dt>
953
+ <dd class="tag-description"><ul class="dummy"><li>Retrieves user activity statistics for a specified month, including daily and weekly activity data.</li></ul></dd>
954
+
955
+
956
+
957
+ <dt class="tag-source">Source:</dt>
958
+ <dd class="tag-source"><ul class="dummy"><li>
959
+ <a href="userActivity.js.html">userActivity.js</a>, <a href="userActivity.js.html#line103">line 103</a>
960
+ </li></ul></dd>
961
+
962
+
963
+
964
+
965
+
966
+
967
+
968
+
969
+
970
+
971
+
972
+
973
+
974
+
975
+
976
+
977
+
978
+
979
+
980
+
981
+
982
+
983
+
984
+
985
+
986
+
987
+
988
+
989
+
990
+
991
+
992
+ </dl>
993
+
994
+
995
+
996
+
997
+
998
+
999
+
1000
+
1001
+
1002
+
1003
+
1004
+ <h5 class="h5-examples">Examples</h5>
1005
+
1006
+ <pre class="prettyprint"><code>// Retrieve user activity statistics for the current month
1007
+ getUserMonthlyStats()
1008
+ .then(stats => console.log(stats))
1009
+ .catch(error => console.error(error));</code></pre>
1010
+
1011
+ <pre class="prettyprint"><code>// Retrieve user activity statistics for March 2024
1012
+ getUserMonthlyStats(2024, 2)
1013
+ .then(stats => console.log(stats))
1014
+ .catch(error => console.error(error));</code></pre>
1015
+
1016
+
1017
+
1018
+
1019
+ <h5 class="h5-parameters">Parameters:</h5>
1020
+
1021
+
1022
+ <table class="params">
1023
+ <thead>
1024
+ <tr>
1025
+
1026
+ <th>Name</th>
1027
+
1028
+
1029
+ <th>Type</th>
1030
+
1031
+
1032
+ <th>Attributes</th>
1033
+
1034
+
1035
+
1036
+ <th>Default</th>
1037
+
1038
+
1039
+ <th class="last">Description</th>
1040
+ </tr>
1041
+ </thead>
1042
+
1043
+ <tbody>
1044
+
1045
+
1046
+ <tr>
1047
+
1048
+ <td class="name"><code>year</code></td>
1049
+
1050
+
1051
+ <td class="type">
1052
+
1053
+
1054
+ <span class="param-type">number</span>
1055
+
1056
+
1057
+
1058
+
1059
+ </td>
1060
+
1061
+
1062
+ <td class="attributes">
1063
+
1064
+ &lt;optional><br>
1065
+
1066
+
1067
+
1068
+
1069
+
1070
+ </td>
1071
+
1072
+
1073
+
1074
+ <td class="default">
1075
+
1076
+ <code>new Date().getFullYear()</code>
1077
+
1078
+ </td>
1079
+
1080
+
1081
+ <td class="description last">The year for which to retrieve the statistics.</td>
1082
+ </tr>
1083
+
1084
+
1085
+
1086
+ <tr>
1087
+
1088
+ <td class="name"><code>month</code></td>
1089
+
1090
+
1091
+ <td class="type">
1092
+
1093
+
1094
+ <span class="param-type">number</span>
1095
+
1096
+
1097
+
1098
+
1099
+ </td>
1100
+
1101
+
1102
+ <td class="attributes">
1103
+
1104
+ &lt;optional><br>
1105
+
1106
+
1107
+
1108
+
1109
+
1110
+ </td>
1111
+
1112
+
1113
+
1114
+ <td class="default">
1115
+
1116
+ <code>new Date().getMonth()</code>
1117
+
1118
+ </td>
1119
+
1120
+
1121
+ <td class="description last">The month (0-indexed) for which to retrieve the statistics.</td>
1122
+ </tr>
1123
+
1124
+
1125
+ </tbody>
1126
+ </table>
1127
+
1128
+
1129
+
1130
+
1131
+
1132
+
1133
+
1134
+
1135
+
1136
+
1137
+
1138
+
1139
+
1140
+
1141
+
1142
+
1143
+ <h5 class="h5-returns">Returns:</h5>
1144
+
1145
+
1146
+ <div class="param-desc">
1147
+ - A promise that resolves to an object containing user activity statistics.
1148
+ </div>
1149
+
1150
+
1151
+
1152
+ <dl class="param-type">
1153
+ <dt>
1154
+ Type
1155
+ </dt>
1156
+ <dd>
1157
+
1158
+ <span class="param-type">Promise.&lt;Object></span>
1159
+
1160
+
1161
+
1162
+ </dd>
1163
+ </dl>
1164
+
1165
+
1166
+
1167
+
1168
+
1169
+
1170
+
1171
+
1172
+
1173
+
1174
+ <h4 class="name" id=".getUserWeeklyStats"><span class="type-signature type-signature-static">(static) </span>getUserWeeklyStats<span class="signature">()</span><span class="type-signature"> &rarr; {Promise.&lt;Object>}</span></h4>
1175
+
1176
+
1177
+
1178
+
1179
+
1180
+
1181
+ <dl class="details">
1182
+
1183
+ <dt class="tag-description">Description:</dt>
1184
+ <dd class="tag-description"><ul class="dummy"><li>Retrieves user activity statistics for the current week, including daily activity and streak messages.</li></ul></dd>
1185
+
1186
+
1187
+
1188
+ <dt class="tag-source">Source:</dt>
1189
+ <dd class="tag-source"><ul class="dummy"><li>
1190
+ <a href="userActivity.js.html">userActivity.js</a>, <a href="userActivity.js.html#line58">line 58</a>
1191
+ </li></ul></dd>
1192
+
1193
+
1194
+
1195
+
1196
+
1197
+
1198
+
1199
+
1200
+
1201
+
1202
+
1203
+
1204
+
1205
+
1206
+
1207
+
1208
+
1209
+
1210
+
1211
+
1212
+
1213
+
1214
+
1215
+
1216
+
1217
+
1218
+
1219
+
1220
+
1221
+
1222
+
1223
+ </dl>
1224
+
1225
+
1226
+
1227
+
1228
+
1229
+
1230
+
1231
+
1232
+
1233
+
1234
+
1235
+ <h5 class="h5-examples">Example</h5>
1236
+
1237
+ <pre class="prettyprint"><code>// Retrieve user activity statistics for the current week
1238
+ getUserWeeklyStats()
1239
+ .then(stats => console.log(stats))
1240
+ .catch(error => console.error(error));</code></pre>
1241
+
1242
+
1243
+
1244
+
1245
+
1246
+
1247
+
1248
+
1249
+
1250
+
1251
+
1252
+
1253
+
1254
+
1255
+
1256
+
1257
+
1258
+
1259
+ <h5 class="h5-returns">Returns:</h5>
1260
+
1261
+
1262
+ <div class="param-desc">
1263
+ - A promise that resolves to an object containing weekly user activity statistics.
1264
+ </div>
1265
+
1266
+
1267
+
1268
+ <dl class="param-type">
1269
+ <dt>
1270
+ Type
1271
+ </dt>
1272
+ <dd>
1273
+
1274
+ <span class="param-type">Promise.&lt;Object></span>
1275
+
1276
+
1277
+
1278
+ </dd>
1279
+ </dl>
1280
+
1281
+
1282
+
1283
+
1284
+
1285
+
1286
+
1287
+
1288
+
1289
+
1290
+ <h4 class="name" id=".recordUserPractice"><span class="type-signature type-signature-static">(static) </span>recordUserPractice<span class="signature">(practiceDetails)</span><span class="type-signature"> &rarr; {Promise.&lt;Object>}</span></h4>
1291
+
1292
+
1293
+
1294
+
1295
+
1296
+
1297
+ <dl class="details">
1298
+
1299
+ <dt class="tag-description">Description:</dt>
1300
+ <dd class="tag-description"><ul class="dummy"><li>Records user practice data and updates both the remote and local activity context.</li></ul></dd>
1301
+
1302
+
1303
+
1304
+ <dt class="tag-source">Source:</dt>
1305
+ <dd class="tag-source"><ul class="dummy"><li>
1306
+ <a href="userActivity.js.html">userActivity.js</a>, <a href="userActivity.js.html#line221">line 221</a>
1307
+ </li></ul></dd>
1308
+
1309
+
1310
+
1311
+
1312
+
1313
+
1314
+
1315
+
1316
+
1317
+
1318
+
1319
+
1320
+
1321
+
1322
+
1323
+
1324
+
1325
+
1326
+
1327
+
1328
+
1329
+
1330
+
1331
+
1332
+
1333
+
1334
+
1335
+
1336
+
1337
+
1338
+
1339
+ </dl>
1340
+
1341
+
1342
+
1343
+
1344
+
1345
+
1346
+
1347
+
1348
+
1349
+
1350
+
1351
+ <h5 class="h5-examples">Examples</h5>
1352
+
1353
+ <pre class="prettyprint"><code>// Record an auto practice session with content ID
1354
+ recordUserPractice({ content_id: 123, duration_seconds: 300 })
1355
+ .then(response => console.log(response))
1356
+ .catch(error => console.error(error));</code></pre>
1357
+
1358
+ <pre class="prettyprint"><code>// Record a custom practice session with additional details
1359
+ recordUserPractice({
1360
+ duration_seconds: 600,
1361
+ auto: false,
1362
+ category_id: 5,
1363
+ title: "Guitar Warm-up",
1364
+ thumbnail_url: "https://example.com/thumbnail.jpg"
1365
+ })
1366
+ .then(response => console.log(response))
1367
+ .catch(error => console.error(error));</code></pre>
1368
+
1369
+
1370
+
1371
+
1372
+ <h5 class="h5-parameters">Parameters:</h5>
1373
+
1374
+
1375
+ <table class="params">
1376
+ <thead>
1377
+ <tr>
1378
+
1379
+ <th>Name</th>
1380
+
1381
+
1382
+ <th>Type</th>
1383
+
1384
+
1385
+
1386
+
1387
+
1388
+ <th class="last">Description</th>
1389
+ </tr>
1390
+ </thead>
1391
+
1392
+ <tbody>
1393
+
1394
+
1395
+ <tr>
1396
+
1397
+ <td class="name"><code>practiceDetails</code></td>
1398
+
1399
+
1400
+ <td class="type">
1401
+
1402
+
1403
+ <span class="param-type">Object</span>
1404
+
1405
+
1406
+
1407
+
1408
+ </td>
1409
+
1410
+
1411
+
1412
+
1413
+
1414
+ <td class="description last">The details of the practice session.
1415
+ <h6>Properties</h6>
1416
+
1417
+
1418
+ <table class="params">
1419
+ <thead>
1420
+ <tr>
1421
+
1422
+ <th>Name</th>
1423
+
1424
+
1425
+ <th>Type</th>
1426
+
1427
+
1428
+ <th>Attributes</th>
1429
+
1430
+
1431
+
1432
+ <th>Default</th>
1433
+
1434
+
1435
+ <th class="last">Description</th>
1436
+ </tr>
1437
+ </thead>
1438
+
1439
+ <tbody>
1440
+
1441
+
1442
+ <tr>
1443
+
1444
+ <td class="name"><code>duration_seconds</code></td>
1445
+
1446
+
1447
+ <td class="type">
1448
+
1449
+
1450
+ <span class="param-type">number</span>
1451
+
1452
+
1453
+
1454
+
1455
+ </td>
1456
+
1457
+
1458
+ <td class="attributes">
1459
+
1460
+
1461
+
1462
+
1463
+
1464
+ </td>
1465
+
1466
+
1467
+
1468
+ <td class="default">
1469
+
1470
+ </td>
1471
+
1472
+
1473
+ <td class="description last">The duration of the practice session in seconds.</td>
1474
+ </tr>
1475
+
1476
+
1477
+
1478
+ <tr>
1479
+
1480
+ <td class="name"><code>auto</code></td>
1481
+
1482
+
1483
+ <td class="type">
1484
+
1485
+
1486
+ <span class="param-type">boolean</span>
1487
+
1488
+
1489
+
1490
+
1491
+ </td>
1492
+
1493
+
1494
+ <td class="attributes">
1495
+
1496
+ &lt;optional><br>
1497
+
1498
+
1499
+
1500
+
1501
+
1502
+ </td>
1503
+
1504
+
1505
+
1506
+ <td class="default">
1507
+
1508
+ <code>true</code>
1509
+
1510
+ </td>
1511
+
1512
+
1513
+ <td class="description last">Whether the session was automatically logged.</td>
1514
+ </tr>
1515
+
1516
+
1517
+
1518
+ <tr>
1519
+
1520
+ <td class="name"><code>content_id</code></td>
1521
+
1522
+
1523
+ <td class="type">
1524
+
1525
+
1526
+ <span class="param-type">number</span>
1527
+
1528
+
1529
+
1530
+
1531
+ </td>
1532
+
1533
+
1534
+ <td class="attributes">
1535
+
1536
+ &lt;optional><br>
1537
+
1538
+
1539
+
1540
+
1541
+
1542
+ </td>
1543
+
1544
+
1545
+
1546
+ <td class="default">
1547
+
1548
+ </td>
1549
+
1550
+
1551
+ <td class="description last">The ID of the practiced content (if available).</td>
1552
+ </tr>
1553
+
1554
+
1555
+
1556
+ <tr>
1557
+
1558
+ <td class="name"><code>category_id</code></td>
1559
+
1560
+
1561
+ <td class="type">
1562
+
1563
+
1564
+ <span class="param-type">number</span>
1565
+
1566
+
1567
+
1568
+
1569
+ </td>
1570
+
1571
+
1572
+ <td class="attributes">
1573
+
1574
+ &lt;optional><br>
1575
+
1576
+
1577
+
1578
+
1579
+
1580
+ </td>
1581
+
1582
+
1583
+
1584
+ <td class="default">
1585
+
1586
+ </td>
1587
+
1588
+
1589
+ <td class="description last">The ID of the associated category (if available).</td>
1590
+ </tr>
1591
+
1592
+
1593
+
1594
+ <tr>
1595
+
1596
+ <td class="name"><code>title</code></td>
1597
+
1598
+
1599
+ <td class="type">
1600
+
1601
+
1602
+ <span class="param-type">string</span>
1603
+
1604
+
1605
+
1606
+
1607
+ </td>
1608
+
1609
+
1610
+ <td class="attributes">
1611
+
1612
+ &lt;optional><br>
1613
+
1614
+
1615
+
1616
+
1617
+
1618
+ </td>
1619
+
1620
+
1621
+
1622
+ <td class="default">
1623
+
1624
+ </td>
1625
+
1626
+
1627
+ <td class="description last">The title of the practice session (max 64 characters).</td>
1628
+ </tr>
1629
+
1630
+
1631
+
1632
+ <tr>
1633
+
1634
+ <td class="name"><code>thumbnail_url</code></td>
1635
+
1636
+
1637
+ <td class="type">
1638
+
1639
+
1640
+ <span class="param-type">string</span>
1641
+
1642
+
1643
+
1644
+
1645
+ </td>
1646
+
1647
+
1648
+ <td class="attributes">
1649
+
1650
+ &lt;optional><br>
1651
+
1652
+
1653
+
1654
+
1655
+
1656
+ </td>
1657
+
1658
+
1659
+
1660
+ <td class="default">
1661
+
1662
+ </td>
1663
+
1664
+
1665
+ <td class="description last">The URL of the session's thumbnail (max 255 characters).</td>
1666
+ </tr>
1667
+
1668
+
1669
+ </tbody>
1670
+ </table>
1671
+
1672
+ </td>
1673
+ </tr>
1674
+
1675
+
1676
+ </tbody>
1677
+ </table>
1678
+
1679
+
1680
+
1681
+
1682
+
1683
+
1684
+
1685
+
1686
+
1687
+
1688
+
1689
+
1690
+
1691
+
1692
+
1693
+
1694
+ <h5 class="h5-returns">Returns:</h5>
1695
+
1696
+
1697
+ <div class="param-desc">
1698
+ - A promise that resolves to the response from logging the user practice.
1699
+ </div>
1700
+
1701
+
1702
+
1703
+ <dl class="param-type">
1704
+ <dt>
1705
+ Type
1706
+ </dt>
1707
+ <dd>
1708
+
1709
+ <span class="param-type">Promise.&lt;Object></span>
1710
+
1711
+
1712
+
1713
+ </dd>
1714
+ </dl>
1715
+
1716
+
1717
+
1718
+
1719
+
1720
+
1721
+
1722
+
1723
+
1724
+
1725
+ <h4 class="name" id=".removeUserPractice"><span class="type-signature type-signature-static">(static) </span>removeUserPractice<span class="signature">(id)</span><span class="type-signature"> &rarr; {Promise.&lt;void>}</span></h4>
1726
+
1727
+
1728
+
1729
+
1730
+
1731
+
1732
+ <dl class="details">
1733
+
1734
+ <dt class="tag-description">Description:</dt>
1735
+ <dd class="tag-description"><ul class="dummy"><li>Removes a user's practice session by ID, updating both the local and remote activity context.</li></ul></dd>
1736
+
1737
+
1738
+
1739
+ <dt class="tag-source">Source:</dt>
1740
+ <dd class="tag-source"><ul class="dummy"><li>
1741
+ <a href="userActivity.js.html">userActivity.js</a>, <a href="userActivity.js.html#line294">line 294</a>
1742
+ </li></ul></dd>
1743
+
1744
+
1745
+
1746
+
1747
+
1748
+
1749
+
1750
+
1751
+
1752
+
1753
+
1754
+
1755
+
1756
+
1757
+
1758
+
1759
+
1760
+
1761
+
1762
+
1763
+
1764
+
1765
+
1766
+
1767
+
1768
+
1769
+
1770
+
1771
+
1772
+
1773
+
1774
+ </dl>
1775
+
1776
+
1777
+
1778
+
1779
+
1780
+
1781
+
1782
+
1783
+
1784
+
1785
+
1786
+ <h5 class="h5-examples">Example</h5>
1787
+
1788
+ <pre class="prettyprint"><code>// Remove a practice session with ID 123
1789
+ removeUserPractice(123)
1790
+ .then(() => console.log("Practice session removed successfully"))
1791
+ .catch(error => console.error(error));</code></pre>
1792
+
1793
+
1794
+
1795
+
1796
+ <h5 class="h5-parameters">Parameters:</h5>
1797
+
1798
+
1799
+ <table class="params">
1800
+ <thead>
1801
+ <tr>
1802
+
1803
+ <th>Name</th>
1804
+
1805
+
1806
+ <th>Type</th>
1807
+
1808
+
1809
+
1810
+
1811
+
1812
+ <th class="last">Description</th>
1813
+ </tr>
1814
+ </thead>
1815
+
1816
+ <tbody>
1817
+
1818
+
1819
+ <tr>
1820
+
1821
+ <td class="name"><code>id</code></td>
1822
+
1823
+
1824
+ <td class="type">
1825
+
1826
+
1827
+ <span class="param-type">number</span>
1828
+
1829
+
1830
+
1831
+
1832
+ </td>
1833
+
1834
+
1835
+
1836
+
1837
+
1838
+ <td class="description last">The unique identifier of the practice session to be removed.</td>
1839
+ </tr>
1840
+
1841
+
1842
+ </tbody>
1843
+ </table>
1844
+
1845
+
1846
+
1847
+
1848
+
1849
+
1850
+
1851
+
1852
+
1853
+
1854
+
1855
+
1856
+
1857
+
1858
+
1859
+
1860
+ <h5 class="h5-returns">Returns:</h5>
1861
+
1862
+
1863
+ <div class="param-desc">
1864
+ - A promise that resolves once the practice session is removed.
1865
+ </div>
1866
+
1867
+
1868
+
1869
+ <dl class="param-type">
1870
+ <dt>
1871
+ Type
1872
+ </dt>
1873
+ <dd>
1874
+
1875
+ <span class="param-type">Promise.&lt;void></span>
1876
+
1877
+
1878
+
1879
+ </dd>
1880
+ </dl>
1881
+
1882
+
1883
+
1884
+
1885
+
1886
+
1887
+
1888
+
1889
+
1890
+
1891
+ <h4 class="name" id=".restorePracticeSession"><span class="type-signature type-signature-async, static">(async, static) </span>restorePracticeSession<span class="signature">(date)</span><span class="type-signature"> &rarr; {Promise.&lt;Object>}</span></h4>
1892
+
1893
+
1894
+
1895
+
1896
+
1897
+
1898
+ <dl class="details">
1899
+
1900
+ <dt class="tag-description">Description:</dt>
1901
+ <dd class="tag-description"><ul class="dummy"><li>Restores deleted practice sessions for a specific date.
1902
+
1903
+ Sends a PUT request to restore any previously deleted practices for a given date.
1904
+ If restored practices are returned, they are added back into the local context.</li></ul></dd>
1905
+
1906
+
1907
+
1908
+ <dt class="tag-source">Source:</dt>
1909
+ <dd class="tag-source"><ul class="dummy"><li>
1910
+ <a href="userActivity.js.html">userActivity.js</a>, <a href="userActivity.js.html#line394">line 394</a>
1911
+ </li></ul></dd>
1912
+
1913
+
1914
+
1915
+
1916
+
1917
+
1918
+
1919
+
1920
+
1921
+
1922
+
1923
+
1924
+
1925
+
1926
+
1927
+
1928
+
1929
+
1930
+
1931
+
1932
+
1933
+
1934
+
1935
+
1936
+
1937
+
1938
+
1939
+
1940
+
1941
+
1942
+
1943
+ </dl>
1944
+
1945
+
1946
+
1947
+
1948
+
1949
+
1950
+
1951
+
1952
+
1953
+
1954
+
1955
+ <h5 class="h5-examples">Example</h5>
1956
+
1957
+ <pre class="prettyprint"><code>// Restore practice sessions deleted on April 10, 2025
1958
+ restorePracticeSession("2025-04-10")
1959
+ .then(response => console.log("Practice session restored:", response))
1960
+ .catch(error => console.error("Restore failed:", error));</code></pre>
1961
+
1962
+
1963
+
1964
+
1965
+ <h5 class="h5-parameters">Parameters:</h5>
1966
+
1967
+
1968
+ <table class="params">
1969
+ <thead>
1970
+ <tr>
1971
+
1972
+ <th>Name</th>
1973
+
1974
+
1975
+ <th>Type</th>
1976
+
1977
+
1978
+
1979
+
1980
+
1981
+ <th class="last">Description</th>
1982
+ </tr>
1983
+ </thead>
1984
+
1985
+ <tbody>
1986
+
1987
+
1988
+ <tr>
1989
+
1990
+ <td class="name"><code>date</code></td>
1991
+
1992
+
1993
+ <td class="type">
1994
+
1995
+
1996
+ <span class="param-type">string</span>
1997
+
1998
+
1999
+
2000
+
2001
+ </td>
2002
+
2003
+
2004
+
2005
+
2006
+
2007
+ <td class="description last">The date (in `YYYY-MM-DD` format) for which deleted practice sessions should be restored.</td>
2008
+ </tr>
2009
+
2010
+
2011
+ </tbody>
2012
+ </table>
2013
+
2014
+
2015
+
2016
+
2017
+
2018
+
2019
+
2020
+
2021
+
2022
+
2023
+
2024
+
2025
+
2026
+
2027
+
2028
+
2029
+ <h5 class="h5-returns">Returns:</h5>
2030
+
2031
+
2032
+ <div class="param-desc">
2033
+ - The response object from the API, containing practices for selected date.
2034
+ </div>
2035
+
2036
+
2037
+
2038
+ <dl class="param-type">
2039
+ <dt>
2040
+ Type
2041
+ </dt>
2042
+ <dd>
2043
+
2044
+ <span class="param-type">Promise.&lt;Object></span>
2045
+
2046
+
2047
+
2048
+ </dd>
2049
+ </dl>
2050
+
2051
+
2052
+
2053
+
2054
+
2055
+
2056
+
2057
+
2058
+
2059
+
2060
+ <h4 class="name" id=".restoreUserPractice"><span class="type-signature type-signature-static">(static) </span>restoreUserPractice<span class="signature">(id)</span><span class="type-signature"> &rarr; {Promise.&lt;Object>}</span></h4>
2061
+
2062
+
2063
+
2064
+
2065
+
2066
+
2067
+ <dl class="details">
2068
+
2069
+ <dt class="tag-description">Description:</dt>
2070
+ <dd class="tag-description"><ul class="dummy"><li>Restores a previously deleted user's practice session by ID, updating both the local and remote activity context.</li></ul></dd>
2071
+
2072
+
2073
+
2074
+ <dt class="tag-source">Source:</dt>
2075
+ <dd class="tag-source"><ul class="dummy"><li>
2076
+ <a href="userActivity.js.html">userActivity.js</a>, <a href="userActivity.js.html#line324">line 324</a>
2077
+ </li></ul></dd>
2078
+
2079
+
2080
+
2081
+
2082
+
2083
+
2084
+
2085
+
2086
+
2087
+
2088
+
2089
+
2090
+
2091
+
2092
+
2093
+
2094
+
2095
+
2096
+
2097
+
2098
+
2099
+
2100
+
2101
+
2102
+
2103
+
2104
+
2105
+
2106
+
2107
+
2108
+
2109
+ </dl>
2110
+
2111
+
2112
+
2113
+
2114
+
2115
+
2116
+
2117
+
2118
+
2119
+
2120
+
2121
+ <h5 class="h5-examples">Example</h5>
2122
+
2123
+ <pre class="prettyprint"><code>// Restore a deleted practice session with ID 123
2124
+ restoreUserPractice(123)
2125
+ .then(response => console.log("Practice session restored:", response))
2126
+ .catch(error => console.error(error));</code></pre>
2127
+
2128
+
2129
+
2130
+
2131
+ <h5 class="h5-parameters">Parameters:</h5>
2132
+
2133
+
2134
+ <table class="params">
2135
+ <thead>
2136
+ <tr>
2137
+
2138
+ <th>Name</th>
2139
+
2140
+
2141
+ <th>Type</th>
2142
+
2143
+
2144
+
2145
+
2146
+
2147
+ <th class="last">Description</th>
2148
+ </tr>
2149
+ </thead>
2150
+
2151
+ <tbody>
2152
+
2153
+
2154
+ <tr>
2155
+
2156
+ <td class="name"><code>id</code></td>
2157
+
2158
+
2159
+ <td class="type">
2160
+
2161
+
2162
+ <span class="param-type">number</span>
2163
+
2164
+
2165
+
2166
+
2167
+ </td>
2168
+
2169
+
2170
+
2171
+
2172
+
2173
+ <td class="description last">The unique identifier of the practice session to be restored.</td>
2174
+ </tr>
2175
+
2176
+
2177
+ </tbody>
2178
+ </table>
2179
+
2180
+
2181
+
2182
+
2183
+
2184
+
2185
+
2186
+
2187
+
2188
+
2189
+
2190
+
2191
+
2192
+
2193
+
2194
+
2195
+ <h5 class="h5-returns">Returns:</h5>
2196
+
2197
+
2198
+ <div class="param-desc">
2199
+ - A promise that resolves to the response containing the restored practice session data.
2200
+ </div>
2201
+
2202
+
2203
+
2204
+ <dl class="param-type">
2205
+ <dt>
2206
+ Type
2207
+ </dt>
2208
+ <dd>
2209
+
2210
+ <span class="param-type">Promise.&lt;Object></span>
2211
+
2212
+
2213
+
2214
+ </dd>
2215
+ </dl>
2216
+
2217
+
2218
+
2219
+
2220
+
2221
+
2222
+
2223
+
2224
+
2225
+
2226
+ <h4 class="name" id=".updatePracticeNotes"><span class="type-signature type-signature-static">(static) </span>updatePracticeNotes<span class="signature">(payload)</span><span class="type-signature"> &rarr; {Promise.&lt;Object>}</span></h4>
2227
+
2228
+
2229
+
2230
+
2231
+
2232
+
2233
+ <dl class="details">
2234
+
2235
+ <dt class="tag-description">Description:</dt>
2236
+ <dd class="tag-description"><ul class="dummy"><li>Updates existing practice notes for a specific date.</li></ul></dd>
2237
+
2238
+
2239
+
2240
+ <dt class="tag-source">Source:</dt>
2241
+ <dd class="tag-source"><ul class="dummy"><li>
2242
+ <a href="userActivity.js.html">userActivity.js</a>, <a href="userActivity.js.html#line537">line 537</a>
2243
+ </li></ul></dd>
2244
+
2245
+
2246
+
2247
+
2248
+
2249
+
2250
+
2251
+
2252
+
2253
+
2254
+
2255
+
2256
+
2257
+
2258
+
2259
+
2260
+
2261
+
2262
+
2263
+
2264
+
2265
+
2266
+
2267
+
2268
+
2269
+
2270
+
2271
+
2272
+
2273
+
2274
+
2275
+ </dl>
2276
+
2277
+
2278
+
2279
+
2280
+
2281
+
2282
+
2283
+
2284
+
2285
+
2286
+
2287
+ <h5 class="h5-examples">Example</h5>
2288
+
2289
+ <pre class="prettyprint"><code>updatePracticeNotes({ date: '2025-04-10', notes: 'Updated: Focused on technique and timing' })
2290
+ .then(response => console.log(response))
2291
+ .catch(error => console.error(error));</code></pre>
2292
+
2293
+
2294
+
2295
+
2296
+ <h5 class="h5-parameters">Parameters:</h5>
2297
+
2298
+
2299
+ <table class="params">
2300
+ <thead>
2301
+ <tr>
2302
+
2303
+ <th>Name</th>
2304
+
2305
+
2306
+ <th>Type</th>
2307
+
2308
+
2309
+
2310
+
2311
+
2312
+ <th class="last">Description</th>
2313
+ </tr>
2314
+ </thead>
2315
+
2316
+ <tbody>
2317
+
2318
+
2319
+ <tr>
2320
+
2321
+ <td class="name"><code>payload</code></td>
2322
+
2323
+
2324
+ <td class="type">
2325
+
2326
+
2327
+ <span class="param-type">Object</span>
2328
+
2329
+
2330
+
2331
+
2332
+ </td>
2333
+
2334
+
2335
+
2336
+
2337
+
2338
+ <td class="description last">The data required to update practice notes.
2339
+ <h6>Properties</h6>
2340
+
2341
+
2342
+ <table class="params">
2343
+ <thead>
2344
+ <tr>
2345
+
2346
+ <th>Name</th>
2347
+
2348
+
2349
+ <th>Type</th>
2350
+
2351
+
2352
+
2353
+
2354
+
2355
+ <th class="last">Description</th>
2356
+ </tr>
2357
+ </thead>
2358
+
2359
+ <tbody>
2360
+
2361
+
2362
+ <tr>
2363
+
2364
+ <td class="name"><code>date</code></td>
2365
+
2366
+
2367
+ <td class="type">
2368
+
2369
+
2370
+ <span class="param-type">string</span>
2371
+
2372
+
2373
+
2374
+
2375
+ </td>
2376
+
2377
+
2378
+
2379
+
2380
+
2381
+ <td class="description last">The date for which to update notes (format: YYYY-MM-DD).</td>
2382
+ </tr>
2383
+
2384
+
2385
+
2386
+ <tr>
2387
+
2388
+ <td class="name"><code>notes</code></td>
2389
+
2390
+
2391
+ <td class="type">
2392
+
2393
+
2394
+ <span class="param-type">string</span>
2395
+
2396
+
2397
+
2398
+
2399
+ </td>
2400
+
2401
+
2402
+
2403
+
2404
+
2405
+ <td class="description last">The updated notes content.</td>
2406
+ </tr>
2407
+
2408
+
2409
+ </tbody>
2410
+ </table>
2411
+
2412
+ </td>
2413
+ </tr>
2414
+
2415
+
2416
+ </tbody>
2417
+ </table>
2418
+
2419
+
2420
+
2421
+
2422
+
2423
+
2424
+
2425
+
2426
+
2427
+
2428
+
2429
+
2430
+
2431
+
2432
+
2433
+
2434
+ <h5 class="h5-returns">Returns:</h5>
2435
+
2436
+
2437
+ <div class="param-desc">
2438
+ - A promise that resolves to the API response after updating the notes.
2439
+ </div>
2440
+
2441
+
2442
+
2443
+ <dl class="param-type">
2444
+ <dt>
2445
+ Type
2446
+ </dt>
2447
+ <dd>
2448
+
2449
+ <span class="param-type">Promise.&lt;Object></span>
2450
+
2451
+
2452
+
2453
+ </dd>
2454
+ </dl>
2455
+
2456
+
2457
+
2458
+
2459
+
2460
+
2461
+
2462
+
2463
+
2464
+
2465
+ <h4 class="name" id=".updateUserPractice"><span class="type-signature type-signature-static">(static) </span>updateUserPractice<span class="signature">(id, practiceDetails)</span><span class="type-signature"> &rarr; {Promise.&lt;Object>}</span></h4>
2466
+
2467
+
2468
+
2469
+
2470
+
2471
+
2472
+ <dl class="details">
2473
+
2474
+ <dt class="tag-description">Description:</dt>
2475
+ <dd class="tag-description"><ul class="dummy"><li>Updates a user's practice session with new details and syncs the changes remotely.</li></ul></dd>
2476
+
2477
+
2478
+
2479
+ <dt class="tag-source">Source:</dt>
2480
+ <dd class="tag-source"><ul class="dummy"><li>
2481
+ <a href="userActivity.js.html">userActivity.js</a>, <a href="userActivity.js.html#line277">line 277</a>
2482
+ </li></ul></dd>
2483
+
2484
+
2485
+
2486
+
2487
+
2488
+
2489
+
2490
+
2491
+
2492
+
2493
+
2494
+
2495
+
2496
+
2497
+
2498
+
2499
+
2500
+
2501
+
2502
+
2503
+
2504
+
2505
+
2506
+
2507
+
2508
+
2509
+
2510
+
2511
+
2512
+
2513
+
2514
+ </dl>
2515
+
2516
+
2517
+
2518
+
2519
+
2520
+
2521
+
2522
+
2523
+
2524
+
2525
+
2526
+ <h5 class="h5-examples">Examples</h5>
2527
+
2528
+ <pre class="prettyprint"><code>// Update a practice session's duration
2529
+ updateUserPractice(123, { duration_seconds: 600 })
2530
+ .then(response => console.log(response))
2531
+ .catch(error => console.error(error));</code></pre>
2532
+
2533
+ <pre class="prettyprint"><code>// Change a practice session to manual and update its category
2534
+ updateUserPractice(456, { auto: false, category_id: 8 })
2535
+ .then(response => console.log(response))
2536
+ .catch(error => console.error(error));</code></pre>
2537
+
2538
+
2539
+
2540
+
2541
+ <h5 class="h5-parameters">Parameters:</h5>
2542
+
2543
+
2544
+ <table class="params">
2545
+ <thead>
2546
+ <tr>
2547
+
2548
+ <th>Name</th>
2549
+
2550
+
2551
+ <th>Type</th>
2552
+
2553
+
2554
+
2555
+
2556
+
2557
+ <th class="last">Description</th>
2558
+ </tr>
2559
+ </thead>
2560
+
2561
+ <tbody>
2562
+
2563
+
2564
+ <tr>
2565
+
2566
+ <td class="name"><code>id</code></td>
2567
+
2568
+
2569
+ <td class="type">
2570
+
2571
+
2572
+ <span class="param-type">number</span>
2573
+
2574
+
2575
+
2576
+
2577
+ </td>
2578
+
2579
+
2580
+
2581
+
2582
+
2583
+ <td class="description last">The unique identifier of the practice session to update.</td>
2584
+ </tr>
2585
+
2586
+
2587
+
2588
+ <tr>
2589
+
2590
+ <td class="name"><code>practiceDetails</code></td>
2591
+
2592
+
2593
+ <td class="type">
2594
+
2595
+
2596
+ <span class="param-type">Object</span>
2597
+
2598
+
2599
+
2600
+
2601
+ </td>
2602
+
2603
+
2604
+
2605
+
2606
+
2607
+ <td class="description last">The updated details of the practice session.
2608
+ <h6>Properties</h6>
2609
+
2610
+
2611
+ <table class="params">
2612
+ <thead>
2613
+ <tr>
2614
+
2615
+ <th>Name</th>
2616
+
2617
+
2618
+ <th>Type</th>
2619
+
2620
+
2621
+ <th>Attributes</th>
2622
+
2623
+
2624
+
2625
+
2626
+ <th class="last">Description</th>
2627
+ </tr>
2628
+ </thead>
2629
+
2630
+ <tbody>
2631
+
2632
+
2633
+ <tr>
2634
+
2635
+ <td class="name"><code>duration_seconds</code></td>
2636
+
2637
+
2638
+ <td class="type">
2639
+
2640
+
2641
+ <span class="param-type">number</span>
2642
+
2643
+
2644
+
2645
+
2646
+ </td>
2647
+
2648
+
2649
+ <td class="attributes">
2650
+
2651
+ &lt;optional><br>
2652
+
2653
+
2654
+
2655
+
2656
+
2657
+ </td>
2658
+
2659
+
2660
+
2661
+
2662
+ <td class="description last">The duration of the practice session in seconds.</td>
2663
+ </tr>
2664
+
2665
+
2666
+
2667
+ <tr>
2668
+
2669
+ <td class="name"><code>category_id</code></td>
2670
+
2671
+
2672
+ <td class="type">
2673
+
2674
+
2675
+ <span class="param-type">number</span>
2676
+
2677
+
2678
+
2679
+
2680
+ </td>
2681
+
2682
+
2683
+ <td class="attributes">
2684
+
2685
+ &lt;optional><br>
2686
+
2687
+
2688
+
2689
+
2690
+
2691
+ </td>
2692
+
2693
+
2694
+
2695
+
2696
+ <td class="description last">The ID of the associated category (if available).</td>
2697
+ </tr>
2698
+
2699
+
2700
+
2701
+ <tr>
2702
+
2703
+ <td class="name"><code>title</code></td>
2704
+
2705
+
2706
+ <td class="type">
2707
+
2708
+
2709
+ <span class="param-type">string</span>
2710
+
2711
+
2712
+
2713
+
2714
+ </td>
2715
+
2716
+
2717
+ <td class="attributes">
2718
+
2719
+ &lt;optional><br>
2720
+
2721
+
2722
+
2723
+
2724
+
2725
+ </td>
2726
+
2727
+
2728
+
2729
+
2730
+ <td class="description last">The title of the practice session (max 64 characters).</td>
2731
+ </tr>
2732
+
2733
+
2734
+
2735
+ <tr>
2736
+
2737
+ <td class="name"><code>thumbnail_url</code></td>
2738
+
2739
+
2740
+ <td class="type">
2741
+
2742
+
2743
+ <span class="param-type">string</span>
2744
+
2745
+
2746
+
2747
+
2748
+ </td>
2749
+
2750
+
2751
+ <td class="attributes">
2752
+
2753
+ &lt;optional><br>
2754
+
2755
+
2756
+
2757
+
2758
+
2759
+ </td>
2760
+
2761
+
2762
+
2763
+
2764
+ <td class="description last">The URL of the session's thumbnail (max 255 characters).</td>
2765
+ </tr>
2766
+
2767
+
2768
+ </tbody>
2769
+ </table>
2770
+
2771
+ </td>
2772
+ </tr>
2773
+
2774
+
2775
+ </tbody>
2776
+ </table>
2777
+
2778
+
2779
+
2780
+
2781
+
2782
+
2783
+
2784
+
2785
+
2786
+
2787
+
2788
+
2789
+
2790
+
2791
+
2792
+
2793
+ <h5 class="h5-returns">Returns:</h5>
2794
+
2795
+
2796
+ <div class="param-desc">
2797
+ - A promise that resolves to the response from updating the user practice.
2798
+ </div>
2799
+
2800
+
2801
+
2802
+ <dl class="param-type">
2803
+ <dt>
2804
+ Type
2805
+ </dt>
2806
+ <dd>
2807
+
2808
+ <span class="param-type">Promise.&lt;Object></span>
2809
+
2810
+
2811
+
2812
+ </dd>
2813
+ </dl>
2814
+
2815
+
2816
+
2817
+
2818
+
2819
+
2820
+
2821
+
2822
+
2823
+
2824
+
2825
+ </article>
2826
+
2827
+ </section>
2828
+
2829
+
2830
+
2831
+
2832
+
2833
+
2834
+ </div>
2835
+
2836
+ <br class="clear">
2837
+
2838
+ <footer>
2839
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Thu Apr 10 2025 11:52:29 GMT+0300 (Eastern European Summer Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
2840
+ </footer>
2841
+
2842
+ <script>prettyPrint();</script>
2843
+ <script src="scripts/polyfill.js"></script>
2844
+ <script src="scripts/linenumber.js"></script>
2845
+
2846
+
2847
+
2848
+ </body>
2849
+ </html>