musora-content-services 2.9.0 → 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 +2 -0
- package/link_mcs.sh +0 -0
- package/package.json +1 -1
- package/src/index.d.ts +2 -0
- package/src/index.js +2 -0
- package/src/services/content-org/playlists.js +23 -1
- package/src/services/imageSRCVerify.js +0 -0
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.9.1](https://github.com/railroadmedia/musora-content-services/compare/v2.9.0...v2.9.1) (2025-06-13)
|
|
6
|
+
|
|
5
7
|
## [2.9.0](https://github.com/railroadmedia/musora-content-services/compare/v2.8.4...v2.9.0) (2025-06-11)
|
|
6
8
|
|
|
7
9
|
|
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,
|
|
@@ -466,6 +467,7 @@ declare module 'musora-content-services' {
|
|
|
466
467
|
reportPlaylist,
|
|
467
468
|
reset,
|
|
468
469
|
restoreComment,
|
|
470
|
+
restoreItemFromPlaylist,
|
|
469
471
|
restorePracticeSession,
|
|
470
472
|
restoreUserPractice,
|
|
471
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,
|
|
@@ -465,6 +466,7 @@ export {
|
|
|
465
466
|
reportPlaylist,
|
|
466
467
|
reset,
|
|
467
468
|
restoreComment,
|
|
469
|
+
restoreItemFromPlaylist,
|
|
468
470
|
restorePracticeSession,
|
|
469
471
|
restoreUserPractice,
|
|
470
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
|