musora-content-services 1.0.238 → 1.0.239

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/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
+ ### [1.0.239](https://github.com/railroadmedia/musora-content-services/compare/v1.0.238...v1.0.239) (2024-12-16)
6
+
5
7
  ### [1.0.238](https://github.com/railroadmedia/musora-content-services/compare/v1.0.237...v1.0.238) (2024-12-16)
6
8
 
7
9
  ### [1.0.237](https://github.com/railroadmedia/musora-content-services/compare/v1.0.236...v1.0.237) (2024-12-14)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "musora-content-services",
3
- "version": "1.0.238",
3
+ "version": "1.0.239",
4
4
  "description": "A package for Musoras content services ",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
package/src/index.d.ts CHANGED
@@ -63,6 +63,7 @@ import {
63
63
  fetchUserPlaylists,
64
64
  likePlaylist,
65
65
  pinPlaylist,
66
+ playback,
66
67
  postChallengesCommunityNotification,
67
68
  postChallengesCompleteLesson,
68
69
  postChallengesEnroll,
@@ -248,6 +249,7 @@ declare module 'musora-content-services' {
248
249
  likeContent,
249
250
  likePlaylist,
250
251
  pinPlaylist,
252
+ playback,
251
253
  postChallengesCommunityNotification,
252
254
  postChallengesCompleteLesson,
253
255
  postChallengesEnroll,
package/src/index.js CHANGED
@@ -63,6 +63,7 @@ import {
63
63
  fetchUserPlaylists,
64
64
  likePlaylist,
65
65
  pinPlaylist,
66
+ playback,
66
67
  postChallengesCommunityNotification,
67
68
  postChallengesCompleteLesson,
68
69
  postChallengesEnroll,
@@ -247,6 +248,7 @@ export {
247
248
  likeContent,
248
249
  likePlaylist,
249
250
  pinPlaylist,
251
+ playback,
250
252
  postChallengesCommunityNotification,
251
253
  postChallengesCompleteLesson,
252
254
  postChallengesEnroll,
@@ -1162,6 +1162,11 @@ export async function reportPlaylist(playlistId, {issue} = {}) {
1162
1162
  return await fetchHandler(url, "PUT");
1163
1163
  }
1164
1164
 
1165
+ export async function playback(playlistId) {
1166
+ const url = `/playlists/play/${playlistId}`;
1167
+ return await fetchHandler(url, "GET");
1168
+ }
1169
+
1165
1170
  function fetchAbsolute(url, params) {
1166
1171
  if (globalConfig.railcontentConfig.baseUrl) {
1167
1172
  if (url.startsWith('/')) {
@@ -1118,7 +1118,7 @@ export async function fetchNextPreviousLesson(railcontentId) {
1118
1118
  */
1119
1119
  export async function jumpToContinueContent(railcontentId) {
1120
1120
  const nextContent = await fetchNextContentDataForParent(railcontentId);
1121
- if (!nextContent) {
1121
+ if (!nextContent || !nextContent.id) {
1122
1122
  return null;
1123
1123
  }
1124
1124
  let next = await fetchByRailContentId(nextContent.id, nextContent.type);