musora-content-services 2.28.3 → 2.28.5

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 (62) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/docs/ContentOrganization.html +2 -2
  3. package/docs/Gamification.html +2 -2
  4. package/docs/UserManagementSystem.html +2 -2
  5. package/docs/api_types.js.html +2 -2
  6. package/docs/config.js.html +2 -2
  7. package/docs/content-org_content-org.js.html +2 -2
  8. package/docs/content-org_playlists-types.js.html +2 -2
  9. package/docs/content-org_playlists.js.html +2 -2
  10. package/docs/content.js.html +4 -4
  11. package/docs/gamification_awards.js.html +2 -2
  12. package/docs/gamification_gamification.js.html +2 -2
  13. package/docs/gamification_types.js.html +2 -2
  14. package/docs/global.html +2 -2
  15. package/docs/index.html +2 -2
  16. package/docs/module-Awards.html +2 -2
  17. package/docs/module-Config.html +2 -2
  18. package/docs/module-Content-Services-V2.html +4 -4
  19. package/docs/module-Interests.html +2 -2
  20. package/docs/module-Permissions.html +2 -2
  21. package/docs/module-Playlists.html +2 -2
  22. package/docs/module-Railcontent-Services.html +590 -2987
  23. package/docs/module-Sanity-Services.html +30 -664
  24. package/docs/module-Sessions.html +2 -2
  25. package/docs/module-UserActivity.html +21 -21
  26. package/docs/module-UserChat.html +2 -2
  27. package/docs/module-UserManagement.html +2 -2
  28. package/docs/module-UserNotifications.html +2 -2
  29. package/docs/module-UserProfile.html +2 -2
  30. package/docs/railcontent.js.html +2 -196
  31. package/docs/sanity.js.html +17 -209
  32. package/docs/userActivity.js.html +4 -3
  33. package/docs/user_chat.js.html +2 -2
  34. package/docs/user_interests.js.html +2 -2
  35. package/docs/user_management.js.html +2 -2
  36. package/docs/user_notifications.js.html +2 -2
  37. package/docs/user_permissions.js.html +2 -2
  38. package/docs/user_profile.js.html +2 -2
  39. package/docs/user_sessions.js.html +2 -2
  40. package/docs/user_types.js.html +2 -2
  41. package/docs/user_user-management-system.js.html +2 -2
  42. package/package.json +1 -1
  43. package/src/contentMetaData.js +0 -24
  44. package/src/contentTypeConfig.js +2 -41
  45. package/src/index.d.ts +0 -30
  46. package/src/index.js +1 -31
  47. package/src/services/content.js +2 -2
  48. package/src/services/railcontent.js +0 -194
  49. package/src/services/sanity.js +13 -173
  50. package/src/services/userActivity.js +0 -1
  51. package/test/live/railcontentLive.test.js +0 -7
  52. package/test/sanityQueryService.test.js +3 -55
  53. package/docs/Content-Organization.html +0 -245
  54. package/docs/UserManagement.html +0 -269
  55. package/docs/global.html#User +0 -293
  56. package/docs/module-Notifications.html +0 -1183
  57. package/docs/module-Session-Management.html +0 -575
  58. package/docs/module-User-Activity.html +0 -4410
  59. package/docs/module-User-Management.html +0 -490
  60. package/docs/module-User-Permissions.html +0 -406
  61. package/docs/types.js.html +0 -122
  62. package/docs/user_user-management.js.html +0 -78
