musora-content-services 2.8.4 → 2.9.1
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 +9 -0
- package/link_mcs.sh +0 -0
- package/package.json +1 -1
- package/src/index.d.ts +4 -0
- package/src/index.js +4 -0
- package/src/services/content-org/playlists.js +23 -1
- package/src/services/imageSRCVerify.js +0 -0
- package/src/services/railcontent.js +9 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
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.9.1](https://github.com/railroadmedia/musora-content-services/compare/v2.9.0...v2.9.1) (2025-06-13)
|
|
6
|
+
|
|
7
|
+
## [2.9.0](https://github.com/railroadmedia/musora-content-services/compare/v2.8.4...v2.9.0) (2025-06-11)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* **BEH-582:** comment undelete endpoint ([#283](https://github.com/railroadmedia/musora-content-services/issues/283)) ([da4f460](https://github.com/railroadmedia/musora-content-services/commit/da4f4602fdd6deb4362a50264a0f224ab5b5a432))
|
|
13
|
+
|
|
5
14
|
### [2.8.4](https://github.com/railroadmedia/musora-content-services/compare/v2.8.3...v2.8.4) (2025-06-10)
|
|
6
15
|
|
|
7
16
|
### [2.8.3](https://github.com/railroadmedia/musora-content-services/compare/v2.8.2...v2.8.3) (2025-06-06)
|
package/link_mcs.sh
CHANGED
|
File without changes
|
package/package.json
CHANGED
package/src/index.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
fetchUserPlaylists,
|
|
17
17
|
likePlaylist,
|
|
18
18
|
reportPlaylist,
|
|
19
|
+
restoreItemFromPlaylist,
|
|
19
20
|
togglePlaylistPrivate,
|
|
20
21
|
undeletePlaylist,
|
|
21
22
|
unlikePlaylist,
|
|
@@ -148,6 +149,7 @@ import {
|
|
|
148
149
|
postRecordWatchSession,
|
|
149
150
|
replyToComment,
|
|
150
151
|
reportComment,
|
|
152
|
+
restoreComment,
|
|
151
153
|
setStudentViewForUser,
|
|
152
154
|
unassignModeratorToComment,
|
|
153
155
|
unlikeComment
|
|
@@ -464,6 +466,8 @@ declare module 'musora-content-services' {
|
|
|
464
466
|
reportComment,
|
|
465
467
|
reportPlaylist,
|
|
466
468
|
reset,
|
|
469
|
+
restoreComment,
|
|
470
|
+
restoreItemFromPlaylist,
|
|
467
471
|
restorePracticeSession,
|
|
468
472
|
restoreUserPractice,
|
|
469
473
|
setStudentViewForUser,
|
package/src/index.js
CHANGED
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
fetchUserPlaylists,
|
|
17
17
|
likePlaylist,
|
|
18
18
|
reportPlaylist,
|
|
19
|
+
restoreItemFromPlaylist,
|
|
19
20
|
togglePlaylistPrivate,
|
|
20
21
|
undeletePlaylist,
|
|
21
22
|
unlikePlaylist,
|
|
@@ -148,6 +149,7 @@ import {
|
|
|
148
149
|
postRecordWatchSession,
|
|
149
150
|
replyToComment,
|
|
150
151
|
reportComment,
|
|
152
|
+
restoreComment,
|
|
151
153
|
setStudentViewForUser,
|
|
152
154
|
unassignModeratorToComment,
|
|
153
155
|
unlikeComment
|
|
@@ -463,6 +465,8 @@ export {
|
|
|
463
465
|
reportComment,
|
|
464
466
|
reportPlaylist,
|
|
465
467
|
reset,
|
|
468
|
+
restoreComment,
|
|
469
|
+
restoreItemFromPlaylist,
|
|
466
470
|
restorePracticeSession,
|
|
467
471
|
restoreUserPractice,
|
|
468
472
|
setStudentViewForUser,
|
|
@@ -263,7 +263,7 @@ export async function updatePlaylist(playlistId, {
|
|
|
263
263
|
* Delete Items from playlist
|
|
264
264
|
*
|
|
265
265
|
* @async
|
|
266
|
-
* @function
|
|
266
|
+
* @function deleteItemsFromPlaylist
|
|
267
267
|
* @param {string|number} playlistId - The unique identifier of the playlist to update.
|
|
268
268
|
* @param {array} deleted_items - list of playlist ids to delete (user_playlist_item_id, not the railcontent_id)
|
|
269
269
|
*
|
|
@@ -281,6 +281,28 @@ export async function deleteItemsFromPlaylist(playlistId, deleted_items) {
|
|
|
281
281
|
return await updatePlaylist(playlistId, {deleted_items})
|
|
282
282
|
}
|
|
283
283
|
|
|
284
|
+
/**
|
|
285
|
+
* Restore items
|
|
286
|
+
*
|
|
287
|
+
* @async
|
|
288
|
+
* @function restoreItemFromPlaylist
|
|
289
|
+
* @param {string|number} playlistItemId - The unique identifier of the playlist ite to restore.
|
|
290
|
+
*
|
|
291
|
+
* @returns {Promise<Object>}
|
|
292
|
+
*
|
|
293
|
+
* @example
|
|
294
|
+
* // Restore item 8462221
|
|
295
|
+
* try {
|
|
296
|
+
* const response = await restoreItemFromPlaylist(8462221);
|
|
297
|
+
* } catch (error) {
|
|
298
|
+
* console.error('Failed to restore playlist item:', error);
|
|
299
|
+
* }
|
|
300
|
+
*/
|
|
301
|
+
export async function restoreItemFromPlaylist(playlistItemId) {
|
|
302
|
+
const url = `${BASE_PATH}/v1/user/playlists/items/undelete/${playlistItemId}`
|
|
303
|
+
return await fetchHandler(url, 'POST')
|
|
304
|
+
}
|
|
305
|
+
|
|
284
306
|
/**
|
|
285
307
|
* Duplicates a playlist and playlist items for the provided playlistID for the authorized user
|
|
286
308
|
*
|
|
File without changes
|
|
@@ -635,6 +635,15 @@ export async function deleteComment(commentId) {
|
|
|
635
635
|
return await fetchHandler(url, 'DELETE')
|
|
636
636
|
}
|
|
637
637
|
|
|
638
|
+
/**
|
|
639
|
+
* @param {int} commentId
|
|
640
|
+
* @returns {Promise<*|null>}
|
|
641
|
+
*/
|
|
642
|
+
export async function restoreComment(commentId) {
|
|
643
|
+
const url = `/api/content/v1/comments/restore/${commentId}`
|
|
644
|
+
return await fetchHandler(url, 'POST')
|
|
645
|
+
}
|
|
646
|
+
|
|
638
647
|
/**
|
|
639
648
|
* @param {int} commentId
|
|
640
649
|
* @param {string} comment
|