musora-content-services 1.6.4 → 1.6.6

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 (124) hide show
  1. package/.github/workflows/conventional-commits.yaml +16 -0
  2. package/.github/workflows/docs.js.yml +58 -0
  3. package/.github/workflows/node.js.yml +0 -0
  4. package/.github/workflows/sync-docs.yml +56 -0
  5. package/.prettierignore +0 -0
  6. package/.prettierrc +0 -0
  7. package/CHANGELOG.md +4 -0
  8. package/README.md +3 -3
  9. package/babel.config.cjs +0 -0
  10. package/docs/fonts/Montserrat/Montserrat-Bold.eot +0 -0
  11. package/docs/fonts/Montserrat/Montserrat-Bold.ttf +0 -0
  12. package/docs/fonts/Montserrat/Montserrat-Bold.woff +0 -0
  13. package/docs/fonts/Montserrat/Montserrat-Bold.woff2 +0 -0
  14. package/docs/fonts/Montserrat/Montserrat-Regular.eot +0 -0
  15. package/docs/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
  16. package/docs/fonts/Montserrat/Montserrat-Regular.woff +0 -0
  17. package/docs/fonts/Montserrat/Montserrat-Regular.woff2 +0 -0
  18. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.eot +0 -0
  19. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg +0 -0
  20. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.ttf +0 -0
  21. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff +0 -0
  22. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff2 +0 -0
  23. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.eot +0 -0
  24. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.svg +0 -0
  25. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.ttf +0 -0
  26. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff +0 -0
  27. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff2 +0 -0
  28. package/docs/scripts/collapse.js +0 -0
  29. package/docs/scripts/commonNav.js +0 -0
  30. package/docs/scripts/linenumber.js +0 -0
  31. package/docs/scripts/nav.js +0 -0
  32. package/docs/scripts/polyfill.js +0 -0
  33. package/docs/scripts/prettify/Apache-License-2.0.txt +0 -0
  34. package/docs/scripts/prettify/lang-css.js +0 -0
  35. package/docs/scripts/prettify/prettify.js +0 -0
  36. package/docs/scripts/search.js +0 -0
  37. package/docs/styles/jsdoc.css +0 -0
  38. package/docs/styles/prettify.css +0 -0
  39. package/docs/v2/Content-Organization.html +245 -0
  40. package/docs/v2/ContentOrganization.html +245 -0
  41. package/docs/v2/Gamification.html +245 -0
  42. package/docs/v2/UserManagement.html +269 -0
  43. package/docs/v2/UserManagementSystem.html +317 -0
  44. package/docs/v2/api_types.js.html +97 -0
  45. package/docs/v2/config.js.html +143 -0
  46. package/docs/v2/content-org_content-org.js.html +76 -0
  47. package/docs/v2/content-org_playlists-types.js.html +116 -0
  48. package/docs/v2/content-org_playlists.js.html +418 -0
  49. package/docs/v2/content.js.html +466 -0
  50. package/docs/v2/fonts/Montserrat/Montserrat-Bold.eot +0 -0
  51. package/docs/v2/fonts/Montserrat/Montserrat-Bold.ttf +0 -0
  52. package/docs/v2/fonts/Montserrat/Montserrat-Bold.woff +0 -0
  53. package/docs/v2/fonts/Montserrat/Montserrat-Bold.woff2 +0 -0
  54. package/docs/v2/fonts/Montserrat/Montserrat-Regular.eot +0 -0
  55. package/docs/v2/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
  56. package/docs/v2/fonts/Montserrat/Montserrat-Regular.woff +0 -0
  57. package/docs/v2/fonts/Montserrat/Montserrat-Regular.woff2 +0 -0
  58. package/docs/v2/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.eot +0 -0
  59. package/docs/v2/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg +978 -0
  60. package/docs/v2/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.ttf +0 -0
  61. package/docs/v2/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff +0 -0
  62. package/docs/v2/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff2 +0 -0
  63. package/docs/v2/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.eot +0 -0
  64. package/docs/v2/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.svg +1049 -0
  65. package/docs/v2/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.ttf +0 -0
  66. package/docs/v2/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff +0 -0
  67. package/docs/v2/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff2 +0 -0
  68. package/docs/v2/gamification_awards.js.html +664 -0
  69. package/docs/v2/gamification_gamification.js.html +76 -0
  70. package/docs/v2/gamification_types.js.html +98 -0
  71. package/docs/v2/global.html +5812 -0
  72. package/docs/v2/global.html#User +293 -0
  73. package/docs/v2/index.html +168 -0
  74. package/docs/v2/module-Awards.html +354 -0
  75. package/docs/v2/module-Config.html +434 -0
  76. package/docs/v2/module-Content-Services-V2.html +2434 -0
  77. package/docs/v2/module-Interests.html +1066 -0
  78. package/docs/v2/module-Notifications.html +1183 -0
  79. package/docs/v2/module-Permissions.html +406 -0
  80. package/docs/v2/module-Playlists.html +2862 -0
  81. package/docs/v2/module-Railcontent-Services.html +7954 -0
  82. package/docs/v2/module-Sanity-Services.html +9608 -0
  83. package/docs/v2/module-Session-Management.html +575 -0
  84. package/docs/v2/module-Sessions.html +575 -0
  85. package/docs/v2/module-User-Activity.html +4410 -0
  86. package/docs/v2/module-User-Management.html +490 -0
  87. package/docs/v2/module-User-Permissions.html +406 -0
  88. package/docs/v2/module-UserActivity.html +4410 -0
  89. package/docs/v2/module-UserManagement.html +915 -0
  90. package/docs/v2/module-UserNotifications.html +1223 -0
  91. package/docs/v2/module-UserProfile.html +266 -0
  92. package/docs/v2/railcontent.js.html +984 -0
  93. package/docs/v2/sanity.js.html +2459 -0
  94. package/docs/v2/scripts/collapse.js +39 -0
  95. package/docs/v2/scripts/commonNav.js +28 -0
  96. package/docs/v2/scripts/linenumber.js +25 -0
  97. package/docs/v2/scripts/nav.js +12 -0
  98. package/docs/v2/scripts/polyfill.js +4 -0
  99. package/docs/v2/scripts/prettify/Apache-License-2.0.txt +202 -0
  100. package/docs/v2/scripts/prettify/lang-css.js +2 -0
  101. package/docs/v2/scripts/prettify/prettify.js +28 -0
  102. package/docs/v2/scripts/search.js +99 -0
  103. package/docs/v2/styles/jsdoc.css +776 -0
  104. package/docs/v2/styles/prettify.css +80 -0
  105. package/docs/v2/types.js.html +122 -0
  106. package/docs/v2/userActivity.js.html +1451 -0
  107. package/docs/v2/user_interests.js.html +150 -0
  108. package/docs/v2/user_management.js.html +178 -0
  109. package/docs/v2/user_notifications.js.html +192 -0
  110. package/docs/v2/user_permissions.js.html +110 -0
  111. package/docs/v2/user_profile.js.html +105 -0
  112. package/docs/v2/user_sessions.js.html +139 -0
  113. package/docs/v2/user_types.js.html +208 -0
  114. package/docs/v2/user_user-management-system.js.html +79 -0
  115. package/docs/v2/user_user-management.js.html +78 -0
  116. package/jest.config.js +0 -0
  117. package/package.json +1 -1
  118. package/src/contentTypeConfig.js +27 -12
  119. package/src/services/imageSRCBuilder.js +2 -0
  120. package/src/services/sanity.js +120 -81
  121. package/test/live/contentProgressLive.test.js +0 -0
  122. package/test/live/railcontentLive.test.js +0 -0
  123. package/test/localStorageMock.js +0 -0
  124. package/test/log.js +0 -0
