musora-content-services 2.3.20 → 2.3.21

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 (67) hide show
  1. package/.github/workflows/node.js.yml +0 -0
  2. package/.prettierignore +0 -0
  3. package/.prettierrc +0 -0
  4. package/CHANGELOG.md +2 -0
  5. package/README.md +0 -0
  6. package/babel.config.cjs +0 -0
  7. package/docs/fonts/Montserrat/Montserrat-Bold.eot +0 -0
  8. package/docs/fonts/Montserrat/Montserrat-Bold.ttf +0 -0
  9. package/docs/fonts/Montserrat/Montserrat-Bold.woff +0 -0
  10. package/docs/fonts/Montserrat/Montserrat-Bold.woff2 +0 -0
  11. package/docs/fonts/Montserrat/Montserrat-Regular.eot +0 -0
  12. package/docs/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
  13. package/docs/fonts/Montserrat/Montserrat-Regular.woff +0 -0
  14. package/docs/fonts/Montserrat/Montserrat-Regular.woff2 +0 -0
  15. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.eot +0 -0
  16. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg +0 -0
  17. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.ttf +0 -0
  18. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff +0 -0
  19. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff2 +0 -0
  20. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.eot +0 -0
  21. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.svg +0 -0
  22. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.ttf +0 -0
  23. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff +0 -0
  24. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff2 +0 -0
  25. package/docs/scripts/collapse.js +0 -0
  26. package/docs/scripts/commonNav.js +0 -0
  27. package/docs/scripts/linenumber.js +0 -0
  28. package/docs/scripts/nav.js +0 -0
  29. package/docs/scripts/polyfill.js +0 -0
  30. package/docs/scripts/prettify/Apache-License-2.0.txt +0 -0
  31. package/docs/scripts/prettify/lang-css.js +0 -0
  32. package/docs/scripts/prettify/prettify.js +0 -0
  33. package/docs/scripts/search.js +0 -0
  34. package/docs/styles/jsdoc.css +0 -0
  35. package/docs/styles/prettify.css +0 -0
  36. package/jest.config.js +0 -0
  37. package/link_mcs.sh +0 -0
  38. package/package.json +1 -1
  39. package/src/contentAggregator.js +0 -0
  40. package/src/filterBuilder.js +0 -0
  41. package/src/index.d.ts +4 -0
  42. package/src/index.js +4 -0
  43. package/src/lib/httpHelper.js +0 -0
  44. package/src/services/api/types.js +0 -0
  45. package/src/services/content-org/content-org.js +0 -0
  46. package/src/services/content-org/playlists.js +41 -41
  47. package/src/services/content.js +0 -0
  48. package/src/services/contentLikes.js +0 -0
  49. package/src/services/contentProgress.js +0 -0
  50. package/src/services/dataContext.js +0 -0
  51. package/src/services/dateUtils.js +0 -0
  52. package/src/services/forum.js +0 -0
  53. package/src/services/gamification/awards.js +0 -0
  54. package/src/services/gamification/gamification.js +0 -0
  55. package/src/services/gamification/types.js +0 -0
  56. package/src/services/imageSRCVerify.js +0 -0
  57. package/src/services/recommendations.js +0 -0
  58. package/src/services/types.js +0 -0
  59. package/src/services/user/management.js +0 -0
  60. package/src/services/user/sessions.js +0 -0
  61. package/src/services/user/types.js +0 -0
  62. package/src/services/user/user-management-system.js +0 -0
  63. package/src/services/userActivity.js +0 -0
  64. package/test/live/contentProgressLive.test.js +0 -0
  65. package/test/live/railcontentLive.test.js +0 -0
  66. package/test/localStorageMock.js +0 -0
  67. package/test/log.js +0 -0
