musora-content-services 2.2.1 → 2.3.2
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/.editorconfig +0 -0
- package/.yarnrc.yml +1 -0
- package/CHANGELOG.md +17 -0
- package/docs/Content-Organization.html +0 -0
- package/docs/Gamification.html +0 -0
- package/docs/Playlists.html +0 -0
- package/docs/api_types.js.html +0 -0
- package/docs/config.js.html +0 -0
- package/docs/content-org_playlists-types.js.html +0 -0
- package/docs/content-org_playlists.js.html +0 -0
- package/docs/content-org_types.js.html +0 -0
- package/docs/content.js.html +0 -0
- package/docs/gamification_awards.js.html +0 -0
- package/docs/gamification_gamification.js.html +0 -0
- package/docs/gamification_types.js.html +0 -0
- package/docs/global.html +0 -0
- package/docs/index.html +0 -0
- package/docs/module-Awards.html +0 -0
- package/docs/module-Config.html +0 -0
- package/docs/module-Content-Organization-Playlists.html +0 -0
- package/docs/module-Content-Organization.html +0 -0
- package/docs/module-Content-Services-V2.html +0 -0
- package/docs/module-Content-Services.html +763 -0
- package/docs/module-Playlists.html +0 -0
- package/docs/module-Railcontent-Services.html +0 -0
- package/docs/module-Sanity-Services.html +0 -0
- package/docs/module-Session-Management.html +0 -0
- package/docs/module-User-Permissions.html +0 -0
- package/docs/module-playlists.html +0 -0
- package/docs/module-playlists_.html +0 -0
- package/docs/railcontent.js.html +0 -0
- package/docs/sanity.js.html +0 -0
- package/docs/user_permissions.js.html +0 -0
- package/docs/user_sessions.js.html +0 -0
- package/docs/user_types.js.html +0 -0
- package/jsdoc.json +0 -0
- package/package.json +1 -1
- package/src/contentMetaData.js +0 -0
- package/src/filterBuilder.js +0 -0
- package/src/index.d.ts +0 -0
- package/src/index.js +0 -0
- package/src/lib/httpHelper.js +0 -0
- package/src/lib/lastUpdated.js +0 -0
- package/src/services/api/types.js +0 -0
- package/src/services/config.js +0 -0
- package/src/services/content-org/playlists-types.js +0 -0
- package/src/services/content-org/playlists.js +0 -0
- package/src/services/content.js +4 -1
- package/src/services/contentProgress.js +0 -0
- package/src/services/dataContext.js +0 -0
- package/src/services/forum.js +0 -0
- package/src/services/gamification/awards.js +0 -0
- package/src/services/gamification/gamification.js +0 -0
- package/src/services/gamification/types.js +0 -0
- package/src/services/railcontent.js +0 -0
- package/src/services/recommendations.js +0 -0
- package/src/services/user/management.js +0 -0
- package/src/services/user/permissions.js +0 -0
- package/src/services/user/sessions.js +0 -0
- package/src/services/user/types.js +0 -0
- package/src/services/userActivity.js +3 -2
- package/test/content.test.js +0 -0
- package/test/contentLikes.test.js +0 -0
- package/test/contentProgress.test.js +0 -0
- package/test/dataContext.test.js +0 -0
- package/test/forum.test.js +0 -0
- package/test/initializeTests.js +0 -0
- package/test/lib/lastUpdated.test.js +0 -0
- package/test/mockData/mockData_fetchByRailContentIds_one_content.json +0 -0
- package/test/sanityQueryService.test.js +0 -0
- package/test/user/permissions.test.js +0 -0
- package/test/userActivity.test.js +0 -0
- package/tools/generate-index.cjs +0 -0
package/.editorconfig
CHANGED
|
File without changes
|
package/.yarnrc.yml
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
nodeLinker: node-modules
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [2.3.2](https://github.com/railroadmedia/musora-content-services/compare/v2.3.1...v2.3.2) (2025-03-31)
|
|
6
|
+
|
|
7
|
+
### [2.3.1](https://github.com/railroadmedia/musora-content-services/compare/v2.3.0...v2.3.1) (2025-03-31)
|
|
8
|
+
|
|
9
|
+
## [2.3.0](https://github.com/railroadmedia/musora-content-services/compare/v1.3.15...v2.3.0) (2025-03-31)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
* **BEH-326:** update routing for top/all comment endpoints ([#203](https://github.com/railroadmedia/musora-content-services/issues/203)) ([1f4807f](https://github.com/railroadmedia/musora-content-services/commit/1f4807fcef3cb7ce0b03202519b4ccb4fbd6232f))
|
|
15
|
+
* **MU2-357:** mock award data ([#204](https://github.com/railroadmedia/musora-content-services/issues/204)) ([008fea3](https://github.com/railroadmedia/musora-content-services/commit/008fea3e9aef75884fe0c3987bdbb42e9cb254da))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* **playlists:** config import ([#198](https://github.com/railroadmedia/musora-content-services/issues/198)) ([4965de4](https://github.com/railroadmedia/musora-content-services/commit/4965de4fc2d1cda8de022ff46a3e09caac9d351f))
|
|
21
|
+
|
|
5
22
|
### [2.2.1](https://github.com/railroadmedia/musora-content-services/compare/v2.2.0...v2.2.1) (2025-03-28)
|
|
6
23
|
|
|
7
24
|
## [2.2.0](https://github.com/railroadmedia/musora-content-services/compare/v2.1.1...v2.2.0) (2025-03-27)
|
|
File without changes
|
package/docs/Gamification.html
CHANGED
|
File without changes
|
package/docs/Playlists.html
CHANGED
|
File without changes
|
package/docs/api_types.js.html
CHANGED
|
File without changes
|
package/docs/config.js.html
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/docs/content.js.html
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/docs/global.html
CHANGED
|
File without changes
|
package/docs/index.html
CHANGED
|
File without changes
|
package/docs/module-Awards.html
CHANGED
|
File without changes
|
package/docs/module-Config.html
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,763 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
|
|
5
|
+
<meta charset="utf-8">
|
|
6
|
+
<title>Content-Services - 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-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.html">Content-Services</a><ul class='methods'><li data-type='method'><a href="module-Content-Services.html#.getTabResults">getTabResults</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#.addItemToPlaylist">addItemToPlaylist</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#.createPlaylist">createPlaylist</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#.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#.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#.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#.fetchUserPlaylists">fetchUserPlaylists</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#.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#.postChallengesCompleteLesson">postChallengesCompleteLesson</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#.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#.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#.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#.fetchLessonContent">fetchLessonContent</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#.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#.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#.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#~handleCustomFetchAll">handleCustomFetchAll</a></li></ul></li></ul>
|
|
33
|
+
|
|
34
|
+
</nav>
|
|
35
|
+
|
|
36
|
+
<div id="main">
|
|
37
|
+
|
|
38
|
+
<h1 class="page-title">Content-Services</h1>
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
<section>
|
|
47
|
+
|
|
48
|
+
<header>
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
</header>
|
|
53
|
+
|
|
54
|
+
<article>
|
|
55
|
+
|
|
56
|
+
<div class="container-overview">
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
</div>
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
<h3 class="subsection-title">Methods</h3>
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
<h4 class="name" id=".getTabResults"><span class="type-signature type-signature-static">(static) </span>getTabResults<span class="signature">(brand, type, params)</span><span class="type-signature"> → {Promise.<(Object|null)>}</span></h4>
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
<dl class="details">
|
|
95
|
+
|
|
96
|
+
<dt class="tag-description">Description:</dt>
|
|
97
|
+
<dd class="tag-description"><ul class="dummy"><li>Fetch all content for a specific brand and type with pagination, search, and grouping options.</li></ul></dd>
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
<dt class="tag-source">Source:</dt>
|
|
102
|
+
<dd class="tag-source"><ul class="dummy"><li>
|
|
103
|
+
<a href="content.js.html">content.js</a>, <a href="content.js.html#line103">line 103</a>
|
|
104
|
+
</li></ul></dd>
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
</dl>
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
<h5 class="h5-examples">Example</h5>
|
|
149
|
+
|
|
150
|
+
<pre class="prettyprint"><code>fetchAll('drumeo', 'song', {
|
|
151
|
+
page: 2,
|
|
152
|
+
limit: 20,
|
|
153
|
+
searchTerm: 'jazz',
|
|
154
|
+
sort: '-popularity',
|
|
155
|
+
includedFields: ['difficulty,Intermediate'],
|
|
156
|
+
groupBy: 'artist',
|
|
157
|
+
progressIds: [123, 321],
|
|
158
|
+
useDefaultFields: false,
|
|
159
|
+
customFields: ['is_house_coach', 'slug.current', "'instructors': instructor[]->name"],
|
|
160
|
+
})
|
|
161
|
+
.then(content => console.log(content))
|
|
162
|
+
.catch(error => console.error(error));</code></pre>
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
<h5 class="h5-parameters">Parameters:</h5>
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
<table class="params">
|
|
171
|
+
<thead>
|
|
172
|
+
<tr>
|
|
173
|
+
|
|
174
|
+
<th>Name</th>
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
<th>Type</th>
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
<th class="last">Description</th>
|
|
184
|
+
</tr>
|
|
185
|
+
</thead>
|
|
186
|
+
|
|
187
|
+
<tbody>
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
<tr>
|
|
191
|
+
|
|
192
|
+
<td class="name"><code>brand</code></td>
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
<td class="type">
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
<span class="param-type">string</span>
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
</td>
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
<td class="description last">The brand for which to fetch content.</td>
|
|
210
|
+
</tr>
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
<tr>
|
|
215
|
+
|
|
216
|
+
<td class="name"><code>type</code></td>
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
<td class="type">
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
<span class="param-type">string</span>
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
</td>
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
<td class="description last">The content type to fetch (e.g., 'song', 'artist').</td>
|
|
234
|
+
</tr>
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
<tr>
|
|
239
|
+
|
|
240
|
+
<td class="name"><code>params</code></td>
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
<td class="type">
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
<span class="param-type">Object</span>
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
</td>
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
<td class="description last">Parameters for pagination, filtering, sorting, and grouping.
|
|
258
|
+
<h6>Properties</h6>
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
<table class="params">
|
|
262
|
+
<thead>
|
|
263
|
+
<tr>
|
|
264
|
+
|
|
265
|
+
<th>Name</th>
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
<th>Type</th>
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
<th>Attributes</th>
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
<th>Default</th>
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
<th class="last">Description</th>
|
|
279
|
+
</tr>
|
|
280
|
+
</thead>
|
|
281
|
+
|
|
282
|
+
<tbody>
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
<tr>
|
|
286
|
+
|
|
287
|
+
<td class="name"><code>page</code></td>
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
<td class="type">
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
<span class="param-type">number</span>
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
</td>
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
<td class="attributes">
|
|
302
|
+
|
|
303
|
+
<optional><br>
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
</td>
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
<td class="default">
|
|
314
|
+
|
|
315
|
+
<code>1</code>
|
|
316
|
+
|
|
317
|
+
</td>
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
<td class="description last">The page number for pagination.</td>
|
|
321
|
+
</tr>
|
|
322
|
+
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
<tr>
|
|
326
|
+
|
|
327
|
+
<td class="name"><code>limit</code></td>
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
<td class="type">
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
<span class="param-type">number</span>
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
</td>
|
|
339
|
+
|
|
340
|
+
|
|
341
|
+
<td class="attributes">
|
|
342
|
+
|
|
343
|
+
<optional><br>
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
</td>
|
|
350
|
+
|
|
351
|
+
|
|
352
|
+
|
|
353
|
+
<td class="default">
|
|
354
|
+
|
|
355
|
+
<code>10</code>
|
|
356
|
+
|
|
357
|
+
</td>
|
|
358
|
+
|
|
359
|
+
|
|
360
|
+
<td class="description last">The number of items per page.</td>
|
|
361
|
+
</tr>
|
|
362
|
+
|
|
363
|
+
|
|
364
|
+
|
|
365
|
+
<tr>
|
|
366
|
+
|
|
367
|
+
<td class="name"><code>searchTerm</code></td>
|
|
368
|
+
|
|
369
|
+
|
|
370
|
+
<td class="type">
|
|
371
|
+
|
|
372
|
+
|
|
373
|
+
<span class="param-type">string</span>
|
|
374
|
+
|
|
375
|
+
|
|
376
|
+
|
|
377
|
+
|
|
378
|
+
</td>
|
|
379
|
+
|
|
380
|
+
|
|
381
|
+
<td class="attributes">
|
|
382
|
+
|
|
383
|
+
<optional><br>
|
|
384
|
+
|
|
385
|
+
|
|
386
|
+
|
|
387
|
+
|
|
388
|
+
|
|
389
|
+
</td>
|
|
390
|
+
|
|
391
|
+
|
|
392
|
+
|
|
393
|
+
<td class="default">
|
|
394
|
+
|
|
395
|
+
<code>""</code>
|
|
396
|
+
|
|
397
|
+
</td>
|
|
398
|
+
|
|
399
|
+
|
|
400
|
+
<td class="description last">The search term to filter content by title or artist.</td>
|
|
401
|
+
</tr>
|
|
402
|
+
|
|
403
|
+
|
|
404
|
+
|
|
405
|
+
<tr>
|
|
406
|
+
|
|
407
|
+
<td class="name"><code>sort</code></td>
|
|
408
|
+
|
|
409
|
+
|
|
410
|
+
<td class="type">
|
|
411
|
+
|
|
412
|
+
|
|
413
|
+
<span class="param-type">string</span>
|
|
414
|
+
|
|
415
|
+
|
|
416
|
+
|
|
417
|
+
|
|
418
|
+
</td>
|
|
419
|
+
|
|
420
|
+
|
|
421
|
+
<td class="attributes">
|
|
422
|
+
|
|
423
|
+
<optional><br>
|
|
424
|
+
|
|
425
|
+
|
|
426
|
+
|
|
427
|
+
|
|
428
|
+
|
|
429
|
+
</td>
|
|
430
|
+
|
|
431
|
+
|
|
432
|
+
|
|
433
|
+
<td class="default">
|
|
434
|
+
|
|
435
|
+
<code>"-published_on"</code>
|
|
436
|
+
|
|
437
|
+
</td>
|
|
438
|
+
|
|
439
|
+
|
|
440
|
+
<td class="description last">The field to sort the content by.</td>
|
|
441
|
+
</tr>
|
|
442
|
+
|
|
443
|
+
|
|
444
|
+
|
|
445
|
+
<tr>
|
|
446
|
+
|
|
447
|
+
<td class="name"><code>includedFields</code></td>
|
|
448
|
+
|
|
449
|
+
|
|
450
|
+
<td class="type">
|
|
451
|
+
|
|
452
|
+
|
|
453
|
+
<span class="param-type">Array.<string></span>
|
|
454
|
+
|
|
455
|
+
|
|
456
|
+
|
|
457
|
+
|
|
458
|
+
</td>
|
|
459
|
+
|
|
460
|
+
|
|
461
|
+
<td class="attributes">
|
|
462
|
+
|
|
463
|
+
<optional><br>
|
|
464
|
+
|
|
465
|
+
|
|
466
|
+
|
|
467
|
+
|
|
468
|
+
|
|
469
|
+
</td>
|
|
470
|
+
|
|
471
|
+
|
|
472
|
+
|
|
473
|
+
<td class="default">
|
|
474
|
+
|
|
475
|
+
<code>[]</code>
|
|
476
|
+
|
|
477
|
+
</td>
|
|
478
|
+
|
|
479
|
+
|
|
480
|
+
<td class="description last">The fields to include in the query.</td>
|
|
481
|
+
</tr>
|
|
482
|
+
|
|
483
|
+
|
|
484
|
+
|
|
485
|
+
<tr>
|
|
486
|
+
|
|
487
|
+
<td class="name"><code>groupBy</code></td>
|
|
488
|
+
|
|
489
|
+
|
|
490
|
+
<td class="type">
|
|
491
|
+
|
|
492
|
+
|
|
493
|
+
<span class="param-type">string</span>
|
|
494
|
+
|
|
495
|
+
|
|
496
|
+
|
|
497
|
+
|
|
498
|
+
</td>
|
|
499
|
+
|
|
500
|
+
|
|
501
|
+
<td class="attributes">
|
|
502
|
+
|
|
503
|
+
<optional><br>
|
|
504
|
+
|
|
505
|
+
|
|
506
|
+
|
|
507
|
+
|
|
508
|
+
|
|
509
|
+
</td>
|
|
510
|
+
|
|
511
|
+
|
|
512
|
+
|
|
513
|
+
<td class="default">
|
|
514
|
+
|
|
515
|
+
<code>""</code>
|
|
516
|
+
|
|
517
|
+
</td>
|
|
518
|
+
|
|
519
|
+
|
|
520
|
+
<td class="description last">The field to group the results by (e.g., 'artist', 'genre').</td>
|
|
521
|
+
</tr>
|
|
522
|
+
|
|
523
|
+
|
|
524
|
+
|
|
525
|
+
<tr>
|
|
526
|
+
|
|
527
|
+
<td class="name"><code>progressIds</code></td>
|
|
528
|
+
|
|
529
|
+
|
|
530
|
+
<td class="type">
|
|
531
|
+
|
|
532
|
+
|
|
533
|
+
<span class="param-type">Array.<string></span>
|
|
534
|
+
|
|
535
|
+
|
|
536
|
+
|
|
537
|
+
|
|
538
|
+
</td>
|
|
539
|
+
|
|
540
|
+
|
|
541
|
+
<td class="attributes">
|
|
542
|
+
|
|
543
|
+
<optional><br>
|
|
544
|
+
|
|
545
|
+
|
|
546
|
+
|
|
547
|
+
|
|
548
|
+
|
|
549
|
+
</td>
|
|
550
|
+
|
|
551
|
+
|
|
552
|
+
|
|
553
|
+
<td class="default">
|
|
554
|
+
|
|
555
|
+
</td>
|
|
556
|
+
|
|
557
|
+
|
|
558
|
+
<td class="description last">An array of railcontent IDs to filter the results by. Used for filtering by progress.</td>
|
|
559
|
+
</tr>
|
|
560
|
+
|
|
561
|
+
|
|
562
|
+
|
|
563
|
+
<tr>
|
|
564
|
+
|
|
565
|
+
<td class="name"><code>useDefaultFields</code></td>
|
|
566
|
+
|
|
567
|
+
|
|
568
|
+
<td class="type">
|
|
569
|
+
|
|
570
|
+
|
|
571
|
+
<span class="param-type">boolean</span>
|
|
572
|
+
|
|
573
|
+
|
|
574
|
+
|
|
575
|
+
|
|
576
|
+
</td>
|
|
577
|
+
|
|
578
|
+
|
|
579
|
+
<td class="attributes">
|
|
580
|
+
|
|
581
|
+
<optional><br>
|
|
582
|
+
|
|
583
|
+
|
|
584
|
+
|
|
585
|
+
|
|
586
|
+
|
|
587
|
+
</td>
|
|
588
|
+
|
|
589
|
+
|
|
590
|
+
|
|
591
|
+
<td class="default">
|
|
592
|
+
|
|
593
|
+
<code>true</code>
|
|
594
|
+
|
|
595
|
+
</td>
|
|
596
|
+
|
|
597
|
+
|
|
598
|
+
<td class="description last">use the default sanity fields for content Type</td>
|
|
599
|
+
</tr>
|
|
600
|
+
|
|
601
|
+
|
|
602
|
+
|
|
603
|
+
<tr>
|
|
604
|
+
|
|
605
|
+
<td class="name"><code>customFields</code></td>
|
|
606
|
+
|
|
607
|
+
|
|
608
|
+
<td class="type">
|
|
609
|
+
|
|
610
|
+
|
|
611
|
+
<span class="param-type">Array.<string></span>
|
|
612
|
+
|
|
613
|
+
|
|
614
|
+
|
|
615
|
+
|
|
616
|
+
</td>
|
|
617
|
+
|
|
618
|
+
|
|
619
|
+
<td class="attributes">
|
|
620
|
+
|
|
621
|
+
<optional><br>
|
|
622
|
+
|
|
623
|
+
|
|
624
|
+
|
|
625
|
+
|
|
626
|
+
|
|
627
|
+
</td>
|
|
628
|
+
|
|
629
|
+
|
|
630
|
+
|
|
631
|
+
<td class="default">
|
|
632
|
+
|
|
633
|
+
<code>[]</code>
|
|
634
|
+
|
|
635
|
+
</td>
|
|
636
|
+
|
|
637
|
+
|
|
638
|
+
<td class="description last">An array of sanity fields to include in the request</td>
|
|
639
|
+
</tr>
|
|
640
|
+
|
|
641
|
+
|
|
642
|
+
|
|
643
|
+
<tr>
|
|
644
|
+
|
|
645
|
+
<td class="name"><code>progress</code></td>
|
|
646
|
+
|
|
647
|
+
|
|
648
|
+
<td class="type">
|
|
649
|
+
|
|
650
|
+
|
|
651
|
+
<span class="param-type">string</span>
|
|
652
|
+
|
|
653
|
+
|
|
654
|
+
|
|
655
|
+
|
|
656
|
+
</td>
|
|
657
|
+
|
|
658
|
+
|
|
659
|
+
<td class="attributes">
|
|
660
|
+
|
|
661
|
+
<optional><br>
|
|
662
|
+
|
|
663
|
+
|
|
664
|
+
|
|
665
|
+
|
|
666
|
+
|
|
667
|
+
</td>
|
|
668
|
+
|
|
669
|
+
|
|
670
|
+
|
|
671
|
+
<td class="default">
|
|
672
|
+
|
|
673
|
+
<code>"all"</code>
|
|
674
|
+
|
|
675
|
+
</td>
|
|
676
|
+
|
|
677
|
+
|
|
678
|
+
<td class="description last">An string representing which progress filter to use ("all", "in progress", "complete", "not started").</td>
|
|
679
|
+
</tr>
|
|
680
|
+
|
|
681
|
+
|
|
682
|
+
</tbody>
|
|
683
|
+
</table>
|
|
684
|
+
|
|
685
|
+
</td>
|
|
686
|
+
</tr>
|
|
687
|
+
|
|
688
|
+
|
|
689
|
+
</tbody>
|
|
690
|
+
</table>
|
|
691
|
+
|
|
692
|
+
|
|
693
|
+
|
|
694
|
+
|
|
695
|
+
|
|
696
|
+
|
|
697
|
+
|
|
698
|
+
|
|
699
|
+
|
|
700
|
+
|
|
701
|
+
|
|
702
|
+
|
|
703
|
+
|
|
704
|
+
|
|
705
|
+
|
|
706
|
+
|
|
707
|
+
<h5 class="h5-returns">Returns:</h5>
|
|
708
|
+
|
|
709
|
+
|
|
710
|
+
<div class="param-desc">
|
|
711
|
+
- The fetched content data or null if not found.
|
|
712
|
+
</div>
|
|
713
|
+
|
|
714
|
+
|
|
715
|
+
|
|
716
|
+
<dl class="param-type">
|
|
717
|
+
<dt>
|
|
718
|
+
Type
|
|
719
|
+
</dt>
|
|
720
|
+
<dd>
|
|
721
|
+
|
|
722
|
+
<span class="param-type">Promise.<(Object|null)></span>
|
|
723
|
+
|
|
724
|
+
|
|
725
|
+
|
|
726
|
+
</dd>
|
|
727
|
+
</dl>
|
|
728
|
+
|
|
729
|
+
|
|
730
|
+
|
|
731
|
+
|
|
732
|
+
|
|
733
|
+
|
|
734
|
+
|
|
735
|
+
|
|
736
|
+
|
|
737
|
+
|
|
738
|
+
|
|
739
|
+
</article>
|
|
740
|
+
|
|
741
|
+
</section>
|
|
742
|
+
|
|
743
|
+
|
|
744
|
+
|
|
745
|
+
|
|
746
|
+
|
|
747
|
+
|
|
748
|
+
</div>
|
|
749
|
+
|
|
750
|
+
<br class="clear">
|
|
751
|
+
|
|
752
|
+
<footer>
|
|
753
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a> on Fri Feb 07 2025 14:33:51 GMT+0000 (Coordinated Universal Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
754
|
+
</footer>
|
|
755
|
+
|
|
756
|
+
<script>prettyPrint();</script>
|
|
757
|
+
<script src="scripts/polyfill.js"></script>
|
|
758
|
+
<script src="scripts/linenumber.js"></script>
|
|
759
|
+
|
|
760
|
+
|
|
761
|
+
|
|
762
|
+
</body>
|
|
763
|
+
</html>
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/docs/railcontent.js.html
CHANGED
|
File without changes
|
package/docs/sanity.js.html
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/docs/user_types.js.html
CHANGED
|
File without changes
|
package/jsdoc.json
CHANGED
|
File without changes
|
package/package.json
CHANGED
package/src/contentMetaData.js
CHANGED
|
File without changes
|
package/src/filterBuilder.js
CHANGED
|
File without changes
|
package/src/index.d.ts
CHANGED
|
File without changes
|
package/src/index.js
CHANGED
|
File without changes
|
package/src/lib/httpHelper.js
CHANGED
|
File without changes
|
package/src/lib/lastUpdated.js
CHANGED
|
File without changes
|
|
File without changes
|
package/src/services/config.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/src/services/content.js
CHANGED
|
@@ -299,11 +299,14 @@ export async function getScheduleContentRows(brand, contentRowId = null, { page
|
|
|
299
299
|
// Apply special pagination rules
|
|
300
300
|
const isNewReleases = id === 'New-Releases';
|
|
301
301
|
const pagination = isNewReleases ? { page: 1, limit: 30 } : { page: 1, limit: Number.MAX_SAFE_INTEGER };
|
|
302
|
+
const items = await section.fetchMethod(brand, pagination)
|
|
302
303
|
|
|
303
304
|
return {
|
|
304
305
|
id,
|
|
305
306
|
title: section.title,
|
|
306
|
-
|
|
307
|
+
// TODO: Remove content after FE/MA updates the existing code to use items
|
|
308
|
+
content: items,
|
|
309
|
+
items: items
|
|
307
310
|
};
|
|
308
311
|
})
|
|
309
312
|
);
|
|
File without changes
|
|
File without changes
|
package/src/services/forum.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -223,6 +223,7 @@ export async function getPracticeSessions(day) {
|
|
|
223
223
|
if (!userPracticesIds.length) return { data: { practices: [], practiceDuration: 0 } };
|
|
224
224
|
|
|
225
225
|
const meta = await fetchUserPracticeMeta(userPracticesIds);
|
|
226
|
+
if (!meta.data.length) return { data: { practices: [], practiceDuration: 0 } };
|
|
226
227
|
const practiceDuration = meta.data.reduce((total, practice) => total + (practice.duration_seconds || 0), 0);
|
|
227
228
|
const contentIds = meta.data.map(practice => practice.content_id).filter(id => id !== null);
|
|
228
229
|
|
|
@@ -245,8 +246,8 @@ export async function getPracticeSessions(day) {
|
|
|
245
246
|
duration: practice.duration_seconds || 0,
|
|
246
247
|
content_url: content.url || null,
|
|
247
248
|
title: (practice.content_id)? content.title : practice.title,
|
|
248
|
-
category_id: practice.category_id
|
|
249
|
-
instrument_id: practice.instrument_id
|
|
249
|
+
category_id: practice.category_id,
|
|
250
|
+
instrument_id: practice.instrument_id ,
|
|
250
251
|
content_type: getFormattedType(content.type || ''),
|
|
251
252
|
content_id: practice.content_id || null,
|
|
252
253
|
content_brand: content.brand || null,
|
package/test/content.test.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/test/dataContext.test.js
CHANGED
|
File without changes
|
package/test/forum.test.js
CHANGED
|
File without changes
|
package/test/initializeTests.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/tools/generate-index.cjs
CHANGED
|
File without changes
|