@@ -1,4410 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
-
5
- <meta charset="utf-8">
6
- <title>User-Activity - Documentation</title>
7
-
8
-
9
- <script src="scripts/prettify/prettify.js"></script>
10
- <script src="scripts/prettify/lang-css.js"></script>
11
- <!--[if lt IE 9]>
12
- <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
13
- <![endif]-->
14
- <link type="text/css" rel="stylesheet" href="styles/prettify.css">
15
- <link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
16
- <script src="scripts/nav.js" defer></script>
17
-
18
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
19
- </head>
20
- <body>
21
-
22
- <input type="checkbox" id="nav-trigger" class="nav-trigger" />
23
- <label for="nav-trigger" class="navicon-button x">
24
- <div class="navicon"></div>
25
- </label>
26
-
27
- <label for="nav-trigger" class="overlay"></label>
28
-
29
- <nav >
30
-
31
-
32
- <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-Awards.html">Awards</a><ul class='methods'><li data-type='method'><a href="module-Awards.html#.fetchAwardsForUser">fetchAwardsForUser</a></li></ul></li><li><a href="module-Config.html">Config</a><ul class='methods'><li data-type='method'><a href="module-Config.html#.initializeService">initializeService</a></li></ul></li><li><a href="module-Content-Services-V2.html">Content-Services-V2</a><ul class='methods'><li data-type='method'><a href="module-Content-Services-V2.html#.getContentRows">getContentRows</a></li><li data-type='method'><a href="module-Content-Services-V2.html#.getNewAndUpcoming">getNewAndUpcoming</a></li><li data-type='method'><a href="module-Content-Services-V2.html#.getRecent">getRecent</a></li><li data-type='method'><a href="module-Content-Services-V2.html#.getRecommendedForYou">getRecommendedForYou</a></li><li data-type='method'><a href="module-Content-Services-V2.html#.getScheduleContentRows">getScheduleContentRows</a></li><li data-type='method'><a href="module-Content-Services-V2.html#.getTabResults">getTabResults</a></li></ul></li><li><a href="module-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-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#.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#.updatePlaylist">updatePlaylist</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#~togglePlaylistPrivate">togglePlaylistPrivate</a></li><li data-type='method'><a href="module-Playlists.html#~unlikePlaylist">unlikePlaylist</a></li></ul></li><li><a href="module-Railcontent-Services.html">Railcontent-Services</a><ul class='methods'><li data-type='method'><a href="module-Railcontent-Services.html#.assignModeratorToComment">assignModeratorToComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.closeComment">closeComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.createComment">createComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.deleteComment">deleteComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.editComment">editComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchAllCompletedStates">fetchAllCompletedStates</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchCarouselCardData">fetchCarouselCardData</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchChallengeIndexMetadata">fetchChallengeIndexMetadata</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchChallengeLessonData">fetchChallengeLessonData</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchChallengeMetadata">fetchChallengeMetadata</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchChallengeUserActiveChallenges">fetchChallengeUserActiveChallenges</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchCommentRelies">fetchCommentRelies</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchComments">fetchComments</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchCompletedChallenges">fetchCompletedChallenges</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchCompletedContent">fetchCompletedContent</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchCompletedState">fetchCompletedState</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchContentInProgress">fetchContentInProgress</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchContentPageUserData">fetchContentPageUserData</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchNextContentDataForParent">fetchNextContentDataForParent</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchOwnedChallenges">fetchOwnedChallenges</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.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#.fetchUserChallengeProgress">fetchUserChallengeProgress</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchUserPracticeNotes">fetchUserPracticeNotes</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.likeComment">likeComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.openComment">openComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.postChallengesCommunityNotification">postChallengesCommunityNotification</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.postChallengesEnroll">postChallengesEnroll</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.postChallengesEnrollmentNotification">postChallengesEnrollmentNotification</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.postChallengesHideCompletedBanner">postChallengesHideCompletedBanner</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.postChallengesLeave">postChallengesLeave</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.postChallengesSetStartDate">postChallengesSetStartDate</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.postChallengesSoloNotification">postChallengesSoloNotification</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.postChallengesUnlock">postChallengesUnlock</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.replyToComment">replyToComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.reportComment">reportComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.setStudentViewForUser">setStudentViewForUser</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.unassignModeratorToComment">unassignModeratorToComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.unlikeComment">unlikeComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#~fetchLastInteractedChild">fetchLastInteractedChild</a></li></ul></li><li><a href="module-Sanity-Services.html">Sanity-Services</a><ul class='methods'><li data-type='method'><a href="module-Sanity-Services.html#.fetchAll">fetchAll</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchAllFilterOptions">fetchAllFilterOptions</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchAllPacks">fetchAllPacks</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchArtistLessons">fetchArtistLessons</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchArtists">fetchArtists</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchByRailContentId">fetchByRailContentId</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchByRailContentIds">fetchByRailContentIds</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchByReference">fetchByReference</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchCoachLessons">fetchCoachLessons</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchComingSoon">fetchComingSoon</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchCommentModContentData">fetchCommentModContentData</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchFoundation">fetchFoundation</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchGenreLessons">fetchGenreLessons</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchLeaving">fetchLeaving</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchLessonContent">fetchLessonContent</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchLessonsFeaturingThisContent">fetchLessonsFeaturingThisContent</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMetadata">fetchMetadata</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMethod">fetchMethod</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMethodChildren">fetchMethodChildren</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMethodChildrenIds">fetchMethodChildrenIds</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMethodPreviousNextLesson">fetchMethodPreviousNextLesson</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchNewReleases">fetchNewReleases</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchNextPreviousLesson">fetchNextPreviousLesson</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchOtherSongVersions">fetchOtherSongVersions</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchPackAll">fetchPackAll</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchPackData">fetchPackData</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchParentForDownload">fetchParentForDownload</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchRelatedLessons">fetchRelatedLessons</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchRelatedRecommendedContent">fetchRelatedRecommendedContent</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchRelatedSongs">fetchRelatedSongs</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchReturning">fetchReturning</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchSanity">fetchSanity</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchScheduledReleases">fetchScheduledReleases</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchShowsData">fetchShowsData</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchSongArtistCount">fetchSongArtistCount</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchSongById">fetchSongById</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchUpcomingEvents">fetchUpcomingEvents</a></li><li data-type='method'><a href="module-Sanity-Services.html#.jumpToContinueContent">jumpToContinueContent</a></li><li data-type='method'><a href="module-Sanity-Services.html#~fetchRelatedByLicense">fetchRelatedByLicense</a></li><li data-type='method'><a href="module-Sanity-Services.html#~getNextAndPreviousQuarterDates">getNextAndPreviousQuarterDates</a></li><li data-type='method'><a href="module-Sanity-Services.html#~getQueryFromPage">getQueryFromPage</a></li><li data-type='method'><a href="module-Sanity-Services.html#~handleCustomFetchAll">handleCustomFetchAll</a></li></ul></li><li><a href="module-Sessions.html">Sessions</a><ul class='methods'><li data-type='method'><a href="module-Sessions.html#.login">login</a></li><li data-type='method'><a href="module-Sessions.html#.logout">logout</a></li></ul></li><li><a href="module-User-Activity.html">User-Activity</a><ul class='methods'><li data-type='method'><a href="module-User-Activity.html#.calculateLongestStreaks">calculateLongestStreaks</a></li><li data-type='method'><a href="module-User-Activity.html#.createPracticeNotes">createPracticeNotes</a></li><li data-type='method'><a href="module-User-Activity.html#.deletePracticeSession">deletePracticeSession</a></li><li data-type='method'><a href="module-User-Activity.html#.deleteUserActivity">deleteUserActivity</a></li><li data-type='method'><a href="module-User-Activity.html#.getPracticeNotes">getPracticeNotes</a></li><li data-type='method'><a href="module-User-Activity.html#.getPracticeSessions">getPracticeSessions</a></li><li data-type='method'><a href="module-User-Activity.html#.getProgressRows">getProgressRows</a></li><li data-type='method'><a href="module-User-Activity.html#.getRecentActivity">getRecentActivity</a></li><li data-type='method'><a href="module-User-Activity.html#.getUserMonthlyStats">getUserMonthlyStats</a></li><li data-type='method'><a href="module-User-Activity.html#.getUserWeeklyStats">getUserWeeklyStats</a></li><li data-type='method'><a href="module-User-Activity.html#.pinProgressRow">pinProgressRow</a></li><li data-type='method'><a href="module-User-Activity.html#.recordUserActivity">recordUserActivity</a></li><li data-type='method'><a href="module-User-Activity.html#.recordUserPractice">recordUserPractice</a></li><li data-type='method'><a href="module-User-Activity.html#.removeUserPractice">removeUserPractice</a></li><li data-type='method'><a href="module-User-Activity.html#.restorePracticeSession">restorePracticeSession</a></li><li data-type='method'><a href="module-User-Activity.html#.restoreUserPractice">restoreUserPractice</a></li><li data-type='method'><a href="module-User-Activity.html#.unpinProgressRow">unpinProgressRow</a></li><li data-type='method'><a href="module-User-Activity.html#.updatePracticeNotes">updatePracticeNotes</a></li><li data-type='method'><a href="module-User-Activity.html#.updateUserPractice">updateUserPractice</a></li></ul></li><li><a href="module-UserManagement.html">UserManagement</a><ul class='methods'><li data-type='method'><a href="module-UserManagement.html#.blockUser">blockUser</a></li><li data-type='method'><a href="module-UserManagement.html#.deletePicture">deletePicture</a></li><li data-type='method'><a href="module-UserManagement.html#.unblockUser">unblockUser</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-UserProfile.html">UserProfile</a><ul class='methods'><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="Gamification.html">Gamification</a></li><li><a href="UserManagementSystem.html">UserManagementSystem</a></li></ul><h3><a href="global.html">Global</a></h3>
33
-
34
- </nav>
35
-
36
- <div id="main">
37
-
38
- <h1 class="page-title">User-Activity</h1>
39
-
40
-
41
-
42
-
43
-
44
-
45
-
46
- <section>
47
-
48
- <header>
49
-
50
-
51
-
52
- </header>
53
-
54
- <article>
55
-
56
- <div class="container-overview">
57
-
58
-
59
-
60
-
61
-
62
- </div>
63
-
64
-
65
-
66
-
67
-
68
-
69
-
70
-
71
-
72
-
73
-
74
-
75
-
76
-
77
-
78
-
79
-
80
- <h3 class="subsection-title">Methods</h3>
81
-
82
-
83
-
84
-
85
-
86
-
87
- <h4 class="name" id=".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#line732">line 732</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#line570">line 570</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#line421">line 421</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#line881">line 881</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#line534">line 534</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#line504">line 504</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#line898">line 898</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#line553">line 553</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#line135">line 135</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#line79">line 79</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#line1208">line 1208</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#line865">line 865</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#line271">line 271</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
- })
2762
- .then(response => console.log(response))
2763
- .catch(error => console.error(error));</code></pre>
2764
-
2765
-
2766
-
2767
-
2768
- <h5 class="h5-parameters">Parameters:</h5>
2769
-
2770
-
2771
- <table class="params">
2772
- <thead>
2773
- <tr>
2774
-
2775
- <th>Name</th>
2776
-
2777
-
2778
- <th>Type</th>
2779
-
2780
-
2781
-
2782
-
2783
-
2784
- <th class="last">Description</th>
2785
- </tr>
2786
- </thead>
2787
-
2788
- <tbody>
2789
-
2790
-
2791
- <tr>
2792
-
2793
- <td class="name"><code>practiceDetails</code></td>
2794
-
2795
-
2796
- <td class="type">
2797
-
2798
-
2799
- <span class="param-type">Object</span>
2800
-
2801
-
2802
-
2803
-
2804
- </td>
2805
-
2806
-
2807
-
2808
-
2809
-
2810
- <td class="description last">The details of the practice session.
2811
- <h6>Properties</h6>
2812
-
2813
-
2814
- <table class="params">
2815
- <thead>
2816
- <tr>
2817
-
2818
- <th>Name</th>
2819
-
2820
-
2821
- <th>Type</th>
2822
-
2823
-
2824
- <th>Attributes</th>
2825
-
2826
-
2827
-
2828
- <th>Default</th>
2829
-
2830
-
2831
- <th class="last">Description</th>
2832
- </tr>
2833
- </thead>
2834
-
2835
- <tbody>
2836
-
2837
-
2838
- <tr>
2839
-
2840
- <td class="name"><code>duration_seconds</code></td>
2841
-
2842
-
2843
- <td class="type">
2844
-
2845
-
2846
- <span class="param-type">number</span>
2847
-
2848
-
2849
-
2850
-
2851
- </td>
2852
-
2853
-
2854
- <td class="attributes">
2855
-
2856
-
2857
-
2858
-
2859
-
2860
- </td>
2861
-
2862
-
2863
-
2864
- <td class="default">
2865
-
2866
- </td>
2867
-
2868
-
2869
- <td class="description last">The duration of the practice session in seconds.</td>
2870
- </tr>
2871
-
2872
-
2873
-
2874
- <tr>
2875
-
2876
- <td class="name"><code>auto</code></td>
2877
-
2878
-
2879
- <td class="type">
2880
-
2881
-
2882
- <span class="param-type">boolean</span>
2883
-
2884
-
2885
-
2886
-
2887
- </td>
2888
-
2889
-
2890
- <td class="attributes">
2891
-
2892
- &lt;optional><br>
2893
-
2894
-
2895
-
2896
-
2897
-
2898
- </td>
2899
-
2900
-
2901
-
2902
- <td class="default">
2903
-
2904
- <code>true</code>
2905
-
2906
- </td>
2907
-
2908
-
2909
- <td class="description last">Whether the session was automatically logged.</td>
2910
- </tr>
2911
-
2912
-
2913
-
2914
- <tr>
2915
-
2916
- <td class="name"><code>content_id</code></td>
2917
-
2918
-
2919
- <td class="type">
2920
-
2921
-
2922
- <span class="param-type">number</span>
2923
-
2924
-
2925
-
2926
-
2927
- </td>
2928
-
2929
-
2930
- <td class="attributes">
2931
-
2932
- &lt;optional><br>
2933
-
2934
-
2935
-
2936
-
2937
-
2938
- </td>
2939
-
2940
-
2941
-
2942
- <td class="default">
2943
-
2944
- </td>
2945
-
2946
-
2947
- <td class="description last">The ID of the practiced content (if available).</td>
2948
- </tr>
2949
-
2950
-
2951
-
2952
- <tr>
2953
-
2954
- <td class="name"><code>category_id</code></td>
2955
-
2956
-
2957
- <td class="type">
2958
-
2959
-
2960
- <span class="param-type">number</span>
2961
-
2962
-
2963
-
2964
-
2965
- </td>
2966
-
2967
-
2968
- <td class="attributes">
2969
-
2970
- &lt;optional><br>
2971
-
2972
-
2973
-
2974
-
2975
-
2976
- </td>
2977
-
2978
-
2979
-
2980
- <td class="default">
2981
-
2982
- </td>
2983
-
2984
-
2985
- <td class="description last">The ID of the associated category (if available).</td>
2986
- </tr>
2987
-
2988
-
2989
-
2990
- <tr>
2991
-
2992
- <td class="name"><code>title</code></td>
2993
-
2994
-
2995
- <td class="type">
2996
-
2997
-
2998
- <span class="param-type">string</span>
2999
-
3000
-
3001
-
3002
-
3003
- </td>
3004
-
3005
-
3006
- <td class="attributes">
3007
-
3008
- &lt;optional><br>
3009
-
3010
-
3011
-
3012
-
3013
-
3014
- </td>
3015
-
3016
-
3017
-
3018
- <td class="default">
3019
-
3020
- </td>
3021
-
3022
-
3023
- <td class="description last">The title of the practice session (max 64 characters).</td>
3024
- </tr>
3025
-
3026
-
3027
-
3028
- <tr>
3029
-
3030
- <td class="name"><code>thumbnail_url</code></td>
3031
-
3032
-
3033
- <td class="type">
3034
-
3035
-
3036
- <span class="param-type">string</span>
3037
-
3038
-
3039
-
3040
-
3041
- </td>
3042
-
3043
-
3044
- <td class="attributes">
3045
-
3046
- &lt;optional><br>
3047
-
3048
-
3049
-
3050
-
3051
-
3052
- </td>
3053
-
3054
-
3055
-
3056
- <td class="default">
3057
-
3058
- </td>
3059
-
3060
-
3061
- <td class="description last">The URL of the session's thumbnail (max 255 characters).</td>
3062
- </tr>
3063
-
3064
-
3065
- </tbody>
3066
- </table>
3067
-
3068
- </td>
3069
- </tr>
3070
-
3071
-
3072
- </tbody>
3073
- </table>
3074
-
3075
-
3076
-
3077
-
3078
-
3079
-
3080
-
3081
-
3082
-
3083
-
3084
-
3085
-
3086
-
3087
-
3088
-
3089
-
3090
- <h5 class="h5-returns">Returns:</h5>
3091
-
3092
-
3093
- <div class="param-desc">
3094
- - A promise that resolves to the response from logging the user practice.
3095
- </div>
3096
-
3097
-
3098
-
3099
- <dl class="param-type">
3100
- <dt>
3101
- Type
3102
- </dt>
3103
- <dd>
3104
-
3105
- <span class="param-type">Promise.&lt;Object></span>
3106
-
3107
-
3108
-
3109
- </dd>
3110
- </dl>
3111
-
3112
-
3113
-
3114
-
3115
-
3116
-
3117
-
3118
-
3119
-
3120
-
3121
- <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>
3122
-
3123
-
3124
-
3125
-
3126
-
3127
-
3128
- <dl class="details">
3129
-
3130
- <dt class="tag-description">Description:</dt>
3131
- <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>
3132
-
3133
-
3134
-
3135
- <dt class="tag-source">Source:</dt>
3136
- <dd class="tag-source"><ul class="dummy"><li>
3137
- <a href="userActivity.js.html">userActivity.js</a>, <a href="userActivity.js.html#line346">line 346</a>
3138
- </li></ul></dd>
3139
-
3140
-
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
- </dl>
3171
-
3172
-
3173
-
3174
-
3175
-
3176
-
3177
-
3178
-
3179
-
3180
-
3181
-
3182
- <h5 class="h5-examples">Example</h5>
3183
-
3184
- <pre class="prettyprint"><code>// Remove a practice session with ID 123
3185
- removeUserPractice(123)
3186
- .then(() => console.log("Practice session removed successfully"))
3187
- .catch(error => console.error(error));</code></pre>
3188
-
3189
-
3190
-
3191
-
3192
- <h5 class="h5-parameters">Parameters:</h5>
3193
-
3194
-
3195
- <table class="params">
3196
- <thead>
3197
- <tr>
3198
-
3199
- <th>Name</th>
3200
-
3201
-
3202
- <th>Type</th>
3203
-
3204
-
3205
-
3206
-
3207
-
3208
- <th class="last">Description</th>
3209
- </tr>
3210
- </thead>
3211
-
3212
- <tbody>
3213
-
3214
-
3215
- <tr>
3216
-
3217
- <td class="name"><code>id</code></td>
3218
-
3219
-
3220
- <td class="type">
3221
-
3222
-
3223
- <span class="param-type">number</span>
3224
-
3225
-
3226
-
3227
-
3228
- </td>
3229
-
3230
-
3231
-
3232
-
3233
-
3234
- <td class="description last">The unique identifier of the practice session to be removed.</td>
3235
- </tr>
3236
-
3237
-
3238
- </tbody>
3239
- </table>
3240
-
3241
-
3242
-
3243
-
3244
-
3245
-
3246
-
3247
-
3248
-
3249
-
3250
-
3251
-
3252
-
3253
-
3254
-
3255
-
3256
- <h5 class="h5-returns">Returns:</h5>
3257
-
3258
-
3259
- <div class="param-desc">
3260
- - A promise that resolves once the practice session is removed.
3261
- </div>
3262
-
3263
-
3264
-
3265
- <dl class="param-type">
3266
- <dt>
3267
- Type
3268
- </dt>
3269
- <dd>
3270
-
3271
- <span class="param-type">Promise.&lt;void></span>
3272
-
3273
-
3274
-
3275
- </dd>
3276
- </dl>
3277
-
3278
-
3279
-
3280
-
3281
-
3282
-
3283
-
3284
-
3285
-
3286
-
3287
- <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>
3288
-
3289
-
3290
-
3291
-
3292
-
3293
-
3294
- <dl class="details">
3295
-
3296
- <dt class="tag-description">Description:</dt>
3297
- <dd class="tag-description"><ul class="dummy"><li>Restores deleted practice sessions for a specific date.
3298
-
3299
- Sends a PUT request to restore any previously deleted practices for a given date.
3300
- If restored practices are returned, they are added back into the local context.</li></ul></dd>
3301
-
3302
-
3303
-
3304
- <dt class="tag-source">Source:</dt>
3305
- <dd class="tag-source"><ul class="dummy"><li>
3306
- <a href="userActivity.js.html">userActivity.js</a>, <a href="userActivity.js.html#line454">line 454</a>
3307
- </li></ul></dd>
3308
-
3309
-
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
- </dl>
3340
-
3341
-
3342
-
3343
-
3344
-
3345
-
3346
-
3347
-
3348
-
3349
-
3350
-
3351
- <h5 class="h5-examples">Example</h5>
3352
-
3353
- <pre class="prettyprint"><code>// Restore practice sessions deleted on April 10, 2025
3354
- restorePracticeSession("2025-04-10")
3355
- .then(response => console.log("Practice session restored:", response))
3356
- .catch(error => console.error("Restore failed:", error));</code></pre>
3357
-
3358
-
3359
-
3360
-
3361
- <h5 class="h5-parameters">Parameters:</h5>
3362
-
3363
-
3364
- <table class="params">
3365
- <thead>
3366
- <tr>
3367
-
3368
- <th>Name</th>
3369
-
3370
-
3371
- <th>Type</th>
3372
-
3373
-
3374
-
3375
-
3376
-
3377
- <th class="last">Description</th>
3378
- </tr>
3379
- </thead>
3380
-
3381
- <tbody>
3382
-
3383
-
3384
- <tr>
3385
-
3386
- <td class="name"><code>date</code></td>
3387
-
3388
-
3389
- <td class="type">
3390
-
3391
-
3392
- <span class="param-type">string</span>
3393
-
3394
-
3395
-
3396
-
3397
- </td>
3398
-
3399
-
3400
-
3401
-
3402
-
3403
- <td class="description last">The date (in `YYYY-MM-DD` format) for which deleted practice sessions should be restored.</td>
3404
- </tr>
3405
-
3406
-
3407
- </tbody>
3408
- </table>
3409
-
3410
-
3411
-
3412
-
3413
-
3414
-
3415
-
3416
-
3417
-
3418
-
3419
-
3420
-
3421
-
3422
-
3423
-
3424
-
3425
- <h5 class="h5-returns">Returns:</h5>
3426
-
3427
-
3428
- <div class="param-desc">
3429
- - The response object from the API, containing practices for selected date.
3430
- </div>
3431
-
3432
-
3433
-
3434
- <dl class="param-type">
3435
- <dt>
3436
- Type
3437
- </dt>
3438
- <dd>
3439
-
3440
- <span class="param-type">Promise.&lt;Object></span>
3441
-
3442
-
3443
-
3444
- </dd>
3445
- </dl>
3446
-
3447
-
3448
-
3449
-
3450
-
3451
-
3452
-
3453
-
3454
-
3455
-
3456
- <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>
3457
-
3458
-
3459
-
3460
-
3461
-
3462
-
3463
- <dl class="details">
3464
-
3465
- <dt class="tag-description">Description:</dt>
3466
- <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>
3467
-
3468
-
3469
-
3470
- <dt class="tag-source">Source:</dt>
3471
- <dd class="tag-source"><ul class="dummy"><li>
3472
- <a href="userActivity.js.html">userActivity.js</a>, <a href="userActivity.js.html#line376">line 376</a>
3473
- </li></ul></dd>
3474
-
3475
-
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
- </dl>
3506
-
3507
-
3508
-
3509
-
3510
-
3511
-
3512
-
3513
-
3514
-
3515
-
3516
-
3517
- <h5 class="h5-examples">Example</h5>
3518
-
3519
- <pre class="prettyprint"><code>// Restore a deleted practice session with ID 123
3520
- restoreUserPractice(123)
3521
- .then(response => console.log("Practice session restored:", response))
3522
- .catch(error => console.error(error));</code></pre>
3523
-
3524
-
3525
-
3526
-
3527
- <h5 class="h5-parameters">Parameters:</h5>
3528
-
3529
-
3530
- <table class="params">
3531
- <thead>
3532
- <tr>
3533
-
3534
- <th>Name</th>
3535
-
3536
-
3537
- <th>Type</th>
3538
-
3539
-
3540
-
3541
-
3542
-
3543
- <th class="last">Description</th>
3544
- </tr>
3545
- </thead>
3546
-
3547
- <tbody>
3548
-
3549
-
3550
- <tr>
3551
-
3552
- <td class="name"><code>id</code></td>
3553
-
3554
-
3555
- <td class="type">
3556
-
3557
-
3558
- <span class="param-type">number</span>
3559
-
3560
-
3561
-
3562
-
3563
- </td>
3564
-
3565
-
3566
-
3567
-
3568
-
3569
- <td class="description last">The unique identifier of the practice session to be restored.</td>
3570
- </tr>
3571
-
3572
-
3573
- </tbody>
3574
- </table>
3575
-
3576
-
3577
-
3578
-
3579
-
3580
-
3581
-
3582
-
3583
-
3584
-
3585
-
3586
-
3587
-
3588
-
3589
-
3590
-
3591
- <h5 class="h5-returns">Returns:</h5>
3592
-
3593
-
3594
- <div class="param-desc">
3595
- - A promise that resolves to the response containing the restored practice session data.
3596
- </div>
3597
-
3598
-
3599
-
3600
- <dl class="param-type">
3601
- <dt>
3602
- Type
3603
- </dt>
3604
- <dd>
3605
-
3606
- <span class="param-type">Promise.&lt;Object></span>
3607
-
3608
-
3609
-
3610
- </dd>
3611
- </dl>
3612
-
3613
-
3614
-
3615
-
3616
-
3617
-
3618
-
3619
-
3620
-
3621
-
3622
- <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>
3623
-
3624
-
3625
-
3626
-
3627
-
3628
-
3629
- <dl class="details">
3630
-
3631
- <dt class="tag-description">Description:</dt>
3632
- <dd class="tag-description"><ul class="dummy"><li>Unpins the current pinned progress row for a user, scoped by brand.</li></ul></dd>
3633
-
3634
-
3635
-
3636
- <dt class="tag-source">Source:</dt>
3637
- <dd class="tag-source"><ul class="dummy"><li>
3638
- <a href="userActivity.js.html">userActivity.js</a>, <a href="userActivity.js.html#line1223">line 1223</a>
3639
- </li></ul></dd>
3640
-
3641
-
3642
-
3643
-
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
- </dl>
3672
-
3673
-
3674
-
3675
-
3676
-
3677
-
3678
-
3679
-
3680
-
3681
-
3682
-
3683
- <h5 class="h5-examples">Example</h5>
3684
-
3685
- <pre class="prettyprint"><code>unpinProgressRow('drumeo')
3686
- .then(response => console.log(response))
3687
- .catch(error => console.error(error));</code></pre>
3688
-
3689
-
3690
-
3691
-
3692
- <h5 class="h5-parameters">Parameters:</h5>
3693
-
3694
-
3695
- <table class="params">
3696
- <thead>
3697
- <tr>
3698
-
3699
- <th>Name</th>
3700
-
3701
-
3702
- <th>Type</th>
3703
-
3704
-
3705
-
3706
-
3707
-
3708
- <th class="last">Description</th>
3709
- </tr>
3710
- </thead>
3711
-
3712
- <tbody>
3713
-
3714
-
3715
- <tr>
3716
-
3717
- <td class="name"><code>brand</code></td>
3718
-
3719
-
3720
- <td class="type">
3721
-
3722
-
3723
- <span class="param-type">string</span>
3724
-
3725
-
3726
-
3727
-
3728
- </td>
3729
-
3730
-
3731
-
3732
-
3733
-
3734
- <td class="description last">The brand context for the unpin action.</td>
3735
- </tr>
3736
-
3737
-
3738
- </tbody>
3739
- </table>
3740
-
3741
-
3742
-
3743
-
3744
-
3745
-
3746
-
3747
-
3748
-
3749
-
3750
-
3751
-
3752
-
3753
-
3754
-
3755
-
3756
- <h5 class="h5-returns">Returns:</h5>
3757
-
3758
-
3759
- <div class="param-desc">
3760
- - A promise resolving to the response from the unpin API.
3761
- </div>
3762
-
3763
-
3764
-
3765
- <dl class="param-type">
3766
- <dt>
3767
- Type
3768
- </dt>
3769
- <dd>
3770
-
3771
- <span class="param-type">Promise.&lt;Object></span>
3772
-
3773
-
3774
-
3775
- </dd>
3776
- </dl>
3777
-
3778
-
3779
-
3780
-
3781
-
3782
-
3783
-
3784
-
3785
-
3786
-
3787
- <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>
3788
-
3789
-
3790
-
3791
-
3792
-
3793
-
3794
- <dl class="details">
3795
-
3796
- <dt class="tag-description">Description:</dt>
3797
- <dd class="tag-description"><ul class="dummy"><li>Updates existing practice notes for a specific date.</li></ul></dd>
3798
-
3799
-
3800
-
3801
- <dt class="tag-source">Source:</dt>
3802
- <dd class="tag-source"><ul class="dummy"><li>
3803
- <a href="userActivity.js.html">userActivity.js</a>, <a href="userActivity.js.html#line588">line 588</a>
3804
- </li></ul></dd>
3805
-
3806
-
3807
-
3808
-
3809
-
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
- </dl>
3837
-
3838
-
3839
-
3840
-
3841
-
3842
-
3843
-
3844
-
3845
-
3846
-
3847
-
3848
- <h5 class="h5-examples">Example</h5>
3849
-
3850
- <pre class="prettyprint"><code>updatePracticeNotes({ date: '2025-04-10', notes: 'Updated: Focused on technique and timing' })
3851
- .then(response => console.log(response))
3852
- .catch(error => console.error(error));</code></pre>
3853
-
3854
-
3855
-
3856
-
3857
- <h5 class="h5-parameters">Parameters:</h5>
3858
-
3859
-
3860
- <table class="params">
3861
- <thead>
3862
- <tr>
3863
-
3864
- <th>Name</th>
3865
-
3866
-
3867
- <th>Type</th>
3868
-
3869
-
3870
-
3871
-
3872
-
3873
- <th class="last">Description</th>
3874
- </tr>
3875
- </thead>
3876
-
3877
- <tbody>
3878
-
3879
-
3880
- <tr>
3881
-
3882
- <td class="name"><code>payload</code></td>
3883
-
3884
-
3885
- <td class="type">
3886
-
3887
-
3888
- <span class="param-type">Object</span>
3889
-
3890
-
3891
-
3892
-
3893
- </td>
3894
-
3895
-
3896
-
3897
-
3898
-
3899
- <td class="description last">The data required to update practice notes.
3900
- <h6>Properties</h6>
3901
-
3902
-
3903
- <table class="params">
3904
- <thead>
3905
- <tr>
3906
-
3907
- <th>Name</th>
3908
-
3909
-
3910
- <th>Type</th>
3911
-
3912
-
3913
-
3914
-
3915
-
3916
- <th class="last">Description</th>
3917
- </tr>
3918
- </thead>
3919
-
3920
- <tbody>
3921
-
3922
-
3923
- <tr>
3924
-
3925
- <td class="name"><code>date</code></td>
3926
-
3927
-
3928
- <td class="type">
3929
-
3930
-
3931
- <span class="param-type">string</span>
3932
-
3933
-
3934
-
3935
-
3936
- </td>
3937
-
3938
-
3939
-
3940
-
3941
-
3942
- <td class="description last">The date for which to update notes (format: YYYY-MM-DD).</td>
3943
- </tr>
3944
-
3945
-
3946
-
3947
- <tr>
3948
-
3949
- <td class="name"><code>notes</code></td>
3950
-
3951
-
3952
- <td class="type">
3953
-
3954
-
3955
- <span class="param-type">string</span>
3956
-
3957
-
3958
-
3959
-
3960
- </td>
3961
-
3962
-
3963
-
3964
-
3965
-
3966
- <td class="description last">The updated notes content.</td>
3967
- </tr>
3968
-
3969
-
3970
- </tbody>
3971
- </table>
3972
-
3973
- </td>
3974
- </tr>
3975
-
3976
-
3977
- </tbody>
3978
- </table>
3979
-
3980
-
3981
-
3982
-
3983
-
3984
-
3985
-
3986
-
3987
-
3988
-
3989
-
3990
-
3991
-
3992
-
3993
-
3994
-
3995
- <h5 class="h5-returns">Returns:</h5>
3996
-
3997
-
3998
- <div class="param-desc">
3999
- - A promise that resolves to the API response after updating the notes.
4000
- </div>
4001
-
4002
-
4003
-
4004
- <dl class="param-type">
4005
- <dt>
4006
- Type
4007
- </dt>
4008
- <dd>
4009
-
4010
- <span class="param-type">Promise.&lt;Object></span>
4011
-
4012
-
4013
-
4014
- </dd>
4015
- </dl>
4016
-
4017
-
4018
-
4019
-
4020
-
4021
-
4022
-
4023
-
4024
-
4025
-
4026
- <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>
4027
-
4028
-
4029
-
4030
-
4031
-
4032
-
4033
- <dl class="details">
4034
-
4035
- <dt class="tag-description">Description:</dt>
4036
- <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>
4037
-
4038
-
4039
-
4040
- <dt class="tag-source">Source:</dt>
4041
- <dd class="tag-source"><ul class="dummy"><li>
4042
- <a href="userActivity.js.html">userActivity.js</a>, <a href="userActivity.js.html#line329">line 329</a>
4043
- </li></ul></dd>
4044
-
4045
-
4046
-
4047
-
4048
-
4049
-
4050
-
4051
-
4052
-
4053
-
4054
-
4055
-
4056
-
4057
-
4058
-
4059
-
4060
-
4061
-
4062
-
4063
-
4064
-
4065
-
4066
-
4067
-
4068
-
4069
-
4070
-
4071
-
4072
-
4073
-
4074
-
4075
- </dl>
4076
-
4077
-
4078
-
4079
-
4080
-
4081
-
4082
-
4083
-
4084
-
4085
-
4086
-
4087
- <h5 class="h5-examples">Examples</h5>
4088
-
4089
- <pre class="prettyprint"><code>// Update a practice session's duration
4090
- updateUserPractice(123, { duration_seconds: 600 })
4091
- .then(response => console.log(response))
4092
- .catch(error => console.error(error));</code></pre>
4093
-
4094
- <pre class="prettyprint"><code>// Change a practice session to manual and update its category
4095
- updateUserPractice(456, { auto: false, category_id: 8 })
4096
- .then(response => console.log(response))
4097
- .catch(error => console.error(error));</code></pre>
4098
-
4099
-
4100
-
4101
-
4102
- <h5 class="h5-parameters">Parameters:</h5>
4103
-
4104
-
4105
- <table class="params">
4106
- <thead>
4107
- <tr>
4108
-
4109
- <th>Name</th>
4110
-
4111
-
4112
- <th>Type</th>
4113
-
4114
-
4115
-
4116
-
4117
-
4118
- <th class="last">Description</th>
4119
- </tr>
4120
- </thead>
4121
-
4122
- <tbody>
4123
-
4124
-
4125
- <tr>
4126
-
4127
- <td class="name"><code>id</code></td>
4128
-
4129
-
4130
- <td class="type">
4131
-
4132
-
4133
- <span class="param-type">number</span>
4134
-
4135
-
4136
-
4137
-
4138
- </td>
4139
-
4140
-
4141
-
4142
-
4143
-
4144
- <td class="description last">The unique identifier of the practice session to update.</td>
4145
- </tr>
4146
-
4147
-
4148
-
4149
- <tr>
4150
-
4151
- <td class="name"><code>practiceDetails</code></td>
4152
-
4153
-
4154
- <td class="type">
4155
-
4156
-
4157
- <span class="param-type">Object</span>
4158
-
4159
-
4160
-
4161
-
4162
- </td>
4163
-
4164
-
4165
-
4166
-
4167
-
4168
- <td class="description last">The updated details of the practice session.
4169
- <h6>Properties</h6>
4170
-
4171
-
4172
- <table class="params">
4173
- <thead>
4174
- <tr>
4175
-
4176
- <th>Name</th>
4177
-
4178
-
4179
- <th>Type</th>
4180
-
4181
-
4182
- <th>Attributes</th>
4183
-
4184
-
4185
-
4186
-
4187
- <th class="last">Description</th>
4188
- </tr>
4189
- </thead>
4190
-
4191
- <tbody>
4192
-
4193
-
4194
- <tr>
4195
-
4196
- <td class="name"><code>duration_seconds</code></td>
4197
-
4198
-
4199
- <td class="type">
4200
-
4201
-
4202
- <span class="param-type">number</span>
4203
-
4204
-
4205
-
4206
-
4207
- </td>
4208
-
4209
-
4210
- <td class="attributes">
4211
-
4212
- &lt;optional><br>
4213
-
4214
-
4215
-
4216
-
4217
-
4218
- </td>
4219
-
4220
-
4221
-
4222
-
4223
- <td class="description last">The duration of the practice session in seconds.</td>
4224
- </tr>
4225
-
4226
-
4227
-
4228
- <tr>
4229
-
4230
- <td class="name"><code>category_id</code></td>
4231
-
4232
-
4233
- <td class="type">
4234
-
4235
-
4236
- <span class="param-type">number</span>
4237
-
4238
-
4239
-
4240
-
4241
- </td>
4242
-
4243
-
4244
- <td class="attributes">
4245
-
4246
- &lt;optional><br>
4247
-
4248
-
4249
-
4250
-
4251
-
4252
- </td>
4253
-
4254
-
4255
-
4256
-
4257
- <td class="description last">The ID of the associated category (if available).</td>
4258
- </tr>
4259
-
4260
-
4261
-
4262
- <tr>
4263
-
4264
- <td class="name"><code>title</code></td>
4265
-
4266
-
4267
- <td class="type">
4268
-
4269
-
4270
- <span class="param-type">string</span>
4271
-
4272
-
4273
-
4274
-
4275
- </td>
4276
-
4277
-
4278
- <td class="attributes">
4279
-
4280
- &lt;optional><br>
4281
-
4282
-
4283
-
4284
-
4285
-
4286
- </td>
4287
-
4288
-
4289
-
4290
-
4291
- <td class="description last">The title of the practice session (max 64 characters).</td>
4292
- </tr>
4293
-
4294
-
4295
-
4296
- <tr>
4297
-
4298
- <td class="name"><code>thumbnail_url</code></td>
4299
-
4300
-
4301
- <td class="type">
4302
-
4303
-
4304
- <span class="param-type">string</span>
4305
-
4306
-
4307
-
4308
-
4309
- </td>
4310
-
4311
-
4312
- <td class="attributes">
4313
-
4314
- &lt;optional><br>
4315
-
4316
-
4317
-
4318
-
4319
-
4320
- </td>
4321
-
4322
-
4323
-
4324
-
4325
- <td class="description last">The URL of the session's thumbnail (max 255 characters).</td>
4326
- </tr>
4327
-
4328
-
4329
- </tbody>
4330
- </table>
4331
-
4332
- </td>
4333
- </tr>
4334
-
4335
-
4336
- </tbody>
4337
- </table>
4338
-
4339
-
4340
-
4341
-
4342
-
4343
-
4344
-
4345
-
4346
-
4347
-
4348
-
4349
-
4350
-
4351
-
4352
-
4353
-
4354
- <h5 class="h5-returns">Returns:</h5>
4355
-
4356
-
4357
- <div class="param-desc">
4358
- - A promise that resolves to the response from updating the user practice.
4359
- </div>
4360
-
4361
-
4362
-
4363
- <dl class="param-type">
4364
- <dt>
4365
- Type
4366
- </dt>
4367
- <dd>
4368
-
4369
- <span class="param-type">Promise.&lt;Object></span>
4370
-
4371
-
4372
-
4373
- </dd>
4374
- </dl>
4375
-
4376
-
4377
-
4378
-
4379
-
4380
-
4381
-
4382
-
4383
-
4384
-
4385
-
4386
- </article>
4387
-
4388
- </section>
4389
-
4390
-
4391
-
4392
-
4393
-
4394
-
4395
- </div>
4396
-
4397
- <br class="clear">
4398
-
4399
- <footer>
4400
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Mon May 26 2025 16:03:08 GMT+0000 (Coordinated Universal Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
4401
- </footer>
4402
-
4403
- <script>prettyPrint();</script>
4404
- <script src="scripts/polyfill.js"></script>
4405
- <script src="scripts/linenumber.js"></script>
4406
-
4407
-
4408
-
4409
- </body>
4410
- </html>