musora-content-services 1.0.255 → 1.0.257

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.
Files changed (38) hide show
  1. package/.github/workflows/node.js.yml +0 -0
  2. package/CHANGELOG.md +4 -0
  3. package/babel.config.js +0 -0
  4. package/docs/fonts/Montserrat/Montserrat-Bold.eot +0 -0
  5. package/docs/fonts/Montserrat/Montserrat-Bold.ttf +0 -0
  6. package/docs/fonts/Montserrat/Montserrat-Bold.woff +0 -0
  7. package/docs/fonts/Montserrat/Montserrat-Bold.woff2 +0 -0
  8. package/docs/fonts/Montserrat/Montserrat-Regular.eot +0 -0
  9. package/docs/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
  10. package/docs/fonts/Montserrat/Montserrat-Regular.woff +0 -0
  11. package/docs/fonts/Montserrat/Montserrat-Regular.woff2 +0 -0
  12. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.eot +0 -0
  13. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg +0 -0
  14. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.ttf +0 -0
  15. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff +0 -0
  16. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff2 +0 -0
  17. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.eot +0 -0
  18. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.svg +0 -0
  19. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.ttf +0 -0
  20. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff +0 -0
  21. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff2 +0 -0
  22. package/docs/scripts/collapse.js +0 -0
  23. package/docs/scripts/commonNav.js +0 -0
  24. package/docs/scripts/linenumber.js +0 -0
  25. package/docs/scripts/nav.js +0 -0
  26. package/docs/scripts/polyfill.js +0 -0
  27. package/docs/scripts/prettify/Apache-License-2.0.txt +0 -0
  28. package/docs/scripts/prettify/lang-css.js +0 -0
  29. package/docs/scripts/prettify/prettify.js +0 -0
  30. package/docs/scripts/search.js +0 -0
  31. package/docs/styles/jsdoc.css +0 -0
  32. package/docs/styles/prettify.css +0 -0
  33. package/jsdoc.json +0 -0
  34. package/package.json +1 -1
  35. package/src/index.d.ts +2 -0
  36. package/src/index.js +2 -0
  37. package/src/services/railcontent.js +11 -0
  38. package/src/services/sanity.js +9 -3
File without changes
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
+ ### [1.0.257](https://github.com/railroadmedia/musora-content-services/compare/v1.0.256...v1.0.257) (2025-01-03)
6
+
7
+ ### [1.0.256](https://github.com/railroadmedia/musora-content-services/compare/v1.0.255...v1.0.256) (2025-01-02)
8
+
5
9
  ### [1.0.255](https://github.com/railroadmedia/musora-content-services/compare/v1.0.254...v1.0.255) (2025-01-02)
6
10
 
7
11
  ### [1.0.254](https://github.com/railroadmedia/musora-content-services/compare/v1.0.253...v1.0.254) (2024-12-20)
package/babel.config.js 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
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/jsdoc.json CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "musora-content-services",
3
- "version": "1.0.255",
3
+ "version": "1.0.257",
4
4
  "description": "A package for Musoras content services ",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
package/src/index.d.ts CHANGED
@@ -71,6 +71,7 @@ import {
71
71
  postChallengesHideCompletedBanner,
72
72
  postChallengesLeave,
73
73
  postChallengesSetStartDate,
74
+ postChallengesSoloNotification,
74
75
  postChallengesUnlock,
75
76
  postContentCompleted,
76
77
  postContentLiked,
@@ -257,6 +258,7 @@ declare module 'musora-content-services' {
257
258
  postChallengesHideCompletedBanner,
258
259
  postChallengesLeave,
259
260
  postChallengesSetStartDate,
261
+ postChallengesSoloNotification,
260
262
  postChallengesUnlock,
261
263
  postContentCompleted,
262
264
  postContentLiked,
package/src/index.js CHANGED
@@ -71,6 +71,7 @@ import {
71
71
  postChallengesHideCompletedBanner,
72
72
  postChallengesLeave,
73
73
  postChallengesSetStartDate,
74
+ postChallengesSoloNotification,
74
75
  postChallengesUnlock,
75
76
  postContentCompleted,
76
77
  postContentLiked,
@@ -256,6 +257,7 @@ export {
256
257
  postChallengesHideCompletedBanner,
257
258
  postChallengesLeave,
258
259
  postChallengesSetStartDate,
260
+ postChallengesSoloNotification,
259
261
  postChallengesUnlock,
260
262
  postContentCompleted,
261
263
  postContentLiked,
@@ -575,6 +575,17 @@ export async function postChallengesCommunityNotification(contentId) {
575
575
  return await fetchHandler(url, 'post');
576
576
  }
577
577
 
578
+ /**
579
+ * Enable solo notifications for the provided challenge
580
+ *
581
+ * @param {int|string} contentId - railcontent id of the challenge
582
+ * @returns {Promise<any|null>}
583
+ */
584
+ export async function postChallengesSoloNotification(contentId) {
585
+ let url = `/challenges/notifications/solo_reminders/${contentId}`;
586
+ return await fetchHandler(url, 'post');
587
+ }
588
+
578
589
  /**
579
590
  * Complete the challenge lesson and update challenge progress
580
591
  *
@@ -1189,7 +1189,7 @@ export async function fetchLessonContent(railContentId) {
1189
1189
  brand,
1190
1190
  status,
1191
1191
  soundslice,
1192
- instrumentless,
1192
+ instrumentless,
1193
1193
  railcontent_id,
1194
1194
  "id":railcontent_id,
1195
1195
  slug, artist->,
@@ -1199,7 +1199,7 @@ export async function fetchLessonContent(railContentId) {
1199
1199
  "description": description[0].children[0].text,
1200
1200
  "chapters": chapter[]{
1201
1201
  chapter_description,
1202
- chapter_timecode,
1202
+ chapter_timecode,
1203
1203
  "chapter_thumbnail_url": chapter_thumbnail_url.asset->url
1204
1204
  },
1205
1205
  "instructors":instructor[]->name,
@@ -1220,7 +1220,13 @@ export async function fetchLessonContent(railContentId) {
1220
1220
  mp3_yes_drums_no_click_url,
1221
1221
  mp3_yes_drums_yes_click_url,
1222
1222
  "permission_id": permission[]->railcontent_id,
1223
- parent_content_data,
1223
+ "parent_content_data": parent_content_data[]{
1224
+ "id": id,
1225
+ "title": *[railcontent_id == ^.id][0].title,
1226
+ "web_url_path": *[railcontent_id == ^.id][0].web_url_path,
1227
+ "slug":*[railcontent_id == ^.id][0].slug,
1228
+ "type": *[railcontent_id == ^.id][0]._type,
1229
+ },
1224
1230
  sort,
1225
1231
  xp`;
1226
1232
  const query = await buildQuery(