musora-content-services 2.90.0 → 2.92.6

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 (177) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/package.json +11 -3
  3. package/src/index.d.ts +9 -31
  4. package/src/index.js +12 -34
  5. package/src/services/content-org/learning-paths.ts +33 -3
  6. package/src/services/contentAggregator.js +2 -2
  7. package/src/services/contentLikes.js +6 -39
  8. package/src/services/contentProgress.js +181 -479
  9. package/src/services/dataContext.js +0 -2
  10. package/src/services/progress-row/method-card.js +2 -1
  11. package/src/services/railcontent.js +12 -135
  12. package/src/services/sentry/.indexignore +0 -0
  13. package/src/services/sentry/index.ts +23 -0
  14. package/src/services/sync/.indexignore +0 -0
  15. package/src/services/sync/adapters/factory.ts +26 -0
  16. package/src/services/sync/adapters/lokijs.ts +1 -0
  17. package/src/services/sync/adapters/sqlite.ts +1 -0
  18. package/src/services/sync/concurrency-safety.ts +4 -0
  19. package/src/services/sync/context/index.ts +43 -0
  20. package/src/services/sync/context/providers/base.ts +4 -0
  21. package/src/services/sync/context/providers/connectivity.ts +14 -0
  22. package/src/services/sync/context/providers/durability.ts +5 -0
  23. package/src/services/sync/context/providers/index.ts +5 -0
  24. package/src/services/sync/context/providers/session.ts +8 -0
  25. package/src/services/sync/context/providers/tabs.ts +18 -0
  26. package/src/services/sync/context/providers/visibility.ts +14 -0
  27. package/src/services/sync/database/factory.ts +10 -0
  28. package/src/services/sync/errors/boundary.ts +45 -0
  29. package/src/services/sync/errors/index.ts +49 -0
  30. package/src/services/sync/fetch.ts +313 -0
  31. package/src/services/sync/index.ts +80 -0
  32. package/src/services/sync/manager.ts +139 -0
  33. package/src/services/sync/models/Base.ts +47 -0
  34. package/src/services/sync/models/ContentLike.ts +16 -0
  35. package/src/services/sync/models/ContentProgress.ts +69 -0
  36. package/src/services/sync/models/Practice.ts +72 -0
  37. package/src/services/sync/models/PracticeDayNote.ts +23 -0
  38. package/src/services/sync/models/index.ts +4 -0
  39. package/src/services/sync/repositories/base.ts +247 -0
  40. package/src/services/sync/repositories/content-likes.ts +26 -0
  41. package/src/services/sync/repositories/content-progress.ts +160 -0
  42. package/src/services/sync/repositories/index.ts +4 -0
  43. package/src/services/sync/repositories/practice-day-notes.ts +4 -0
  44. package/src/services/sync/repositories/practices.ts +52 -0
  45. package/src/services/sync/repository-proxy.ts +48 -0
  46. package/src/services/sync/resolver.ts +84 -0
  47. package/src/services/sync/retry.ts +88 -0
  48. package/src/services/sync/run-scope.ts +30 -0
  49. package/src/services/sync/schema/index.ts +66 -0
  50. package/src/services/sync/serializers/index.ts +2 -0
  51. package/src/services/sync/serializers/model.ts +32 -0
  52. package/src/services/sync/serializers/raw.ts +21 -0
  53. package/src/services/sync/store/index.ts +779 -0
  54. package/src/services/sync/store/push-coalescer.ts +57 -0
  55. package/src/services/sync/store-configs.ts +41 -0
  56. package/src/services/sync/strategies/base.ts +21 -0
  57. package/src/services/sync/strategies/index.ts +12 -0
  58. package/src/services/sync/strategies/initial.ts +11 -0
  59. package/src/services/sync/strategies/polling.ts +54 -0
  60. package/src/services/sync/telemetry/index.ts +140 -0
  61. package/src/services/sync/telemetry/sampling.ts +91 -0
  62. package/src/services/sync/utils/event-emitter.ts +24 -0
  63. package/src/services/sync/utils/index.ts +1 -0
  64. package/src/services/sync/utils/throttle.ts +93 -0
  65. package/src/services/sync/utils/timers.ts +9 -0
  66. package/src/services/userActivity.js +83 -148
  67. package/test/contentProgress.test.js +6 -39
  68. package/test/live/contentProgressLive.test.js +2 -31
  69. package/tools/generate-index.cjs +10 -4
  70. package/babel.config.cjs +0 -3
  71. package/docs/Content.html +0 -269
  72. package/docs/ContentOrganization.html +0 -245
  73. package/docs/Forums.html +0 -269
  74. package/docs/Gamification.html +0 -245
  75. package/docs/TestUser.html +0 -260
  76. package/docs/UserManagementSystem.html +0 -317
  77. package/docs/api_types.js.html +0 -97
  78. package/docs/config.js.html +0 -140
  79. package/docs/content-org_content-org.js.html +0 -76
  80. package/docs/content-org_guided-courses.ts.html +0 -110
  81. package/docs/content-org_learning-paths.ts.html +0 -379
  82. package/docs/content-org_playlists-types.js.html +0 -128
  83. package/docs/content-org_playlists.js.html +0 -440
  84. package/docs/content.js.html +0 -603
  85. package/docs/content_artist.ts.html +0 -206
  86. package/docs/content_content.ts.html +0 -77
  87. package/docs/content_genre.ts.html +0 -209
  88. package/docs/content_instructor.ts.html +0 -206
  89. package/docs/fonts/Montserrat/Montserrat-Bold.eot +0 -0
  90. package/docs/fonts/Montserrat/Montserrat-Bold.ttf +0 -0
  91. package/docs/fonts/Montserrat/Montserrat-Bold.woff +0 -0
  92. package/docs/fonts/Montserrat/Montserrat-Bold.woff2 +0 -0
  93. package/docs/fonts/Montserrat/Montserrat-Regular.eot +0 -0
  94. package/docs/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
  95. package/docs/fonts/Montserrat/Montserrat-Regular.woff +0 -0
  96. package/docs/fonts/Montserrat/Montserrat-Regular.woff2 +0 -0
  97. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.eot +0 -0
  98. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg +0 -978
  99. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.ttf +0 -0
  100. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff +0 -0
  101. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff2 +0 -0
  102. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.eot +0 -0
  103. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.svg +0 -1049
  104. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.ttf +0 -0
  105. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff +0 -0
  106. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff2 +0 -0
  107. package/docs/forums_categories.ts.html +0 -156
  108. package/docs/forums_discussions.js.html +0 -95
  109. package/docs/forums_forum.js.html +0 -95
  110. package/docs/forums_forums.ts.html +0 -160
  111. package/docs/forums_posts.ts.html +0 -284
  112. package/docs/forums_threads.ts.html +0 -284
  113. package/docs/gamification_awards.js.html +0 -165
  114. package/docs/gamification_awards.ts.html +0 -195
  115. package/docs/gamification_gamification.js.html +0 -76
  116. package/docs/gamification_types.js.html +0 -80
  117. package/docs/global.html +0 -6019
  118. package/docs/index.html +0 -167
  119. package/docs/liveTesting.ts.html +0 -103
  120. package/docs/module-Accounts.html +0 -2283
  121. package/docs/module-Artist.html +0 -993
  122. package/docs/module-Awards.html +0 -836
  123. package/docs/module-Categories.html +0 -711
  124. package/docs/module-Config.html +0 -431
  125. package/docs/module-Content-Services-V2.html +0 -2998
  126. package/docs/module-ForumCategories.html +0 -687
  127. package/docs/module-ForumDiscussions.html +0 -370
  128. package/docs/module-Forums.html +0 -16599
  129. package/docs/module-Genre.html +0 -981
  130. package/docs/module-GuidedCourses.html +0 -108
  131. package/docs/module-Instructor.html +0 -929
  132. package/docs/module-Interests.html +0 -1066
  133. package/docs/module-LearningPaths.html +0 -2298
  134. package/docs/module-Onboarding.html +0 -882
  135. package/docs/module-Payments.html +0 -392
  136. package/docs/module-Permissions.html +0 -406
  137. package/docs/module-Playlists.html +0 -3030
  138. package/docs/module-ProgressRow.html +0 -108
  139. package/docs/module-Railcontent-Services.html +0 -6735
  140. package/docs/module-Sanity-Services.html +0 -8244
  141. package/docs/module-Sessions.html +0 -575
  142. package/docs/module-Threads.html +0 -1119
  143. package/docs/module-UserActivity.html +0 -4580
  144. package/docs/module-UserChat.html +0 -410
  145. package/docs/module-UserManagement.html +0 -1932
  146. package/docs/module-UserMemberships.html +0 -829
  147. package/docs/module-UserNotifications.html +0 -2595
  148. package/docs/module-UserProfile.html +0 -370
  149. package/docs/progress-row_method-card.js.html +0 -183
  150. package/docs/railcontent.js.html +0 -847
  151. package/docs/sanity.js.html +0 -2322
  152. package/docs/scripts/collapse.js +0 -39
  153. package/docs/scripts/commonNav.js +0 -28
  154. package/docs/scripts/linenumber.js +0 -25
  155. package/docs/scripts/nav.js +0 -12
  156. package/docs/scripts/polyfill.js +0 -4
  157. package/docs/scripts/prettify/Apache-License-2.0.txt +0 -202
  158. package/docs/scripts/prettify/lang-css.js +0 -2
  159. package/docs/scripts/prettify/prettify.js +0 -28
  160. package/docs/scripts/search.js +0 -99
  161. package/docs/styles/jsdoc.css +0 -776
  162. package/docs/styles/prettify.css +0 -80
  163. package/docs/userActivity.js.html +0 -1577
  164. package/docs/user_account.ts.html +0 -265
  165. package/docs/user_chat.js.html +0 -98
  166. package/docs/user_interests.js.html +0 -150
  167. package/docs/user_management.js.html +0 -258
  168. package/docs/user_memberships.js.html +0 -144
  169. package/docs/user_memberships.ts.html +0 -292
  170. package/docs/user_notifications.js.html +0 -374
  171. package/docs/user_onboarding.ts.html +0 -325
  172. package/docs/user_payments.ts.html +0 -146
  173. package/docs/user_permissions.js.html +0 -110
  174. package/docs/user_profile.js.html +0 -115
  175. package/docs/user_sessions.js.html +0 -170
  176. package/docs/user_types.js.html +0 -224
  177. package/docs/user_user-management-system.js.html +0 -79
