musora-content-services 2.9.3 → 2.9.5
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 +4 -0
- package/docs/ContentOrganization.html +0 -0
- package/docs/Gamification.html +0 -0
- package/docs/UserManagementSystem.html +0 -0
- package/docs/api_types.js.html +0 -0
- package/docs/config.js.html +0 -0
- package/docs/content-org_content-org.js.html +0 -0
- package/docs/content-org_playlists-types.js.html +0 -0
- package/docs/content-org_playlists.js.html +0 -0
- package/docs/content.js.html +0 -0
- package/docs/gamification_awards.js.html +0 -0
- package/docs/gamification_gamification.js.html +0 -0
- package/docs/gamification_types.js.html +0 -0
- package/docs/global.html +0 -0
- package/docs/index.html +0 -0
- package/docs/module-Awards.html +0 -0
- package/docs/module-Config.html +0 -0
- package/docs/module-Content-Services-V2.html +0 -0
- package/docs/module-Interests.html +0 -0
- package/docs/module-Permissions.html +0 -0
- package/docs/module-Playlists.html +0 -0
- package/docs/module-Railcontent-Services.html +0 -0
- package/docs/module-Sanity-Services.html +0 -0
- package/docs/module-Sessions.html +0 -0
- package/docs/module-UserActivity.html +0 -0
- package/docs/module-UserChat.html +0 -0
- package/docs/module-UserManagement.html +0 -0
- package/docs/module-UserNotifications.html +0 -0
- package/docs/module-UserProfile.html +0 -0
- package/docs/railcontent.js.html +0 -0
- package/docs/sanity.js.html +0 -0
- package/docs/userActivity.js.html +0 -0
- package/docs/user_chat.js.html +0 -0
- package/docs/user_interests.js.html +0 -0
- package/docs/user_management.js.html +0 -0
- package/docs/user_notifications.js.html +0 -0
- package/docs/user_permissions.js.html +0 -0
- package/docs/user_profile.js.html +0 -0
- package/docs/user_sessions.js.html +0 -0
- package/docs/user_types.js.html +0 -0
- package/docs/user_user-management-system.js.html +0 -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-types.js +0 -0
- package/src/services/content-org/playlists.js +0 -0
- package/src/services/railcontent.js +0 -0
- package/src/services/sanity.js +2 -1
- package/src/services/user/chat.js +0 -0
- package/src/services/user/notifications.js +22 -0
- package/src/services/userActivity.js +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
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.5](https://github.com/railroadmedia/musora-content-services/compare/v2.9.4...v2.9.5) (2025-06-18)
|
|
6
|
+
|
|
7
|
+
### [2.9.4](https://github.com/railroadmedia/musora-content-services/compare/v2.9.3...v2.9.4) (2025-06-17)
|
|
8
|
+
|
|
5
9
|
### [2.9.3](https://github.com/railroadmedia/musora-content-services/compare/v2.9.2...v2.9.3) (2025-06-16)
|
|
6
10
|
|
|
7
11
|
### [2.9.2](https://github.com/railroadmedia/musora-content-services/compare/v2.9.0...v2.9.2) (2025-06-16)
|
|
File without changes
|
package/docs/Gamification.html
CHANGED
|
File without changes
|
|
File without changes
|
package/docs/api_types.js.html
CHANGED
|
File without changes
|
package/docs/config.js.html
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/docs/content.js.html
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/docs/global.html
CHANGED
|
File without changes
|
package/docs/index.html
CHANGED
|
File without changes
|
package/docs/module-Awards.html
CHANGED
|
File without changes
|
package/docs/module-Config.html
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
|
package/docs/railcontent.js.html
CHANGED
|
File without changes
|
package/docs/sanity.js.html
CHANGED
|
File without changes
|
|
File without changes
|
package/docs/user_chat.js.html
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/docs/user_types.js.html
CHANGED
|
File without changes
|
|
File without changes
|
package/link_mcs.sh
CHANGED
|
File without changes
|
package/package.json
CHANGED
package/src/index.d.ts
CHANGED
|
@@ -237,6 +237,7 @@ import {
|
|
|
237
237
|
import {
|
|
238
238
|
deleteNotification,
|
|
239
239
|
fetchNotifications,
|
|
240
|
+
fetchUnreadCount,
|
|
240
241
|
markAllNotificationsAsRead,
|
|
241
242
|
markNotificationAsRead,
|
|
242
243
|
markNotificationAsUnread
|
|
@@ -383,6 +384,7 @@ declare module 'musora-content-services' {
|
|
|
383
384
|
fetchTopComment,
|
|
384
385
|
fetchTopLevelParentId,
|
|
385
386
|
fetchUninterests,
|
|
387
|
+
fetchUnreadCount,
|
|
386
388
|
fetchUpcomingEvents,
|
|
387
389
|
fetchUserAward,
|
|
388
390
|
fetchUserBadges,
|
package/src/index.js
CHANGED
|
@@ -237,6 +237,7 @@ import {
|
|
|
237
237
|
import {
|
|
238
238
|
deleteNotification,
|
|
239
239
|
fetchNotifications,
|
|
240
|
+
fetchUnreadCount,
|
|
240
241
|
markAllNotificationsAsRead,
|
|
241
242
|
markNotificationAsRead,
|
|
242
243
|
markNotificationAsUnread
|
|
@@ -382,6 +383,7 @@ export {
|
|
|
382
383
|
fetchTopComment,
|
|
383
384
|
fetchTopLevelParentId,
|
|
384
385
|
fetchUninterests,
|
|
386
|
+
fetchUnreadCount,
|
|
385
387
|
fetchUpcomingEvents,
|
|
386
388
|
fetchUserAward,
|
|
387
389
|
fetchUserBadges,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/src/services/sanity.js
CHANGED
|
@@ -1307,11 +1307,12 @@ export async function fetchLessonContent(railContentId) {
|
|
|
1307
1307
|
xp,
|
|
1308
1308
|
stbs,ds2stbs, bdsStbs,
|
|
1309
1309
|
...select(
|
|
1310
|
-
defined(live_event_start_time)
|
|
1310
|
+
defined(live_event_start_time) => {
|
|
1311
1311
|
"live_event_start_time": live_event_start_time,
|
|
1312
1312
|
"live_event_end_time": live_event_end_time,
|
|
1313
1313
|
"live_event_youtube_id": live_event_youtube_id,
|
|
1314
1314
|
"videoId": coalesce(live_event_youtube_id, video.external_id),
|
|
1315
|
+
"live_event_is_global": live_global_event == true
|
|
1315
1316
|
}
|
|
1316
1317
|
)`
|
|
1317
1318
|
const query = await buildQuery(`railcontent_id == ${railContentId}`, filterParams, fields, {
|
|
File without changes
|
|
@@ -118,3 +118,25 @@ export async function deleteNotification(notificationId) {
|
|
|
118
118
|
const url = `${baseUrl}/v1/${notificationId}`
|
|
119
119
|
return fetchHandler(url, 'delete')
|
|
120
120
|
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Fetches the count of unread notifications for the current user in a given brand context.
|
|
124
|
+
*
|
|
125
|
+
* @param {Object} [options={}] - Options for fetching unread count.
|
|
126
|
+
* @param {string} options.brand - The brand to filter unread notifications by (required).
|
|
127
|
+
* @returns {Promise<Object>} - A promise that resolves to an object with the unread count.
|
|
128
|
+
*
|
|
129
|
+
* @throws {Error} If the brand is not provided.
|
|
130
|
+
*
|
|
131
|
+
* @example
|
|
132
|
+
* fetchUnreadCount({ brand: 'drumeo' })
|
|
133
|
+
* .then(data => console.log(data.unread_count))
|
|
134
|
+
* .catch(error => console.error(error));
|
|
135
|
+
*/
|
|
136
|
+
export async function fetchUnreadCount({ brand = null} = {}) {
|
|
137
|
+
if (!brand) {
|
|
138
|
+
throw new Error('brand is required')
|
|
139
|
+
}
|
|
140
|
+
const url = `${baseUrl}/v1/unread-count?brand=${brand}`
|
|
141
|
+
return fetchHandler(url, 'get')
|
|
142
|
+
}
|
|
File without changes
|