musora-content-services 2.67.1 → 2.67.2

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 (191) hide show
  1. package/.coderabbit.yaml +0 -0
  2. package/.editorconfig +0 -0
  3. package/.github/pull_request_template.md +0 -0
  4. package/.github/workflows/conventional-commits.yaml +0 -0
  5. package/.github/workflows/docs.js.yml +0 -0
  6. package/.github/workflows/node.js.yml +0 -0
  7. package/.prettierignore +0 -0
  8. package/.prettierrc +0 -0
  9. package/CHANGELOG.md +2 -0
  10. package/README.md +0 -0
  11. package/babel.config.cjs +0 -0
  12. package/docs/ContentOrganization.html +1 -1
  13. package/docs/Forums.html +1 -1
  14. package/docs/Gamification.html +1 -1
  15. package/docs/UserManagementSystem.html +1 -1
  16. package/docs/api_types.js.html +1 -1
  17. package/docs/config.js.html +1 -1
  18. package/docs/content-org_content-org.js.html +1 -1
  19. package/docs/content-org_guided-courses.ts.html +1 -1
  20. package/docs/content-org_learning-paths.ts.html +1 -1
  21. package/docs/content-org_playlists-types.js.html +1 -1
  22. package/docs/content-org_playlists.js.html +1 -1
  23. package/docs/content.js.html +1 -1
  24. package/docs/fonts/Montserrat/Montserrat-Bold.eot +0 -0
  25. package/docs/fonts/Montserrat/Montserrat-Bold.ttf +0 -0
  26. package/docs/fonts/Montserrat/Montserrat-Bold.woff +0 -0
  27. package/docs/fonts/Montserrat/Montserrat-Bold.woff2 +0 -0
  28. package/docs/fonts/Montserrat/Montserrat-Regular.eot +0 -0
  29. package/docs/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
  30. package/docs/fonts/Montserrat/Montserrat-Regular.woff +0 -0
  31. package/docs/fonts/Montserrat/Montserrat-Regular.woff2 +0 -0
  32. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.eot +0 -0
  33. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg +0 -0
  34. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.ttf +0 -0
  35. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff +0 -0
  36. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff2 +0 -0
  37. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.eot +0 -0
  38. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.svg +0 -0
  39. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.ttf +0 -0
  40. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff +0 -0
  41. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff2 +0 -0
  42. package/docs/forums_categories.ts.html +1 -1
  43. package/docs/forums_discussions.js.html +0 -0
  44. package/docs/forums_forum.js.html +0 -0
  45. package/docs/forums_forums.ts.html +1 -1
  46. package/docs/forums_posts.ts.html +2 -1
  47. package/docs/forums_threads.ts.html +1 -1
  48. package/docs/gamification_awards.js.html +0 -0
  49. package/docs/gamification_awards.ts.html +1 -1
  50. package/docs/gamification_gamification.js.html +1 -1
  51. package/docs/gamification_types.js.html +0 -0
  52. package/docs/global.html +1 -1
  53. package/docs/index.html +1 -1
  54. package/docs/module-Accounts.html +1 -1
  55. package/docs/module-Awards.html +1 -1
  56. package/docs/module-Categories.html +0 -0
  57. package/docs/module-Config.html +1 -1
  58. package/docs/module-Content-Services-V2.html +1 -1
  59. package/docs/module-ForumCategories.html +0 -0
  60. package/docs/module-ForumDiscussions.html +0 -0
  61. package/docs/module-Forums.html +7 -7
  62. package/docs/module-GuidedCourses.html +1 -1
  63. package/docs/module-Interests.html +1 -1
  64. package/docs/module-Onboarding.html +1 -1
  65. package/docs/module-Payments.html +1 -1
  66. package/docs/module-Permissions.html +1 -1
  67. package/docs/module-Playlists.html +1 -1
  68. package/docs/module-Railcontent-Services.html +1 -1
  69. package/docs/module-Sanity-Services.html +1 -1
  70. package/docs/module-Sessions.html +1 -1
  71. package/docs/module-Threads.html +0 -0
  72. package/docs/module-UserActivity.html +1 -1
  73. package/docs/module-UserChat.html +1 -1
  74. package/docs/module-UserManagement.html +1 -1
  75. package/docs/module-UserMemberships.html +1 -1
  76. package/docs/module-UserNotifications.html +1 -1
  77. package/docs/module-UserProfile.html +1 -1
  78. package/docs/railcontent.js.html +1 -1
  79. package/docs/sanity.js.html +1 -1
  80. package/docs/scripts/collapse.js +0 -0
  81. package/docs/scripts/commonNav.js +0 -0
  82. package/docs/scripts/linenumber.js +0 -0
  83. package/docs/scripts/nav.js +0 -0
  84. package/docs/scripts/polyfill.js +0 -0
  85. package/docs/scripts/prettify/Apache-License-2.0.txt +0 -0
  86. package/docs/scripts/prettify/lang-css.js +0 -0
  87. package/docs/scripts/prettify/prettify.js +0 -0
  88. package/docs/scripts/search.js +0 -0
  89. package/docs/styles/jsdoc.css +0 -0
  90. package/docs/styles/prettify.css +0 -0
  91. package/docs/userActivity.js.html +1 -1
  92. package/docs/user_account.ts.html +1 -1
  93. package/docs/user_chat.js.html +1 -1
  94. package/docs/user_interests.js.html +1 -1
  95. package/docs/user_management.js.html +1 -1
  96. package/docs/user_memberships.js.html +0 -0
  97. package/docs/user_memberships.ts.html +1 -1
  98. package/docs/user_notifications.js.html +1 -1
  99. package/docs/user_onboarding.ts.html +1 -1
  100. package/docs/user_payments.ts.html +1 -1
  101. package/docs/user_permissions.js.html +1 -1
  102. package/docs/user_profile.js.html +1 -1
  103. package/docs/user_sessions.js.html +1 -1
  104. package/docs/user_types.js.html +1 -1
  105. package/docs/user_user-management-system.js.html +1 -1
  106. package/jest.config.js +0 -0
  107. package/jsdoc.json +0 -0
  108. package/package.json +1 -1
  109. package/src/contentMetaData.js +75 -12
  110. package/src/contentTypeConfig.js +13 -3
  111. package/src/filterBuilder.js +0 -0
  112. package/src/index.d.ts +0 -0
  113. package/src/index.js +0 -0
  114. package/src/infrastructure/http/HttpClient.ts +0 -0
  115. package/src/infrastructure/http/executors/FetchRequestExecutor.ts +0 -0
  116. package/src/infrastructure/http/index.ts +0 -0
  117. package/src/infrastructure/http/interfaces/HeaderProvider.ts +0 -0
  118. package/src/infrastructure/http/interfaces/HttpError.ts +0 -0
  119. package/src/infrastructure/http/interfaces/NetworkError.ts +0 -0
  120. package/src/infrastructure/http/interfaces/RequestExecutor.ts +0 -0
  121. package/src/infrastructure/http/interfaces/RequestOptions.ts +0 -0
  122. package/src/infrastructure/http/providers/DefaultHeaderProvider.ts +0 -0
  123. package/src/lib/httpHelper.js +0 -0
  124. package/src/lib/lastUpdated.js +0 -0
  125. package/src/services/api/types.js +0 -0
  126. package/src/services/api/types.ts +0 -0
  127. package/src/services/config.js +0 -0
  128. package/src/services/content-org/content-org.js +0 -0
  129. package/src/services/content-org/guided-courses.ts +0 -0
  130. package/src/services/content-org/learning-paths.ts +0 -0
  131. package/src/services/content-org/playlists-types.js +0 -0
  132. package/src/services/content-org/playlists.js +0 -0
  133. package/src/services/content.js +0 -0
  134. package/src/services/contentAggregator.js +0 -0
  135. package/src/services/contentLikes.js +0 -0
  136. package/src/services/contentProgress.js +0 -0
  137. package/src/services/dataContext.js +0 -0
  138. package/src/services/dateUtils.js +0 -0
  139. package/src/services/eventsAPI.js +0 -0
  140. package/src/services/forums/categories.ts +0 -0
  141. package/src/services/forums/forums.ts +0 -0
  142. package/src/services/forums/posts.ts +2 -1
  143. package/src/services/forums/threads.ts +0 -0
  144. package/src/services/forums/types.ts +0 -0
  145. package/src/services/gamification/awards.ts +0 -0
  146. package/src/services/gamification/gamification.js +0 -0
  147. package/src/services/imageSRCBuilder.js +0 -0
  148. package/src/services/imageSRCVerify.js +0 -0
  149. package/src/services/railcontent.js +0 -0
  150. package/src/services/recommendations.js +0 -0
  151. package/src/services/types.js +0 -0
  152. package/src/services/user/account.ts +0 -0
  153. package/src/services/user/chat.js +0 -0
  154. package/src/services/user/interests.js +0 -0
  155. package/src/services/user/management.js +0 -0
  156. package/src/services/user/memberships.ts +0 -0
  157. package/src/services/user/notifications.js +0 -0
  158. package/src/services/user/onboarding.ts +0 -0
  159. package/src/services/user/payments.ts +0 -0
  160. package/src/services/user/permissions.js +0 -0
  161. package/src/services/user/profile.js +0 -0
  162. package/src/services/user/sessions.js +0 -0
  163. package/src/services/user/types.js +0 -0
  164. package/src/services/user/user-management-system.js +0 -0
  165. package/src/services/userActivity.js +0 -0
  166. package/test/HttpClient.test.js +0 -0
  167. package/test/content.test.js +0 -0
  168. package/test/contentLikes.test.js +0 -0
  169. package/test/contentProgress.test.js +0 -0
  170. package/test/dataContext.test.js +0 -0
  171. package/test/forum.test.js +0 -0
  172. package/test/imageSRCBuilder.test.js +0 -0
  173. package/test/imageSRCVerify.test.js +0 -0
  174. package/test/initializeTests.js +0 -0
  175. package/test/lib/lastUpdated.test.js +0 -0
  176. package/test/live/contentProgressLive.test.js +0 -0
  177. package/test/live/railcontentLive.test.js +0 -0
  178. package/test/localStorageMock.js +0 -0
  179. package/test/log.js +0 -0
  180. package/test/mockData/mockData_fetchByRailContentIds_one_content.json +0 -0
  181. package/test/mockData/mockData_progress_content.json +0 -0
  182. package/test/mockData/mockData_sanity_progress_content.json +0 -0
  183. package/test/mockData/mockData_user_practices.json +0 -0
  184. package/test/notifications.test.js +0 -0
  185. package/test/progressRows.test.js +0 -0
  186. package/test/sanityQueryService.test.js +0 -0
  187. package/test/streakMessage.test.js +0 -0
  188. package/test/user/permissions.test.js +0 -0
  189. package/test/userActivity.test.js +0 -0
  190. package/tools/generate-index.cjs +0 -0
  191. package/.claude/settings.local.json +0 -8