@@ -1,4580 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
-
5
- <meta charset="utf-8">
6
- <title>UserActivity - 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-Accounts.html">Accounts</a><ul class='methods'><li data-type='method'><a href="module-Accounts.html#~confirmEmailChange">confirmEmailChange</a></li><li data-type='method'><a href="module-Accounts.html#~deleteAccount">deleteAccount</a></li><li data-type='method'><a href="module-Accounts.html#~numberOfActiveUsers">numberOfActiveUsers</a></li><li data-type='method'><a href="module-Accounts.html#~requestEmailChange">requestEmailChange</a></li><li data-type='method'><a href="module-Accounts.html#~resetPassword">resetPassword</a></li><li data-type='method'><a href="module-Accounts.html#~sendAccountSetupEmail">sendAccountSetupEmail</a></li><li data-type='method'><a href="module-Accounts.html#~sendPasswordResetEmail">sendPasswordResetEmail</a></li><li data-type='method'><a href="module-Accounts.html#~setupAccount">setupAccount</a></li><li data-type='method'><a href="module-Accounts.html#~status">status</a></li><li data-type='method'><a href="module-Accounts.html#~toggleStudentView">toggleStudentView</a></li></ul></li><li><a href="module-Artist.html">Artist</a><ul class='methods'><li data-type='method'><a href="module-Artist.html#~fetchArtistBySlug">fetchArtistBySlug</a></li><li data-type='method'><a href="module-Artist.html#~fetchArtistLessons">fetchArtistLessons</a></li><li data-type='method'><a href="module-Artist.html#~fetchArtists">fetchArtists</a></li></ul></li><li><a href="module-Awards.html">Awards</a><ul class='methods'><li data-type='method'><a href="module-Awards.html#~fetchAwardsForUser">fetchAwardsForUser</a></li><li data-type='method'><a href="module-Awards.html#~fetchCertificate">fetchCertificate</a></li><li data-type='method'><a href="module-Awards.html#~getAwardDataForGuidedContent">getAwardDataForGuidedContent</a></li></ul></li><li><a href="module-Config.html">Config</a><ul class='methods'><li data-type='method'><a href="module-Config.html#.initializeService">initializeService</a></li></ul></li><li><a href="module-Content-Services-V2.html">Content-Services-V2</a><ul class='methods'><li data-type='method'><a href="module-Content-Services-V2.html#.getContentRows">getContentRows</a></li><li data-type='method'><a href="module-Content-Services-V2.html#.getLegacyMethods">getLegacyMethods</a></li><li data-type='method'><a href="module-Content-Services-V2.html#.getNewAndUpcoming">getNewAndUpcoming</a></li><li data-type='method'><a href="module-Content-Services-V2.html#.getOwnedContent">getOwnedContent</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#~deleteForumCategory">deleteForumCategory</a></li><li data-type='method'><a href="module-Forums.html#~deletePost">deletePost</a></li><li data-type='method'><a href="module-Forums.html#~deleteThread">deleteThread</a></li><li data-type='method'><a href="module-Forums.html#~fetchCommunityGuidelines">fetchCommunityGuidelines</a></li><li data-type='method'><a href="module-Forums.html#~fetchFollowedThreads">fetchFollowedThreads</a></li><li data-type='method'><a href="module-Forums.html#~fetchForumCategories">fetchForumCategories</a></li><li data-type='method'><a href="module-Forums.html#~fetchLatestThreads">fetchLatestThreads</a></li><li data-type='method'><a href="module-Forums.html#~fetchPosts">fetchPosts</a></li><li data-type='method'><a href="module-Forums.html#~fetchThreads">fetchThreads</a></li><li data-type='method'><a href="module-Forums.html#~followThread">followThread</a></li><li data-type='method'><a href="module-Forums.html#~jumpToPost">jumpToPost</a></li><li data-type='method'><a href="module-Forums.html#~likePost">likePost</a></li><li data-type='method'><a href="module-Forums.html#~lockThread">lockThread</a></li><li data-type='method'><a href="module-Forums.html#~markThreadAsRead">markThreadAsRead</a></li><li data-type='method'><a href="module-Forums.html#~pinThread">pinThread</a></li><li data-type='method'><a href="module-Forums.html#~search">search</a></li><li data-type='method'><a href="module-Forums.html#~unfollowThread">unfollowThread</a></li><li data-type='method'><a href="module-Forums.html#~unlikePost">unlikePost</a></li><li data-type='method'><a href="module-Forums.html#~unlockThread">unlockThread</a></li><li data-type='method'><a href="module-Forums.html#~unpinThread">unpinThread</a></li><li data-type='method'><a href="module-Forums.html#~updateForumCategory">updateForumCategory</a></li><li data-type='method'><a href="module-Forums.html#~updatePost">updatePost</a></li><li data-type='method'><a href="module-Forums.html#~updateThread">updateThread</a></li></ul></li><li></li><li></li><li><a href="module-Genre.html">Genre</a><ul class='methods'><li data-type='method'><a href="module-Genre.html#~fetchGenreBySlug">fetchGenreBySlug</a></li><li data-type='method'><a href="module-Genre.html#~fetchGenreLessons">fetchGenreLessons</a></li><li data-type='method'><a href="module-Genre.html#~fetchGenres">fetchGenres</a></li></ul></li><li><a href="module-GuidedCourses.html">GuidedCourses</a></li><li><a href="module-Instructor.html">Instructor</a><ul class='methods'><li data-type='method'><a href="module-Instructor.html#~fetchInstructorBySlug">fetchInstructorBySlug</a></li><li data-type='method'><a href="module-Instructor.html#~fetchInstructorLessons">fetchInstructorLessons</a></li><li data-type='method'><a href="module-Instructor.html#~fetchInstructors">fetchInstructors</a></li></ul></li><li><a href="module-Interests.html">Interests</a><ul class='methods'><li data-type='method'><a href="module-Interests.html#.fetchInterests">fetchInterests</a></li><li data-type='method'><a href="module-Interests.html#.fetchUninterests">fetchUninterests</a></li><li data-type='method'><a href="module-Interests.html#.markContentAsInterested">markContentAsInterested</a></li><li data-type='method'><a href="module-Interests.html#.markContentAsNotInterested">markContentAsNotInterested</a></li><li data-type='method'><a href="module-Interests.html#.removeContentAsInterested">removeContentAsInterested</a></li><li data-type='method'><a href="module-Interests.html#.removeContentAsNotInterested">removeContentAsNotInterested</a></li></ul></li><li><a href="module-LearningPaths.html">LearningPaths</a><ul class='methods'><li data-type='method'><a href="module-LearningPaths.html#~completeLearningPathIntroVideo">completeLearningPathIntroVideo</a></li><li data-type='method'><a href="module-LearningPaths.html#~completeMethodIntroVideo">completeMethodIntroVideo</a></li><li data-type='method'><a href="module-LearningPaths.html#~fetchLearningPathLessons">fetchLearningPathLessons</a></li><li data-type='method'><a href="module-LearningPaths.html#~getActivePath">getActivePath</a></li><li data-type='method'><a href="module-LearningPaths.html#~getDailySession">getDailySession</a></li><li data-type='method'><a href="module-LearningPaths.html#~getEnrichedLearningPath">getEnrichedLearningPath</a></li><li data-type='method'><a href="module-LearningPaths.html#~getLearningPathLessonsByIds">getLearningPathLessonsByIds</a></li><li data-type='method'><a href="module-LearningPaths.html#~mapContentToParent">mapContentToParent</a></li><li data-type='method'><a href="module-LearningPaths.html#~resetAllLearningPaths">resetAllLearningPaths</a></li><li data-type='method'><a href="module-LearningPaths.html#~startLearningPath">startLearningPath</a></li><li data-type='method'><a href="module-LearningPaths.html#~updateActivePath">updateActivePath</a></li><li data-type='method'><a href="module-LearningPaths.html#~updateDailySession">updateDailySession</a></li></ul></li><li><a href="module-Onboarding.html">Onboarding</a><ul class='methods'><li data-type='method'><a href="module-Onboarding.html#~getOnboardingRecommendedContent">getOnboardingRecommendedContent</a></li><li data-type='method'><a href="module-Onboarding.html#~startOnboarding">startOnboarding</a></li><li data-type='method'><a href="module-Onboarding.html#~updateOnboarding">updateOnboarding</a></li><li data-type='method'><a href="module-Onboarding.html#~userOnboardingForBrand">userOnboardingForBrand</a></li></ul></li><li><a href="module-Payments.html">Payments</a><ul class='methods'><li data-type='method'><a href="module-Payments.html#~fetchCustomerPayments">fetchCustomerPayments</a></li></ul></li><li><a href="module-Permissions.html">Permissions</a><ul class='methods'><li data-type='method'><a href="module-Permissions.html#.fetchUserPermissions">fetchUserPermissions</a></li><li data-type='method'><a href="module-Permissions.html#.reset">reset</a></li></ul></li><li><a href="module-Playlists.html">Playlists</a><ul class='methods'><li data-type='method'><a href="module-Playlists.html#.addItemToPlaylist">addItemToPlaylist</a></li><li data-type='method'><a href="module-Playlists.html#.createPlaylist">createPlaylist</a></li><li data-type='method'><a href="module-Playlists.html#.deletePlaylist">deletePlaylist</a></li><li data-type='method'><a href="module-Playlists.html#.duplicatePlaylist">duplicatePlaylist</a></li><li data-type='method'><a href="module-Playlists.html#.fetchPlaylist">fetchPlaylist</a></li><li data-type='method'><a href="module-Playlists.html#.fetchPlaylistItems">fetchPlaylistItems</a></li><li data-type='method'><a href="module-Playlists.html#.fetchUserPlaylists">fetchUserPlaylists</a></li><li data-type='method'><a href="module-Playlists.html#.togglePlaylistPrivate">togglePlaylistPrivate</a></li><li data-type='method'><a href="module-Playlists.html#.undeletePlaylist">undeletePlaylist</a></li><li data-type='method'><a href="module-Playlists.html#.updatePlaylist">updatePlaylist</a></li><li data-type='method'><a href="module-Playlists.html#~deleteItemsFromPlaylist">deleteItemsFromPlaylist</a></li><li data-type='method'><a href="module-Playlists.html#~likePlaylist">likePlaylist</a></li><li data-type='method'><a href="module-Playlists.html#~reportPlaylist">reportPlaylist</a></li><li data-type='method'><a href="module-Playlists.html#~restoreItemFromPlaylist">restoreItemFromPlaylist</a></li><li data-type='method'><a href="module-Playlists.html#~unlikePlaylist">unlikePlaylist</a></li></ul></li><li><a href="module-ProgressRow.html">ProgressRow</a></li><li><a href="module-Railcontent-Services.html">Railcontent-Services</a><ul class='methods'><li data-type='method'><a href="module-Railcontent-Services.html#.assignModeratorToComment">assignModeratorToComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.closeComment">closeComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.createComment">createComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.deleteComment">deleteComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.editComment">editComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchAllCompletedStates">fetchAllCompletedStates</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchCarouselCardData">fetchCarouselCardData</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchComment">fetchComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchCommentRelies">fetchCommentRelies</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchComments">fetchComments</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchCompletedContent">fetchCompletedContent</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchCompletedState">fetchCompletedState</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchContentInProgress">fetchContentInProgress</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchContentPageUserData">fetchContentPageUserData</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchNextContentDataForParent">fetchNextContentDataForParent</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchRecentUserActivities">fetchRecentUserActivities</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchSongsInProgress">fetchSongsInProgress</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchTopComment">fetchTopComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchUserAward">fetchUserAward</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchUserBadges">fetchUserBadges</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchUserPracticeNotes">fetchUserPracticeNotes</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.likeComment">likeComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.openComment">openComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.postContentComplete">postContentComplete</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.postContentReset">postContentReset</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.postContentRestore">postContentRestore</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.postContentStart">postContentStart</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.replyToComment">replyToComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.reportComment">reportComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.restoreComment">restoreComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.setStudentViewForUser">setStudentViewForUser</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.unassignModeratorToComment">unassignModeratorToComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.unlikeComment">unlikeComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#~fetchLastInteractedChild">fetchLastInteractedChild</a></li></ul></li><li><a href="module-Sanity-Services.html">Sanity-Services</a><ul class='methods'><li data-type='method'><a href="module-Sanity-Services.html#.fetchAll">fetchAll</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchAllFilterOptions">fetchAllFilterOptions</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchAllPacks">fetchAllPacks</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchByRailContentId">fetchByRailContentId</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchByRailContentIds">fetchByRailContentIds</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchByReference">fetchByReference</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchComingSoon">fetchComingSoon</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchCommentModContentData">fetchCommentModContentData</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchFoundation">fetchFoundation</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchLeaving">fetchLeaving</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchLessonContent">fetchLessonContent</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchLessonsFeaturingThisContent">fetchLessonsFeaturingThisContent</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMetadata">fetchMetadata</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMethod">fetchMethod</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMethodChildren">fetchMethodChildren</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMethodChildrenIds">fetchMethodChildrenIds</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMethodPreviousNextLesson">fetchMethodPreviousNextLesson</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMethodV2IntroVideo">fetchMethodV2IntroVideo</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMethodV2Structure">fetchMethodV2Structure</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMethodV2StructureFromId">fetchMethodV2StructureFromId</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#.fetchOwnedContent">fetchOwnedContent</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#.fetchTopLevelParentId">fetchTopLevelParentId</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
-
34
- </nav>
35
-
36
- <div id="main">
37
-
38
- <h1 class="page-title">UserActivity</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=".calculateLongestStreaks"><span class="type-signature type-signature-static">(static) </span>calculateLongestStreaks<span class="signature">()</span><span class="type-signature"> &rarr; {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>Calculates the longest daily, weekly streaks and totalPracticeSeconds from user practice dates.</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#line782">line 782</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
-
149
-
150
-
151
-
152
-
153
-
154
-
155
-
156
-
157
-
158
-
159
-
160
-
161
-
162
-
163
-
164
- <h5 class="h5-returns">Returns:</h5>
165
-
166
-
167
-
168
-
169
- <dl class="param-type">
170
- <dt>
171
- Type
172
- </dt>
173
- <dd>
174
-
175
- <span class="param-type">Object</span>
176
-
177
-
178
-
179
- </dd>
180
- </dl>
181
-
182
-
183
-
184
-
185
-
186
-
187
-
188
-
189
-
190
-
191
- <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>
192
-
193
-
194
-
195
-
196
-
197
-
198
- <dl class="details">
199
-
200
- <dt class="tag-description">Description:</dt>
201
- <dd class="tag-description"><ul class="dummy"><li>Creates practice notes for a specific date.</li></ul></dd>
202
-
203
-
204
-
205
- <dt class="tag-source">Source:</dt>
206
- <dd class="tag-source"><ul class="dummy"><li>
207
- <a href="userActivity.js.html">userActivity.js</a>, <a href="userActivity.js.html#line620">line 620</a>
208
- </li></ul></dd>
209
-
210
-
211
-
212
-
213
-
214
-
215
-
216
-
217
-
218
-
219
-
220
-
221
-
222
-
223
-
224
-
225
-
226
-
227
-
228
-
229
-
230
-
231
-
232
-
233
-
234
-
235
-
236
-
237
-
238
-
239
-
240
- </dl>
241
-
242
-
243
-
244
-
245
-
246
-
247
-
248
-
249
-
250
-
251
-
252
- <h5 class="h5-examples">Example</h5>
253
-
254
- <pre class="prettyprint"><code>createPracticeNotes({ date: '2025-04-10', notes: 'Worked on scales and arpeggios' })
255
- .then(response => console.log(response))
256
- .catch(error => console.error(error));</code></pre>
257
-
258
-
259
-
260
-
261
- <h5 class="h5-parameters">Parameters:</h5>
262
-
263
-
264
- <table class="params">
265
- <thead>
266
- <tr>
267
-
268
- <th>Name</th>
269
-
270
-
271
- <th>Type</th>
272
-
273
-
274
-
275
-
276
-
277
- <th class="last">Description</th>
278
- </tr>
279
- </thead>
280
-
281
- <tbody>
282
-
283
-
284
- <tr>
285
-
286
- <td class="name"><code>payload</code></td>
287
-
288
-
289
- <td class="type">
290
-
291
-
292
- <span class="param-type">Object</span>
293
-
294
-
295
-
296
-
297
- </td>
298
-
299
-
300
-
301
-
302
-
303
- <td class="description last">The data required to create practice notes.
304
- <h6>Properties</h6>
305
-
306
-
307
- <table class="params">
308
- <thead>
309
- <tr>
310
-
311
- <th>Name</th>
312
-
313
-
314
- <th>Type</th>
315
-
316
-
317
-
318
-
319
-
320
- <th class="last">Description</th>
321
- </tr>
322
- </thead>
323
-
324
- <tbody>
325
-
326
-
327
- <tr>
328
-
329
- <td class="name"><code>date</code></td>
330
-
331
-
332
- <td class="type">
333
-
334
-
335
- <span class="param-type">string</span>
336
-
337
-
338
-
339
-
340
- </td>
341
-
342
-
343
-
344
-
345
-
346
- <td class="description last">The date for which to create notes (format: YYYY-MM-DD).</td>
347
- </tr>
348
-
349
-
350
-
351
- <tr>
352
-
353
- <td class="name"><code>notes</code></td>
354
-
355
-
356
- <td class="type">
357
-
358
-
359
- <span class="param-type">string</span>
360
-
361
-
362
-
363
-
364
- </td>
365
-
366
-
367
-
368
-
369
-
370
- <td class="description last">The notes content to be saved.</td>
371
- </tr>
372
-
373
-
374
- </tbody>
375
- </table>
376
-
377
- </td>
378
- </tr>
379
-
380
-
381
- </tbody>
382
- </table>
383
-
384
-
385
-
386
-
387
-
388
-
389
-
390
-
391
-
392
-
393
-
394
-
395
-
396
-
397
-
398
-
399
- <h5 class="h5-returns">Returns:</h5>
400
-
401
-
402
- <div class="param-desc">
403
- - A promise that resolves to the API response after creating the notes.
404
- </div>
405
-
406
-
407
-
408
- <dl class="param-type">
409
- <dt>
410
- Type
411
- </dt>
412
- <dd>
413
-
414
- <span class="param-type">Promise.&lt;Object></span>
415
-
416
-
417
-
418
- </dd>
419
- </dl>
420
-
421
-
422
-
423
-
424
-
425
-
426
-
427
-
428
-
429
-
430
- <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>
431
-
432
-
433
-
434
-
435
-
436
-
437
- <dl class="details">
438
-
439
- <dt class="tag-description">Description:</dt>
440
- <dd class="tag-description"><ul class="dummy"><li>Deletes all practice sessions for a specific day.
441
-
442
- This function retrieves all user practice session IDs for a given day and sends a DELETE request
443
- to remove them from the server. It also updates the local context to reflect the deletion.</li></ul></dd>
444
-
445
-
446
-
447
- <dt class="tag-source">Source:</dt>
448
- <dd class="tag-source"><ul class="dummy"><li>
449
- <a href="userActivity.js.html">userActivity.js</a>, <a href="userActivity.js.html#line457">line 457</a>
450
- </li></ul></dd>
451
-
452
-
453
-
454
-
455
-
456
-
457
-
458
-
459
-
460
-
461
-
462
-
463
-
464
-
465
-
466
-
467
-
468
-
469
-
470
-
471
-
472
-
473
-
474
-
475
-
476
-
477
-
478
-
479
-
480
-
481
-
482
- </dl>
483
-
484
-
485
-
486
-
487
-
488
-
489
-
490
-
491
-
492
-
493
-
494
-
495
-
496
- <h5 class="h5-parameters">Parameters:</h5>
497
-
498
-
499
- <table class="params">
500
- <thead>
501
- <tr>
502
-
503
- <th>Name</th>
504
-
505
-
506
- <th>Type</th>
507
-
508
-
509
-
510
-
511
-
512
- <th class="last">Description</th>
513
- </tr>
514
- </thead>
515
-
516
- <tbody>
517
-
518
-
519
- <tr>
520
-
521
- <td class="name"><code>day</code></td>
522
-
523
-
524
- <td class="type">
525
-
526
-
527
- <span class="param-type">string</span>
528
-
529
-
530
-
531
-
532
- </td>
533
-
534
-
535
-
536
-
537
-
538
- <td class="description last">The day (in `YYYY-MM-DD` format) for which practice sessions should be deleted.</td>
539
- </tr>
540
-
541
-
542
- </tbody>
543
- </table>
544
-
545
-
546
-
547
-
548
-
549
-
550
-
551
-
552
-
553
-
554
-
555
-
556
-
557
-
558
-
559
-
560
- <h5 class="h5-returns">Returns:</h5>
561
-
562
-
563
- <div class="param-desc">
564
- - A promise that resolves once the practice session is removed.
565
-
566
- * @example
567
- // Delete practice sessions for April 10, 2025
568
- deletePracticeSession("2025-04-10")
569
- .then(deletedIds => console.log("Deleted sessions:", response))
570
- .catch(error => console.error("Delete failed:", error));
571
- </div>
572
-
573
-
574
-
575
- <dl class="param-type">
576
- <dt>
577
- Type
578
- </dt>
579
- <dd>
580
-
581
- <span class="param-type">Promise.&lt;Array.&lt;string>></span>
582
-
583
-
584
-
585
- </dd>
586
- </dl>
587
-
588
-
589
-
590
-
591
-
592
-
593
-
594
-
595
-
596
-
597
- <h4 class="name" id=".deleteUserActivity"><span class="type-signature type-signature-static">(static) </span>deleteUserActivity<span class="signature">(id)</span><span class="type-signature"> &rarr; {Promise.&lt;Object>}</span></h4>
598
-
599
-
600
-
601
-
602
-
603
-
604
- <dl class="details">
605
-
606
- <dt class="tag-description">Description:</dt>
607
- <dd class="tag-description"><ul class="dummy"><li>Deletes a specific user activity by its ID.</li></ul></dd>
608
-
609
-
610
-
611
- <dt class="tag-source">Source:</dt>
612
- <dd class="tag-source"><ul class="dummy"><li>
613
- <a href="userActivity.js.html">userActivity.js</a>, <a href="userActivity.js.html#line935">line 935</a>
614
- </li></ul></dd>
615
-
616
-
617
-
618
-
619
-
620
-
621
-
622
-
623
-
624
-
625
-
626
-
627
-
628
-
629
-
630
-
631
-
632
-
633
-
634
-
635
-
636
-
637
-
638
-
639
-
640
-
641
-
642
-
643
-
644
-
645
-
646
- </dl>
647
-
648
-
649
-
650
-
651
-
652
-
653
-
654
-
655
-
656
-
657
-
658
- <h5 class="h5-examples">Example</h5>
659
-
660
- <pre class="prettyprint"><code>deleteUserActivity(789)
661
- .then(response => console.log('Deleted:', response))
662
- .catch(error => console.error(error));</code></pre>
663
-
664
-
665
-
666
-
667
- <h5 class="h5-parameters">Parameters:</h5>
668
-
669
-
670
- <table class="params">
671
- <thead>
672
- <tr>
673
-
674
- <th>Name</th>
675
-
676
-
677
- <th>Type</th>
678
-
679
-
680
-
681
-
682
-
683
- <th class="last">Description</th>
684
- </tr>
685
- </thead>
686
-
687
- <tbody>
688
-
689
-
690
- <tr>
691
-
692
- <td class="name"><code>id</code></td>
693
-
694
-
695
- <td class="type">
696
-
697
-
698
- <span class="param-type">number</span>
699
- |
700
-
701
- <span class="param-type">string</span>
702
-
703
-
704
-
705
-
706
- </td>
707
-
708
-
709
-
710
-
711
-
712
- <td class="description last">The ID of the user activity to delete.</td>
713
- </tr>
714
-
715
-
716
- </tbody>
717
- </table>
718
-
719
-
720
-
721
-
722
-
723
-
724
-
725
-
726
-
727
-
728
-
729
-
730
-
731
-
732
-
733
-
734
- <h5 class="h5-returns">Returns:</h5>
735
-
736
-
737
- <div class="param-desc">
738
- - A promise that resolves to the API response after deletion.
739
- </div>
740
-
741
-
742
-
743
- <dl class="param-type">
744
- <dt>
745
- Type
746
- </dt>
747
- <dd>
748
-
749
- <span class="param-type">Promise.&lt;Object></span>
750
-
751
-
752
-
753
- </dd>
754
- </dl>
755
-
756
-
757
-
758
-
759
-
760
-
761
-
762
-
763
-
764
-
765
- <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>
766
-
767
-
768
-
769
-
770
-
771
-
772
- <dl class="details">
773
-
774
- <dt class="tag-description">Description:</dt>
775
- <dd class="tag-description"><ul class="dummy"><li>Retrieves user practice notes for a specific day.</li></ul></dd>
776
-
777
-
778
-
779
- <dt class="tag-source">Source:</dt>
780
- <dd class="tag-source"><ul class="dummy"><li>
781
- <a href="userActivity.js.html">userActivity.js</a>, <a href="userActivity.js.html#line570">line 570</a>
782
- </li></ul></dd>
783
-
784
-
785
-
786
-
787
-
788
-
789
-
790
-
791
-
792
-
793
-
794
-
795
-
796
-
797
-
798
-
799
-
800
-
801
-
802
-
803
-
804
-
805
-
806
-
807
-
808
-
809
-
810
-
811
-
812
-
813
-
814
- </dl>
815
-
816
-
817
-
818
-
819
-
820
-
821
-
822
-
823
-
824
-
825
-
826
- <h5 class="h5-examples">Example</h5>
827
-
828
- <pre class="prettyprint"><code>// Get notes for April 10, 2025
829
- getPracticeNotes("2025-04-10")
830
- .then(({ data }) => console.log("Practice notes:", data))
831
- .catch(error => console.error("Failed to get notes:", error));</code></pre>
832
-
833
-
834
-
835
-
836
- <h5 class="h5-parameters">Parameters:</h5>
837
-
838
-
839
- <table class="params">
840
- <thead>
841
- <tr>
842
-
843
- <th>Name</th>
844
-
845
-
846
- <th>Type</th>
847
-
848
-
849
-
850
-
851
-
852
- <th class="last">Description</th>
853
- </tr>
854
- </thead>
855
-
856
- <tbody>
857
-
858
-
859
- <tr>
860
-
861
- <td class="name"><code>day</code></td>
862
-
863
-
864
- <td class="type">
865
-
866
-
867
- <span class="param-type">string</span>
868
-
869
-
870
-
871
-
872
- </td>
873
-
874
-
875
-
876
-
877
-
878
- <td class="description last">The day (in `YYYY-MM-DD` format) to fetch practice notes for.</td>
879
- </tr>
880
-
881
-
882
- </tbody>
883
- </table>
884
-
885
-
886
-
887
-
888
-
889
-
890
-
891
-
892
-
893
-
894
-
895
-
896
-
897
-
898
-
899
-
900
- <h5 class="h5-returns">Returns:</h5>
901
-
902
-
903
- <div class="param-desc">
904
- - A promise that resolves to an object containing the practice notes.
905
- </div>
906
-
907
-
908
-
909
- <dl class="param-type">
910
- <dt>
911
- Type
912
- </dt>
913
- <dd>
914
-
915
- <span class="param-type">Promise.&lt;{data: Array.&lt;Object>}></span>
916
-
917
-
918
-
919
- </dd>
920
- </dl>
921
-
922
-
923
-
924
-
925
-
926
-
927
-
928
-
929
-
930
-
931
- <h4 class="name" id=".getPracticeSessions"><span class="type-signature type-signature-static">(static) </span>getPracticeSessions<span class="signature">(params)</span><span class="type-signature"> &rarr; {Promise.&lt;Object>}</span></h4>
932
-
933
-
934
-
935
-
936
-
937
-
938
- <dl class="details">
939
-
940
- <dt class="tag-description">Description:</dt>
941
- <dd class="tag-description"><ul class="dummy"><li>Retrieves and formats a user's practice sessions for a specific day.</li></ul></dd>
942
-
943
-
944
-
945
- <dt class="tag-source">Source:</dt>
946
- <dd class="tag-source"><ul class="dummy"><li>
947
- <a href="userActivity.js.html">userActivity.js</a>, <a href="userActivity.js.html#line540">line 540</a>
948
- </li></ul></dd>
949
-
950
-
951
-
952
-
953
-
954
-
955
-
956
-
957
-
958
-
959
-
960
-
961
-
962
-
963
-
964
-
965
-
966
-
967
-
968
-
969
-
970
-
971
-
972
-
973
-
974
-
975
-
976
-
977
-
978
-
979
-
980
- </dl>
981
-
982
-
983
-
984
-
985
-
986
-
987
-
988
-
989
-
990
-
991
-
992
- <h5 class="h5-examples">Examples</h5>
993
-
994
- <pre class="prettyprint"><code>// Get practice sessions for the current user on a specific day
995
- getPracticeSessions({ day: "2025-03-31" })
996
- .then(response => console.log(response))
997
- .catch(error => console.error(error));</code></pre>
998
-
999
- <pre class="prettyprint"><code>// Get practice sessions for another user
1000
- getPracticeSessions({ day: "2025-03-31", userId: 456 })
1001
- .then(response => console.log(response))
1002
- .catch(error => console.error(error));</code></pre>
1003
-
1004
-
1005
-
1006
-
1007
- <h5 class="h5-parameters">Parameters:</h5>
1008
-
1009
-
1010
- <table class="params">
1011
- <thead>
1012
- <tr>
1013
-
1014
- <th>Name</th>
1015
-
1016
-
1017
- <th>Type</th>
1018
-
1019
-
1020
-
1021
-
1022
-
1023
- <th class="last">Description</th>
1024
- </tr>
1025
- </thead>
1026
-
1027
- <tbody>
1028
-
1029
-
1030
- <tr>
1031
-
1032
- <td class="name"><code>params</code></td>
1033
-
1034
-
1035
- <td class="type">
1036
-
1037
-
1038
- <span class="param-type">Object</span>
1039
-
1040
-
1041
-
1042
-
1043
- </td>
1044
-
1045
-
1046
-
1047
-
1048
-
1049
- <td class="description last">Parameters for fetching practice sessions.
1050
- <h6>Properties</h6>
1051
-
1052
-
1053
- <table class="params">
1054
- <thead>
1055
- <tr>
1056
-
1057
- <th>Name</th>
1058
-
1059
-
1060
- <th>Type</th>
1061
-
1062
-
1063
- <th>Attributes</th>
1064
-
1065
-
1066
-
1067
- <th>Default</th>
1068
-
1069
-
1070
- <th class="last">Description</th>
1071
- </tr>
1072
- </thead>
1073
-
1074
- <tbody>
1075
-
1076
-
1077
- <tr>
1078
-
1079
- <td class="name"><code>day</code></td>
1080
-
1081
-
1082
- <td class="type">
1083
-
1084
-
1085
- <span class="param-type">string</span>
1086
-
1087
-
1088
-
1089
-
1090
- </td>
1091
-
1092
-
1093
- <td class="attributes">
1094
-
1095
-
1096
-
1097
-
1098
-
1099
- </td>
1100
-
1101
-
1102
-
1103
- <td class="default">
1104
-
1105
- </td>
1106
-
1107
-
1108
- <td class="description last">The date for which practice sessions should be retrieved (format: YYYY-MM-DD).</td>
1109
- </tr>
1110
-
1111
-
1112
-
1113
- <tr>
1114
-
1115
- <td class="name"><code>userId</code></td>
1116
-
1117
-
1118
- <td class="type">
1119
-
1120
-
1121
- <span class="param-type">number</span>
1122
-
1123
-
1124
-
1125
-
1126
- </td>
1127
-
1128
-
1129
- <td class="attributes">
1130
-
1131
- &lt;optional><br>
1132
-
1133
-
1134
-
1135
-
1136
-
1137
- </td>
1138
-
1139
-
1140
-
1141
- <td class="default">
1142
-
1143
- <code>globalConfig.sessionConfig.userId</code>
1144
-
1145
- </td>
1146
-
1147
-
1148
- <td class="description last">Optional user ID to retrieve sessions for a specific user. Defaults to the logged-in user.</td>
1149
- </tr>
1150
-
1151
-
1152
- </tbody>
1153
- </table>
1154
-
1155
- </td>
1156
- </tr>
1157
-
1158
-
1159
- </tbody>
1160
- </table>
1161
-
1162
-
1163
-
1164
-
1165
-
1166
-
1167
-
1168
-
1169
-
1170
-
1171
-
1172
-
1173
-
1174
-
1175
-
1176
-
1177
- <h5 class="h5-returns">Returns:</h5>
1178
-
1179
-
1180
- <div class="param-desc">
1181
- - A promise that resolves to an object containing:
1182
- - `practices`: An array of formatted practice session data.
1183
- - `practiceDuration`: Total practice duration (in seconds) for the given day.
1184
- </div>
1185
-
1186
-
1187
-
1188
- <dl class="param-type">
1189
- <dt>
1190
- Type
1191
- </dt>
1192
- <dd>
1193
-
1194
- <span class="param-type">Promise.&lt;Object></span>
1195
-
1196
-
1197
-
1198
- </dd>
1199
- </dl>
1200
-
1201
-
1202
-
1203
-
1204
-
1205
-
1206
-
1207
-
1208
-
1209
-
1210
- <h4 class="name" id=".getProgressRows"><span class="type-signature type-signature-static">(static) </span>getProgressRows<span class="signature">(options<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Promise.&lt;Object>}</span></h4>
1211
-
1212
-
1213
-
1214
-
1215
-
1216
-
1217
- <dl class="details">
1218
-
1219
- <dt class="tag-description">Description:</dt>
1220
- <dd class="tag-description"><ul class="dummy"><li>Fetches and combines recent user progress rows and playlists, excluding certain types and parents.</li></ul></dd>
1221
-
1222
-
1223
-
1224
- <dt class="tag-source">Source:</dt>
1225
- <dd class="tag-source"><ul class="dummy"><li>
1226
- <a href="userActivity.js.html">userActivity.js</a>, <a href="userActivity.js.html#line1047">line 1047</a>
1227
- </li></ul></dd>
1228
-
1229
-
1230
-
1231
-
1232
-
1233
-
1234
-
1235
-
1236
-
1237
-
1238
-
1239
-
1240
-
1241
-
1242
-
1243
-
1244
-
1245
-
1246
-
1247
-
1248
-
1249
-
1250
-
1251
-
1252
-
1253
-
1254
-
1255
-
1256
-
1257
-
1258
-
1259
- </dl>
1260
-
1261
-
1262
-
1263
-
1264
-
1265
-
1266
-
1267
-
1268
-
1269
-
1270
-
1271
- <h5 class="h5-examples">Example</h5>
1272
-
1273
- <pre class="prettyprint"><code>getProgressRows({ brand: 'drumeo', limit: 10 })
1274
- .then(data => console.log(data))
1275
- .catch(error => console.error(error));</code></pre>
1276
-
1277
-
1278
-
1279
-
1280
- <h5 class="h5-parameters">Parameters:</h5>
1281
-
1282
-
1283
- <table class="params">
1284
- <thead>
1285
- <tr>
1286
-
1287
- <th>Name</th>
1288
-
1289
-
1290
- <th>Type</th>
1291
-
1292
-
1293
- <th>Attributes</th>
1294
-
1295
-
1296
-
1297
- <th>Default</th>
1298
-
1299
-
1300
- <th class="last">Description</th>
1301
- </tr>
1302
- </thead>
1303
-
1304
- <tbody>
1305
-
1306
-
1307
- <tr>
1308
-
1309
- <td class="name"><code>options</code></td>
1310
-
1311
-
1312
- <td class="type">
1313
-
1314
-
1315
- <span class="param-type">Object</span>
1316
-
1317
-
1318
-
1319
-
1320
- </td>
1321
-
1322
-
1323
- <td class="attributes">
1324
-
1325
- &lt;optional><br>
1326
-
1327
-
1328
-
1329
-
1330
-
1331
- </td>
1332
-
1333
-
1334
-
1335
- <td class="default">
1336
-
1337
- <code>{}</code>
1338
-
1339
- </td>
1340
-
1341
-
1342
- <td class="description last">Options for fetching progress rows.
1343
- <h6>Properties</h6>
1344
-
1345
-
1346
- <table class="params">
1347
- <thead>
1348
- <tr>
1349
-
1350
- <th>Name</th>
1351
-
1352
-
1353
- <th>Type</th>
1354
-
1355
-
1356
- <th>Attributes</th>
1357
-
1358
-
1359
-
1360
- <th>Default</th>
1361
-
1362
-
1363
- <th class="last">Description</th>
1364
- </tr>
1365
- </thead>
1366
-
1367
- <tbody>
1368
-
1369
-
1370
- <tr>
1371
-
1372
- <td class="name"><code>brand</code></td>
1373
-
1374
-
1375
- <td class="type">
1376
-
1377
-
1378
- <span class="param-type">string</span>
1379
- |
1380
-
1381
- <span class="param-type">null</span>
1382
-
1383
-
1384
-
1385
-
1386
- </td>
1387
-
1388
-
1389
- <td class="attributes">
1390
-
1391
- &lt;optional><br>
1392
-
1393
-
1394
-
1395
-
1396
-
1397
- </td>
1398
-
1399
-
1400
-
1401
- <td class="default">
1402
-
1403
- <code>null</code>
1404
-
1405
- </td>
1406
-
1407
-
1408
- <td class="description last">The brand context for progress data.</td>
1409
- </tr>
1410
-
1411
-
1412
-
1413
- <tr>
1414
-
1415
- <td class="name"><code>limit</code></td>
1416
-
1417
-
1418
- <td class="type">
1419
-
1420
-
1421
- <span class="param-type">number</span>
1422
-
1423
-
1424
-
1425
-
1426
- </td>
1427
-
1428
-
1429
- <td class="attributes">
1430
-
1431
- &lt;optional><br>
1432
-
1433
-
1434
-
1435
-
1436
-
1437
- </td>
1438
-
1439
-
1440
-
1441
- <td class="default">
1442
-
1443
- <code>8</code>
1444
-
1445
- </td>
1446
-
1447
-
1448
- <td class="description last">Maximum number of progress rows to return.</td>
1449
- </tr>
1450
-
1451
-
1452
- </tbody>
1453
- </table>
1454
-
1455
- </td>
1456
- </tr>
1457
-
1458
-
1459
- </tbody>
1460
- </table>
1461
-
1462
-
1463
-
1464
-
1465
-
1466
-
1467
-
1468
-
1469
-
1470
-
1471
-
1472
-
1473
-
1474
-
1475
-
1476
-
1477
- <h5 class="h5-returns">Returns:</h5>
1478
-
1479
-
1480
- <div class="param-desc">
1481
- - A promise that resolves to an object containing progress rows formatted for UI.
1482
- </div>
1483
-
1484
-
1485
-
1486
- <dl class="param-type">
1487
- <dt>
1488
- Type
1489
- </dt>
1490
- <dd>
1491
-
1492
- <span class="param-type">Promise.&lt;Object></span>
1493
-
1494
-
1495
-
1496
- </dd>
1497
- </dl>
1498
-
1499
-
1500
-
1501
-
1502
-
1503
-
1504
-
1505
-
1506
-
1507
-
1508
- <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>
1509
-
1510
-
1511
-
1512
-
1513
-
1514
-
1515
- <dl class="details">
1516
-
1517
- <dt class="tag-description">Description:</dt>
1518
- <dd class="tag-description"><ul class="dummy"><li>Retrieves the user's recent activity.
1519
-
1520
- Returns an object containing recent practice activity.</li></ul></dd>
1521
-
1522
-
1523
-
1524
- <dt class="tag-source">Source:</dt>
1525
- <dd class="tag-source"><ul class="dummy"><li>
1526
- <a href="userActivity.js.html">userActivity.js</a>, <a href="userActivity.js.html#line589">line 589</a>
1527
- </li></ul></dd>
1528
-
1529
-
1530
-
1531
-
1532
-
1533
-
1534
-
1535
-
1536
-
1537
-
1538
-
1539
-
1540
-
1541
-
1542
-
1543
-
1544
-
1545
-
1546
-
1547
-
1548
-
1549
-
1550
-
1551
-
1552
-
1553
-
1554
-
1555
-
1556
-
1557
-
1558
-
1559
- </dl>
1560
-
1561
-
1562
-
1563
-
1564
-
1565
-
1566
-
1567
-
1568
-
1569
-
1570
-
1571
- <h5 class="h5-examples">Example</h5>
1572
-
1573
- <pre class="prettyprint"><code>// Fetch recent practice activity
1574
- getRecentActivity()
1575
- .then(({ data }) => console.log("Recent activity:", data))
1576
- .catch(error => console.error("Failed to get recent activity:", error));</code></pre>
1577
-
1578
-
1579
-
1580
-
1581
-
1582
-
1583
-
1584
-
1585
-
1586
-
1587
-
1588
-
1589
-
1590
-
1591
-
1592
-
1593
-
1594
-
1595
- <h5 class="h5-returns">Returns:</h5>
1596
-
1597
-
1598
- <div class="param-desc">
1599
- - A promise that resolves to an object containing recent activity items.
1600
- </div>
1601
-
1602
-
1603
-
1604
- <dl class="param-type">
1605
- <dt>
1606
- Type
1607
- </dt>
1608
- <dd>
1609
-
1610
- <span class="param-type">Promise.&lt;{data: Array.&lt;Object>}></span>
1611
-
1612
-
1613
-
1614
- </dd>
1615
- </dl>
1616
-
1617
-
1618
-
1619
-
1620
-
1621
-
1622
-
1623
-
1624
-
1625
-
1626
- <h4 class="name" id=".getUserMonthlyStats"><span class="type-signature type-signature-static">(static) </span>getUserMonthlyStats<span class="signature">(params<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Promise.&lt;Object>}</span></h4>
1627
-
1628
-
1629
-
1630
-
1631
-
1632
-
1633
- <dl class="details">
1634
-
1635
- <dt class="tag-description">Description:</dt>
1636
- <dd class="tag-description"><ul class="dummy"><li>Retrieves user activity statistics for a specified month and user, including daily and weekly activity data.
1637
- If no parameters are provided, defaults to the current year, current month, and the logged-in user.</li></ul></dd>
1638
-
1639
-
1640
-
1641
- <dt class="tag-source">Source:</dt>
1642
- <dd class="tag-source"><ul class="dummy"><li>
1643
- <a href="userActivity.js.html">userActivity.js</a>, <a href="userActivity.js.html#line165">line 165</a>
1644
- </li></ul></dd>
1645
-
1646
-
1647
-
1648
-
1649
-
1650
-
1651
-
1652
-
1653
-
1654
-
1655
-
1656
-
1657
-
1658
-
1659
-
1660
-
1661
-
1662
-
1663
-
1664
-
1665
-
1666
-
1667
-
1668
-
1669
-
1670
-
1671
-
1672
-
1673
-
1674
-
1675
-
1676
- </dl>
1677
-
1678
-
1679
-
1680
-
1681
-
1682
-
1683
-
1684
-
1685
-
1686
-
1687
-
1688
- <h5 class="h5-examples">Examples</h5>
1689
-
1690
- <pre class="prettyprint"><code>// Get stats for current user and month
1691
- getUserMonthlyStats().then(console.log);</code></pre>
1692
-
1693
- <pre class="prettyprint"><code>// Get stats for March 2024
1694
- getUserMonthlyStats({ year: 2024, month: 2 }).then(console.log);</code></pre>
1695
-
1696
- <pre class="prettyprint"><code>// Get stats for another user
1697
- getUserMonthlyStats({ userId: 123 }).then(console.log);</code></pre>
1698
-
1699
-
1700
-
1701
-
1702
- <h5 class="h5-parameters">Parameters:</h5>
1703
-
1704
-
1705
- <table class="params">
1706
- <thead>
1707
- <tr>
1708
-
1709
- <th>Name</th>
1710
-
1711
-
1712
- <th>Type</th>
1713
-
1714
-
1715
- <th>Attributes</th>
1716
-
1717
-
1718
-
1719
- <th>Default</th>
1720
-
1721
-
1722
- <th class="last">Description</th>
1723
- </tr>
1724
- </thead>
1725
-
1726
- <tbody>
1727
-
1728
-
1729
- <tr>
1730
-
1731
- <td class="name"><code>params</code></td>
1732
-
1733
-
1734
- <td class="type">
1735
-
1736
-
1737
- <span class="param-type">Object</span>
1738
-
1739
-
1740
-
1741
-
1742
- </td>
1743
-
1744
-
1745
- <td class="attributes">
1746
-
1747
- &lt;optional><br>
1748
-
1749
-
1750
-
1751
-
1752
-
1753
- </td>
1754
-
1755
-
1756
-
1757
- <td class="default">
1758
-
1759
- <code>{}</code>
1760
-
1761
- </td>
1762
-
1763
-
1764
- <td class="description last">Parameters for fetching user statistics.
1765
- <h6>Properties</h6>
1766
-
1767
-
1768
- <table class="params">
1769
- <thead>
1770
- <tr>
1771
-
1772
- <th>Name</th>
1773
-
1774
-
1775
- <th>Type</th>
1776
-
1777
-
1778
- <th>Attributes</th>
1779
-
1780
-
1781
-
1782
- <th>Default</th>
1783
-
1784
-
1785
- <th class="last">Description</th>
1786
- </tr>
1787
- </thead>
1788
-
1789
- <tbody>
1790
-
1791
-
1792
- <tr>
1793
-
1794
- <td class="name"><code>year</code></td>
1795
-
1796
-
1797
- <td class="type">
1798
-
1799
-
1800
- <span class="param-type">number</span>
1801
-
1802
-
1803
-
1804
-
1805
- </td>
1806
-
1807
-
1808
- <td class="attributes">
1809
-
1810
- &lt;optional><br>
1811
-
1812
-
1813
-
1814
-
1815
-
1816
- </td>
1817
-
1818
-
1819
-
1820
- <td class="default">
1821
-
1822
- <code>new Date().getFullYear()</code>
1823
-
1824
- </td>
1825
-
1826
-
1827
- <td class="description last">The year for which to retrieve the statistics.</td>
1828
- </tr>
1829
-
1830
-
1831
-
1832
- <tr>
1833
-
1834
- <td class="name"><code>month</code></td>
1835
-
1836
-
1837
- <td class="type">
1838
-
1839
-
1840
- <span class="param-type">number</span>
1841
-
1842
-
1843
-
1844
-
1845
- </td>
1846
-
1847
-
1848
- <td class="attributes">
1849
-
1850
- &lt;optional><br>
1851
-
1852
-
1853
-
1854
-
1855
-
1856
- </td>
1857
-
1858
-
1859
-
1860
- <td class="default">
1861
-
1862
- <code>new Date().getMonth()</code>
1863
-
1864
- </td>
1865
-
1866
-
1867
- <td class="description last">The 0-based month index (0 = January).</td>
1868
- </tr>
1869
-
1870
-
1871
-
1872
- <tr>
1873
-
1874
- <td class="name"><code>day</code></td>
1875
-
1876
-
1877
- <td class="type">
1878
-
1879
-
1880
- <span class="param-type">number</span>
1881
-
1882
-
1883
-
1884
-
1885
- </td>
1886
-
1887
-
1888
- <td class="attributes">
1889
-
1890
- &lt;optional><br>
1891
-
1892
-
1893
-
1894
-
1895
-
1896
- </td>
1897
-
1898
-
1899
-
1900
- <td class="default">
1901
-
1902
- <code>1</code>
1903
-
1904
- </td>
1905
-
1906
-
1907
- <td class="description last">The starting day (not used for grid calc, but kept for flexibility).</td>
1908
- </tr>
1909
-
1910
-
1911
-
1912
- <tr>
1913
-
1914
- <td class="name"><code>userId</code></td>
1915
-
1916
-
1917
- <td class="type">
1918
-
1919
-
1920
- <span class="param-type">number</span>
1921
-
1922
-
1923
-
1924
-
1925
- </td>
1926
-
1927
-
1928
- <td class="attributes">
1929
-
1930
- &lt;optional><br>
1931
-
1932
-
1933
-
1934
-
1935
-
1936
- </td>
1937
-
1938
-
1939
-
1940
- <td class="default">
1941
-
1942
- <code>globalConfig.sessionConfig.userId</code>
1943
-
1944
- </td>
1945
-
1946
-
1947
- <td class="description last">The user ID for whom to retrieve stats.</td>
1948
- </tr>
1949
-
1950
-
1951
- </tbody>
1952
- </table>
1953
-
1954
- </td>
1955
- </tr>
1956
-
1957
-
1958
- </tbody>
1959
- </table>
1960
-
1961
-
1962
-
1963
-
1964
-
1965
-
1966
-
1967
-
1968
-
1969
-
1970
-
1971
-
1972
-
1973
-
1974
-
1975
-
1976
- <h5 class="h5-returns">Returns:</h5>
1977
-
1978
-
1979
- <div class="param-desc">
1980
- A promise that resolves to an object containing:
1981
- - `dailyActiveStats`: Array of daily activity data for the calendar grid.
1982
- - `weeklyActiveStats`: Array of weekly streak summaries.
1983
- - `practiceDuration`: Total number of seconds practiced in the month.
1984
- - `currentDailyStreak`: Count of consecutive active days.
1985
- - `currentWeeklyStreak`: Count of consecutive active weeks.
1986
- - `daysPracticed`: Total number of active days in the month.
1987
- </div>
1988
-
1989
-
1990
-
1991
- <dl class="param-type">
1992
- <dt>
1993
- Type
1994
- </dt>
1995
- <dd>
1996
-
1997
- <span class="param-type">Promise.&lt;Object></span>
1998
-
1999
-
2000
-
2001
- </dd>
2002
- </dl>
2003
-
2004
-
2005
-
2006
-
2007
-
2008
-
2009
-
2010
-
2011
-
2012
-
2013
- <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>
2014
-
2015
-
2016
-
2017
-
2018
-
2019
-
2020
- <dl class="details">
2021
-
2022
- <dt class="tag-description">Description:</dt>
2023
- <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>
2024
-
2025
-
2026
-
2027
- <dt class="tag-source">Source:</dt>
2028
- <dd class="tag-source"><ul class="dummy"><li>
2029
- <a href="userActivity.js.html">userActivity.js</a>, <a href="userActivity.js.html#line103">line 103</a>
2030
- </li></ul></dd>
2031
-
2032
-
2033
-
2034
-
2035
-
2036
-
2037
-
2038
-
2039
-
2040
-
2041
-
2042
-
2043
-
2044
-
2045
-
2046
-
2047
-
2048
-
2049
-
2050
-
2051
-
2052
-
2053
-
2054
-
2055
-
2056
-
2057
-
2058
-
2059
-
2060
-
2061
-
2062
- </dl>
2063
-
2064
-
2065
-
2066
-
2067
-
2068
-
2069
-
2070
-
2071
-
2072
-
2073
-
2074
- <h5 class="h5-examples">Example</h5>
2075
-
2076
- <pre class="prettyprint"><code>// Retrieve user activity statistics for the current week
2077
- getUserWeeklyStats()
2078
- .then(stats => console.log(stats))
2079
- .catch(error => console.error(error));</code></pre>
2080
-
2081
-
2082
-
2083
-
2084
-
2085
-
2086
-
2087
-
2088
-
2089
-
2090
-
2091
-
2092
-
2093
-
2094
-
2095
-
2096
-
2097
-
2098
- <h5 class="h5-returns">Returns:</h5>
2099
-
2100
-
2101
- <div class="param-desc">
2102
- - A promise that resolves to an object containing weekly user activity statistics.
2103
- </div>
2104
-
2105
-
2106
-
2107
- <dl class="param-type">
2108
- <dt>
2109
- Type
2110
- </dt>
2111
- <dd>
2112
-
2113
- <span class="param-type">Promise.&lt;Object></span>
2114
-
2115
-
2116
-
2117
- </dd>
2118
- </dl>
2119
-
2120
-
2121
-
2122
-
2123
-
2124
-
2125
-
2126
-
2127
-
2128
-
2129
- <h4 class="name" id=".pinProgressRow"><span class="type-signature type-signature-static">(static) </span>pinProgressRow<span class="signature">(brand, id, progressType)</span><span class="type-signature"> &rarr; {Promise.&lt;Object>}</span></h4>
2130
-
2131
-
2132
-
2133
-
2134
-
2135
-
2136
- <dl class="details">
2137
-
2138
- <dt class="tag-description">Description:</dt>
2139
- <dd class="tag-description"><ul class="dummy"><li>Pins a specific progress row for a user, scoped by brand.</li></ul></dd>
2140
-
2141
-
2142
-
2143
- <dt class="tag-source">Source:</dt>
2144
- <dd class="tag-source"><ul class="dummy"><li>
2145
- <a href="userActivity.js.html">userActivity.js</a>, <a href="userActivity.js.html#line1450">line 1450</a>
2146
- </li></ul></dd>
2147
-
2148
-
2149
-
2150
-
2151
-
2152
-
2153
-
2154
-
2155
-
2156
-
2157
-
2158
-
2159
-
2160
-
2161
-
2162
-
2163
-
2164
-
2165
-
2166
-
2167
-
2168
-
2169
-
2170
-
2171
-
2172
-
2173
-
2174
-
2175
-
2176
-
2177
-
2178
- </dl>
2179
-
2180
-
2181
-
2182
-
2183
-
2184
-
2185
-
2186
-
2187
-
2188
-
2189
-
2190
- <h5 class="h5-examples">Example</h5>
2191
-
2192
- <pre class="prettyprint"><code>pinProgressRow('drumeo', 12345, 'content')
2193
- .then(response => console.log(response))
2194
- .catch(error => console.error(error));</code></pre>
2195
-
2196
-
2197
-
2198
-
2199
- <h5 class="h5-parameters">Parameters:</h5>
2200
-
2201
-
2202
- <table class="params">
2203
- <thead>
2204
- <tr>
2205
-
2206
- <th>Name</th>
2207
-
2208
-
2209
- <th>Type</th>
2210
-
2211
-
2212
-
2213
-
2214
-
2215
- <th class="last">Description</th>
2216
- </tr>
2217
- </thead>
2218
-
2219
- <tbody>
2220
-
2221
-
2222
- <tr>
2223
-
2224
- <td class="name"><code>brand</code></td>
2225
-
2226
-
2227
- <td class="type">
2228
-
2229
-
2230
- <span class="param-type">string</span>
2231
-
2232
-
2233
-
2234
-
2235
- </td>
2236
-
2237
-
2238
-
2239
-
2240
-
2241
- <td class="description last">The brand context for the pin action.</td>
2242
- </tr>
2243
-
2244
-
2245
-
2246
- <tr>
2247
-
2248
- <td class="name"><code>id</code></td>
2249
-
2250
-
2251
- <td class="type">
2252
-
2253
-
2254
- <span class="param-type">number</span>
2255
- |
2256
-
2257
- <span class="param-type">string</span>
2258
-
2259
-
2260
-
2261
-
2262
- </td>
2263
-
2264
-
2265
-
2266
-
2267
-
2268
- <td class="description last">The ID of the progress item to pin.</td>
2269
- </tr>
2270
-
2271
-
2272
-
2273
- <tr>
2274
-
2275
- <td class="name"><code>progressType</code></td>
2276
-
2277
-
2278
- <td class="type">
2279
-
2280
-
2281
- <span class="param-type">string</span>
2282
-
2283
-
2284
-
2285
-
2286
- </td>
2287
-
2288
-
2289
-
2290
-
2291
-
2292
- <td class="description last">The type of progress (e.g., 'content', 'playlist').</td>
2293
- </tr>
2294
-
2295
-
2296
- </tbody>
2297
- </table>
2298
-
2299
-
2300
-
2301
-
2302
-
2303
-
2304
-
2305
-
2306
-
2307
-
2308
-
2309
-
2310
-
2311
-
2312
-
2313
-
2314
- <h5 class="h5-returns">Returns:</h5>
2315
-
2316
-
2317
- <div class="param-desc">
2318
- - A promise resolving to the response from the pin API.
2319
- </div>
2320
-
2321
-
2322
-
2323
- <dl class="param-type">
2324
- <dt>
2325
- Type
2326
- </dt>
2327
- <dd>
2328
-
2329
- <span class="param-type">Promise.&lt;Object></span>
2330
-
2331
-
2332
-
2333
- </dd>
2334
- </dl>
2335
-
2336
-
2337
-
2338
-
2339
-
2340
-
2341
-
2342
-
2343
-
2344
-
2345
- <h4 class="name" id=".recordUserActivity"><span class="type-signature type-signature-static">(static) </span>recordUserActivity<span class="signature">(payload)</span><span class="type-signature"> &rarr; {Promise.&lt;Object>}</span></h4>
2346
-
2347
-
2348
-
2349
-
2350
-
2351
-
2352
- <dl class="details">
2353
-
2354
- <dt class="tag-description">Description:</dt>
2355
- <dd class="tag-description"><ul class="dummy"><li>Records a new user activity in the system.</li></ul></dd>
2356
-
2357
-
2358
-
2359
- <dt class="tag-source">Source:</dt>
2360
- <dd class="tag-source"><ul class="dummy"><li>
2361
- <a href="userActivity.js.html">userActivity.js</a>, <a href="userActivity.js.html#line919">line 919</a>
2362
- </li></ul></dd>
2363
-
2364
-
2365
-
2366
-
2367
-
2368
-
2369
-
2370
-
2371
-
2372
-
2373
-
2374
-
2375
-
2376
-
2377
-
2378
-
2379
-
2380
-
2381
-
2382
-
2383
-
2384
-
2385
-
2386
-
2387
-
2388
-
2389
-
2390
-
2391
-
2392
-
2393
-
2394
- </dl>
2395
-
2396
-
2397
-
2398
-
2399
-
2400
-
2401
-
2402
-
2403
-
2404
-
2405
-
2406
- <h5 class="h5-examples">Example</h5>
2407
-
2408
- <pre class="prettyprint"><code>recordUserActivity({
2409
- user_id: 123,
2410
- action: 'start',
2411
- brand: 'pianote',
2412
- type: 'lesson',
2413
- content_id: 4561,
2414
- date: '2025-05-15'
2415
- }).then(response => console.log(response))
2416
- .catch(error => console.error(error));</code></pre>
2417
-
2418
-
2419
-
2420
-
2421
- <h5 class="h5-parameters">Parameters:</h5>
2422
-
2423
-
2424
- <table class="params">
2425
- <thead>
2426
- <tr>
2427
-
2428
- <th>Name</th>
2429
-
2430
-
2431
- <th>Type</th>
2432
-
2433
-
2434
-
2435
-
2436
-
2437
- <th class="last">Description</th>
2438
- </tr>
2439
- </thead>
2440
-
2441
- <tbody>
2442
-
2443
-
2444
- <tr>
2445
-
2446
- <td class="name"><code>payload</code></td>
2447
-
2448
-
2449
- <td class="type">
2450
-
2451
-
2452
- <span class="param-type">Object</span>
2453
-
2454
-
2455
-
2456
-
2457
- </td>
2458
-
2459
-
2460
-
2461
-
2462
-
2463
- <td class="description last">The data representing the user activity.
2464
- <h6>Properties</h6>
2465
-
2466
-
2467
- <table class="params">
2468
- <thead>
2469
- <tr>
2470
-
2471
- <th>Name</th>
2472
-
2473
-
2474
- <th>Type</th>
2475
-
2476
-
2477
-
2478
-
2479
-
2480
- <th class="last">Description</th>
2481
- </tr>
2482
- </thead>
2483
-
2484
- <tbody>
2485
-
2486
-
2487
- <tr>
2488
-
2489
- <td class="name"><code>user_id</code></td>
2490
-
2491
-
2492
- <td class="type">
2493
-
2494
-
2495
- <span class="param-type">number</span>
2496
-
2497
-
2498
-
2499
-
2500
- </td>
2501
-
2502
-
2503
-
2504
-
2505
-
2506
- <td class="description last">The ID of the user.</td>
2507
- </tr>
2508
-
2509
-
2510
-
2511
- <tr>
2512
-
2513
- <td class="name"><code>action</code></td>
2514
-
2515
-
2516
- <td class="type">
2517
-
2518
-
2519
- <span class="param-type">string</span>
2520
-
2521
-
2522
-
2523
-
2524
- </td>
2525
-
2526
-
2527
-
2528
-
2529
-
2530
- <td class="description last">The type of action (e.g., 'start', 'complete', 'comment', etc.).</td>
2531
- </tr>
2532
-
2533
-
2534
-
2535
- <tr>
2536
-
2537
- <td class="name"><code>brand</code></td>
2538
-
2539
-
2540
- <td class="type">
2541
-
2542
-
2543
- <span class="param-type">string</span>
2544
-
2545
-
2546
-
2547
-
2548
- </td>
2549
-
2550
-
2551
-
2552
-
2553
-
2554
- <td class="description last">The brand associated with the activity.</td>
2555
- </tr>
2556
-
2557
-
2558
-
2559
- <tr>
2560
-
2561
- <td class="name"><code>type</code></td>
2562
-
2563
-
2564
- <td class="type">
2565
-
2566
-
2567
- <span class="param-type">string</span>
2568
-
2569
-
2570
-
2571
-
2572
- </td>
2573
-
2574
-
2575
-
2576
-
2577
-
2578
- <td class="description last">The content type (e.g., 'lesson', 'song', etc.).</td>
2579
- </tr>
2580
-
2581
-
2582
-
2583
- <tr>
2584
-
2585
- <td class="name"><code>content_id</code></td>
2586
-
2587
-
2588
- <td class="type">
2589
-
2590
-
2591
- <span class="param-type">number</span>
2592
-
2593
-
2594
-
2595
-
2596
- </td>
2597
-
2598
-
2599
-
2600
-
2601
-
2602
- <td class="description last">The ID of the related content.</td>
2603
- </tr>
2604
-
2605
-
2606
-
2607
- <tr>
2608
-
2609
- <td class="name"><code>date</code></td>
2610
-
2611
-
2612
- <td class="type">
2613
-
2614
-
2615
- <span class="param-type">string</span>
2616
-
2617
-
2618
-
2619
-
2620
- </td>
2621
-
2622
-
2623
-
2624
-
2625
-
2626
- <td class="description last">The date of the activity (ISO format).</td>
2627
- </tr>
2628
-
2629
-
2630
- </tbody>
2631
- </table>
2632
-
2633
- </td>
2634
- </tr>
2635
-
2636
-
2637
- </tbody>
2638
- </table>
2639
-
2640
-
2641
-
2642
-
2643
-
2644
-
2645
-
2646
-
2647
-
2648
-
2649
-
2650
-
2651
-
2652
-
2653
-
2654
-
2655
- <h5 class="h5-returns">Returns:</h5>
2656
-
2657
-
2658
- <div class="param-desc">
2659
- - A promise that resolves to the API response after recording the activity.
2660
- </div>
2661
-
2662
-
2663
-
2664
- <dl class="param-type">
2665
- <dt>
2666
- Type
2667
- </dt>
2668
- <dd>
2669
-
2670
- <span class="param-type">Promise.&lt;Object></span>
2671
-
2672
-
2673
-
2674
- </dd>
2675
- </dl>
2676
-
2677
-
2678
-
2679
-
2680
-
2681
-
2682
-
2683
-
2684
-
2685
-
2686
- <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>
2687
-
2688
-
2689
-
2690
-
2691
-
2692
-
2693
- <dl class="details">
2694
-
2695
- <dt class="tag-description">Description:</dt>
2696
- <dd class="tag-description"><ul class="dummy"><li>Records user practice data and updates both the remote and local activity context.</li></ul></dd>
2697
-
2698
-
2699
-
2700
- <dt class="tag-source">Source:</dt>
2701
- <dd class="tag-source"><ul class="dummy"><li>
2702
- <a href="userActivity.js.html">userActivity.js</a>, <a href="userActivity.js.html#line298">line 298</a>
2703
- </li></ul></dd>
2704
-
2705
-
2706
-
2707
-
2708
-
2709
-
2710
-
2711
-
2712
-
2713
-
2714
-
2715
-
2716
-
2717
-
2718
-
2719
-
2720
-
2721
-
2722
-
2723
-
2724
-
2725
-
2726
-
2727
-
2728
-
2729
-
2730
-
2731
-
2732
-
2733
-
2734
-
2735
- </dl>
2736
-
2737
-
2738
-
2739
-
2740
-
2741
-
2742
-
2743
-
2744
-
2745
-
2746
-
2747
- <h5 class="h5-examples">Examples</h5>
2748
-
2749
- <pre class="prettyprint"><code>// Record an auto practice session with content ID
2750
- recordUserPractice({ content_id: 123, duration_seconds: 300 })
2751
- .then(response => console.log(response))
2752
- .catch(error => console.error(error));</code></pre>
2753
-
2754
- <pre class="prettyprint"><code>// Record a custom practice session with additional details
2755
- recordUserPractice({
2756
- duration_seconds: 600,
2757
- auto: false,
2758
- category_id: 5,
2759
- title: "Guitar Warm-up",
2760
- thumbnail_url: "https://example.com/thumbnail.jpg",
2761
- instrument_id: 1,
2762
- instrument_id: 2,
2763
- })
2764
- .then(response => console.log(response))
2765
- .catch(error => console.error(error));</code></pre>
2766
-
2767
-
2768
-
2769
-
2770
- <h5 class="h5-parameters">Parameters:</h5>
2771
-
2772
-
2773
- <table class="params">
2774
- <thead>
2775
- <tr>
2776
-
2777
- <th>Name</th>
2778
-
2779
-
2780
- <th>Type</th>
2781
-
2782
-
2783
-
2784
-
2785
-
2786
- <th class="last">Description</th>
2787
- </tr>
2788
- </thead>
2789
-
2790
- <tbody>
2791
-
2792
-
2793
- <tr>
2794
-
2795
- <td class="name"><code>practiceDetails</code></td>
2796
-
2797
-
2798
- <td class="type">
2799
-
2800
-
2801
- <span class="param-type">Object</span>
2802
-
2803
-
2804
-
2805
-
2806
- </td>
2807
-
2808
-
2809
-
2810
-
2811
-
2812
- <td class="description last">The details of the practice session.
2813
- <h6>Properties</h6>
2814
-
2815
-
2816
- <table class="params">
2817
- <thead>
2818
- <tr>
2819
-
2820
- <th>Name</th>
2821
-
2822
-
2823
- <th>Type</th>
2824
-
2825
-
2826
- <th>Attributes</th>
2827
-
2828
-
2829
-
2830
- <th>Default</th>
2831
-
2832
-
2833
- <th class="last">Description</th>
2834
- </tr>
2835
- </thead>
2836
-
2837
- <tbody>
2838
-
2839
-
2840
- <tr>
2841
-
2842
- <td class="name"><code>duration_seconds</code></td>
2843
-
2844
-
2845
- <td class="type">
2846
-
2847
-
2848
- <span class="param-type">number</span>
2849
-
2850
-
2851
-
2852
-
2853
- </td>
2854
-
2855
-
2856
- <td class="attributes">
2857
-
2858
-
2859
-
2860
-
2861
-
2862
- </td>
2863
-
2864
-
2865
-
2866
- <td class="default">
2867
-
2868
- </td>
2869
-
2870
-
2871
- <td class="description last">The duration of the practice session in seconds.</td>
2872
- </tr>
2873
-
2874
-
2875
-
2876
- <tr>
2877
-
2878
- <td class="name"><code>auto</code></td>
2879
-
2880
-
2881
- <td class="type">
2882
-
2883
-
2884
- <span class="param-type">boolean</span>
2885
-
2886
-
2887
-
2888
-
2889
- </td>
2890
-
2891
-
2892
- <td class="attributes">
2893
-
2894
- &lt;optional><br>
2895
-
2896
-
2897
-
2898
-
2899
-
2900
- </td>
2901
-
2902
-
2903
-
2904
- <td class="default">
2905
-
2906
- <code>true</code>
2907
-
2908
- </td>
2909
-
2910
-
2911
- <td class="description last">Whether the session was automatically logged.</td>
2912
- </tr>
2913
-
2914
-
2915
-
2916
- <tr>
2917
-
2918
- <td class="name"><code>content_id</code></td>
2919
-
2920
-
2921
- <td class="type">
2922
-
2923
-
2924
- <span class="param-type">number</span>
2925
-
2926
-
2927
-
2928
-
2929
- </td>
2930
-
2931
-
2932
- <td class="attributes">
2933
-
2934
- &lt;optional><br>
2935
-
2936
-
2937
-
2938
-
2939
-
2940
- </td>
2941
-
2942
-
2943
-
2944
- <td class="default">
2945
-
2946
- </td>
2947
-
2948
-
2949
- <td class="description last">The ID of the practiced content (if available).</td>
2950
- </tr>
2951
-
2952
-
2953
-
2954
- <tr>
2955
-
2956
- <td class="name"><code>category_id</code></td>
2957
-
2958
-
2959
- <td class="type">
2960
-
2961
-
2962
- <span class="param-type">number</span>
2963
-
2964
-
2965
-
2966
-
2967
- </td>
2968
-
2969
-
2970
- <td class="attributes">
2971
-
2972
- &lt;optional><br>
2973
-
2974
-
2975
-
2976
-
2977
-
2978
- </td>
2979
-
2980
-
2981
-
2982
- <td class="default">
2983
-
2984
- </td>
2985
-
2986
-
2987
- <td class="description last">The ID of the associated category (if available).</td>
2988
- </tr>
2989
-
2990
-
2991
-
2992
- <tr>
2993
-
2994
- <td class="name"><code>title</code></td>
2995
-
2996
-
2997
- <td class="type">
2998
-
2999
-
3000
- <span class="param-type">string</span>
3001
-
3002
-
3003
-
3004
-
3005
- </td>
3006
-
3007
-
3008
- <td class="attributes">
3009
-
3010
- &lt;optional><br>
3011
-
3012
-
3013
-
3014
-
3015
-
3016
- </td>
3017
-
3018
-
3019
-
3020
- <td class="default">
3021
-
3022
- </td>
3023
-
3024
-
3025
- <td class="description last">The title of the practice session (max 64 characters).</td>
3026
- </tr>
3027
-
3028
-
3029
-
3030
- <tr>
3031
-
3032
- <td class="name"><code>thumbnail_url</code></td>
3033
-
3034
-
3035
- <td class="type">
3036
-
3037
-
3038
- <span class="param-type">string</span>
3039
-
3040
-
3041
-
3042
-
3043
- </td>
3044
-
3045
-
3046
- <td class="attributes">
3047
-
3048
- &lt;optional><br>
3049
-
3050
-
3051
-
3052
-
3053
-
3054
- </td>
3055
-
3056
-
3057
-
3058
- <td class="default">
3059
-
3060
- </td>
3061
-
3062
-
3063
- <td class="description last">The URL of the session's thumbnail (max 255 characters).</td>
3064
- </tr>
3065
-
3066
-
3067
- </tbody>
3068
- </table>
3069
-
3070
- </td>
3071
- </tr>
3072
-
3073
-
3074
- </tbody>
3075
- </table>
3076
-
3077
-
3078
-
3079
-
3080
-
3081
-
3082
-
3083
-
3084
-
3085
-
3086
-
3087
-
3088
-
3089
-
3090
-
3091
-
3092
- <h5 class="h5-returns">Returns:</h5>
3093
-
3094
-
3095
- <div class="param-desc">
3096
- - A promise that resolves to the response from logging the user practice.
3097
- </div>
3098
-
3099
-
3100
-
3101
- <dl class="param-type">
3102
- <dt>
3103
- Type
3104
- </dt>
3105
- <dd>
3106
-
3107
- <span class="param-type">Promise.&lt;Object></span>
3108
-
3109
-
3110
-
3111
- </dd>
3112
- </dl>
3113
-
3114
-
3115
-
3116
-
3117
-
3118
-
3119
-
3120
-
3121
-
3122
-
3123
- <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>
3124
-
3125
-
3126
-
3127
-
3128
-
3129
-
3130
- <dl class="details">
3131
-
3132
- <dt class="tag-description">Description:</dt>
3133
- <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>
3134
-
3135
-
3136
-
3137
- <dt class="tag-source">Source:</dt>
3138
- <dd class="tag-source"><ul class="dummy"><li>
3139
- <a href="userActivity.js.html">userActivity.js</a>, <a href="userActivity.js.html#line374">line 374</a>
3140
- </li></ul></dd>
3141
-
3142
-
3143
-
3144
-
3145
-
3146
-
3147
-
3148
-
3149
-
3150
-
3151
-
3152
-
3153
-
3154
-
3155
-
3156
-
3157
-
3158
-
3159
-
3160
-
3161
-
3162
-
3163
-
3164
-
3165
-
3166
-
3167
-
3168
-
3169
-
3170
-
3171
-
3172
- </dl>
3173
-
3174
-
3175
-
3176
-
3177
-
3178
-
3179
-
3180
-
3181
-
3182
-
3183
-
3184
- <h5 class="h5-examples">Example</h5>
3185
-
3186
- <pre class="prettyprint"><code>// Remove a practice session with ID 123
3187
- removeUserPractice(123)
3188
- .then(() => console.log("Practice session removed successfully"))
3189
- .catch(error => console.error(error));</code></pre>
3190
-
3191
-
3192
-
3193
-
3194
- <h5 class="h5-parameters">Parameters:</h5>
3195
-
3196
-
3197
- <table class="params">
3198
- <thead>
3199
- <tr>
3200
-
3201
- <th>Name</th>
3202
-
3203
-
3204
- <th>Type</th>
3205
-
3206
-
3207
-
3208
-
3209
-
3210
- <th class="last">Description</th>
3211
- </tr>
3212
- </thead>
3213
-
3214
- <tbody>
3215
-
3216
-
3217
- <tr>
3218
-
3219
- <td class="name"><code>id</code></td>
3220
-
3221
-
3222
- <td class="type">
3223
-
3224
-
3225
- <span class="param-type">number</span>
3226
-
3227
-
3228
-
3229
-
3230
- </td>
3231
-
3232
-
3233
-
3234
-
3235
-
3236
- <td class="description last">The unique identifier of the practice session to be removed.</td>
3237
- </tr>
3238
-
3239
-
3240
- </tbody>
3241
- </table>
3242
-
3243
-
3244
-
3245
-
3246
-
3247
-
3248
-
3249
-
3250
-
3251
-
3252
-
3253
-
3254
-
3255
-
3256
-
3257
-
3258
- <h5 class="h5-returns">Returns:</h5>
3259
-
3260
-
3261
- <div class="param-desc">
3262
- - A promise that resolves once the practice session is removed.
3263
- </div>
3264
-
3265
-
3266
-
3267
- <dl class="param-type">
3268
- <dt>
3269
- Type
3270
- </dt>
3271
- <dd>
3272
-
3273
- <span class="param-type">Promise.&lt;void></span>
3274
-
3275
-
3276
-
3277
- </dd>
3278
- </dl>
3279
-
3280
-
3281
-
3282
-
3283
-
3284
-
3285
-
3286
-
3287
-
3288
-
3289
- <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>
3290
-
3291
-
3292
-
3293
-
3294
-
3295
-
3296
- <dl class="details">
3297
-
3298
- <dt class="tag-description">Description:</dt>
3299
- <dd class="tag-description"><ul class="dummy"><li>Restores deleted practice sessions for a specific date.
3300
-
3301
- Sends a PUT request to restore any previously deleted practices for a given date.
3302
- If restored practices are returned, they are added back into the local context.</li></ul></dd>
3303
-
3304
-
3305
-
3306
- <dt class="tag-source">Source:</dt>
3307
- <dd class="tag-source"><ul class="dummy"><li>
3308
- <a href="userActivity.js.html">userActivity.js</a>, <a href="userActivity.js.html#line490">line 490</a>
3309
- </li></ul></dd>
3310
-
3311
-
3312
-
3313
-
3314
-
3315
-
3316
-
3317
-
3318
-
3319
-
3320
-
3321
-
3322
-
3323
-
3324
-
3325
-
3326
-
3327
-
3328
-
3329
-
3330
-
3331
-
3332
-
3333
-
3334
-
3335
-
3336
-
3337
-
3338
-
3339
-
3340
-
3341
- </dl>
3342
-
3343
-
3344
-
3345
-
3346
-
3347
-
3348
-
3349
-
3350
-
3351
-
3352
-
3353
- <h5 class="h5-examples">Example</h5>
3354
-
3355
- <pre class="prettyprint"><code>// Restore practice sessions deleted on April 10, 2025
3356
- restorePracticeSession("2025-04-10")
3357
- .then(response => console.log("Practice session restored:", response))
3358
- .catch(error => console.error("Restore failed:", error));</code></pre>
3359
-
3360
-
3361
-
3362
-
3363
- <h5 class="h5-parameters">Parameters:</h5>
3364
-
3365
-
3366
- <table class="params">
3367
- <thead>
3368
- <tr>
3369
-
3370
- <th>Name</th>
3371
-
3372
-
3373
- <th>Type</th>
3374
-
3375
-
3376
-
3377
-
3378
-
3379
- <th class="last">Description</th>
3380
- </tr>
3381
- </thead>
3382
-
3383
- <tbody>
3384
-
3385
-
3386
- <tr>
3387
-
3388
- <td class="name"><code>date</code></td>
3389
-
3390
-
3391
- <td class="type">
3392
-
3393
-
3394
- <span class="param-type">string</span>
3395
-
3396
-
3397
-
3398
-
3399
- </td>
3400
-
3401
-
3402
-
3403
-
3404
-
3405
- <td class="description last">The date (in `YYYY-MM-DD` format) for which deleted practice sessions should be restored.</td>
3406
- </tr>
3407
-
3408
-
3409
- </tbody>
3410
- </table>
3411
-
3412
-
3413
-
3414
-
3415
-
3416
-
3417
-
3418
-
3419
-
3420
-
3421
-
3422
-
3423
-
3424
-
3425
-
3426
-
3427
- <h5 class="h5-returns">Returns:</h5>
3428
-
3429
-
3430
- <div class="param-desc">
3431
- - The response object from the API, containing practices for selected date.
3432
- </div>
3433
-
3434
-
3435
-
3436
- <dl class="param-type">
3437
- <dt>
3438
- Type
3439
- </dt>
3440
- <dd>
3441
-
3442
- <span class="param-type">Promise.&lt;Object></span>
3443
-
3444
-
3445
-
3446
- </dd>
3447
- </dl>
3448
-
3449
-
3450
-
3451
-
3452
-
3453
-
3454
-
3455
-
3456
-
3457
-
3458
- <h4 class="name" id=".restoreUserActivity"><span class="type-signature type-signature-static">(static) </span>restoreUserActivity<span class="signature">(id)</span><span class="type-signature"> &rarr; {Promise.&lt;Object>}</span></h4>
3459
-
3460
-
3461
-
3462
-
3463
-
3464
-
3465
- <dl class="details">
3466
-
3467
- <dt class="tag-description">Description:</dt>
3468
- <dd class="tag-description"><ul class="dummy"><li>Restores a specific user activity by its ID.</li></ul></dd>
3469
-
3470
-
3471
-
3472
- <dt class="tag-source">Source:</dt>
3473
- <dd class="tag-source"><ul class="dummy"><li>
3474
- <a href="userActivity.js.html">userActivity.js</a>, <a href="userActivity.js.html#line951">line 951</a>
3475
- </li></ul></dd>
3476
-
3477
-
3478
-
3479
-
3480
-
3481
-
3482
-
3483
-
3484
-
3485
-
3486
-
3487
-
3488
-
3489
-
3490
-
3491
-
3492
-
3493
-
3494
-
3495
-
3496
-
3497
-
3498
-
3499
-
3500
-
3501
-
3502
-
3503
-
3504
-
3505
-
3506
-
3507
- </dl>
3508
-
3509
-
3510
-
3511
-
3512
-
3513
-
3514
-
3515
-
3516
-
3517
-
3518
-
3519
- <h5 class="h5-examples">Example</h5>
3520
-
3521
- <pre class="prettyprint"><code>restoreUserActivity(789)
3522
- .then(response => console.log('Restored:', response))
3523
- .catch(error => console.error(error));</code></pre>
3524
-
3525
-
3526
-
3527
-
3528
- <h5 class="h5-parameters">Parameters:</h5>
3529
-
3530
-
3531
- <table class="params">
3532
- <thead>
3533
- <tr>
3534
-
3535
- <th>Name</th>
3536
-
3537
-
3538
- <th>Type</th>
3539
-
3540
-
3541
-
3542
-
3543
-
3544
- <th class="last">Description</th>
3545
- </tr>
3546
- </thead>
3547
-
3548
- <tbody>
3549
-
3550
-
3551
- <tr>
3552
-
3553
- <td class="name"><code>id</code></td>
3554
-
3555
-
3556
- <td class="type">
3557
-
3558
-
3559
- <span class="param-type">number</span>
3560
- |
3561
-
3562
- <span class="param-type">string</span>
3563
-
3564
-
3565
-
3566
-
3567
- </td>
3568
-
3569
-
3570
-
3571
-
3572
-
3573
- <td class="description last">The ID of the user activity to restore.</td>
3574
- </tr>
3575
-
3576
-
3577
- </tbody>
3578
- </table>
3579
-
3580
-
3581
-
3582
-
3583
-
3584
-
3585
-
3586
-
3587
-
3588
-
3589
-
3590
-
3591
-
3592
-
3593
-
3594
-
3595
- <h5 class="h5-returns">Returns:</h5>
3596
-
3597
-
3598
- <div class="param-desc">
3599
- - A promise that resolves to the API response after restoration.
3600
- </div>
3601
-
3602
-
3603
-
3604
- <dl class="param-type">
3605
- <dt>
3606
- Type
3607
- </dt>
3608
- <dd>
3609
-
3610
- <span class="param-type">Promise.&lt;Object></span>
3611
-
3612
-
3613
-
3614
- </dd>
3615
- </dl>
3616
-
3617
-
3618
-
3619
-
3620
-
3621
-
3622
-
3623
-
3624
-
3625
-
3626
- <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>
3627
-
3628
-
3629
-
3630
-
3631
-
3632
-
3633
- <dl class="details">
3634
-
3635
- <dt class="tag-description">Description:</dt>
3636
- <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>
3637
-
3638
-
3639
-
3640
- <dt class="tag-source">Source:</dt>
3641
- <dd class="tag-source"><ul class="dummy"><li>
3642
- <a href="userActivity.js.html">userActivity.js</a>, <a href="userActivity.js.html#line409">line 409</a>
3643
- </li></ul></dd>
3644
-
3645
-
3646
-
3647
-
3648
-
3649
-
3650
-
3651
-
3652
-
3653
-
3654
-
3655
-
3656
-
3657
-
3658
-
3659
-
3660
-
3661
-
3662
-
3663
-
3664
-
3665
-
3666
-
3667
-
3668
-
3669
-
3670
-
3671
-
3672
-
3673
-
3674
-
3675
- </dl>
3676
-
3677
-
3678
-
3679
-
3680
-
3681
-
3682
-
3683
-
3684
-
3685
-
3686
-
3687
- <h5 class="h5-examples">Example</h5>
3688
-
3689
- <pre class="prettyprint"><code>// Restore a deleted practice session with ID 123
3690
- restoreUserPractice(123)
3691
- .then(response => console.log("Practice session restored:", response))
3692
- .catch(error => console.error(error));</code></pre>
3693
-
3694
-
3695
-
3696
-
3697
- <h5 class="h5-parameters">Parameters:</h5>
3698
-
3699
-
3700
- <table class="params">
3701
- <thead>
3702
- <tr>
3703
-
3704
- <th>Name</th>
3705
-
3706
-
3707
- <th>Type</th>
3708
-
3709
-
3710
-
3711
-
3712
-
3713
- <th class="last">Description</th>
3714
- </tr>
3715
- </thead>
3716
-
3717
- <tbody>
3718
-
3719
-
3720
- <tr>
3721
-
3722
- <td class="name"><code>id</code></td>
3723
-
3724
-
3725
- <td class="type">
3726
-
3727
-
3728
- <span class="param-type">number</span>
3729
-
3730
-
3731
-
3732
-
3733
- </td>
3734
-
3735
-
3736
-
3737
-
3738
-
3739
- <td class="description last">The unique identifier of the practice session to be restored.</td>
3740
- </tr>
3741
-
3742
-
3743
- </tbody>
3744
- </table>
3745
-
3746
-
3747
-
3748
-
3749
-
3750
-
3751
-
3752
-
3753
-
3754
-
3755
-
3756
-
3757
-
3758
-
3759
-
3760
-
3761
- <h5 class="h5-returns">Returns:</h5>
3762
-
3763
-
3764
- <div class="param-desc">
3765
- - A promise that resolves to the response containing the restored practice session data.
3766
- </div>
3767
-
3768
-
3769
-
3770
- <dl class="param-type">
3771
- <dt>
3772
- Type
3773
- </dt>
3774
- <dd>
3775
-
3776
- <span class="param-type">Promise.&lt;Object></span>
3777
-
3778
-
3779
-
3780
- </dd>
3781
- </dl>
3782
-
3783
-
3784
-
3785
-
3786
-
3787
-
3788
-
3789
-
3790
-
3791
-
3792
- <h4 class="name" id=".unpinProgressRow"><span class="type-signature type-signature-static">(static) </span>unpinProgressRow<span class="signature">(brand)</span><span class="type-signature"> &rarr; {Promise.&lt;Object>}</span></h4>
3793
-
3794
-
3795
-
3796
-
3797
-
3798
-
3799
- <dl class="details">
3800
-
3801
- <dt class="tag-description">Description:</dt>
3802
- <dd class="tag-description"><ul class="dummy"><li>Unpins the current pinned progress row for a user, scoped by brand.</li></ul></dd>
3803
-
3804
-
3805
-
3806
- <dt class="tag-source">Source:</dt>
3807
- <dd class="tag-source"><ul class="dummy"><li>
3808
- <a href="userActivity.js.html">userActivity.js</a>, <a href="userActivity.js.html#line1473">line 1473</a>
3809
- </li></ul></dd>
3810
-
3811
-
3812
-
3813
-
3814
-
3815
-
3816
-
3817
-
3818
-
3819
-
3820
-
3821
-
3822
-
3823
-
3824
-
3825
-
3826
-
3827
-
3828
-
3829
-
3830
-
3831
-
3832
-
3833
-
3834
-
3835
-
3836
-
3837
-
3838
-
3839
-
3840
-
3841
- </dl>
3842
-
3843
-
3844
-
3845
-
3846
-
3847
-
3848
-
3849
-
3850
-
3851
-
3852
-
3853
- <h5 class="h5-examples">Example</h5>
3854
-
3855
- <pre class="prettyprint"><code>unpinProgressRow('drumeo', 123456)
3856
- .then(response => console.log(response))
3857
- .catch(error => console.error(error));</code></pre>
3858
-
3859
-
3860
-
3861
-
3862
- <h5 class="h5-parameters">Parameters:</h5>
3863
-
3864
-
3865
- <table class="params">
3866
- <thead>
3867
- <tr>
3868
-
3869
- <th>Name</th>
3870
-
3871
-
3872
- <th>Type</th>
3873
-
3874
-
3875
-
3876
-
3877
-
3878
- <th class="last">Description</th>
3879
- </tr>
3880
- </thead>
3881
-
3882
- <tbody>
3883
-
3884
-
3885
- <tr>
3886
-
3887
- <td class="name"><code>brand</code></td>
3888
-
3889
-
3890
- <td class="type">
3891
-
3892
-
3893
- <span class="param-type">string</span>
3894
-
3895
-
3896
-
3897
-
3898
- </td>
3899
-
3900
-
3901
-
3902
-
3903
-
3904
- <td class="description last">The brand context for the unpin action.</td>
3905
- </tr>
3906
-
3907
-
3908
- </tbody>
3909
- </table>
3910
-
3911
-
3912
-
3913
-
3914
-
3915
-
3916
-
3917
-
3918
-
3919
-
3920
-
3921
-
3922
-
3923
-
3924
-
3925
-
3926
- <h5 class="h5-returns">Returns:</h5>
3927
-
3928
-
3929
- <div class="param-desc">
3930
- - A promise resolving to the response from the unpin API.
3931
- </div>
3932
-
3933
-
3934
-
3935
- <dl class="param-type">
3936
- <dt>
3937
- Type
3938
- </dt>
3939
- <dd>
3940
-
3941
- <span class="param-type">Promise.&lt;Object></span>
3942
-
3943
-
3944
-
3945
- </dd>
3946
- </dl>
3947
-
3948
-
3949
-
3950
-
3951
-
3952
-
3953
-
3954
-
3955
-
3956
-
3957
- <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>
3958
-
3959
-
3960
-
3961
-
3962
-
3963
-
3964
- <dl class="details">
3965
-
3966
- <dt class="tag-description">Description:</dt>
3967
- <dd class="tag-description"><ul class="dummy"><li>Updates existing practice notes for a specific date.</li></ul></dd>
3968
-
3969
-
3970
-
3971
- <dt class="tag-source">Source:</dt>
3972
- <dd class="tag-source"><ul class="dummy"><li>
3973
- <a href="userActivity.js.html">userActivity.js</a>, <a href="userActivity.js.html#line638">line 638</a>
3974
- </li></ul></dd>
3975
-
3976
-
3977
-
3978
-
3979
-
3980
-
3981
-
3982
-
3983
-
3984
-
3985
-
3986
-
3987
-
3988
-
3989
-
3990
-
3991
-
3992
-
3993
-
3994
-
3995
-
3996
-
3997
-
3998
-
3999
-
4000
-
4001
-
4002
-
4003
-
4004
-
4005
-
4006
- </dl>
4007
-
4008
-
4009
-
4010
-
4011
-
4012
-
4013
-
4014
-
4015
-
4016
-
4017
-
4018
- <h5 class="h5-examples">Example</h5>
4019
-
4020
- <pre class="prettyprint"><code>updatePracticeNotes({ date: '2025-04-10', notes: 'Updated: Focused on technique and timing' })
4021
- .then(response => console.log(response))
4022
- .catch(error => console.error(error));</code></pre>
4023
-
4024
-
4025
-
4026
-
4027
- <h5 class="h5-parameters">Parameters:</h5>
4028
-
4029
-
4030
- <table class="params">
4031
- <thead>
4032
- <tr>
4033
-
4034
- <th>Name</th>
4035
-
4036
-
4037
- <th>Type</th>
4038
-
4039
-
4040
-
4041
-
4042
-
4043
- <th class="last">Description</th>
4044
- </tr>
4045
- </thead>
4046
-
4047
- <tbody>
4048
-
4049
-
4050
- <tr>
4051
-
4052
- <td class="name"><code>payload</code></td>
4053
-
4054
-
4055
- <td class="type">
4056
-
4057
-
4058
- <span class="param-type">Object</span>
4059
-
4060
-
4061
-
4062
-
4063
- </td>
4064
-
4065
-
4066
-
4067
-
4068
-
4069
- <td class="description last">The data required to update practice notes.
4070
- <h6>Properties</h6>
4071
-
4072
-
4073
- <table class="params">
4074
- <thead>
4075
- <tr>
4076
-
4077
- <th>Name</th>
4078
-
4079
-
4080
- <th>Type</th>
4081
-
4082
-
4083
-
4084
-
4085
-
4086
- <th class="last">Description</th>
4087
- </tr>
4088
- </thead>
4089
-
4090
- <tbody>
4091
-
4092
-
4093
- <tr>
4094
-
4095
- <td class="name"><code>date</code></td>
4096
-
4097
-
4098
- <td class="type">
4099
-
4100
-
4101
- <span class="param-type">string</span>
4102
-
4103
-
4104
-
4105
-
4106
- </td>
4107
-
4108
-
4109
-
4110
-
4111
-
4112
- <td class="description last">The date for which to update notes (format: YYYY-MM-DD).</td>
4113
- </tr>
4114
-
4115
-
4116
-
4117
- <tr>
4118
-
4119
- <td class="name"><code>notes</code></td>
4120
-
4121
-
4122
- <td class="type">
4123
-
4124
-
4125
- <span class="param-type">string</span>
4126
-
4127
-
4128
-
4129
-
4130
- </td>
4131
-
4132
-
4133
-
4134
-
4135
-
4136
- <td class="description last">The updated notes content.</td>
4137
- </tr>
4138
-
4139
-
4140
- </tbody>
4141
- </table>
4142
-
4143
- </td>
4144
- </tr>
4145
-
4146
-
4147
- </tbody>
4148
- </table>
4149
-
4150
-
4151
-
4152
-
4153
-
4154
-
4155
-
4156
-
4157
-
4158
-
4159
-
4160
-
4161
-
4162
-
4163
-
4164
-
4165
- <h5 class="h5-returns">Returns:</h5>
4166
-
4167
-
4168
- <div class="param-desc">
4169
- - A promise that resolves to the API response after updating the notes.
4170
- </div>
4171
-
4172
-
4173
-
4174
- <dl class="param-type">
4175
- <dt>
4176
- Type
4177
- </dt>
4178
- <dd>
4179
-
4180
- <span class="param-type">Promise.&lt;Object></span>
4181
-
4182
-
4183
-
4184
- </dd>
4185
- </dl>
4186
-
4187
-
4188
-
4189
-
4190
-
4191
-
4192
-
4193
-
4194
-
4195
-
4196
- <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>
4197
-
4198
-
4199
-
4200
-
4201
-
4202
-
4203
- <dl class="details">
4204
-
4205
- <dt class="tag-description">Description:</dt>
4206
- <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>
4207
-
4208
-
4209
-
4210
- <dt class="tag-source">Source:</dt>
4211
- <dd class="tag-source"><ul class="dummy"><li>
4212
- <a href="userActivity.js.html">userActivity.js</a>, <a href="userActivity.js.html#line357">line 357</a>
4213
- </li></ul></dd>
4214
-
4215
-
4216
-
4217
-
4218
-
4219
-
4220
-
4221
-
4222
-
4223
-
4224
-
4225
-
4226
-
4227
-
4228
-
4229
-
4230
-
4231
-
4232
-
4233
-
4234
-
4235
-
4236
-
4237
-
4238
-
4239
-
4240
-
4241
-
4242
-
4243
-
4244
-
4245
- </dl>
4246
-
4247
-
4248
-
4249
-
4250
-
4251
-
4252
-
4253
-
4254
-
4255
-
4256
-
4257
- <h5 class="h5-examples">Examples</h5>
4258
-
4259
- <pre class="prettyprint"><code>// Update a practice session's duration
4260
- updateUserPractice(123, { duration_seconds: 600 })
4261
- .then(response => console.log(response))
4262
- .catch(error => console.error(error));</code></pre>
4263
-
4264
- <pre class="prettyprint"><code>// Change a practice session to manual and update its category
4265
- updateUserPractice(456, { auto: false, category_id: 8 })
4266
- .then(response => console.log(response))
4267
- .catch(error => console.error(error));</code></pre>
4268
-
4269
-
4270
-
4271
-
4272
- <h5 class="h5-parameters">Parameters:</h5>
4273
-
4274
-
4275
- <table class="params">
4276
- <thead>
4277
- <tr>
4278
-
4279
- <th>Name</th>
4280
-
4281
-
4282
- <th>Type</th>
4283
-
4284
-
4285
-
4286
-
4287
-
4288
- <th class="last">Description</th>
4289
- </tr>
4290
- </thead>
4291
-
4292
- <tbody>
4293
-
4294
-
4295
- <tr>
4296
-
4297
- <td class="name"><code>id</code></td>
4298
-
4299
-
4300
- <td class="type">
4301
-
4302
-
4303
- <span class="param-type">number</span>
4304
-
4305
-
4306
-
4307
-
4308
- </td>
4309
-
4310
-
4311
-
4312
-
4313
-
4314
- <td class="description last">The unique identifier of the practice session to update.</td>
4315
- </tr>
4316
-
4317
-
4318
-
4319
- <tr>
4320
-
4321
- <td class="name"><code>practiceDetails</code></td>
4322
-
4323
-
4324
- <td class="type">
4325
-
4326
-
4327
- <span class="param-type">Object</span>
4328
-
4329
-
4330
-
4331
-
4332
- </td>
4333
-
4334
-
4335
-
4336
-
4337
-
4338
- <td class="description last">The updated details of the practice session.
4339
- <h6>Properties</h6>
4340
-
4341
-
4342
- <table class="params">
4343
- <thead>
4344
- <tr>
4345
-
4346
- <th>Name</th>
4347
-
4348
-
4349
- <th>Type</th>
4350
-
4351
-
4352
- <th>Attributes</th>
4353
-
4354
-
4355
-
4356
-
4357
- <th class="last">Description</th>
4358
- </tr>
4359
- </thead>
4360
-
4361
- <tbody>
4362
-
4363
-
4364
- <tr>
4365
-
4366
- <td class="name"><code>duration_seconds</code></td>
4367
-
4368
-
4369
- <td class="type">
4370
-
4371
-
4372
- <span class="param-type">number</span>
4373
-
4374
-
4375
-
4376
-
4377
- </td>
4378
-
4379
-
4380
- <td class="attributes">
4381
-
4382
- &lt;optional><br>
4383
-
4384
-
4385
-
4386
-
4387
-
4388
- </td>
4389
-
4390
-
4391
-
4392
-
4393
- <td class="description last">The duration of the practice session in seconds.</td>
4394
- </tr>
4395
-
4396
-
4397
-
4398
- <tr>
4399
-
4400
- <td class="name"><code>category_id</code></td>
4401
-
4402
-
4403
- <td class="type">
4404
-
4405
-
4406
- <span class="param-type">number</span>
4407
-
4408
-
4409
-
4410
-
4411
- </td>
4412
-
4413
-
4414
- <td class="attributes">
4415
-
4416
- &lt;optional><br>
4417
-
4418
-
4419
-
4420
-
4421
-
4422
- </td>
4423
-
4424
-
4425
-
4426
-
4427
- <td class="description last">The ID of the associated category (if available).</td>
4428
- </tr>
4429
-
4430
-
4431
-
4432
- <tr>
4433
-
4434
- <td class="name"><code>title</code></td>
4435
-
4436
-
4437
- <td class="type">
4438
-
4439
-
4440
- <span class="param-type">string</span>
4441
-
4442
-
4443
-
4444
-
4445
- </td>
4446
-
4447
-
4448
- <td class="attributes">
4449
-
4450
- &lt;optional><br>
4451
-
4452
-
4453
-
4454
-
4455
-
4456
- </td>
4457
-
4458
-
4459
-
4460
-
4461
- <td class="description last">The title of the practice session (max 64 characters).</td>
4462
- </tr>
4463
-
4464
-
4465
-
4466
- <tr>
4467
-
4468
- <td class="name"><code>thumbnail_url</code></td>
4469
-
4470
-
4471
- <td class="type">
4472
-
4473
-
4474
- <span class="param-type">string</span>
4475
-
4476
-
4477
-
4478
-
4479
- </td>
4480
-
4481
-
4482
- <td class="attributes">
4483
-
4484
- &lt;optional><br>
4485
-
4486
-
4487
-
4488
-
4489
-
4490
- </td>
4491
-
4492
-
4493
-
4494
-
4495
- <td class="description last">The URL of the session's thumbnail (max 255 characters).</td>
4496
- </tr>
4497
-
4498
-
4499
- </tbody>
4500
- </table>
4501
-
4502
- </td>
4503
- </tr>
4504
-
4505
-
4506
- </tbody>
4507
- </table>
4508
-
4509
-
4510
-
4511
-
4512
-
4513
-
4514
-
4515
-
4516
-
4517
-
4518
-
4519
-
4520
-
4521
-
4522
-
4523
-
4524
- <h5 class="h5-returns">Returns:</h5>
4525
-
4526
-
4527
- <div class="param-desc">
4528
- - A promise that resolves to the response from updating the user practice.
4529
- </div>
4530
-
4531
-
4532
-
4533
- <dl class="param-type">
4534
- <dt>
4535
- Type
4536
- </dt>
4537
- <dd>
4538
-
4539
- <span class="param-type">Promise.&lt;Object></span>
4540
-
4541
-
4542
-
4543
- </dd>
4544
- </dl>
4545
-
4546
-
4547
-
4548
-
4549
-
4550
-
4551
-
4552
-
4553
-
4554
-
4555
-
4556
- </article>
4557
-
4558
- </section>
4559
-
4560
-
4561
-
4562
-
4563
-
4564
-
4565
- </div>
4566
-
4567
- <br class="clear">
4568
-
4569
- <footer>
4570
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Tue Nov 25 2025 19:26:53 GMT+0000 (Coordinated Universal Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
4571
- </footer>
4572
-
4573
- <script>prettyPrint();</script>
4574
- <script src="scripts/polyfill.js"></script>
4575
- <script src="scripts/linenumber.js"></script>
4576
-
4577
-
4578
-
4579
- </body>
4580
- </html>