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.
- package/.coderabbit.yaml +0 -0
- package/.editorconfig +0 -0
- package/.github/pull_request_template.md +0 -0
- package/.github/workflows/conventional-commits.yaml +0 -0
- package/.github/workflows/docs.js.yml +0 -0
- package/.github/workflows/node.js.yml +0 -0
- package/.prettierignore +0 -0
- package/.prettierrc +0 -0
- package/CHANGELOG.md +2 -0
- package/README.md +0 -0
- package/babel.config.cjs +0 -0
- package/docs/ContentOrganization.html +1 -1
- package/docs/Forums.html +1 -1
- package/docs/Gamification.html +1 -1
- package/docs/UserManagementSystem.html +1 -1
- package/docs/api_types.js.html +1 -1
- package/docs/config.js.html +1 -1
- package/docs/content-org_content-org.js.html +1 -1
- package/docs/content-org_guided-courses.ts.html +1 -1
- package/docs/content-org_learning-paths.ts.html +1 -1
- package/docs/content-org_playlists-types.js.html +1 -1
- package/docs/content-org_playlists.js.html +1 -1
- package/docs/content.js.html +1 -1
- package/docs/fonts/Montserrat/Montserrat-Bold.eot +0 -0
- package/docs/fonts/Montserrat/Montserrat-Bold.ttf +0 -0
- package/docs/fonts/Montserrat/Montserrat-Bold.woff +0 -0
- package/docs/fonts/Montserrat/Montserrat-Bold.woff2 +0 -0
- package/docs/fonts/Montserrat/Montserrat-Regular.eot +0 -0
- package/docs/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
- package/docs/fonts/Montserrat/Montserrat-Regular.woff +0 -0
- package/docs/fonts/Montserrat/Montserrat-Regular.woff2 +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.eot +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.ttf +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff2 +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.eot +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.svg +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.ttf +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff2 +0 -0
- package/docs/forums_categories.ts.html +1 -1
- package/docs/forums_discussions.js.html +0 -0
- package/docs/forums_forum.js.html +0 -0
- package/docs/forums_forums.ts.html +1 -1
- package/docs/forums_posts.ts.html +2 -1
- package/docs/forums_threads.ts.html +1 -1
- package/docs/gamification_awards.js.html +0 -0
- package/docs/gamification_awards.ts.html +1 -1
- package/docs/gamification_gamification.js.html +1 -1
- package/docs/gamification_types.js.html +0 -0
- package/docs/global.html +1 -1
- package/docs/index.html +1 -1
- package/docs/module-Accounts.html +1 -1
- package/docs/module-Awards.html +1 -1
- package/docs/module-Categories.html +0 -0
- package/docs/module-Config.html +1 -1
- package/docs/module-Content-Services-V2.html +1 -1
- package/docs/module-ForumCategories.html +0 -0
- package/docs/module-ForumDiscussions.html +0 -0
- package/docs/module-Forums.html +7 -7
- package/docs/module-GuidedCourses.html +1 -1
- package/docs/module-Interests.html +1 -1
- package/docs/module-Onboarding.html +1 -1
- package/docs/module-Payments.html +1 -1
- package/docs/module-Permissions.html +1 -1
- package/docs/module-Playlists.html +1 -1
- package/docs/module-Railcontent-Services.html +1 -1
- package/docs/module-Sanity-Services.html +1 -1
- package/docs/module-Sessions.html +1 -1
- package/docs/module-Threads.html +0 -0
- package/docs/module-UserActivity.html +1 -1
- package/docs/module-UserChat.html +1 -1
- package/docs/module-UserManagement.html +1 -1
- package/docs/module-UserMemberships.html +1 -1
- package/docs/module-UserNotifications.html +1 -1
- package/docs/module-UserProfile.html +1 -1
- package/docs/railcontent.js.html +1 -1
- package/docs/sanity.js.html +1 -1
- package/docs/scripts/collapse.js +0 -0
- package/docs/scripts/commonNav.js +0 -0
- package/docs/scripts/linenumber.js +0 -0
- package/docs/scripts/nav.js +0 -0
- package/docs/scripts/polyfill.js +0 -0
- package/docs/scripts/prettify/Apache-License-2.0.txt +0 -0
- package/docs/scripts/prettify/lang-css.js +0 -0
- package/docs/scripts/prettify/prettify.js +0 -0
- package/docs/scripts/search.js +0 -0
- package/docs/styles/jsdoc.css +0 -0
- package/docs/styles/prettify.css +0 -0
- package/docs/userActivity.js.html +1 -1
- package/docs/user_account.ts.html +1 -1
- package/docs/user_chat.js.html +1 -1
- package/docs/user_interests.js.html +1 -1
- package/docs/user_management.js.html +1 -1
- package/docs/user_memberships.js.html +0 -0
- package/docs/user_memberships.ts.html +1 -1
- package/docs/user_notifications.js.html +1 -1
- package/docs/user_onboarding.ts.html +1 -1
- package/docs/user_payments.ts.html +1 -1
- package/docs/user_permissions.js.html +1 -1
- package/docs/user_profile.js.html +1 -1
- package/docs/user_sessions.js.html +1 -1
- package/docs/user_types.js.html +1 -1
- package/docs/user_user-management-system.js.html +1 -1
- package/jest.config.js +0 -0
- package/jsdoc.json +0 -0
- package/package.json +1 -1
- package/src/contentMetaData.js +75 -12
- package/src/contentTypeConfig.js +13 -3
- package/src/filterBuilder.js +0 -0
- package/src/index.d.ts +0 -0
- package/src/index.js +0 -0
- package/src/infrastructure/http/HttpClient.ts +0 -0
- package/src/infrastructure/http/executors/FetchRequestExecutor.ts +0 -0
- package/src/infrastructure/http/index.ts +0 -0
- package/src/infrastructure/http/interfaces/HeaderProvider.ts +0 -0
- package/src/infrastructure/http/interfaces/HttpError.ts +0 -0
- package/src/infrastructure/http/interfaces/NetworkError.ts +0 -0
- package/src/infrastructure/http/interfaces/RequestExecutor.ts +0 -0
- package/src/infrastructure/http/interfaces/RequestOptions.ts +0 -0
- package/src/infrastructure/http/providers/DefaultHeaderProvider.ts +0 -0
- package/src/lib/httpHelper.js +0 -0
- package/src/lib/lastUpdated.js +0 -0
- package/src/services/api/types.js +0 -0
- package/src/services/api/types.ts +0 -0
- package/src/services/config.js +0 -0
- package/src/services/content-org/content-org.js +0 -0
- package/src/services/content-org/guided-courses.ts +0 -0
- package/src/services/content-org/learning-paths.ts +0 -0
- package/src/services/content-org/playlists-types.js +0 -0
- package/src/services/content-org/playlists.js +0 -0
- package/src/services/content.js +0 -0
- package/src/services/contentAggregator.js +0 -0
- package/src/services/contentLikes.js +0 -0
- package/src/services/contentProgress.js +0 -0
- package/src/services/dataContext.js +0 -0
- package/src/services/dateUtils.js +0 -0
- package/src/services/eventsAPI.js +0 -0
- package/src/services/forums/categories.ts +0 -0
- package/src/services/forums/forums.ts +0 -0
- package/src/services/forums/posts.ts +2 -1
- package/src/services/forums/threads.ts +0 -0
- package/src/services/forums/types.ts +0 -0
- package/src/services/gamification/awards.ts +0 -0
- package/src/services/gamification/gamification.js +0 -0
- package/src/services/imageSRCBuilder.js +0 -0
- package/src/services/imageSRCVerify.js +0 -0
- package/src/services/railcontent.js +0 -0
- package/src/services/recommendations.js +0 -0
- package/src/services/types.js +0 -0
- package/src/services/user/account.ts +0 -0
- package/src/services/user/chat.js +0 -0
- package/src/services/user/interests.js +0 -0
- package/src/services/user/management.js +0 -0
- package/src/services/user/memberships.ts +0 -0
- package/src/services/user/notifications.js +0 -0
- package/src/services/user/onboarding.ts +0 -0
- package/src/services/user/payments.ts +0 -0
- package/src/services/user/permissions.js +0 -0
- package/src/services/user/profile.js +0 -0
- package/src/services/user/sessions.js +0 -0
- package/src/services/user/types.js +0 -0
- package/src/services/user/user-management-system.js +0 -0
- package/src/services/userActivity.js +0 -0
- package/test/HttpClient.test.js +0 -0
- package/test/content.test.js +0 -0
- package/test/contentLikes.test.js +0 -0
- package/test/contentProgress.test.js +0 -0
- package/test/dataContext.test.js +0 -0
- package/test/forum.test.js +0 -0
- package/test/imageSRCBuilder.test.js +0 -0
- package/test/imageSRCVerify.test.js +0 -0
- package/test/initializeTests.js +0 -0
- package/test/lib/lastUpdated.test.js +0 -0
- package/test/live/contentProgressLive.test.js +0 -0
- package/test/live/railcontentLive.test.js +0 -0
- package/test/localStorageMock.js +0 -0
- package/test/log.js +0 -0
- package/test/mockData/mockData_fetchByRailContentIds_one_content.json +0 -0
- package/test/mockData/mockData_progress_content.json +0 -0
- package/test/mockData/mockData_sanity_progress_content.json +0 -0
- package/test/mockData/mockData_user_practices.json +0 -0
- package/test/notifications.test.js +0 -0
- package/test/progressRows.test.js +0 -0
- package/test/sanityQueryService.test.js +0 -0
- package/test/streakMessage.test.js +0 -0
- package/test/user/permissions.test.js +0 -0
- package/test/userActivity.test.js +0 -0
- package/tools/generate-index.cjs +0 -0
- 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
|
|
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>
|
package/docs/railcontent.js.html
CHANGED
|
@@ -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
|
|
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>
|
package/docs/sanity.js.html
CHANGED
|
@@ -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
|
|
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>
|
package/docs/scripts/collapse.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/docs/scripts/nav.js
CHANGED
|
File without changes
|
package/docs/scripts/polyfill.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/docs/scripts/search.js
CHANGED
|
File without changes
|
package/docs/styles/jsdoc.css
CHANGED
|
File without changes
|
package/docs/styles/prettify.css
CHANGED
|
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
|
|
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<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
|
|
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>
|
package/docs/user_chat.js.html
CHANGED
|
@@ -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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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<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
|
|
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<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
|
|
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
|
|
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
|
|
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
|
|
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>
|
package/docs/user_types.js.html
CHANGED
|
@@ -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
|
|
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
|
|
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
package/src/contentMetaData.js
CHANGED
|
@@ -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:
|
|
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:
|
|
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:
|
|
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
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
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
|
/**
|
package/src/contentTypeConfig.js
CHANGED
|
@@ -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
|
-
'
|
|
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':
|
|
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: [...
|
|
272
|
+
lessons: [...singleLessonTypes, ...practiceAlongsLessonTypes , ...liveArchivesLessonTypes, ...studentArchivesLessonTypes, ...coursesLessonTypes, ...skillLessonTypes , ...entertainmentLessonTypes],
|
|
263
273
|
songs: [...tutorialsLessonTypes, ...transcriptionsLessonTypes, ...playAlongLessonTypes, ...jamTrackLessonTypes],
|
|
264
274
|
}
|
|
265
275
|
|
package/src/filterBuilder.js
CHANGED
|
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
|
package/src/lib/httpHelper.js
CHANGED
|
File without changes
|
package/src/lib/lastUpdated.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/src/services/config.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/src/services/content.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
|
|
@@ -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
|
package/src/services/types.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
|
package/test/HttpClient.test.js
CHANGED
|
File without changes
|
package/test/content.test.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/test/dataContext.test.js
CHANGED
|
File without changes
|
package/test/forum.test.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/test/initializeTests.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/test/localStorageMock.js
CHANGED
|
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
|
|
File without changes
|
|
File without changes
|