@@ -0,0 +1,78 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+
5
+ <meta charset="utf-8">
6
+ <title>user/user-management.js - Documentation</title>
7
+
8
+
9
+ <script src="scripts/prettify/prettify.js"></script>
10
+ <script src="scripts/prettify/lang-css.js"></script>
11
+ <!--[if lt IE 9]>
12
+ <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
13
+ <![endif]-->
14
+ <link type="text/css" rel="stylesheet" href="styles/prettify.css">
15
+ <link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
16
+ <script src="scripts/nav.js" defer></script>
17
+
18
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
19
+ </head>
20
+ <body>
21
+
22
+ <input type="checkbox" id="nav-trigger" class="nav-trigger" />
23
+ <label for="nav-trigger" class="navicon-button x">
24
+ <div class="navicon"></div>
25
+ </label>
26
+
27
+ <label for="nav-trigger" class="overlay"></label>
28
+
29
+ <nav >
30
+
31
+
32
+ <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-Awards.html">Awards</a><ul class='methods'><li data-type='method'><a href="module-Awards.html#.fetchAwardsForUser">fetchAwardsForUser</a></li></ul></li><li><a href="module-Config.html">Config</a><ul class='methods'><li data-type='method'><a href="module-Config.html#.initializeService">initializeService</a></li></ul></li><li><a href="module-Content-Services-V2.html">Content-Services-V2</a><ul class='methods'><li data-type='method'><a href="module-Content-Services-V2.html#.getContentRows">getContentRows</a></li><li data-type='method'><a href="module-Content-Services-V2.html#.getNewAndUpcoming">getNewAndUpcoming</a></li><li data-type='method'><a href="module-Content-Services-V2.html#.getRecent">getRecent</a></li><li data-type='method'><a href="module-Content-Services-V2.html#.getRecommendedForYou">getRecommendedForYou</a></li><li data-type='method'><a href="module-Content-Services-V2.html#.getScheduleContentRows">getScheduleContentRows</a></li><li data-type='method'><a href="module-Content-Services-V2.html#.getTabResults">getTabResults</a></li></ul></li><li><a href="module-Permissions.html">Permissions</a><ul class='methods'><li data-type='method'><a href="module-Permissions.html#.fetchUserPermissions">fetchUserPermissions</a></li><li data-type='method'><a href="module-Permissions.html#.reset">reset</a></li></ul></li><li><a href="module-Playlists.html">Playlists</a><ul class='methods'><li data-type='method'><a href="module-Playlists.html#.addItemToPlaylist">addItemToPlaylist</a></li><li data-type='method'><a href="module-Playlists.html#.createPlaylist">createPlaylist</a></li><li data-type='method'><a href="module-Playlists.html#.fetchUserPlaylists">fetchUserPlaylists</a></li></ul></li><li><a href="module-Railcontent-Services.html">Railcontent-Services</a><ul class='methods'><li data-type='method'><a href="module-Railcontent-Services.html#.assignModeratorToComment">assignModeratorToComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.closeComment">closeComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.countAssignmentsAndLessons">countAssignmentsAndLessons</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.createComment">createComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.deleteComment">deleteComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.deletePlaylist">deletePlaylist</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.deletePlaylistItem">deletePlaylistItem</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.deletePlaylistLike">deletePlaylistLike</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.duplicatePlaylist">duplicatePlaylist</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.editComment">editComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchAllCompletedStates">fetchAllCompletedStates</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchCarouselCardData">fetchCarouselCardData</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchChallengeIndexMetadata">fetchChallengeIndexMetadata</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchChallengeLessonData">fetchChallengeLessonData</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchChallengeMetadata">fetchChallengeMetadata</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchChallengeUserActiveChallenges">fetchChallengeUserActiveChallenges</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchCommentRelies">fetchCommentRelies</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchComments">fetchComments</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchCompletedChallenges">fetchCompletedChallenges</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchCompletedContent">fetchCompletedContent</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchCompletedState">fetchCompletedState</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchContentInProgress">fetchContentInProgress</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchContentPageUserData">fetchContentPageUserData</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchNextContentDataForParent">fetchNextContentDataForParent</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchOwnedChallenges">fetchOwnedChallenges</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchPinnedPlaylists">fetchPinnedPlaylists</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchPlaylist">fetchPlaylist</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchPlaylistItem">fetchPlaylistItem</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchPlaylistItems">fetchPlaylistItems</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchSongsInProgress">fetchSongsInProgress</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchTopComment">fetchTopComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchUserAward">fetchUserAward</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchUserBadges">fetchUserBadges</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchUserChallengeProgress">fetchUserChallengeProgress</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.likeComment">likeComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.likePlaylist">likePlaylist</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.openComment">openComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.pinPlaylist">pinPlaylist</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.postChallengesCommunityNotification">postChallengesCommunityNotification</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.postChallengesEnroll">postChallengesEnroll</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.postChallengesEnrollmentNotification">postChallengesEnrollmentNotification</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.postChallengesHideCompletedBanner">postChallengesHideCompletedBanner</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.postChallengesLeave">postChallengesLeave</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.postChallengesSetStartDate">postChallengesSetStartDate</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.postChallengesSoloNotification">postChallengesSoloNotification</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.postChallengesUnlock">postChallengesUnlock</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.replyToComment">replyToComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.reportPlaylist">reportPlaylist</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.setStudentViewForUser">setStudentViewForUser</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.unassignModeratorToComment">unassignModeratorToComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.unlikeComment">unlikeComment</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.unpinPlaylist">unpinPlaylist</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.updatePlaylist">updatePlaylist</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.updatePlaylistItem">updatePlaylistItem</a></li></ul></li><li><a href="module-Sanity-Services.html">Sanity-Services</a><ul class='methods'><li data-type='method'><a href="module-Sanity-Services.html#.fetchAll">fetchAll</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchAllFilterOptions">fetchAllFilterOptions</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchAllPacks">fetchAllPacks</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchArtistLessons">fetchArtistLessons</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchArtists">fetchArtists</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchByRailContentId">fetchByRailContentId</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchByRailContentIds">fetchByRailContentIds</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchByReference">fetchByReference</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchCoachLessons">fetchCoachLessons</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchComingSoon">fetchComingSoon</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchCommentModContentData">fetchCommentModContentData</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchFoundation">fetchFoundation</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchGenreLessons">fetchGenreLessons</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchLeaving">fetchLeaving</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchLessonContent">fetchLessonContent</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchLessonsFeaturingThisContent">fetchLessonsFeaturingThisContent</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMetadata">fetchMetadata</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMethod">fetchMethod</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMethodChildren">fetchMethodChildren</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMethodChildrenIds">fetchMethodChildrenIds</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMethodPreviousNextLesson">fetchMethodPreviousNextLesson</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchNewReleases">fetchNewReleases</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchNextPreviousLesson">fetchNextPreviousLesson</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchOtherSongVersions">fetchOtherSongVersions</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchPackAll">fetchPackAll</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchPackData">fetchPackData</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchParentForDownload">fetchParentForDownload</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchRelatedLessons">fetchRelatedLessons</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchRelatedRecommendedContent">fetchRelatedRecommendedContent</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchRelatedSongs">fetchRelatedSongs</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchReturning">fetchReturning</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchSanity">fetchSanity</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchScheduledReleases">fetchScheduledReleases</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchShowsData">fetchShowsData</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchSongArtistCount">fetchSongArtistCount</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchSongById">fetchSongById</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchUpcomingEvents">fetchUpcomingEvents</a></li><li data-type='method'><a href="module-Sanity-Services.html#.jumpToContinueContent">jumpToContinueContent</a></li><li data-type='method'><a href="module-Sanity-Services.html#~fetchRelatedByLicense">fetchRelatedByLicense</a></li><li data-type='method'><a href="module-Sanity-Services.html#~getNextAndPreviousQuarterDates">getNextAndPreviousQuarterDates</a></li><li data-type='method'><a href="module-Sanity-Services.html#~getQueryFromPage">getQueryFromPage</a></li><li data-type='method'><a href="module-Sanity-Services.html#~handleCustomFetchAll">handleCustomFetchAll</a></li></ul></li><li><a href="module-Sessions.html">Sessions</a><ul class='methods'><li data-type='method'><a href="module-Sessions.html#.login">login</a></li><li data-type='method'><a href="module-Sessions.html#.logout">logout</a></li></ul></li><li><a href="module-UserManagement.html">UserManagement</a><ul class='methods'><li data-type='method'><a href="module-UserManagement.html#.blockUser">blockUser</a></li><li data-type='method'><a href="module-UserManagement.html#.unblockUser">unblockUser</a></li></ul></li></ul><h3>Namespaces</h3><ul><li><a href="ContentOrganization.html">ContentOrganization</a></li><li><a href="Gamification.html">Gamification</a></li><li><a href="UserManagementSystem.html">UserManagementSystem</a></li></ul><h3><a href="global.html">Global</a></h3>
33
+
34
+ </nav>
35
+
36
+ <div id="main">
37
+
38
+ <h1 class="page-title">user/user-management.js</h1>
39
+
40
+
41
+
42
+
43
+
44
+
45
+
46
+ <section>
47
+ <article>
48
+ <pre class="prettyprint source linenums"><code>/**
49
+ * @namespace UserManagementSystem
50
+ * @property {module:Sessions} Sessions
51
+ * @property {module:Permissions} Permissions
52
+ * @property {module:UserManagement} UserManagement
53
+ */
54
+ </code></pre>
55
+ </article>
56
+ </section>
57
+
58
+
59
+
60
+
61
+
62
+
63
+ </div>
64
+
65
+ <br class="clear">
66
+
67
+ <footer>
68
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Thu Mar 27 2025 03:43:00 GMT+0000 (Coordinated Universal Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
69
+ </footer>
70
+
71
+ <script>prettyPrint();</script>
72
+ <script src="scripts/polyfill.js"></script>
73
+ <script src="scripts/linenumber.js"></script>
74
+
75
+
76
+
77
+ </body>
78
+ </html>
package/jest.config.js CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "musora-content-services",
3
- "version": "1.6.4",
3
+ "version": "1.6.6",
4
4
  "description": "A package for Musoras content services ",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -61,7 +61,8 @@ export const assignmentsField = `"assignments":assignment[]{
61
61
  }
62
62
  }.url, assignment_sheet_music_image),
63
63
  "timecode": assignment_timecode,
64
- "description": coalesce(assignment_description,'')
64
+ "description": coalesce(assignment_description,''),
65
+ "description_portable": assignment_description_portable,
65
66
  },`
66
67
 
67
68
  const contentWithInstructorsField = {
@@ -120,11 +121,7 @@ export const coachLessonsTypes = [
120
121
  ]
121
122
 
122
123
  export const childContentTypeConfig = {
123
- 'song-tutorial': [
124
- `"genre": genre[]->name`,
125
- `difficulty_string`,
126
- `"type": _type`,
127
- ]
124
+ 'song-tutorial': [`"genre": genre[]->name`, `difficulty_string`, `"type": _type`],
128
125
  }
129
126
 
130
127
  export let contentTypeConfig = {
@@ -170,6 +167,7 @@ export let contentTypeConfig = {
170
167
  'challenge_state',
171
168
  'challenge_state_text',
172
169
  `"description": ${descriptionField}`,
170
+ 'description_portable',
173
171
  'total_xp',
174
172
  'xp',
175
173
  '"instructors": instructor[]->name',
@@ -201,6 +199,7 @@ export let contentTypeConfig = {
201
199
  '"lesson_count": child_count',
202
200
  '"instructors": instructor[]->name',
203
201
  `"description": ${descriptionField}`,
202
+ 'description_portable',
204
203
  `"resource": ${resourcesField}`,
205
204
  'xp',
206
205
  'total_xp',
@@ -219,6 +218,7 @@ export let contentTypeConfig = {
219
218
  '"lesson_count": child_count',
220
219
  '"instructors": instructor[]->name',
221
220
  `"description": ${descriptionField}`,
221
+ 'description_portable',
222
222
  `"resource": ${resourcesField}`,
223
223
  'xp',
224
224
  'total_xp',
@@ -237,6 +237,7 @@ export let contentTypeConfig = {
237
237
  artist->,
238
238
  "thumbnail_url":thumbnail.asset->url,
239
239
  "description": description[0].children[0].text,
240
+ description_portable,
240
241
  "chapters": chapter[]{
241
242
  chapter_description,
242
243
  chapter_timecode,
@@ -261,6 +262,7 @@ export let contentTypeConfig = {
261
262
  method: {
262
263
  fields: [
263
264
  `"description": ${descriptionField}`,
265
+ 'description_portable',
264
266
  'hide_from_recsys',
265
267
  '"image": thumbnail.asset->url',
266
268
  '"instructors":instructor[]->name',
@@ -282,6 +284,7 @@ export let contentTypeConfig = {
282
284
  '"lesson_count": child_count',
283
285
  '"instructors": instructor[]->name',
284
286
  `"description": ${descriptionField}`,
287
+ 'description_portable',
285
288
  `"resource": ${resourcesField}`,
286
289
  'xp',
287
290
  'total_xp',
@@ -299,6 +302,7 @@ export let contentTypeConfig = {
299
302
  '"lesson_count": child_count',
300
303
  '"instructors": instructor[]->name',
301
304
  `"description": ${descriptionField}`,
305
+ 'description_portable',
302
306
  `"resource": ${resourcesField}`,
303
307
  'xp',
304
308
  'total_xp',
@@ -331,11 +335,13 @@ export let contentTypeConfig = {
331
335
  '"lesson_count": coalesce(count(child[]->.child[]->), 0)',
332
336
  'xp',
333
337
  `"description": ${descriptionField}`,
338
+ 'description_portable',
334
339
  '"instructors": instructor[]->name',
335
340
  '"logo_image_url": logo_image_url.asset->url',
336
341
  'total_xp',
337
342
  `"children": child[]->{
338
343
  "description": ${descriptionField},
344
+ "description_portable": description_portable,
339
345
  "lesson_count": child_count,
340
346
  ${getFieldsForContentType()}
341
347
  }`,
@@ -344,6 +350,7 @@ export let contentTypeConfig = {
344
350
  '"light_logo": light_mode_logo_url.asset->url',
345
351
  '"dark_logo": dark_mode_logo_url.asset->url',
346
352
  `"description": ${descriptionField}`,
353
+ 'description_portable',
347
354
  ],
348
355
  },
349
356
  rudiment: {
@@ -351,7 +358,12 @@ export let contentTypeConfig = {
351
358
  slug: 'rudiments',
352
359
  },
353
360
  routine: {
354
- fields: [`"description": ${descriptionField}`, 'high_soundslice_slug', 'low_soundslice_slug'],
361
+ fields: [
362
+ `"description": ${descriptionField}`,
363
+ 'description_portable',
364
+ 'high_soundslice_slug',
365
+ 'low_soundslice_slug',
366
+ ],
355
367
  slug: 'routines',
356
368
  },
357
369
  'pack-children': {
@@ -359,6 +371,7 @@ export let contentTypeConfig = {
359
371
  'child_count',
360
372
  `"children": child[]->{
361
373
  "description": ${descriptionField},
374
+ "description_portable": description_portable,
362
375
  ${getFieldsForContentType()}
363
376
  }`,
364
377
  `"resources": ${resourcesField}`,
@@ -367,6 +380,7 @@ export let contentTypeConfig = {
367
380
  '"light_logo": light_mode_logo_url.asset->url',
368
381
  '"dark_logo": dark_mode_logo_url.asset->url',
369
382
  `"description": ${descriptionField}`,
383
+ 'description_portable',
370
384
  'total_xp',
371
385
  ],
372
386
  },
@@ -376,6 +390,7 @@ export let contentTypeConfig = {
376
390
  foundation: {
377
391
  fields: [
378
392
  `"description": ${descriptionField}`,
393
+ 'description_portable',
379
394
  `"instructors":instructor[]->name`,
380
395
  `"units": child[]->{
381
396
  "id": railcontent_id,
@@ -388,6 +403,7 @@ export let contentTypeConfig = {
388
403
  title,
389
404
  "type": _type,
390
405
  "description": ${descriptionField},
406
+ "description_portable": description_portable,
391
407
  xp,
392
408
  web_url_path,
393
409
  "url": web_url_path,
@@ -399,6 +415,7 @@ export let contentTypeConfig = {
399
415
  '"lesson_count": child_count',
400
416
  '"instructors": instructor[]->name',
401
417
  `"description": ${descriptionField}`,
418
+ 'description_portable',
402
419
  `"resource": ${resourcesField}`,
403
420
  'xp',
404
421
  'total_xp',
@@ -456,10 +473,8 @@ export let contentTypeConfig = {
456
473
  'exploring-beats': contentWithSortField,
457
474
  sonor: contentWithSortField,
458
475
  returning: {
459
- fields: [
460
- `quarter_published`,
461
- ]
462
- }
476
+ fields: [`quarter_published`],
477
+ },
463
478
  }
464
479
 
465
480
  export const plusMembershipPermissions = 92
@@ -652,7 +667,7 @@ export function filtersToGroq(filters, selectedFilters = []) {
652
667
  return `instrumentless == ${value}`
653
668
  }
654
669
  } else if (key === 'difficulty' && !selectedFilters.includes(key)) {
655
- if(value === 'Introductory'){
670
+ if (value === 'Introductory') {
656
671
  return `(difficulty_string == "Novice" || difficulty_string == "Introductory" )`
657
672
  }
658
673
  return `difficulty_string == "${value}"`
@@ -38,6 +38,8 @@ export function buildImageSRC(url, options = {}) {
38
38
  // Process Sanity URL first if applicable
39
39
  if (url.includes('cdn.sanity.io')) {
40
40
  url = applySanityTransformations(url, options)
41
+ } else if (url.includes('imagedelivery.net')) {
42
+ return url
41
43
  }
42
44
 
43
45
  // Then apply Cloudflare transformations
@@ -73,15 +73,22 @@ export async function fetchSongById(documentId) {
73
73
  * @number contentPerPage
74
74
  * @returns {Promise<Object|null>}
75
75
  */
76
- export async function fetchLeaving(
77
- brand,
78
- { pageNumber = 1, contentPerPage = 20 } = {}) {
79
- const nextQuarter = getNextAndPreviousQuarterDates()['next'];
76
+ export async function fetchLeaving(brand, { pageNumber = 1, contentPerPage = 20 } = {}) {
77
+ const nextQuarter = getNextAndPreviousQuarterDates()['next']
80
78
  const filterString = `brand == '${brand}' && quarter_removed == '${nextQuarter}'`
81
- const startEndOrder = getQueryFromPage(pageNumber, contentPerPage);
82
- const sortOrder = {sortOrder: "published_on desc, id desc", start: startEndOrder['start'], end: startEndOrder['end']};
83
- const query = await buildQuery(filterString, {pullFutureContent: false, availableContentStatuses: ["published"]}, getFieldsForContentType(), sortOrder);
84
- return fetchSanity(query, true);
79
+ const startEndOrder = getQueryFromPage(pageNumber, contentPerPage)
80
+ const sortOrder = {
81
+ sortOrder: 'published_on desc, id desc',
82
+ start: startEndOrder['start'],
83
+ end: startEndOrder['end'],
84
+ }
85
+ const query = await buildQuery(
86
+ filterString,
87
+ { pullFutureContent: false, availableContentStatuses: ['published'] },
88
+ getFieldsForContentType(),
89
+ sortOrder
90
+ )
91
+ return fetchSanity(query, true)
85
92
  }
86
93
 
87
94
  /**
@@ -92,16 +99,23 @@ export async function fetchLeaving(
92
99
  * @number contentPerPage
93
100
  * @returns {Promise<Object|null>}
94
101
  */
95
- export async function fetchReturning(
96
- brand,
97
- { pageNumber = 1, contentPerPage = 20 } = {}) {
98
- const nextQuarter = getNextAndPreviousQuarterDates()['next'];
99
- const filterString = `brand == '${brand}' && quarter_published == '${nextQuarter}'`;
100
- const startEndOrder = getQueryFromPage(pageNumber, contentPerPage);
101
- const sortOrder = {sortOrder: "published_on desc, id desc", start: startEndOrder['start'], end: startEndOrder['end']};
102
- const query = await buildQuery(filterString, {pullFutureContent: true, availableContentStatuses: ["draft"]}, getFieldsForContentType('returning'), sortOrder);
102
+ export async function fetchReturning(brand, { pageNumber = 1, contentPerPage = 20 } = {}) {
103
+ const nextQuarter = getNextAndPreviousQuarterDates()['next']
104
+ const filterString = `brand == '${brand}' && quarter_published == '${nextQuarter}'`
105
+ const startEndOrder = getQueryFromPage(pageNumber, contentPerPage)
106
+ const sortOrder = {
107
+ sortOrder: 'published_on desc, id desc',
108
+ start: startEndOrder['start'],
109
+ end: startEndOrder['end'],
110
+ }
111
+ const query = await buildQuery(
112
+ filterString,
113
+ { pullFutureContent: true, availableContentStatuses: ['draft'] },
114
+ getFieldsForContentType('returning'),
115
+ sortOrder
116
+ )
103
117
 
104
- return fetchSanity(query, true);
118
+ return fetchSanity(query, true)
105
119
  }
106
120
 
107
121
  /**
@@ -112,14 +126,21 @@ export async function fetchReturning(
112
126
  * @number contentPerPage
113
127
  * @returns {Promise<Object|null>}
114
128
  */
115
- export async function fetchComingSoon(
116
- brand,
117
- { pageNumber = 1, contentPerPage = 20 } = {}) {
118
- const filterString = `brand == '${brand}' && _type == 'song'`;
119
- const startEndOrder = getQueryFromPage(pageNumber, contentPerPage);
120
- const sortOrder = {sortOrder: "published_on desc, id desc", start: startEndOrder['start'], end: startEndOrder['end']};
121
- const query = await buildQuery(filterString, {getFutureContentOnly: true}, getFieldsForContentType(), sortOrder);
122
- return fetchSanity(query, true);
129
+ export async function fetchComingSoon(brand, { pageNumber = 1, contentPerPage = 20 } = {}) {
130
+ const filterString = `brand == '${brand}' && _type == 'song'`
131
+ const startEndOrder = getQueryFromPage(pageNumber, contentPerPage)
132
+ const sortOrder = {
133
+ sortOrder: 'published_on desc, id desc',
134
+ start: startEndOrder['start'],
135
+ end: startEndOrder['end'],
136
+ }
137
+ const query = await buildQuery(
138
+ filterString,
139
+ { getFutureContentOnly: true },
140
+ getFieldsForContentType(),
141
+ sortOrder
142
+ )
143
+ return fetchSanity(query, true)
123
144
  }
124
145
 
125
146
  /**
@@ -128,12 +149,12 @@ export async function fetchComingSoon(
128
149
  * @returns {number[]}
129
150
  */
130
151
  function getQueryFromPage(pageNumber, contentPerPage) {
131
- const start = contentPerPage*(pageNumber-1);
132
- const end = contentPerPage*pageNumber;
133
- let result = [];
134
- result['start'] = start;
135
- result['end'] = end;
136
- return result;
152
+ const start = contentPerPage * (pageNumber - 1)
153
+ const end = contentPerPage * pageNumber
154
+ let result = []
155
+ result['start'] = start
156
+ result['end'] = end
157
+ return result
137
158
  }
138
159
 
139
160
  /**
@@ -142,33 +163,33 @@ function getQueryFromPage(pageNumber, contentPerPage) {
142
163
  * @returns {*[]}
143
164
  */
144
165
  function getNextAndPreviousQuarterDates() {
145
- const january = 1;
146
- const april = 4;
147
- const july = 7;
148
- const october = 10;
149
- const month = new Date().getMonth();
150
- let year = new Date().getFullYear();
151
- let nextQuarter = '';
152
- let prevQuarter = '';
166
+ const january = 1
167
+ const april = 4
168
+ const july = 7
169
+ const october = 10
170
+ const month = new Date().getMonth()
171
+ let year = new Date().getFullYear()
172
+ let nextQuarter = ''
173
+ let prevQuarter = ''
153
174
  if (month < april) {
154
- nextQuarter = `${year}-0${april}-01`;
155
- prevQuarter = `${year}-0${january}-01`;
175
+ nextQuarter = `${year}-0${april}-01`
176
+ prevQuarter = `${year}-0${january}-01`
156
177
  } else if (month < july) {
157
- nextQuarter = `${year}-0${july}-01`;
158
- prevQuarter = `${year}-0${april}-01`;
178
+ nextQuarter = `${year}-0${july}-01`
179
+ prevQuarter = `${year}-0${april}-01`
159
180
  } else if (month < october) {
160
- nextQuarter = `${year}-${october}-01`;
161
- prevQuarter = `${year}-0${july}-01`;
181
+ nextQuarter = `${year}-${october}-01`
182
+ prevQuarter = `${year}-0${july}-01`
162
183
  } else {
163
- prevQuarter = `${year}-${october}-01`;
164
- year++;
165
- nextQuarter = `${year}-0${january}-01`;
184
+ prevQuarter = `${year}-${october}-01`
185
+ year++
186
+ nextQuarter = `${year}-0${january}-01`
166
187
  }
167
188
 
168
- let result = [];
169
- result['next'] = nextQuarter;
170
- result['previous'] = prevQuarter;
171
- return result;
189
+ let result = []
190
+ result['next'] = nextQuarter
191
+ result['previous'] = prevQuarter
192
+ return result
172
193
  }
173
194
 
174
195
  /**
@@ -202,8 +223,8 @@ export async function fetchArtists(brand) {
202
223
  */
203
224
  export async function fetchSongArtistCount(brand) {
204
225
  const filter = await new FilterBuilder(
205
- `_type == "song" && brand == "${brand}" && references(^._id)`,
206
- { bypassPermissions: true }
226
+ `_type == "song" && brand == "${brand}" && references(^._id)`,
227
+ { bypassPermissions: true }
207
228
  ).buildFilter()
208
229
  const query = `
209
230
  count(*[_type == "artist"]{
@@ -213,13 +234,13 @@ export async function fetchSongArtistCount(brand) {
213
234
  return fetchSanity(query, true, { processNeedAccess: false })
214
235
  }
215
236
 
216
- export async function fetchPlayAlongsCount(brand, {
217
- searchTerm,
218
- includedFields,
219
- progressIds,
220
- progress,
221
- }) {
222
- const searchFilter = searchTerm ? `&& (artist->name match "${searchTerm}*" || instructor[]->name match "${searchTerm}*" || title match "${searchTerm}*" || name match "${searchTerm}*")` :'';
237
+ export async function fetchPlayAlongsCount(
238
+ brand,
239
+ { searchTerm, includedFields, progressIds, progress }
240
+ ) {
241
+ const searchFilter = searchTerm
242
+ ? `&& (artist->name match "${searchTerm}*" || instructor[]->name match "${searchTerm}*" || title match "${searchTerm}*" || name match "${searchTerm}*")`
243
+ : ''
223
244
 
224
245
  // Construct the included fields filter, replacing 'difficulty' with 'difficulty_string'
225
246
  const includedFieldsFilter = includedFields.length > 0 ? filtersToGroq(includedFields) : ''
@@ -490,7 +511,7 @@ export async function fetchByRailContentId(id, contentType) {
490
511
  */
491
512
  export async function fetchByRailContentIds(ids, contentType = undefined) {
492
513
  if (!ids) {
493
- return [];
514
+ return []
494
515
  }
495
516
  const idsString = ids.join(',')
496
517
 
@@ -1010,6 +1031,7 @@ export async function fetchMethod(brand, slug) {
1010
1031
 
1011
1032
  const query = `*[_type == 'learning-path' && brand == "${brand}" && slug.current == "${slug}"] {
1012
1033
  "description": ${descriptionField},
1034
+ description_portable,
1013
1035
  "instructors":instructor[]->name,
1014
1036
  published_on,
1015
1037
  "id": railcontent_id,
@@ -1039,6 +1061,7 @@ export async function fetchMethod(brand, slug) {
1039
1061
  title,
1040
1062
  "type": _type,
1041
1063
  "description": ${descriptionField},
1064
+ description_portable,
1042
1065
  "url": web_url_path,
1043
1066
  web_url_path,
1044
1067
  xp,
@@ -1060,6 +1083,7 @@ export async function fetchMethodChildren(railcontentId) {
1060
1083
  "child_count":coalesce(count(child[${childrenFilter}]->), 0),
1061
1084
  "id": railcontent_id,
1062
1085
  "description": ${descriptionField},
1086
+ description_portable,
1063
1087
  "thumbnail_url": thumbnail.asset->url,
1064
1088
  title,
1065
1089
  xp,
@@ -1231,6 +1255,7 @@ export async function fetchLessonContent(railContentId) {
1231
1255
  "light_logo": light_mode_logo_url.asset->url,
1232
1256
  soundslice_slug,
1233
1257
  "description": description[0].children[0].text,
1258
+ description_portable,
1234
1259
  "chapters": chapter[]{
1235
1260
  chapter_description,
1236
1261
  chapter_timecode,
@@ -1268,16 +1293,16 @@ export async function fetchLessonContent(railContentId) {
1268
1293
  isSingle: true,
1269
1294
  })
1270
1295
  const chapterProcess = (result) => {
1271
- const chapters = result.chapters ?? [];
1272
- if(chapters.length == 0) return result
1296
+ const chapters = result.chapters ?? []
1297
+ if (chapters.length == 0) return result
1273
1298
  result.chapters = chapters.map((chapter, index) => ({
1274
1299
  ...chapter,
1275
- chapter_thumbnail_url: `https://musora-web-platform.s3.amazonaws.com/chapters/${result.brand}/Chapter${index + 1}.jpg`
1276
- }));
1300
+ chapter_thumbnail_url: `https://musora-web-platform.s3.amazonaws.com/chapters/${result.brand}/Chapter${index + 1}.jpg`,
1301
+ }))
1277
1302
  return result
1278
1303
  }
1279
1304
 
1280
- return fetchSanity(query, false, {customPostProcess:chapterProcess})
1305
+ return fetchSanity(query, false, { customPostProcess: chapterProcess })
1281
1306
  }
1282
1307
 
1283
1308
  /**
@@ -1368,9 +1393,25 @@ async function fetchRelatedLessonsSectionData(currentContent) {
1368
1393
  async function buildRelatedLessonsQuery(currentContent) {
1369
1394
  const defaultProjectionsAndSorting = `{_id, "id":railcontent_id, published_on, "instructor": instructor[0]->name, title, "thumbnail_url":thumbnail.asset->url, length_in_seconds, web_url_path, "type": _type, difficulty, difficulty_string, railcontent_id, artist->,"permission_id": permission[]->railcontent_id,_type,genre}|order(published_on desc, title asc)[0...10]`
1370
1395
  const currentContentData = await getCurrentContentDataForQuery(currentContent)
1371
- const tutorialQuery = await buildSubQueryForFetch(currentContentData.parentType, currentContentData.brand, currentContentData.parentId, currentContentData.difficulty_string, currentContentData.genres)
1372
- const quickTipQuery = await buildSubQueryForFetch("quick-tips", currentContentData.brand, currentContentData.parentId, currentContentData.difficulty_string)
1373
- const songQuery = await buildSubQueryForFetch("song", currentContentData.brand, currentContentData.parentId, currentContentData.difficulty_string)
1396
+ const tutorialQuery = await buildSubQueryForFetch(
1397
+ currentContentData.parentType,
1398
+ currentContentData.brand,
1399
+ currentContentData.parentId,
1400
+ currentContentData.difficulty_string,
1401
+ currentContentData.genres
1402
+ )
1403
+ const quickTipQuery = await buildSubQueryForFetch(
1404
+ 'quick-tips',
1405
+ currentContentData.brand,
1406
+ currentContentData.parentId,
1407
+ currentContentData.difficulty_string
1408
+ )
1409
+ const songQuery = await buildSubQueryForFetch(
1410
+ 'song',
1411
+ currentContentData.brand,
1412
+ currentContentData.parentId,
1413
+ currentContentData.difficulty_string
1414
+ )
1374
1415
  return `[...*[${tutorialQuery}]${defaultProjectionsAndSorting}, ...*[${quickTipQuery}]${defaultProjectionsAndSorting}, ...*[${songQuery}]${defaultProjectionsAndSorting}, ]`
1375
1416
  }
1376
1417
 
@@ -1383,9 +1424,7 @@ async function getCurrentContentDataForQuery(currentContent) {
1383
1424
  const currentContentData = groupCurrentContentData(currentContent)
1384
1425
  const genres = await fetchParentContentGenres(currentContentData)
1385
1426
  const genreString = formatGenresToString(genres)
1386
- return {...currentContentData,
1387
- genres: genreString
1388
- }
1427
+ return { ...currentContentData, genres: genreString }
1389
1428
  }
1390
1429
 
1391
1430
  /**
@@ -1398,7 +1437,7 @@ function groupCurrentContentData(currentContent) {
1398
1437
  parentType: currentContent.parent_type,
1399
1438
  parentId: currentContent.parent_content_data[0].id,
1400
1439
  difficulty_string: currentContent.difficulty_string,
1401
- brand: currentContent.brand
1440
+ brand: currentContent.brand,
1402
1441
  }
1403
1442
  }
1404
1443
 
@@ -1432,7 +1471,9 @@ function formatGenresToString(genres) {
1432
1471
  */
1433
1472
  async function buildSubQueryForFetch(type, brand, id, difficulty, genres = null) {
1434
1473
  const genreString = genres ? `&& references([${genres}])` : ``
1435
- return new FilterBuilder(`_type == "${type}" && brand == "${brand}" && railcontent_id != ${id} && difficulty_string == "${difficulty}" ${genreString}`).buildFilter()
1474
+ return new FilterBuilder(
1475
+ `_type == "${type}" && brand == "${brand}" && railcontent_id != ${id} && difficulty_string == "${difficulty}" ${genreString}`
1476
+ ).buildFilter()
1436
1477
  }
1437
1478
 
1438
1479
  /**
@@ -1442,9 +1483,7 @@ async function buildSubQueryForFetch(type, brand, id, difficulty, genres = null)
1442
1483
  * @returns {Object}
1443
1484
  */
1444
1485
  function formatForResponse(parentObject, relatedLessonObject) {
1445
- return {...parentObject,
1446
- related_lessons: relatedLessonObject
1447
- }
1486
+ return { ...parentObject, related_lessons: relatedLessonObject }
1448
1487
  }
1449
1488
 
1450
1489
  /**
@@ -2114,7 +2153,7 @@ function checkSanityConfig(config) {
2114
2153
  function buildRawQuery(
2115
2154
  filter = '',
2116
2155
  fields = '...',
2117
- { sortOrder = 'published_on desc', start = 0, end = 10, isSingle = false}
2156
+ { sortOrder = 'published_on desc', start = 0, end = 10, isSingle = false }
2118
2157
  ) {
2119
2158
  const sortString = sortOrder ? `order(${sortOrder})` : ''
2120
2159
  const countString = isSingle ? '[0...1]' : `[${start}...${end}]`
@@ -2128,10 +2167,10 @@ async function buildQuery(
2128
2167
  baseFilter = '',
2129
2168
  filterParams = { pullFutureContent: false },
2130
2169
  fields = '...',
2131
- { sortOrder = 'published_on desc', start = 0, end = 10, isSingle = false}
2170
+ { sortOrder = 'published_on desc', start = 0, end = 10, isSingle = false }
2132
2171
  ) {
2133
2172
  const filter = await new FilterBuilder(baseFilter, filterParams).buildFilter()
2134
- return buildRawQuery(filter, fields, { sortOrder, start, end, isSingle})
2173
+ return buildRawQuery(filter, fields, { sortOrder, start, end, isSingle })
2135
2174
  }
2136
2175
 
2137
2176
  function buildEntityAndTotalQuery(
File without changes
File without changes