File without changes
package/.prettierignore CHANGED
File without changes
package/.prettierrc CHANGED
File without changes
package/CHANGELOG.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [2.3.21](https://github.com/railroadmedia/musora-content-services/compare/v2.3.20...v2.3.21) (2025-05-02)
6
+
5
7
  ### [2.3.20](https://github.com/railroadmedia/musora-content-services/compare/v2.3.19...v2.3.20) (2025-04-30)
6
8
 
7
9
  ### [2.3.19](https://github.com/railroadmedia/musora-content-services/compare/v2.3.18...v2.3.19) (2025-04-30)
package/README.md CHANGED
File without changes
package/babel.config.cjs 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
package/jest.config.js CHANGED
File without changes
package/link_mcs.sh CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "musora-content-services",
3
- "version": "2.3.20",
3
+ "version": "2.3.21",
4
4
  "description": "A package for Musoras content services ",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
File without changes
File without changes
package/src/index.d.ts CHANGED
@@ -9,6 +9,8 @@ import {
9
9
  addItemToPlaylist,
10
10
  createPlaylist,
11
11
  duplicatePlaylist,
12
+ fetchPlaylist,
13
+ fetchPlaylistItems,
12
14
  fetchUserPlaylists,
13
15
  likePlaylist,
14
16
  reorderPlaylistItems,
@@ -300,6 +302,8 @@ declare module 'musora-content-services' {
300
302
  fetchPackData,
301
303
  fetchParentForDownload,
302
304
  fetchPlayAlongsCount,
305
+ fetchPlaylist,
306
+ fetchPlaylistItems,
303
307
  fetchRecent,
304
308
  fetchRelatedLessons,
305
309
  fetchRelatedRecommendedContent,
package/src/index.js CHANGED
@@ -9,6 +9,8 @@ import {
9
9
  addItemToPlaylist,
10
10
  createPlaylist,
11
11
  duplicatePlaylist,
12
+ fetchPlaylist,
13
+ fetchPlaylistItems,
12
14
  fetchUserPlaylists,
13
15
  likePlaylist,
14
16
  reorderPlaylistItems,
@@ -299,6 +301,8 @@ export {
299
301
  fetchPackData,
300
302
  fetchParentForDownload,
301
303
  fetchPlayAlongsCount,
304
+ fetchPlaylist,
305
+ fetchPlaylistItems,
302
306
  fetchRecent,
303
307
  fetchRelatedLessons,
304
308
  fetchRelatedRecommendedContent,
File without changes
File without changes
File without changes
@@ -254,6 +254,47 @@ export async function duplicatePlaylist(playlistId, playlistData) {
254
254
  return await fetchHandler(url, 'POST', null, playlistData)
255
255
  }
256
256
 
257
+ /**
258
+ * Retrieves details of a specific playlist by its ID.
259
+ *
260
+ * This function sends a GET request to the `/playlists/playlist` endpoint with a specified playlist ID.
261
+ * The server validates the user's access to the playlist and returns playlist details if the user is authorized.
262
+ *
263
+ * @param {string|number} playlistId - The unique identifier of the playlist to retrieve.
264
+ *
265
+ * @returns {Promise<Object>} - A promise that resolves to the response from the API, containing:
266
+ * - `data` (Object): The playlist details, or an error message if access is denied or the playlist is not found.
267
+ *
268
+ * @example
269
+ * fetchPlaylist(12345)
270
+ * .then(response => console.log(response.data))
271
+ * .catch(error => console.error('Error fetching playlist:', error));
272
+ */
273
+ export async function fetchPlaylist(playlistId) {
274
+ const url = `${BASE_PATH}/v1/user/playlists/${playlistId}`
275
+ return await fetchHandler(url, 'GET')
276
+ }
277
+
278
+ /**
279
+ * Retrieves items within a specified playlist by playlist ID.
280
+ *
281
+ * This function sends a GET request to the `/playlists/playlist-lessons` endpoint to fetch items in the given playlist.
282
+ * The server combines data from the playlist and additional metadata from Sanity to enhance item details.
283
+ *
284
+ * @param {string|number} playlistId - The unique identifier of the playlist whose items are to be fetched.
285
+ *
286
+ * @returns {Promise<Array<Object>>} - A promise that resolves to an array of playlist items
287
+ *
288
+ * @example
289
+ * fetchPlaylistItems(12345)
290
+ * .then(items => console.log(items))
291
+ * .catch(error => console.error('Error fetching playlist items:', error));
292
+ */
293
+ export async function fetchPlaylistItems(playlistId) {
294
+ const url = `${BASE_PATH}/v1/user/playlists/items/${playlistId}`
295
+ return await fetchHandler(url, 'GET')
296
+ }
297
+
257
298
  // Unsupported playlist endpoints are here and will need to be implemented one by one
258
299
  //
259
300
  //
@@ -321,47 +362,6 @@ export async function duplicatePlaylist(playlistId, playlistData) {
321
362
  // }
322
363
  //
323
364
  //
324
- // /**
325
- // * Retrieves details of a specific playlist by its ID.
326
- // *
327
- // * This function sends a GET request to the `/playlists/playlist` endpoint with a specified playlist ID.
328
- // * The server validates the user's access to the playlist and returns playlist details if the user is authorized.
329
- // *
330
- // * @param {string|number} playlistId - The unique identifier of the playlist to retrieve.
331
- // *
332
- // * @returns {Promise<Object>} - A promise that resolves to the response from the API, containing:
333
- // * - `data` (Object): The playlist details, or an error message if access is denied or the playlist is not found.
334
- // *
335
- // * @example
336
- // * fetchPlaylist(12345)
337
- // * .then(response => console.log(response.data))
338
- // * .catch(error => console.error('Error fetching playlist:', error));
339
- // */
340
- // export async function fetchPlaylist(playlistId) {
341
- // const url = `/playlists/playlist/${playlistId}`
342
- // return await fetchHandler(url, 'GET')
343
- // }
344
- //
345
- // /**
346
- // * Retrieves items within a specified playlist by playlist ID.
347
- // *
348
- // * This function sends a GET request to the `/playlists/playlist-lessons` endpoint to fetch items in the given playlist.
349
- // * The server combines data from the playlist and additional metadata from Sanity to enhance item details.
350
- // *
351
- // * @param {string|number} playlistId - The unique identifier of the playlist whose items are to be fetched.
352
- // *
353
- // * @returns {Promise<Array<Object>>} - A promise that resolves to an array of playlist items
354
- // *
355
- // * @example
356
- // * fetchPlaylistItems(12345)
357
- // * .then(items => console.log(items))
358
- // * .catch(error => console.error('Error fetching playlist items:', error));
359
- // */
360
- // export async function fetchPlaylistItems(playlistId, { sort } = {}) {
361
- // const sortString = sort ? `&sort=${sort}` : ''
362
- // const url = `/playlists/playlist-lessons?playlist_id=${playlistId}${sortString}`
363
- // return await fetchHandler(url, 'GET')
364
- // }
365
365
  //
366
366
  // /**
367
367
  // * Updates a playlist item with the provided data.
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