musora-content-services 2.27.1 → 2.27.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/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/src/index.d.ts +2 -4
- package/src/index.js +2 -4
- package/src/services/contentProgress.js +0 -24
- package/src/services/railcontent.js +5 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
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.27.2](https://github.com/railroadmedia/musora-content-services/compare/v2.27.1...v2.27.2) (2025-07-21)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **last-engaged:** add playlist last engaged endpoint ([#361](https://github.com/railroadmedia/musora-content-services/issues/361)) ([3396207](https://github.com/railroadmedia/musora-content-services/commit/33962077500e47ff9cba93fb23fd28b63eb4112a))
|
|
11
|
+
|
|
5
12
|
### [2.27.1](https://github.com/railroadmedia/musora-content-services/compare/v2.27.0...v2.27.1) (2025-07-17)
|
|
6
13
|
|
|
7
14
|
|
package/package.json
CHANGED
package/src/index.d.ts
CHANGED
|
@@ -55,8 +55,6 @@ import {
|
|
|
55
55
|
} from './services/contentLikes.js';
|
|
56
56
|
|
|
57
57
|
import {
|
|
58
|
-
assignmentStatusCompleted,
|
|
59
|
-
assignmentStatusReset,
|
|
60
58
|
contentStatusCompleted,
|
|
61
59
|
contentStatusReset,
|
|
62
60
|
getAllCompleted,
|
|
@@ -160,6 +158,7 @@ import {
|
|
|
160
158
|
postContentLiked,
|
|
161
159
|
postContentReset,
|
|
162
160
|
postContentUnliked,
|
|
161
|
+
postPlaylistContentEngaged,
|
|
163
162
|
postRecordWatchSession,
|
|
164
163
|
replyToComment,
|
|
165
164
|
reportComment,
|
|
@@ -318,8 +317,6 @@ declare module 'musora-content-services' {
|
|
|
318
317
|
applyCloudflareWrapper,
|
|
319
318
|
applySanityTransformations,
|
|
320
319
|
assignModeratorToComment,
|
|
321
|
-
assignmentStatusCompleted,
|
|
322
|
-
assignmentStatusReset,
|
|
323
320
|
blockUser,
|
|
324
321
|
buildImageSRC,
|
|
325
322
|
calculateLongestStreaks,
|
|
@@ -506,6 +503,7 @@ declare module 'musora-content-services' {
|
|
|
506
503
|
postContentLiked,
|
|
507
504
|
postContentReset,
|
|
508
505
|
postContentUnliked,
|
|
506
|
+
postPlaylistContentEngaged,
|
|
509
507
|
postRecordWatchSession,
|
|
510
508
|
rankCategories,
|
|
511
509
|
rankItems,
|
package/src/index.js
CHANGED
|
@@ -55,8 +55,6 @@ import {
|
|
|
55
55
|
} from './services/contentLikes.js';
|
|
56
56
|
|
|
57
57
|
import {
|
|
58
|
-
assignmentStatusCompleted,
|
|
59
|
-
assignmentStatusReset,
|
|
60
58
|
contentStatusCompleted,
|
|
61
59
|
contentStatusReset,
|
|
62
60
|
getAllCompleted,
|
|
@@ -160,6 +158,7 @@ import {
|
|
|
160
158
|
postContentLiked,
|
|
161
159
|
postContentReset,
|
|
162
160
|
postContentUnliked,
|
|
161
|
+
postPlaylistContentEngaged,
|
|
163
162
|
postRecordWatchSession,
|
|
164
163
|
replyToComment,
|
|
165
164
|
reportComment,
|
|
@@ -317,8 +316,6 @@ export {
|
|
|
317
316
|
applyCloudflareWrapper,
|
|
318
317
|
applySanityTransformations,
|
|
319
318
|
assignModeratorToComment,
|
|
320
|
-
assignmentStatusCompleted,
|
|
321
|
-
assignmentStatusReset,
|
|
322
319
|
blockUser,
|
|
323
320
|
buildImageSRC,
|
|
324
321
|
calculateLongestStreaks,
|
|
@@ -505,6 +502,7 @@ export {
|
|
|
505
502
|
postContentLiked,
|
|
506
503
|
postContentReset,
|
|
507
504
|
postContentUnliked,
|
|
505
|
+
postPlaylistContentEngaged,
|
|
508
506
|
postRecordWatchSession,
|
|
509
507
|
rankCategories,
|
|
510
508
|
rankItems,
|
|
@@ -256,18 +256,6 @@ export async function getStartedOrCompletedProgressOnly({ brand = null} = {}) {
|
|
|
256
256
|
return result
|
|
257
257
|
}
|
|
258
258
|
|
|
259
|
-
export async function assignmentStatusCompleted(assignmentId, parentContentId) {
|
|
260
|
-
await dataContext.update(
|
|
261
|
-
async function (localContext) {
|
|
262
|
-
let hierarchy = await fetchHierarchy(parentContentId)
|
|
263
|
-
completeStatusInLocalContext(localContext, assignmentId, hierarchy)
|
|
264
|
-
},
|
|
265
|
-
async function () {
|
|
266
|
-
return postContentComplete(assignmentId)
|
|
267
|
-
}
|
|
268
|
-
)
|
|
269
|
-
}
|
|
270
|
-
|
|
271
259
|
export async function contentStatusCompleted(contentId) {
|
|
272
260
|
return await dataContext.update(
|
|
273
261
|
async function (localContext) {
|
|
@@ -324,18 +312,6 @@ function getChildrenToDepth(parentId, hierarchy, depth = 1) {
|
|
|
324
312
|
return allChildrenIds
|
|
325
313
|
}
|
|
326
314
|
|
|
327
|
-
export async function assignmentStatusReset(assignmentId, contentId) {
|
|
328
|
-
await dataContext.update(
|
|
329
|
-
async function (localContext) {
|
|
330
|
-
let hierarchy = await fetchHierarchy(contentId)
|
|
331
|
-
resetStatusInLocalContext(localContext, assignmentId, hierarchy)
|
|
332
|
-
},
|
|
333
|
-
async function () {
|
|
334
|
-
return postContentReset(contentId)
|
|
335
|
-
}
|
|
336
|
-
)
|
|
337
|
-
}
|
|
338
|
-
|
|
339
315
|
export async function contentStatusReset(contentId) {
|
|
340
316
|
await dataContext.update(
|
|
341
317
|
async function (localContext) {
|
|
@@ -323,6 +323,11 @@ export async function fetchContentProgress(currentVersion) {
|
|
|
323
323
|
return fetchDataHandler(url, currentVersion)
|
|
324
324
|
}
|
|
325
325
|
|
|
326
|
+
export async function postPlaylistContentEngaged(playlistItemId) {
|
|
327
|
+
let url = `/railtracker/v1/last-engaged/${playlistItemId}`
|
|
328
|
+
return postDataHandler(url)
|
|
329
|
+
}
|
|
330
|
+
|
|
326
331
|
export async function postRecordWatchSession(
|
|
327
332
|
contentId,
|
|
328
333
|
mediaTypeId,
|