musora-content-services 1.0.58 → 1.0.60
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/config.js.html +2 -2
- package/docs/index.html +2 -2
- package/docs/module-Config.html +2 -2
- package/docs/module-Railcontent-Services.html +2 -2
- package/docs/module-Sanity-Services.html +254 -28
- package/docs/railcontent.js.html +2 -2
- package/docs/sanity.js.html +57 -26
- package/package.json +1 -1
- package/src/contentTypeConfig.js +2 -0
- package/src/index.d.ts +4 -0
- package/src/index.js +2 -0
- package/src/services/sanity.js +54 -28
- package/test/sanityQueryService.test.js +17 -1
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.60](https://github.com/railroadmedia/musora-content-services/compare/v1.0.59...v1.0.60) (2024-08-26)
|
|
6
|
+
|
|
7
|
+
### [1.0.59](https://github.com/railroadmedia/musora-content-services/compare/v1.0.58...v1.0.59) (2024-08-26)
|
|
8
|
+
|
|
5
9
|
### [1.0.58](https://github.com/railroadmedia/musora-content-services/compare/v1.0.57...v1.0.58) (2024-08-26)
|
|
6
10
|
|
|
7
11
|
### [1.0.57](https://github.com/railroadmedia/musora-content-services/compare/v1.0.56...v1.0.57) (2024-08-26)
|
package/docs/config.js.html
CHANGED
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
<nav >
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><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-Railcontent-Services.html">Railcontent-Services</a><ul class='methods'><li data-type='method'><a href="module-Railcontent-Services.html#.fetchAllCompletedStates">fetchAllCompletedStates</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#.fetchCurrentSongComplete">fetchCurrentSongComplete</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchSongsInProgress">fetchSongsInProgress</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#.fetchAllSongs">fetchAllSongs</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#.fetchChildren">fetchChildren</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchCourseOverview">fetchCourseOverview</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#.fetchMethodChildren">fetchMethodChildren</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMethodNextLesson">fetchMethodNextLesson</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMethods">fetchMethods</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#.fetchPackAll">fetchPackAll</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchPackChildren">fetchPackChildren</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#.fetchRelatedSongs">fetchRelatedSongs</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#.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#.fetchSongCount">fetchSongCount</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchSongFilterOptions">fetchSongFilterOptions</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#.fetchWorkouts">fetchWorkouts</a></li></ul></li></ul>
|
|
32
|
+
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><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-Railcontent-Services.html">Railcontent-Services</a><ul class='methods'><li data-type='method'><a href="module-Railcontent-Services.html#.fetchAllCompletedStates">fetchAllCompletedStates</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#.fetchCurrentSongComplete">fetchCurrentSongComplete</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchSongsInProgress">fetchSongsInProgress</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#.fetchAllSongs">fetchAllSongs</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#.fetchChildren">fetchChildren</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchCourseOverview">fetchCourseOverview</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#.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#.fetchMethodNextLesson">fetchMethodNextLesson</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMethods">fetchMethods</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#.fetchPackAll">fetchPackAll</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchPackChildren">fetchPackChildren</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#.fetchRelatedSongs">fetchRelatedSongs</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#.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#.fetchSongCount">fetchSongCount</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchSongFilterOptions">fetchSongFilterOptions</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#.fetchWorkouts">fetchWorkouts</a></li></ul></li></ul>
|
|
33
33
|
|
|
34
34
|
</nav>
|
|
35
35
|
|
|
@@ -111,7 +111,7 @@ module.exports = {
|
|
|
111
111
|
<br class="clear">
|
|
112
112
|
|
|
113
113
|
<footer>
|
|
114
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on
|
|
114
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Mon Aug 26 2024 19:46:17 GMT+0000 (Coordinated Universal Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
115
115
|
</footer>
|
|
116
116
|
|
|
117
117
|
<script>prettyPrint();</script>
|
package/docs/index.html
CHANGED
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
<nav >
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><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-Railcontent-Services.html">Railcontent-Services</a><ul class='methods'><li data-type='method'><a href="module-Railcontent-Services.html#.fetchAllCompletedStates">fetchAllCompletedStates</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#.fetchCurrentSongComplete">fetchCurrentSongComplete</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchSongsInProgress">fetchSongsInProgress</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#.fetchAllSongs">fetchAllSongs</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#.fetchChildren">fetchChildren</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchCourseOverview">fetchCourseOverview</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#.fetchMethodChildren">fetchMethodChildren</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMethodNextLesson">fetchMethodNextLesson</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMethods">fetchMethods</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#.fetchPackAll">fetchPackAll</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchPackChildren">fetchPackChildren</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#.fetchRelatedSongs">fetchRelatedSongs</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#.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#.fetchSongCount">fetchSongCount</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchSongFilterOptions">fetchSongFilterOptions</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#.fetchWorkouts">fetchWorkouts</a></li></ul></li></ul>
|
|
32
|
+
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><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-Railcontent-Services.html">Railcontent-Services</a><ul class='methods'><li data-type='method'><a href="module-Railcontent-Services.html#.fetchAllCompletedStates">fetchAllCompletedStates</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#.fetchCurrentSongComplete">fetchCurrentSongComplete</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchSongsInProgress">fetchSongsInProgress</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#.fetchAllSongs">fetchAllSongs</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#.fetchChildren">fetchChildren</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchCourseOverview">fetchCourseOverview</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#.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#.fetchMethodNextLesson">fetchMethodNextLesson</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMethods">fetchMethods</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#.fetchPackAll">fetchPackAll</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchPackChildren">fetchPackChildren</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#.fetchRelatedSongs">fetchRelatedSongs</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#.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#.fetchSongCount">fetchSongCount</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchSongFilterOptions">fetchSongFilterOptions</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#.fetchWorkouts">fetchWorkouts</a></li></ul></li></ul>
|
|
33
33
|
|
|
34
34
|
</nav>
|
|
35
35
|
|
|
@@ -111,7 +111,7 @@ You may need to install jest (npm install --save-dev jest)</p>
|
|
|
111
111
|
<br class="clear">
|
|
112
112
|
|
|
113
113
|
<footer>
|
|
114
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on
|
|
114
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Mon Aug 26 2024 19:46:17 GMT+0000 (Coordinated Universal Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
115
115
|
</footer>
|
|
116
116
|
|
|
117
117
|
<script>prettyPrint();</script>
|
package/docs/module-Config.html
CHANGED
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
<nav >
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><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-Railcontent-Services.html">Railcontent-Services</a><ul class='methods'><li data-type='method'><a href="module-Railcontent-Services.html#.fetchAllCompletedStates">fetchAllCompletedStates</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#.fetchCurrentSongComplete">fetchCurrentSongComplete</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchSongsInProgress">fetchSongsInProgress</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#.fetchAllSongs">fetchAllSongs</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#.fetchChildren">fetchChildren</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchCourseOverview">fetchCourseOverview</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#.fetchMethodChildren">fetchMethodChildren</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMethodNextLesson">fetchMethodNextLesson</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMethods">fetchMethods</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#.fetchPackAll">fetchPackAll</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchPackChildren">fetchPackChildren</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#.fetchRelatedSongs">fetchRelatedSongs</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#.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#.fetchSongCount">fetchSongCount</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchSongFilterOptions">fetchSongFilterOptions</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#.fetchWorkouts">fetchWorkouts</a></li></ul></li></ul>
|
|
32
|
+
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><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-Railcontent-Services.html">Railcontent-Services</a><ul class='methods'><li data-type='method'><a href="module-Railcontent-Services.html#.fetchAllCompletedStates">fetchAllCompletedStates</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#.fetchCurrentSongComplete">fetchCurrentSongComplete</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchSongsInProgress">fetchSongsInProgress</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#.fetchAllSongs">fetchAllSongs</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#.fetchChildren">fetchChildren</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchCourseOverview">fetchCourseOverview</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#.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#.fetchMethodNextLesson">fetchMethodNextLesson</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMethods">fetchMethods</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#.fetchPackAll">fetchPackAll</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchPackChildren">fetchPackChildren</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#.fetchRelatedSongs">fetchRelatedSongs</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#.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#.fetchSongCount">fetchSongCount</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchSongFilterOptions">fetchSongFilterOptions</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#.fetchWorkouts">fetchWorkouts</a></li></ul></li></ul>
|
|
33
33
|
|
|
34
34
|
</nav>
|
|
35
35
|
|
|
@@ -656,7 +656,7 @@ initializeService({
|
|
|
656
656
|
<br class="clear">
|
|
657
657
|
|
|
658
658
|
<footer>
|
|
659
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on
|
|
659
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Mon Aug 26 2024 19:46:17 GMT+0000 (Coordinated Universal Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
660
660
|
</footer>
|
|
661
661
|
|
|
662
662
|
<script>prettyPrint();</script>
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
<nav >
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><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-Railcontent-Services.html">Railcontent-Services</a><ul class='methods'><li data-type='method'><a href="module-Railcontent-Services.html#.fetchAllCompletedStates">fetchAllCompletedStates</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#.fetchCurrentSongComplete">fetchCurrentSongComplete</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchSongsInProgress">fetchSongsInProgress</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#.fetchAllSongs">fetchAllSongs</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#.fetchChildren">fetchChildren</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchCourseOverview">fetchCourseOverview</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#.fetchMethodChildren">fetchMethodChildren</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMethodNextLesson">fetchMethodNextLesson</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMethods">fetchMethods</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#.fetchPackAll">fetchPackAll</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchPackChildren">fetchPackChildren</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#.fetchRelatedSongs">fetchRelatedSongs</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#.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#.fetchSongCount">fetchSongCount</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchSongFilterOptions">fetchSongFilterOptions</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#.fetchWorkouts">fetchWorkouts</a></li></ul></li></ul>
|
|
32
|
+
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><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-Railcontent-Services.html">Railcontent-Services</a><ul class='methods'><li data-type='method'><a href="module-Railcontent-Services.html#.fetchAllCompletedStates">fetchAllCompletedStates</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#.fetchCurrentSongComplete">fetchCurrentSongComplete</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchSongsInProgress">fetchSongsInProgress</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#.fetchAllSongs">fetchAllSongs</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#.fetchChildren">fetchChildren</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchCourseOverview">fetchCourseOverview</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#.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#.fetchMethodNextLesson">fetchMethodNextLesson</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMethods">fetchMethods</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#.fetchPackAll">fetchPackAll</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchPackChildren">fetchPackChildren</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#.fetchRelatedSongs">fetchRelatedSongs</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#.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#.fetchSongCount">fetchSongCount</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchSongFilterOptions">fetchSongFilterOptions</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#.fetchWorkouts">fetchWorkouts</a></li></ul></li></ul>
|
|
33
33
|
|
|
34
34
|
</nav>
|
|
35
35
|
|
|
@@ -783,7 +783,7 @@
|
|
|
783
783
|
<br class="clear">
|
|
784
784
|
|
|
785
785
|
<footer>
|
|
786
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on
|
|
786
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Mon Aug 26 2024 19:46:17 GMT+0000 (Coordinated Universal Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
787
787
|
</footer>
|
|
788
788
|
|
|
789
789
|
<script>prettyPrint();</script>
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
<nav >
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><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-Railcontent-Services.html">Railcontent-Services</a><ul class='methods'><li data-type='method'><a href="module-Railcontent-Services.html#.fetchAllCompletedStates">fetchAllCompletedStates</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#.fetchCurrentSongComplete">fetchCurrentSongComplete</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchSongsInProgress">fetchSongsInProgress</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#.fetchAllSongs">fetchAllSongs</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#.fetchChildren">fetchChildren</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchCourseOverview">fetchCourseOverview</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#.fetchMethodChildren">fetchMethodChildren</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMethodNextLesson">fetchMethodNextLesson</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMethods">fetchMethods</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#.fetchPackAll">fetchPackAll</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchPackChildren">fetchPackChildren</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#.fetchRelatedSongs">fetchRelatedSongs</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#.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#.fetchSongCount">fetchSongCount</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchSongFilterOptions">fetchSongFilterOptions</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#.fetchWorkouts">fetchWorkouts</a></li></ul></li></ul>
|
|
32
|
+
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><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-Railcontent-Services.html">Railcontent-Services</a><ul class='methods'><li data-type='method'><a href="module-Railcontent-Services.html#.fetchAllCompletedStates">fetchAllCompletedStates</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#.fetchCurrentSongComplete">fetchCurrentSongComplete</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchSongsInProgress">fetchSongsInProgress</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#.fetchAllSongs">fetchAllSongs</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#.fetchChildren">fetchChildren</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchCourseOverview">fetchCourseOverview</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#.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#.fetchMethodNextLesson">fetchMethodNextLesson</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMethods">fetchMethods</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#.fetchPackAll">fetchPackAll</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchPackChildren">fetchPackChildren</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#.fetchRelatedSongs">fetchRelatedSongs</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#.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#.fetchSongCount">fetchSongCount</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchSongFilterOptions">fetchSongFilterOptions</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#.fetchWorkouts">fetchWorkouts</a></li></ul></li></ul>
|
|
33
33
|
|
|
34
34
|
</nav>
|
|
35
35
|
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
|
|
101
101
|
<dt class="tag-source">Source:</dt>
|
|
102
102
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
103
|
-
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#
|
|
103
|
+
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line420">line 420</a>
|
|
104
104
|
</li></ul></dd>
|
|
105
105
|
|
|
106
106
|
|
|
@@ -593,7 +593,7 @@ The filter options are dynamically generated based on the provided filters, styl
|
|
|
593
593
|
|
|
594
594
|
<dt class="tag-source">Source:</dt>
|
|
595
595
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
596
|
-
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#
|
|
596
|
+
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line561">line 561</a>
|
|
597
597
|
</li></ul></dd>
|
|
598
598
|
|
|
599
599
|
|
|
@@ -935,7 +935,7 @@ fetchAllFilterOptions('myBrand', '', 'Rock', 'John Doe', 'song', 'Love')
|
|
|
935
935
|
|
|
936
936
|
<dt class="tag-source">Source:</dt>
|
|
937
937
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
938
|
-
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#
|
|
938
|
+
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line192">line 192</a>
|
|
939
939
|
</li></ul></dd>
|
|
940
940
|
|
|
941
941
|
|
|
@@ -1401,7 +1401,7 @@ fetchAllFilterOptions('myBrand', '', 'Rock', 'John Doe', 'song', 'Love')
|
|
|
1401
1401
|
|
|
1402
1402
|
<dt class="tag-source">Source:</dt>
|
|
1403
1403
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
1404
|
-
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#
|
|
1404
|
+
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line68">line 68</a>
|
|
1405
1405
|
</li></ul></dd>
|
|
1406
1406
|
|
|
1407
1407
|
|
|
@@ -1566,7 +1566,7 @@ fetchAllFilterOptions('myBrand', '', 'Rock', 'John Doe', 'song', 'Love')
|
|
|
1566
1566
|
|
|
1567
1567
|
<dt class="tag-source">Source:</dt>
|
|
1568
1568
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
1569
|
-
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#
|
|
1569
|
+
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line359">line 359</a>
|
|
1570
1570
|
</li></ul></dd>
|
|
1571
1571
|
|
|
1572
1572
|
|
|
@@ -1715,7 +1715,7 @@ fetchAllFilterOptions('myBrand', '', 'Rock', 'John Doe', 'song', 'Love')
|
|
|
1715
1715
|
|
|
1716
1716
|
|
|
1717
1717
|
|
|
1718
|
-
<h4 class="name" id=".fetchByRailContentIds"><span class="type-signature type-signature-static">(static) </span>fetchByRailContentIds<span class="signature">(ids)</span><span class="type-signature"> → {Promise.<(Array.<Object>|null)>}</span></h4>
|
|
1718
|
+
<h4 class="name" id=".fetchByRailContentIds"><span class="type-signature type-signature-static">(static) </span>fetchByRailContentIds<span class="signature">(ids, contentType<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Promise.<(Array.<Object>|null)>}</span></h4>
|
|
1719
1719
|
|
|
1720
1720
|
|
|
1721
1721
|
|
|
@@ -1731,7 +1731,7 @@ fetchAllFilterOptions('myBrand', '', 'Rock', 'John Doe', 'song', 'Love')
|
|
|
1731
1731
|
|
|
1732
1732
|
<dt class="tag-source">Source:</dt>
|
|
1733
1733
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
1734
|
-
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#
|
|
1734
|
+
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line386">line 386</a>
|
|
1735
1735
|
</li></ul></dd>
|
|
1736
1736
|
|
|
1737
1737
|
|
|
@@ -1798,6 +1798,8 @@ fetchAllFilterOptions('myBrand', '', 'Rock', 'John Doe', 'song', 'Love')
|
|
|
1798
1798
|
<th>Type</th>
|
|
1799
1799
|
|
|
1800
1800
|
|
|
1801
|
+
<th>Attributes</th>
|
|
1802
|
+
|
|
1801
1803
|
|
|
1802
1804
|
|
|
1803
1805
|
|
|
@@ -1824,6 +1826,14 @@ fetchAllFilterOptions('myBrand', '', 'Rock', 'John Doe', 'song', 'Love')
|
|
|
1824
1826
|
</td>
|
|
1825
1827
|
|
|
1826
1828
|
|
|
1829
|
+
<td class="attributes">
|
|
1830
|
+
|
|
1831
|
+
|
|
1832
|
+
|
|
1833
|
+
|
|
1834
|
+
|
|
1835
|
+
</td>
|
|
1836
|
+
|
|
1827
1837
|
|
|
1828
1838
|
|
|
1829
1839
|
|
|
@@ -1831,6 +1841,40 @@ fetchAllFilterOptions('myBrand', '', 'Rock', 'John Doe', 'song', 'Love')
|
|
|
1831
1841
|
</tr>
|
|
1832
1842
|
|
|
1833
1843
|
|
|
1844
|
+
|
|
1845
|
+
<tr>
|
|
1846
|
+
|
|
1847
|
+
<td class="name"><code>contentType</code></td>
|
|
1848
|
+
|
|
1849
|
+
|
|
1850
|
+
<td class="type">
|
|
1851
|
+
|
|
1852
|
+
|
|
1853
|
+
<span class="param-type">string</span>
|
|
1854
|
+
|
|
1855
|
+
|
|
1856
|
+
|
|
1857
|
+
|
|
1858
|
+
</td>
|
|
1859
|
+
|
|
1860
|
+
|
|
1861
|
+
<td class="attributes">
|
|
1862
|
+
|
|
1863
|
+
<optional><br>
|
|
1864
|
+
|
|
1865
|
+
|
|
1866
|
+
|
|
1867
|
+
|
|
1868
|
+
|
|
1869
|
+
</td>
|
|
1870
|
+
|
|
1871
|
+
|
|
1872
|
+
|
|
1873
|
+
|
|
1874
|
+
<td class="description last">The content type the IDs to add needed fields to the response.</td>
|
|
1875
|
+
</tr>
|
|
1876
|
+
|
|
1877
|
+
|
|
1834
1878
|
</tbody>
|
|
1835
1879
|
</table>
|
|
1836
1880
|
|
|
@@ -1896,7 +1940,7 @@ fetchAllFilterOptions('myBrand', '', 'Rock', 'John Doe', 'song', 'Love')
|
|
|
1896
1940
|
|
|
1897
1941
|
<dt class="tag-source">Source:</dt>
|
|
1898
1942
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
1899
|
-
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#
|
|
1943
|
+
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line611">line 611</a>
|
|
1900
1944
|
</li></ul></dd>
|
|
1901
1945
|
|
|
1902
1946
|
|
|
@@ -2054,7 +2098,7 @@ fetchAllFilterOptions('myBrand', '', 'Rock', 'John Doe', 'song', 'Love')
|
|
|
2054
2098
|
|
|
2055
2099
|
<dt class="tag-source">Source:</dt>
|
|
2056
2100
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
2057
|
-
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#
|
|
2101
|
+
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line849">line 849</a>
|
|
2058
2102
|
</li></ul></dd>
|
|
2059
2103
|
|
|
2060
2104
|
|
|
@@ -2219,7 +2263,7 @@ fetchAllFilterOptions('myBrand', '', 'Rock', 'John Doe', 'song', 'Love')
|
|
|
2219
2263
|
|
|
2220
2264
|
<dt class="tag-source">Source:</dt>
|
|
2221
2265
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
2222
|
-
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#
|
|
2266
|
+
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line755">line 755</a>
|
|
2223
2267
|
</li></ul></dd>
|
|
2224
2268
|
|
|
2225
2269
|
|
|
@@ -2368,6 +2412,188 @@ fetchAllFilterOptions('myBrand', '', 'Rock', 'John Doe', 'song', 'Love')
|
|
|
2368
2412
|
|
|
2369
2413
|
|
|
2370
2414
|
|
|
2415
|
+
<h4 class="name" id=".fetchMethod"><span class="type-signature type-signature-static">(static) </span>fetchMethod<span class="signature">(brand, slug)</span><span class="type-signature"> → {Promise.<(Object|null)>}</span></h4>
|
|
2416
|
+
|
|
2417
|
+
|
|
2418
|
+
|
|
2419
|
+
|
|
2420
|
+
|
|
2421
|
+
|
|
2422
|
+
<dl class="details">
|
|
2423
|
+
|
|
2424
|
+
<dt class="tag-description">Description:</dt>
|
|
2425
|
+
<dd class="tag-description"><ul class="dummy"><li>Fetch the Method (learning-paths) for a specific brand.</li></ul></dd>
|
|
2426
|
+
|
|
2427
|
+
|
|
2428
|
+
|
|
2429
|
+
<dt class="tag-source">Source:</dt>
|
|
2430
|
+
<dd class="tag-source"><ul class="dummy"><li>
|
|
2431
|
+
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line668">line 668</a>
|
|
2432
|
+
</li></ul></dd>
|
|
2433
|
+
|
|
2434
|
+
|
|
2435
|
+
|
|
2436
|
+
|
|
2437
|
+
|
|
2438
|
+
|
|
2439
|
+
|
|
2440
|
+
|
|
2441
|
+
|
|
2442
|
+
|
|
2443
|
+
|
|
2444
|
+
|
|
2445
|
+
|
|
2446
|
+
|
|
2447
|
+
|
|
2448
|
+
|
|
2449
|
+
|
|
2450
|
+
|
|
2451
|
+
|
|
2452
|
+
|
|
2453
|
+
|
|
2454
|
+
|
|
2455
|
+
|
|
2456
|
+
|
|
2457
|
+
|
|
2458
|
+
|
|
2459
|
+
|
|
2460
|
+
|
|
2461
|
+
|
|
2462
|
+
|
|
2463
|
+
|
|
2464
|
+
</dl>
|
|
2465
|
+
|
|
2466
|
+
|
|
2467
|
+
|
|
2468
|
+
|
|
2469
|
+
|
|
2470
|
+
|
|
2471
|
+
|
|
2472
|
+
|
|
2473
|
+
|
|
2474
|
+
|
|
2475
|
+
|
|
2476
|
+
|
|
2477
|
+
|
|
2478
|
+
<h5 class="h5-parameters">Parameters:</h5>
|
|
2479
|
+
|
|
2480
|
+
|
|
2481
|
+
<table class="params">
|
|
2482
|
+
<thead>
|
|
2483
|
+
<tr>
|
|
2484
|
+
|
|
2485
|
+
<th>Name</th>
|
|
2486
|
+
|
|
2487
|
+
|
|
2488
|
+
<th>Type</th>
|
|
2489
|
+
|
|
2490
|
+
|
|
2491
|
+
|
|
2492
|
+
|
|
2493
|
+
|
|
2494
|
+
<th class="last">Description</th>
|
|
2495
|
+
</tr>
|
|
2496
|
+
</thead>
|
|
2497
|
+
|
|
2498
|
+
<tbody>
|
|
2499
|
+
|
|
2500
|
+
|
|
2501
|
+
<tr>
|
|
2502
|
+
|
|
2503
|
+
<td class="name"><code>brand</code></td>
|
|
2504
|
+
|
|
2505
|
+
|
|
2506
|
+
<td class="type">
|
|
2507
|
+
|
|
2508
|
+
|
|
2509
|
+
<span class="param-type">string</span>
|
|
2510
|
+
|
|
2511
|
+
|
|
2512
|
+
|
|
2513
|
+
|
|
2514
|
+
</td>
|
|
2515
|
+
|
|
2516
|
+
|
|
2517
|
+
|
|
2518
|
+
|
|
2519
|
+
|
|
2520
|
+
<td class="description last">The brand for which to fetch methods.</td>
|
|
2521
|
+
</tr>
|
|
2522
|
+
|
|
2523
|
+
|
|
2524
|
+
|
|
2525
|
+
<tr>
|
|
2526
|
+
|
|
2527
|
+
<td class="name"><code>slug</code></td>
|
|
2528
|
+
|
|
2529
|
+
|
|
2530
|
+
<td class="type">
|
|
2531
|
+
|
|
2532
|
+
|
|
2533
|
+
<span class="param-type">string</span>
|
|
2534
|
+
|
|
2535
|
+
|
|
2536
|
+
|
|
2537
|
+
|
|
2538
|
+
</td>
|
|
2539
|
+
|
|
2540
|
+
|
|
2541
|
+
|
|
2542
|
+
|
|
2543
|
+
|
|
2544
|
+
<td class="description last">The slug of the method.</td>
|
|
2545
|
+
</tr>
|
|
2546
|
+
|
|
2547
|
+
|
|
2548
|
+
</tbody>
|
|
2549
|
+
</table>
|
|
2550
|
+
|
|
2551
|
+
|
|
2552
|
+
|
|
2553
|
+
|
|
2554
|
+
|
|
2555
|
+
|
|
2556
|
+
|
|
2557
|
+
|
|
2558
|
+
|
|
2559
|
+
|
|
2560
|
+
|
|
2561
|
+
|
|
2562
|
+
|
|
2563
|
+
|
|
2564
|
+
|
|
2565
|
+
|
|
2566
|
+
<h5 class="h5-returns">Returns:</h5>
|
|
2567
|
+
|
|
2568
|
+
|
|
2569
|
+
<div class="param-desc">
|
|
2570
|
+
- The fetched methods data or null if not found.
|
|
2571
|
+
</div>
|
|
2572
|
+
|
|
2573
|
+
|
|
2574
|
+
|
|
2575
|
+
<dl class="param-type">
|
|
2576
|
+
<dt>
|
|
2577
|
+
Type
|
|
2578
|
+
</dt>
|
|
2579
|
+
<dd>
|
|
2580
|
+
|
|
2581
|
+
<span class="param-type">Promise.<(Object|null)></span>
|
|
2582
|
+
|
|
2583
|
+
|
|
2584
|
+
|
|
2585
|
+
</dd>
|
|
2586
|
+
</dl>
|
|
2587
|
+
|
|
2588
|
+
|
|
2589
|
+
|
|
2590
|
+
|
|
2591
|
+
|
|
2592
|
+
|
|
2593
|
+
|
|
2594
|
+
|
|
2595
|
+
|
|
2596
|
+
|
|
2371
2597
|
<h4 class="name" id=".fetchMethodChildren"><span class="type-signature type-signature-static">(static) </span>fetchMethodChildren<span class="signature">(railcontentId)</span><span class="type-signature"> → {Promise.<(Array.<Object>|null)>}</span></h4>
|
|
2372
2598
|
|
|
2373
2599
|
|
|
@@ -2384,7 +2610,7 @@ fetchAllFilterOptions('myBrand', '', 'Rock', 'John Doe', 'song', 'Love')
|
|
|
2384
2610
|
|
|
2385
2611
|
<dt class="tag-source">Source:</dt>
|
|
2386
2612
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
2387
|
-
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#
|
|
2613
|
+
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line719">line 719</a>
|
|
2388
2614
|
</li></ul></dd>
|
|
2389
2615
|
|
|
2390
2616
|
|
|
@@ -2542,7 +2768,7 @@ fetchAllFilterOptions('myBrand', '', 'Rock', 'John Doe', 'song', 'Love')
|
|
|
2542
2768
|
|
|
2543
2769
|
<dt class="tag-source">Source:</dt>
|
|
2544
2770
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
2545
|
-
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#
|
|
2771
|
+
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line698">line 698</a>
|
|
2546
2772
|
</li></ul></dd>
|
|
2547
2773
|
|
|
2548
2774
|
|
|
@@ -2700,7 +2926,7 @@ fetchAllFilterOptions('myBrand', '', 'Rock', 'John Doe', 'song', 'Love')
|
|
|
2700
2926
|
|
|
2701
2927
|
<dt class="tag-source">Source:</dt>
|
|
2702
2928
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
2703
|
-
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#
|
|
2929
|
+
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line632">line 632</a>
|
|
2704
2930
|
</li></ul></dd>
|
|
2705
2931
|
|
|
2706
2932
|
|
|
@@ -2858,7 +3084,7 @@ fetchAllFilterOptions('myBrand', '', 'Rock', 'John Doe', 'song', 'Love')
|
|
|
2858
3084
|
|
|
2859
3085
|
<dt class="tag-source">Source:</dt>
|
|
2860
3086
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
2861
|
-
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#
|
|
3087
|
+
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line283">line 283</a>
|
|
2862
3088
|
</li></ul></dd>
|
|
2863
3089
|
|
|
2864
3090
|
|
|
@@ -3016,7 +3242,7 @@ fetchAllFilterOptions('myBrand', '', 'Rock', 'John Doe', 'song', 'Love')
|
|
|
3016
3242
|
|
|
3017
3243
|
<dt class="tag-source">Source:</dt>
|
|
3018
3244
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
3019
|
-
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#
|
|
3245
|
+
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line729">line 729</a>
|
|
3020
3246
|
</li></ul></dd>
|
|
3021
3247
|
|
|
3022
3248
|
|
|
@@ -3174,7 +3400,7 @@ fetchAllFilterOptions('myBrand', '', 'Rock', 'John Doe', 'song', 'Love')
|
|
|
3174
3400
|
|
|
3175
3401
|
<dt class="tag-source">Source:</dt>
|
|
3176
3402
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
3177
|
-
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#
|
|
3403
|
+
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line809">line 809</a>
|
|
3178
3404
|
</li></ul></dd>
|
|
3179
3405
|
|
|
3180
3406
|
|
|
@@ -3332,7 +3558,7 @@ fetchAllFilterOptions('myBrand', '', 'Rock', 'John Doe', 'song', 'Love')
|
|
|
3332
3558
|
|
|
3333
3559
|
<dt class="tag-source">Source:</dt>
|
|
3334
3560
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
3335
|
-
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#
|
|
3561
|
+
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line835">line 835</a>
|
|
3336
3562
|
</li></ul></dd>
|
|
3337
3563
|
|
|
3338
3564
|
|
|
@@ -3497,7 +3723,7 @@ fetchAllFilterOptions('myBrand', '', 'Rock', 'John Doe', 'song', 'Love')
|
|
|
3497
3723
|
|
|
3498
3724
|
<dt class="tag-source">Source:</dt>
|
|
3499
3725
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
3500
|
-
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#
|
|
3726
|
+
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line788">line 788</a>
|
|
3501
3727
|
</li></ul></dd>
|
|
3502
3728
|
|
|
3503
3729
|
|
|
@@ -3679,7 +3905,7 @@ fetchAllFilterOptions('myBrand', '', 'Rock', 'John Doe', 'song', 'Love')
|
|
|
3679
3905
|
|
|
3680
3906
|
<dt class="tag-source">Source:</dt>
|
|
3681
3907
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
3682
|
-
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#
|
|
3908
|
+
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line99">line 99</a>
|
|
3683
3909
|
</li></ul></dd>
|
|
3684
3910
|
|
|
3685
3911
|
|
|
@@ -3868,7 +4094,7 @@ fetchAllFilterOptions('myBrand', '', 'Rock', 'John Doe', 'song', 'Love')
|
|
|
3868
4094
|
|
|
3869
4095
|
<dt class="tag-source">Source:</dt>
|
|
3870
4096
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
3871
|
-
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#
|
|
4097
|
+
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line890">line 890</a>
|
|
3872
4098
|
</li></ul></dd>
|
|
3873
4099
|
|
|
3874
4100
|
|
|
@@ -4058,7 +4284,7 @@ fetchSanity(query, true)
|
|
|
4058
4284
|
|
|
4059
4285
|
<dt class="tag-source">Source:</dt>
|
|
4060
4286
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
4061
|
-
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#
|
|
4287
|
+
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line82">line 82</a>
|
|
4062
4288
|
</li></ul></dd>
|
|
4063
4289
|
|
|
4064
4290
|
|
|
@@ -4216,7 +4442,7 @@ fetchSanity(query, true)
|
|
|
4216
4442
|
|
|
4217
4443
|
<dt class="tag-source">Source:</dt>
|
|
4218
4444
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
4219
|
-
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#
|
|
4445
|
+
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line32">line 32</a>
|
|
4220
4446
|
</li></ul></dd>
|
|
4221
4447
|
|
|
4222
4448
|
|
|
@@ -4381,7 +4607,7 @@ fetchSanity(query, true)
|
|
|
4381
4607
|
|
|
4382
4608
|
<dt class="tag-source">Source:</dt>
|
|
4383
4609
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
4384
|
-
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#
|
|
4610
|
+
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line243">line 243</a>
|
|
4385
4611
|
</li></ul></dd>
|
|
4386
4612
|
|
|
4387
4613
|
|
|
@@ -4539,7 +4765,7 @@ fetchSanity(query, true)
|
|
|
4539
4765
|
|
|
4540
4766
|
<dt class="tag-source">Source:</dt>
|
|
4541
4767
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
4542
|
-
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#
|
|
4768
|
+
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line214">line 214</a>
|
|
4543
4769
|
</li></ul></dd>
|
|
4544
4770
|
|
|
4545
4771
|
|
|
@@ -4704,7 +4930,7 @@ fetchSanity(query, true)
|
|
|
4704
4930
|
|
|
4705
4931
|
<dt class="tag-source">Source:</dt>
|
|
4706
4932
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
4707
|
-
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#
|
|
4933
|
+
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line320">line 320</a>
|
|
4708
4934
|
</li></ul></dd>
|
|
4709
4935
|
|
|
4710
4936
|
|
|
@@ -4871,7 +5097,7 @@ It also includes completion status and progress percentage for each workout by f
|
|
|
4871
5097
|
|
|
4872
5098
|
<dt class="tag-source">Source:</dt>
|
|
4873
5099
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
4874
|
-
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#
|
|
5100
|
+
<a href="sanity.js.html">sanity.js</a>, <a href="sanity.js.html#line261">line 261</a>
|
|
4875
5101
|
</li></ul></dd>
|
|
4876
5102
|
|
|
4877
5103
|
|
|
@@ -5035,7 +5261,7 @@ It also includes completion status and progress percentage for each workout by f
|
|
|
5035
5261
|
<br class="clear">
|
|
5036
5262
|
|
|
5037
5263
|
<footer>
|
|
5038
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on
|
|
5264
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Mon Aug 26 2024 19:46:17 GMT+0000 (Coordinated Universal Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
5039
5265
|
</footer>
|
|
5040
5266
|
|
|
5041
5267
|
<script>prettyPrint();</script>
|
package/docs/railcontent.js.html
CHANGED
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
<nav >
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><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-Railcontent-Services.html">Railcontent-Services</a><ul class='methods'><li data-type='method'><a href="module-Railcontent-Services.html#.fetchAllCompletedStates">fetchAllCompletedStates</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#.fetchCurrentSongComplete">fetchCurrentSongComplete</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchSongsInProgress">fetchSongsInProgress</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#.fetchAllSongs">fetchAllSongs</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#.fetchChildren">fetchChildren</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchCourseOverview">fetchCourseOverview</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#.fetchMethodChildren">fetchMethodChildren</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMethodNextLesson">fetchMethodNextLesson</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMethods">fetchMethods</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#.fetchPackAll">fetchPackAll</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchPackChildren">fetchPackChildren</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#.fetchRelatedSongs">fetchRelatedSongs</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#.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#.fetchSongCount">fetchSongCount</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchSongFilterOptions">fetchSongFilterOptions</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#.fetchWorkouts">fetchWorkouts</a></li></ul></li></ul>
|
|
32
|
+
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><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-Railcontent-Services.html">Railcontent-Services</a><ul class='methods'><li data-type='method'><a href="module-Railcontent-Services.html#.fetchAllCompletedStates">fetchAllCompletedStates</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#.fetchCurrentSongComplete">fetchCurrentSongComplete</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchSongsInProgress">fetchSongsInProgress</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#.fetchAllSongs">fetchAllSongs</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#.fetchChildren">fetchChildren</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchCourseOverview">fetchCourseOverview</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#.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#.fetchMethodNextLesson">fetchMethodNextLesson</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMethods">fetchMethods</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#.fetchPackAll">fetchPackAll</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchPackChildren">fetchPackChildren</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#.fetchRelatedSongs">fetchRelatedSongs</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#.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#.fetchSongCount">fetchSongCount</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchSongFilterOptions">fetchSongFilterOptions</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#.fetchWorkouts">fetchWorkouts</a></li></ul></li></ul>
|
|
33
33
|
|
|
34
34
|
</nav>
|
|
35
35
|
|
|
@@ -201,7 +201,7 @@ export async function fetchContentInProgress(type="all", brand) {
|
|
|
201
201
|
<br class="clear">
|
|
202
202
|
|
|
203
203
|
<footer>
|
|
204
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on
|
|
204
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Mon Aug 26 2024 19:46:17 GMT+0000 (Coordinated Universal Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
205
205
|
</footer>
|
|
206
206
|
|
|
207
207
|
<script>prettyPrint();</script>
|
package/docs/sanity.js.html
CHANGED
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
<nav >
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><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-Railcontent-Services.html">Railcontent-Services</a><ul class='methods'><li data-type='method'><a href="module-Railcontent-Services.html#.fetchAllCompletedStates">fetchAllCompletedStates</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#.fetchCurrentSongComplete">fetchCurrentSongComplete</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchSongsInProgress">fetchSongsInProgress</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#.fetchAllSongs">fetchAllSongs</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#.fetchChildren">fetchChildren</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchCourseOverview">fetchCourseOverview</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#.fetchMethodChildren">fetchMethodChildren</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMethodNextLesson">fetchMethodNextLesson</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMethods">fetchMethods</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#.fetchPackAll">fetchPackAll</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchPackChildren">fetchPackChildren</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#.fetchRelatedSongs">fetchRelatedSongs</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#.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#.fetchSongCount">fetchSongCount</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchSongFilterOptions">fetchSongFilterOptions</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#.fetchWorkouts">fetchWorkouts</a></li></ul></li></ul>
|
|
32
|
+
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><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-Railcontent-Services.html">Railcontent-Services</a><ul class='methods'><li data-type='method'><a href="module-Railcontent-Services.html#.fetchAllCompletedStates">fetchAllCompletedStates</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#.fetchCurrentSongComplete">fetchCurrentSongComplete</a></li><li data-type='method'><a href="module-Railcontent-Services.html#.fetchSongsInProgress">fetchSongsInProgress</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#.fetchAllSongs">fetchAllSongs</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#.fetchChildren">fetchChildren</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchCourseOverview">fetchCourseOverview</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#.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#.fetchMethodNextLesson">fetchMethodNextLesson</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchMethods">fetchMethods</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#.fetchPackAll">fetchPackAll</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchPackChildren">fetchPackChildren</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#.fetchRelatedSongs">fetchRelatedSongs</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#.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#.fetchSongCount">fetchSongCount</a></li><li data-type='method'><a href="module-Sanity-Services.html#.fetchSongFilterOptions">fetchSongFilterOptions</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#.fetchWorkouts">fetchWorkouts</a></li></ul></li></ul>
|
|
33
33
|
|
|
34
34
|
</nav>
|
|
35
35
|
|
|
@@ -53,6 +53,18 @@ import {globalConfig} from "./config";
|
|
|
53
53
|
|
|
54
54
|
import { fetchAllCompletedStates, fetchCurrentSongComplete } from './railcontent.js';
|
|
55
55
|
|
|
56
|
+
const DEFAULT_FIELDS = [
|
|
57
|
+
'"id": railcontent_id',
|
|
58
|
+
'railcontent_id',
|
|
59
|
+
'"type": _type',
|
|
60
|
+
'title',
|
|
61
|
+
'"image": thumbnail.asset->url',
|
|
62
|
+
'difficulty',
|
|
63
|
+
'difficulty_string',
|
|
64
|
+
'web_url_path',
|
|
65
|
+
'published_on'
|
|
66
|
+
];
|
|
67
|
+
|
|
56
68
|
/**
|
|
57
69
|
* Fetch a song by its document ID from Sanity.
|
|
58
70
|
*
|
|
@@ -410,6 +422,7 @@ export async function fetchByRailContentId(id) {
|
|
|
410
422
|
* Fetch content by an array of Railcontent IDs.
|
|
411
423
|
*
|
|
412
424
|
* @param {Array<string>} ids - The array of Railcontent IDs of the content to fetch.
|
|
425
|
+
* @param {string} [contentType] - The content type the IDs to add needed fields to the response.
|
|
413
426
|
* @returns {Promise<Array<Object>|null>} - A promise that resolves to an array of content objects or null if not found.
|
|
414
427
|
*
|
|
415
428
|
* @example
|
|
@@ -417,18 +430,11 @@ export async function fetchByRailContentId(id) {
|
|
|
417
430
|
* .then(contents => console.log(contents))
|
|
418
431
|
* .catch(error => console.error(error));
|
|
419
432
|
*/
|
|
420
|
-
export async function fetchByRailContentIds(ids) {
|
|
433
|
+
export async function fetchByRailContentIds(ids, contentType = undefined) {
|
|
434
|
+
const fields = contentType ? DEFAULT_FIELDS.concat(contentTypeConfig?.[contentType]?.fields ?? []) : DEFAULT_FIELDS;
|
|
421
435
|
const idsString = ids.join(',');
|
|
422
436
|
const query = `*[railcontent_id in [${idsString}]]{
|
|
423
|
-
|
|
424
|
-
title,
|
|
425
|
-
"image": thumbnail.asset->url,
|
|
426
|
-
"artist_name": artist->name,
|
|
427
|
-
artist,
|
|
428
|
-
difficulty,
|
|
429
|
-
difficulty_string,
|
|
430
|
-
web_url_path,
|
|
431
|
-
published_on
|
|
437
|
+
${fields.join(', ')}
|
|
432
438
|
}`
|
|
433
439
|
return fetchSanity(query, true);
|
|
434
440
|
}
|
|
@@ -521,18 +527,7 @@ export async function fetchAll(brand, type, {
|
|
|
521
527
|
break;
|
|
522
528
|
}
|
|
523
529
|
|
|
524
|
-
let
|
|
525
|
-
'"id": railcontent_id',
|
|
526
|
-
'railcontent_id',
|
|
527
|
-
'"type": _type',
|
|
528
|
-
'title',
|
|
529
|
-
'"image": thumbnail.asset->url',
|
|
530
|
-
'difficulty',
|
|
531
|
-
'difficulty_string',
|
|
532
|
-
'web_url_path',
|
|
533
|
-
'published_on'];
|
|
534
|
-
|
|
535
|
-
let fields = defaultFields.concat(additionalFields);
|
|
530
|
+
let fields = DEFAULT_FIELDS.concat(additionalFields);
|
|
536
531
|
let fieldsString = fields.join(',');
|
|
537
532
|
|
|
538
533
|
// Determine the group by clause
|
|
@@ -682,15 +677,19 @@ export async function fetchChildren(railcontentId) {
|
|
|
682
677
|
* @returns {Promise<Object|null>} - The fetched methods data or null if not found.
|
|
683
678
|
*/
|
|
684
679
|
export async function fetchMethods(brand) {
|
|
685
|
-
const query = `*[_type == 'learning-path' && brand == "
|
|
680
|
+
const query = `*[_type == 'learning-path' && brand == "${brand}"] {
|
|
686
681
|
child_count,
|
|
687
682
|
difficulty,
|
|
683
|
+
difficulty_string,
|
|
688
684
|
"description": description[0].children[0].text,
|
|
689
685
|
hide_from_recsys,
|
|
686
|
+
"image": thumbnail.asset->url,
|
|
690
687
|
"instructors":instructor[]->name,
|
|
688
|
+
"lesson_count": child_count,
|
|
691
689
|
length_in_seconds,
|
|
692
690
|
permission,
|
|
693
691
|
popularity,
|
|
692
|
+
"position": count(*[_type == 'learning-path' && brand == '${brand}' && (published_on < ^.published_on || (published_on == ^.published_on && _id < ^._id))]) + 1,
|
|
694
693
|
published_on,
|
|
695
694
|
railcontent_id,
|
|
696
695
|
"slug": slug.current,
|
|
@@ -701,11 +700,43 @@ export async function fetchMethods(brand) {
|
|
|
701
700
|
total_xp,
|
|
702
701
|
"type": _type,
|
|
703
702
|
web_url_path,
|
|
704
|
-
|
|
703
|
+
"url": web_url_path,
|
|
704
|
+
xp,
|
|
705
705
|
} | order(published_on asc)`
|
|
706
706
|
return fetchSanity(query, true);
|
|
707
707
|
}
|
|
708
708
|
|
|
709
|
+
/**
|
|
710
|
+
* Fetch the Method (learning-paths) for a specific brand.
|
|
711
|
+
* @param {string} brand - The brand for which to fetch methods.
|
|
712
|
+
* @param {string} slug - The slug of the method.
|
|
713
|
+
* @returns {Promise<Object|null>} - The fetched methods data or null if not found.
|
|
714
|
+
*/
|
|
715
|
+
export async function fetchMethod(brand, slug) {
|
|
716
|
+
const query = `*[_type == 'learning-path' && brand == "${brand}" && slug.current == "${slug}"] {
|
|
717
|
+
"description": description[0].children[0].text,
|
|
718
|
+
"instructors":instructor[]->name,
|
|
719
|
+
published_on,
|
|
720
|
+
"id": railcontent_id,
|
|
721
|
+
railcontent_id,
|
|
722
|
+
"slug": slug.current,
|
|
723
|
+
status,
|
|
724
|
+
title,
|
|
725
|
+
video,
|
|
726
|
+
"type": _type,
|
|
727
|
+
"levels": child[]->
|
|
728
|
+
{
|
|
729
|
+
"id": railcontent_id,
|
|
730
|
+
published_on,
|
|
731
|
+
"thumbnail_url": thumbnail.asset->url,
|
|
732
|
+
"instructor": instructor[]->{name},
|
|
733
|
+
title,
|
|
734
|
+
"description": description[0].children[0].text,
|
|
735
|
+
}
|
|
736
|
+
} | order(published_on asc)`
|
|
737
|
+
return fetchSanity(query, false);
|
|
738
|
+
}
|
|
739
|
+
|
|
709
740
|
/**
|
|
710
741
|
* Fetch the next lesson for a specific method by Railcontent ID.
|
|
711
742
|
* @param {string} railcontentId - The Railcontent ID of the current lesson.
|
|
@@ -985,7 +1016,7 @@ function checkSanityConfig(config) {
|
|
|
985
1016
|
<br class="clear">
|
|
986
1017
|
|
|
987
1018
|
<footer>
|
|
988
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on
|
|
1019
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Mon Aug 26 2024 19:46:17 GMT+0000 (Coordinated Universal Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
989
1020
|
</footer>
|
|
990
1021
|
|
|
991
1022
|
<script>prettyPrint();</script>
|
package/package.json
CHANGED
package/src/contentTypeConfig.js
CHANGED
package/src/index.d.ts
CHANGED
|
@@ -14,6 +14,8 @@ import {
|
|
|
14
14
|
fetchByRailContentIds,
|
|
15
15
|
fetchAll,
|
|
16
16
|
fetchAllFilterOptions,
|
|
17
|
+
fetchMethods,
|
|
18
|
+
fetchMethod,
|
|
17
19
|
fetchMethodNextLesson,
|
|
18
20
|
fetchMethodChildren,
|
|
19
21
|
fetchNextPreviousLesson,
|
|
@@ -43,6 +45,8 @@ declare module 'musora-content-services' {
|
|
|
43
45
|
fetchByRailContentIds,
|
|
44
46
|
fetchAll,
|
|
45
47
|
fetchAllFilterOptions,
|
|
48
|
+
fetchMethods,
|
|
49
|
+
fetchMethod,
|
|
46
50
|
fetchMethodNextLesson,
|
|
47
51
|
fetchMethodChildren,
|
|
48
52
|
fetchNextPreviousLesson,
|
package/src/index.js
CHANGED
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
fetchAllFilterOptions,
|
|
18
18
|
fetchMethodNextLesson,
|
|
19
19
|
fetchMethods,
|
|
20
|
+
fetchMethod,
|
|
20
21
|
fetchMethodChildren,
|
|
21
22
|
fetchNextPreviousLesson,
|
|
22
23
|
fetchRelatedLessons,
|
|
@@ -50,6 +51,7 @@ export {
|
|
|
50
51
|
fetchAll,
|
|
51
52
|
fetchAllFilterOptions,
|
|
52
53
|
fetchMethods,
|
|
54
|
+
fetchMethod,
|
|
53
55
|
fetchMethodNextLesson,
|
|
54
56
|
fetchMethodChildren,
|
|
55
57
|
fetchNextPreviousLesson,
|
package/src/services/sanity.js
CHANGED
|
@@ -6,6 +6,18 @@ import {globalConfig} from "./config";
|
|
|
6
6
|
|
|
7
7
|
import { fetchAllCompletedStates, fetchCurrentSongComplete } from './railcontent.js';
|
|
8
8
|
|
|
9
|
+
const DEFAULT_FIELDS = [
|
|
10
|
+
'"id": railcontent_id',
|
|
11
|
+
'railcontent_id',
|
|
12
|
+
'"type": _type',
|
|
13
|
+
'title',
|
|
14
|
+
'"image": thumbnail.asset->url',
|
|
15
|
+
'difficulty',
|
|
16
|
+
'difficulty_string',
|
|
17
|
+
'web_url_path',
|
|
18
|
+
'published_on'
|
|
19
|
+
];
|
|
20
|
+
|
|
9
21
|
/**
|
|
10
22
|
* Fetch a song by its document ID from Sanity.
|
|
11
23
|
*
|
|
@@ -363,6 +375,7 @@ export async function fetchByRailContentId(id) {
|
|
|
363
375
|
* Fetch content by an array of Railcontent IDs.
|
|
364
376
|
*
|
|
365
377
|
* @param {Array<string>} ids - The array of Railcontent IDs of the content to fetch.
|
|
378
|
+
* @param {string} [contentType] - The content type the IDs to add needed fields to the response.
|
|
366
379
|
* @returns {Promise<Array<Object>|null>} - A promise that resolves to an array of content objects or null if not found.
|
|
367
380
|
*
|
|
368
381
|
* @example
|
|
@@ -370,18 +383,11 @@ export async function fetchByRailContentId(id) {
|
|
|
370
383
|
* .then(contents => console.log(contents))
|
|
371
384
|
* .catch(error => console.error(error));
|
|
372
385
|
*/
|
|
373
|
-
export async function fetchByRailContentIds(ids) {
|
|
386
|
+
export async function fetchByRailContentIds(ids, contentType = undefined) {
|
|
387
|
+
const fields = contentType ? DEFAULT_FIELDS.concat(contentTypeConfig?.[contentType]?.fields ?? []) : DEFAULT_FIELDS;
|
|
374
388
|
const idsString = ids.join(',');
|
|
375
389
|
const query = `*[railcontent_id in [${idsString}]]{
|
|
376
|
-
|
|
377
|
-
title,
|
|
378
|
-
"image": thumbnail.asset->url,
|
|
379
|
-
"artist_name": artist->name,
|
|
380
|
-
artist,
|
|
381
|
-
difficulty,
|
|
382
|
-
difficulty_string,
|
|
383
|
-
web_url_path,
|
|
384
|
-
published_on
|
|
390
|
+
${fields.join(', ')}
|
|
385
391
|
}`
|
|
386
392
|
return fetchSanity(query, true);
|
|
387
393
|
}
|
|
@@ -474,19 +480,7 @@ export async function fetchAll(brand, type, {
|
|
|
474
480
|
break;
|
|
475
481
|
}
|
|
476
482
|
|
|
477
|
-
let
|
|
478
|
-
'"id": railcontent_id',
|
|
479
|
-
'railcontent_id',
|
|
480
|
-
'"type": _type',
|
|
481
|
-
'title',
|
|
482
|
-
'"image": thumbnail.asset->url',
|
|
483
|
-
'difficulty',
|
|
484
|
-
'difficulty_string',
|
|
485
|
-
'web_url_path',
|
|
486
|
-
'published_on'
|
|
487
|
-
];
|
|
488
|
-
|
|
489
|
-
let fields = defaultFields.concat(additionalFields);
|
|
483
|
+
let fields = DEFAULT_FIELDS.concat(additionalFields);
|
|
490
484
|
let fieldsString = fields.join(',');
|
|
491
485
|
|
|
492
486
|
// Determine the group by clause
|
|
@@ -636,9 +630,8 @@ export async function fetchChildren(railcontentId) {
|
|
|
636
630
|
* @returns {Promise<Object|null>} - The fetched methods data or null if not found.
|
|
637
631
|
*/
|
|
638
632
|
export async function fetchMethods(brand) {
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
const query = `*[_type == 'learning-path' && brand == '${brand}'] {
|
|
633
|
+
const query = `*[_type == 'learning-path' && brand == "${brand}"] {
|
|
634
|
+
child_count,
|
|
642
635
|
difficulty,
|
|
643
636
|
difficulty_string,
|
|
644
637
|
"description": description[0].children[0].text,
|
|
@@ -654,16 +647,49 @@ export async function fetchMethods(brand) {
|
|
|
654
647
|
railcontent_id,
|
|
655
648
|
"slug": slug.current,
|
|
656
649
|
status,
|
|
650
|
+
"thumbnail": thumbnail.asset->url,
|
|
657
651
|
"thumbnail_logo": logo_image_url.asset->url,
|
|
658
652
|
title,
|
|
659
653
|
total_xp,
|
|
660
654
|
"type": _type,
|
|
655
|
+
web_url_path,
|
|
661
656
|
"url": web_url_path,
|
|
662
|
-
xp
|
|
663
|
-
}`
|
|
657
|
+
xp,
|
|
658
|
+
} | order(published_on asc)`
|
|
664
659
|
return fetchSanity(query, true);
|
|
665
660
|
}
|
|
666
661
|
|
|
662
|
+
/**
|
|
663
|
+
* Fetch the Method (learning-paths) for a specific brand.
|
|
664
|
+
* @param {string} brand - The brand for which to fetch methods.
|
|
665
|
+
* @param {string} slug - The slug of the method.
|
|
666
|
+
* @returns {Promise<Object|null>} - The fetched methods data or null if not found.
|
|
667
|
+
*/
|
|
668
|
+
export async function fetchMethod(brand, slug) {
|
|
669
|
+
const query = `*[_type == 'learning-path' && brand == "${brand}" && slug.current == "${slug}"] {
|
|
670
|
+
"description": description[0].children[0].text,
|
|
671
|
+
"instructors":instructor[]->name,
|
|
672
|
+
published_on,
|
|
673
|
+
"id": railcontent_id,
|
|
674
|
+
railcontent_id,
|
|
675
|
+
"slug": slug.current,
|
|
676
|
+
status,
|
|
677
|
+
title,
|
|
678
|
+
video,
|
|
679
|
+
"type": _type,
|
|
680
|
+
"levels": child[]->
|
|
681
|
+
{
|
|
682
|
+
"id": railcontent_id,
|
|
683
|
+
published_on,
|
|
684
|
+
"thumbnail_url": thumbnail.asset->url,
|
|
685
|
+
"instructor": instructor[]->{name},
|
|
686
|
+
title,
|
|
687
|
+
"description": description[0].children[0].text,
|
|
688
|
+
}
|
|
689
|
+
} | order(published_on asc)`
|
|
690
|
+
return fetchSanity(query, false);
|
|
691
|
+
}
|
|
692
|
+
|
|
667
693
|
/**
|
|
668
694
|
* Fetch the next lesson for a specific method by Railcontent ID.
|
|
669
695
|
* @param {string} railcontentId - The Railcontent ID of the current lesson.
|
|
@@ -21,7 +21,9 @@ const {
|
|
|
21
21
|
fetchRelatedLessons,
|
|
22
22
|
fetchPackAll,
|
|
23
23
|
fetchPackChildren,
|
|
24
|
-
fetchLessonContent
|
|
24
|
+
fetchLessonContent,
|
|
25
|
+
fetchMethod,
|
|
26
|
+
fetchMethods,
|
|
25
27
|
} = require('../src/services/sanity.js');
|
|
26
28
|
|
|
27
29
|
describe('Sanity Queries', function () {
|
|
@@ -117,6 +119,20 @@ describe('Sanity Queries', function () {
|
|
|
117
119
|
expect(response.entity[0].challenge_state_text).toBeDefined();
|
|
118
120
|
|
|
119
121
|
});
|
|
122
|
+
|
|
123
|
+
test('fetchMethod', async () => {
|
|
124
|
+
const response = await fetchMethod('drumeo', 'drumeo-method');
|
|
125
|
+
//console.log(response);
|
|
126
|
+
expect(response).toBeDefined();
|
|
127
|
+
expect(response.levels.length).toBeGreaterThan(0);
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
test('fetchMethods', async () => {
|
|
131
|
+
const response = await fetchMethods('drumeo');
|
|
132
|
+
//console.log(response);
|
|
133
|
+
expect(response.length).toBeGreaterThan(0);
|
|
134
|
+
expect(response[0].type).toBe('learning-path');
|
|
135
|
+
});
|
|
120
136
|
// test('fetchRelatedLessons', async () => {
|
|
121
137
|
// const id = 380094;
|
|
122
138
|
// const response = await fetchRelatedLessons(id, 'singeo', 'song');
|