@@ -357,7 +357,7 @@
357
357
  <br class="clear">
358
358
 
359
359
  <footer>
360
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Mon Nov 03 2025 17:10:23 GMT-0800 (Pacific Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
360
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Tue Nov 04 2025 08:55:34 GMT+0200 (Eastern European Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
361
361
  </footer>
362
362
 
363
363
  <script>prettyPrint();</script>
@@ -822,7 +822,7 @@ export async function fetchHandler(url, method = 'get', dataVersion = null, body
822
822
  <br class="clear">
823
823
 
824
824
  <footer>
825
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Mon Nov 03 2025 17:10:23 GMT-0800 (Pacific Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
825
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Tue Nov 04 2025 08:55:34 GMT+0200 (Eastern European Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
826
826
  </footer>
827
827
 
828
828
  <script>prettyPrint();</script>
@@ -2373,7 +2373,7 @@ export async function fetchMethodV2Structure(brand) {
2373
2373
  <br class="clear">
2374
2374
 
2375
2375
  <footer>
2376
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Mon Nov 03 2025 17:10:23 GMT-0800 (Pacific Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
2376
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Tue Nov 04 2025 08:55:34 GMT+0200 (Eastern European Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
2377
2377
  </footer>
2378
2378
 
2379
2379
  <script>prettyPrint();</script>
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1519,7 +1519,7 @@ export async function fetchRecentActivitiesActiveTabs() {
1519
1519
  <br class="clear">
1520
1520
 
1521
1521
  <footer>
1522
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Mon Nov 03 2025 17:10:23 GMT-0800 (Pacific Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
1522
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Tue Nov 04 2025 08:55:34 GMT+0200 (Eastern European Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
1523
1523
  </footer>
1524
1524
 
1525
1525
  <script>prettyPrint();</script>
@@ -224,7 +224,7 @@ export async function numberOfActiveUsers(): Promise&lt;number> {
224
224
  <br class="clear">
225
225
 
226
226
  <footer>
227
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Mon Nov 03 2025 17:10:23 GMT-0800 (Pacific Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
227
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Tue Nov 04 2025 08:55:34 GMT+0200 (Eastern European Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
228
228
  </footer>
229
229
 
230
230
  <script>prettyPrint();</script>
@@ -85,7 +85,7 @@ export async function fetchChatSettings({ brand = null, liveEventIsGlobal = fals
85
85
  <br class="clear">
86
86
 
87
87
  <footer>
88
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Mon Nov 03 2025 17:10:23 GMT-0800 (Pacific Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
88
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Tue Nov 04 2025 08:55:34 GMT+0200 (Eastern European Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
89
89
  </footer>
90
90
 
91
91
  <script>prettyPrint();</script>
@@ -137,7 +137,7 @@ export async function removeContentAsNotInterested(contentId) {
137
137
  <br class="clear">
138
138
 
139
139
  <footer>
140
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Mon Nov 03 2025 17:10:23 GMT-0800 (Pacific Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
140
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Tue Nov 04 2025 08:55:34 GMT+0200 (Eastern European Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
141
141
  </footer>
142
142
 
143
143
  <script>prettyPrint();</script>
@@ -245,7 +245,7 @@ export async function toggleSignaturePrivate(showSignature = true) {
245
245
  <br class="clear">
246
246
 
247
247
  <footer>
248
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Mon Nov 03 2025 17:10:23 GMT-0800 (Pacific Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
248
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Tue Nov 04 2025 08:55:34 GMT+0200 (Eastern European Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
249
249
  </footer>
250
250
 
251
251
  <script>prettyPrint();</script>
File without changes
@@ -279,7 +279,7 @@ export async function restorePurchases(
279
279
  <br class="clear">
280
280
 
281
281
  <footer>
282
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Mon Nov 03 2025 17:10:23 GMT-0800 (Pacific Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
282
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Tue Nov 04 2025 08:55:34 GMT+0200 (Eastern European Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
283
283
  </footer>
284
284
 
285
285
  <script>prettyPrint();</script>
@@ -361,7 +361,7 @@ export async function fetchLiveEventPollingState() {
361
361
  <br class="clear">
362
362
 
363
363
  <footer>
364
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Mon Nov 03 2025 17:10:23 GMT-0800 (Pacific Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
364
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Tue Nov 04 2025 08:55:34 GMT+0200 (Eastern European Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
365
365
  </footer>
366
366
 
367
367
  <script>prettyPrint();</script>
@@ -170,7 +170,7 @@ export async function userOnboardingForBrand(brand: string): Promise&lt;Onboardi
170
170
  <br class="clear">
171
171
 
172
172
  <footer>
173
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Mon Nov 03 2025 17:10:23 GMT-0800 (Pacific Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
173
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Tue Nov 04 2025 08:55:34 GMT+0200 (Eastern European Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
174
174
  </footer>
175
175
 
176
176
  <script>prettyPrint();</script>
@@ -84,7 +84,7 @@ export async function fetchCustomerPayments(): Promise&lt;CustomerOrder[]> {
84
84
  <br class="clear">
85
85
 
86
86
  <footer>
87
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Mon Nov 03 2025 17:10:23 GMT-0800 (Pacific Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
87
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Tue Nov 04 2025 08:55:34 GMT+0200 (Eastern European Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
88
88
  </footer>
89
89
 
90
90
  <script>prettyPrint();</script>
@@ -97,7 +97,7 @@ export async function reset() {
97
97
  <br class="clear">
98
98
 
99
99
  <footer>
100
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Mon Nov 03 2025 17:10:23 GMT-0800 (Pacific Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
100
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Tue Nov 04 2025 08:55:34 GMT+0200 (Eastern European Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
101
101
  </footer>
102
102
 
103
103
  <script>prettyPrint();</script>
@@ -102,7 +102,7 @@ export async function deleteProfilePicture() {
102
102
  <br class="clear">
103
103
 
104
104
  <footer>
105
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Mon Nov 03 2025 17:10:23 GMT-0800 (Pacific Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
105
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Tue Nov 04 2025 08:55:34 GMT+0200 (Eastern European Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
106
106
  </footer>
107
107
 
108
108
  <script>prettyPrint();</script>
@@ -157,7 +157,7 @@ export async function logout() {
157
157
  <br class="clear">
158
158
 
159
159
  <footer>
160
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Mon Nov 03 2025 17:10:23 GMT-0800 (Pacific Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
160
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Tue Nov 04 2025 08:55:34 GMT+0200 (Eastern European Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
161
161
  </footer>
162
162
 
163
163
  <script>prettyPrint();</script>
@@ -209,7 +209,7 @@
209
209
  <br class="clear">
210
210
 
211
211
  <footer>
212
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Mon Nov 03 2025 17:10:23 GMT-0800 (Pacific Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
212
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Tue Nov 04 2025 08:55:34 GMT+0200 (Eastern European Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
213
213
  </footer>
214
214
 
215
215
  <script>prettyPrint();</script>
@@ -66,7 +66,7 @@
66
66
  <br class="clear">
67
67
 
68
68
  <footer>
69
- Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Mon Nov 03 2025 17:10:23 GMT-0800 (Pacific Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
69
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Tue Nov 04 2025 08:55:34 GMT+0200 (Eastern European Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
70
70
  </footer>
71
71
 
72
72
  <script>prettyPrint();</script>
package/jest.config.js CHANGED
File without changes
package/jsdoc.json CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "musora-content-services",
3
- "version": "2.67.1",
3
+ "version": "2.67.2",
4
4
  "description": "A package for Musoras content services ",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -4,6 +4,24 @@
4
4
  const PROGRESS_NAMES = ['All', 'In Progress', 'Completed', 'Not Started']
5
5
  const DIFFICULTY_STRINGS = ['Introductory', 'Beginner', 'Intermediate', 'Advanced', 'Expert']
6
6
 
7
+ const LESSON_TYPE_FILTER = [
8
+ {
9
+ title: 'Single Lessons',
10
+ children: ['Lessons', 'Practice Alongs', 'Live Archives', 'Student Archives']
11
+ },
12
+ {
13
+ title: 'Courses',
14
+ children: ['Courses', 'Guided Courses', 'Tiered Courses']
15
+ },
16
+ {
17
+ title: 'Skill Packs',
18
+ },
19
+ {
20
+ title: 'Entertainment',
21
+ children: ['Specials', 'Documentaries', 'Shows']
22
+ }
23
+ ]
24
+
7
25
  class SortingOptions {
8
26
  static Popularity = { value: '-popularity', name: 'Most Popular' }
9
27
  static PopularityDesc = { value: 'recommended', name: 'Recommended' }
@@ -65,7 +83,7 @@ const commonMetadata = {
65
83
  filterOptions: {
66
84
  difficulty: DIFFICULTY_STRINGS,
67
85
  style: ['Country/Folk', 'Funk/Disco', 'Hard Rock/Metal', 'Hip-Hop/Rap/EDM', 'Holiday/Soundtrack', 'Jazz/Blues', 'Latin/World', 'Pop/Rock', 'R&B/Soul', 'Worship/Gospel'],
68
- type: ['Single Lessons', 'Practice Alongs', 'Performances', 'Courses', 'Live Archives', 'Student Archives'],
86
+ type: LESSON_TYPE_FILTER,
69
87
  progress: PROGRESS_NAMES,
70
88
  },
71
89
  sortingOptions: {
@@ -140,7 +158,7 @@ const contentMetadata = {
140
158
  filterOptions: {
141
159
  difficulty: DIFFICULTY_STRINGS,
142
160
  style: ['Country/Folk', 'Funk/Disco', 'Hard Rock/Metal', 'Hip-Hop/Rap/EDM', 'Holiday/Soundtrack', 'Jazz/Blues', 'Latin/World', 'Pop/Rock', 'R&B/Soul', 'Worship/Gospel'],
143
- type: ['Single Lessons', 'Practice Alongs', 'Performances', 'Courses', 'Shows', 'Documentaries', 'Live Archives', 'Student Archives'],
161
+ type: LESSON_TYPE_FILTER,
144
162
  progress: PROGRESS_NAMES,
145
163
  },
146
164
  sortingOptions: {
@@ -165,7 +183,7 @@ const contentMetadata = {
165
183
  filterOptions: {
166
184
  difficulty: DIFFICULTY_STRINGS,
167
185
  style: ['Classical', 'Country/Folk', 'Funk/Disco', 'Hip-Hop/Rap/EDM', 'Holiday/Soundtrack', 'Jazz/Blues', 'Latin/World', 'Pop/Rock', 'R&B/Soul', 'Worship/Gospel'],
168
- type: ['Single Lessons', 'Practice Alongs', 'Performances', 'Courses', 'Live Archives', 'Student Archives'],
186
+ type: LESSON_TYPE_FILTER,
169
187
  progress: PROGRESS_NAMES,
170
188
  },
171
189
  sortingOptions: {
@@ -246,17 +264,62 @@ const filterTypes = {
246
264
 
247
265
  /**
248
266
  * Transforms filterOptions into the required format
267
+ * Supports both flat and hierarchical (two-layer) filter structures
268
+ *
269
+ * @param {Object} filterOptions - The raw filter options object
270
+ * @returns {Array} Transformed filter groups with items
271
+ *
272
+ * Hierarchical Structure Format:
273
+ * Input: [{ parent: 'Category', children: ['Sub1', 'Sub2'] }]
274
+ * Output: Parent items with nested children in 'items' property
275
+ *
276
+ * This nested structure provides clear parent-child relationships
277
+ * and is ideal for collapsible groups and hierarchical rendering
249
278
  */
250
279
  function transformFilters(filterOptions) {
251
- return Object.entries(filterOptions).map(([key, values]) => ({
252
- title: capitalizeFirstLetter(key),
253
- type: filterTypes[key] || 'checkbox',
254
- key,
255
- items: values.map(value => ({
256
- name: value,
257
- value: `${key},${key === 'progress' ? value.toLowerCase() : value}`,
258
- })),
259
- }))
280
+ return Object.entries(filterOptions).map(([key, values]) => {
281
+ // Check if values is hierarchical (array of objects with title property)
282
+ // We check for 'title' property to distinguish from simple string arrays
283
+ const isHierarchical = Array.isArray(values) &&
284
+ values.length > 0 &&
285
+ typeof values[0] === 'object' &&
286
+ values[0].title !== undefined;
287
+
288
+ if (isHierarchical) {
289
+ // Handle hierarchical structure - nest children inside parents
290
+ const items = values.map(group => ({
291
+ name: group.title,
292
+ value: `${key},${group.title}`,
293
+ // Only include isParent and items if children exist
294
+ ...(group.children && group.children.length > 0 && {
295
+ isParent: true,
296
+ items: group.children.map(child => ({
297
+ name: child,
298
+ value: `${key},${child}`,
299
+ }))
300
+ })
301
+ }));
302
+
303
+ return {
304
+ title: capitalizeFirstLetter(key),
305
+ type: filterTypes[key] || 'checkbox',
306
+ key,
307
+ items,
308
+ isHierarchical: true,
309
+ };
310
+ } else {
311
+ // Handle flat structure (existing behavior - no changes)
312
+ return {
313
+ title: capitalizeFirstLetter(key),
314
+ type: filterTypes[key] || 'checkbox',
315
+ key,
316
+ items: values.map(value => ({
317
+ name: value,
318
+ value: `${key},${key === 'progress' ? value.toLowerCase() : value}`,
319
+ })),
320
+ };
321
+ }
322
+ });
260
323
  }
261
324
 
262
325
  /**
@@ -197,6 +197,10 @@ export const coursesLessonTypes = [
197
197
  'tiered-course', // TODO: new content type
198
198
  'guided-course'];
199
199
 
200
+ export const skillLessonTypes = [
201
+ 'skill-pack'
202
+ ]
203
+
200
204
  export const showsLessonTypes = [
201
205
  'boot-camp',
202
206
  'diy-drum-experiment',
@@ -216,13 +220,17 @@ export const collectionLessonTypes = [
216
220
  ];
217
221
 
218
222
  export const lessonTypesMapping = {
219
- 'single lessons': singleLessonTypes,
223
+ 'lessons': singleLessonTypes,
220
224
  'practice alongs': practiceAlongsLessonTypes,
221
225
  'live archives': liveArchivesLessonTypes,
222
226
  'performances': performancesLessonTypes,
223
227
  'student archives': studentArchivesLessonTypes,
224
228
  'documentaries': documentariesLessonTypes,
225
- 'courses': coursesLessonTypes,
229
+ 'courses': ['course'],
230
+ 'guided courses': ['guided-course'],
231
+ 'tiered courses': ['tiered-course' ],
232
+ 'skill packs': ['skill-pack'],
233
+ 'specials': ['specials'],
226
234
  'shows': showsLessonTypes,
227
235
  'collections': collectionLessonTypes,
228
236
  'individuals': individualLessonsTypes,
@@ -232,6 +240,8 @@ export const lessonTypesMapping = {
232
240
  'sheet music': transcriptionsLessonTypes,
233
241
  'play-alongs': playAlongLessonTypes,
234
242
  'jam tracks': jamTrackLessonTypes,
243
+ 'entertainment': entertainmentLessonTypes,
244
+ 'single lessons': [...singleLessonTypes, ...liveArchivesLessonTypes, ...studentArchivesLessonTypes, ...practiceAlongsLessonTypes]
235
245
  };
236
246
 
237
247
  export const getNextLessonLessonParentTypes = ['course', 'guided-course', 'pack', 'pack-bundle', 'song-tutorial'];
@@ -259,7 +269,7 @@ export const songs = {
259
269
  }
260
270
 
261
271
  export const filterTypes = {
262
- lessons: [...individualLessonsTypes, ...collectionLessonTypes],
272
+ lessons: [...singleLessonTypes, ...practiceAlongsLessonTypes , ...liveArchivesLessonTypes, ...studentArchivesLessonTypes, ...coursesLessonTypes, ...skillLessonTypes , ...entertainmentLessonTypes],
263
273
  songs: [...tutorialsLessonTypes, ...transcriptionsLessonTypes, ...playAlongLessonTypes, ...jamTrackLessonTypes],
264
274
  }
265
275
 
File without changes
package/src/index.d.ts CHANGED
File without changes
package/src/index.js CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -132,6 +132,7 @@ export async function fetchCommunityGuidelines(brand: string): Promise<ForumPost
132
132
  export interface SearchParams {
133
133
  page?: number,
134
134
  limit?: number,
135
+ category_id?: number,
135
136
  /** Sort order: "-published_on" (default), "published_on", or "mine". */
136
137
  sort?: '-published_on' | string,
137
138
  term: string
@@ -147,7 +148,7 @@ export interface SearchParams {
147
148
  */
148
149
  export async function search(
149
150
  brand: string,
150
- params: SearchParams = {}
151
+ params: SearchParams
151
152
  ): Promise<PaginatedResponse<ForumPost>> {
152
153
  const httpClient = new HttpClient(globalConfig.baseUrl)
153
154
  const queryObj: Record<string, string> = { brand, ...Object.fromEntries(
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/test/log.js CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes