musora-content-services 1.2.3 → 1.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/README.md +0 -0
- package/babel.config.cjs +0 -0
- package/docs/config.js.html +8 -11
- package/docs/index.html +2 -2
- package/docs/module-Config.html +29 -5
- package/docs/module-Railcontent-Services.html +376 -38
- package/docs/module-Sanity-Services.html +1132 -3781
- package/docs/railcontent.js.html +54 -9
- package/docs/sanity.js.html +172 -343
- package/jest.config.js +0 -0
- package/package.json +1 -1
- package/src/contentMetaData.js +1 -0
- package/src/contentTypeConfig.js +18 -6
- package/src/filterBuilder.js +0 -0
- package/src/index.d.ts +0 -28
- package/src/index.js +0 -28
- package/src/services/config.js +0 -0
- package/src/services/contentLikes.js +0 -0
- package/src/services/contentProgress.js +1 -1
- package/src/services/dataContext.js +0 -0
- package/src/services/lastUpdated.js +0 -0
- package/src/services/railcontent.js +0 -0
- package/src/services/sanity.js +1 -286
- package/src/services/userPermissions.js +0 -0
- package/test/contentLikes.test.js +0 -0
- package/test/initializeTests.js +0 -0
- package/test/lastUpdated.test.js +0 -0
- package/test/live/contentProgressLive.test.js +0 -0
- package/test/live/railcontentLive.test.js +0 -0
- package/test/localStorageMock.js +0 -0
- package/test/log.js +0 -0
- package/test/sanityQueryService.test.js +0 -99
- package/test/userPermissions.test.js +0 -0
- package/.yarnrc.yml +0 -1
package/jest.config.js
CHANGED
|
File without changes
|
package/package.json
CHANGED
package/src/contentMetaData.js
CHANGED
|
@@ -1012,6 +1012,7 @@ const contentMetadata = {
|
|
|
1012
1012
|
allowableFilters: ['difficulty', 'genre', 'essential', 'theory', 'lifestyle'],
|
|
1013
1013
|
},
|
|
1014
1014
|
'question-and-answer': {
|
|
1015
|
+
thumbnailUrl: 'https://d1923uyy6spedc.cloudfront.net/question-answer-singeo.png',
|
|
1015
1016
|
icon: "fas fa-question-circle",
|
|
1016
1017
|
description: "Each week we go live to answer your questions. Submit your questions in advance using the button below, in the Q&A thread in the forums, or live in the community chat.",
|
|
1017
1018
|
allowableFilters: ['difficulty', 'genre', 'essential', 'theory'],
|
package/src/contentTypeConfig.js
CHANGED
|
@@ -34,14 +34,26 @@ export const resourcesField = `[
|
|
|
34
34
|
... *[railcontent_id == ^.parent_content_data[0].id] [0].resource[]{resource_name, _key, "resource_url": coalesce('${CloudFrontURl}'+string::split(resource_aws.asset->fileURL, '${AWSUrl}')[1], resource_url )},
|
|
35
35
|
]`;
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
/*
|
|
38
|
+
* NOTE: TP-366 - Arrays can be either arrays of different objects or arrays of different primitives, not both
|
|
39
|
+
* updated query so assignment_sheet_music_image can be either an image or a URL
|
|
40
|
+
* see: https://www.sanity.io/docs/array-type#fNBIr84P
|
|
41
|
+
*/
|
|
38
42
|
export const assignmentsField = `"assignments":assignment[]{
|
|
39
43
|
"id": railcontent_id,
|
|
40
44
|
"soundslice_slug": assignment_soundslice,
|
|
41
45
|
"title": assignment_title,
|
|
42
|
-
"sheet_music_image_url":
|
|
46
|
+
"sheet_music_image_url":
|
|
47
|
+
coalesce(assignment_sheet_music_image_new[]{
|
|
48
|
+
_type == 'Image' => {
|
|
49
|
+
'url': asset->url
|
|
50
|
+
},
|
|
51
|
+
_type == 'URL' => {
|
|
52
|
+
url
|
|
53
|
+
}
|
|
54
|
+
}.url, assignment_sheet_music_image),
|
|
43
55
|
"timecode": assignment_timecode,
|
|
44
|
-
"description": assignment_description
|
|
56
|
+
"description": coalesce(assignment_description,'')
|
|
45
57
|
},`
|
|
46
58
|
|
|
47
59
|
const contentWithInstructorsField = {
|
|
@@ -191,7 +203,7 @@ export let contentTypeConfig = {
|
|
|
191
203
|
"id":railcontent_id,
|
|
192
204
|
name,
|
|
193
205
|
short_bio,
|
|
194
|
-
"biography": short_bio[0].children[0].text,
|
|
206
|
+
"biography": short_bio[0].children[0].text,
|
|
195
207
|
web_url_path,
|
|
196
208
|
"coach_card_image": coach_card_image.asset->url,
|
|
197
209
|
"coach_profile_image":thumbnail_url.asset->url
|
|
@@ -391,8 +403,8 @@ export let contentTypeConfig = {
|
|
|
391
403
|
'backstage-secret': contentWithInstructorsField,
|
|
392
404
|
'question-and-answer': contentWithInstructorsField,
|
|
393
405
|
'student-collaboration': contentWithInstructorsField,
|
|
394
|
-
'live': {...contentWithInstructorsField, 'slug': 'live-streams'},
|
|
395
|
-
'solo': {...contentWithInstructorsField, 'slug': 'solos'},
|
|
406
|
+
'live': { ...contentWithInstructorsField, 'slug': 'live-streams' },
|
|
407
|
+
'solo': { ...contentWithInstructorsField, 'slug': 'solos' },
|
|
396
408
|
'boot-camp': contentWithInstructorsField,
|
|
397
409
|
'gear-guids': contentWithInstructorsField,
|
|
398
410
|
'performance': contentWithInstructorsField,
|
package/src/filterBuilder.js
CHANGED
|
File without changes
|
package/src/index.d.ts
CHANGED
|
@@ -89,20 +89,14 @@ import {
|
|
|
89
89
|
fetchAll,
|
|
90
90
|
fetchAllFilterOptions,
|
|
91
91
|
fetchAllPacks,
|
|
92
|
-
fetchAllSongs,
|
|
93
92
|
fetchArtistLessons,
|
|
94
93
|
fetchArtists,
|
|
95
|
-
fetchAssignments,
|
|
96
94
|
fetchByRailContentId,
|
|
97
95
|
fetchByRailContentIds,
|
|
98
96
|
fetchByReference,
|
|
99
|
-
fetchCatalogMetadata,
|
|
100
|
-
fetchChallengeOverview,
|
|
101
97
|
fetchChatAndLiveEnvent,
|
|
102
|
-
fetchChildren,
|
|
103
98
|
fetchCoachLessons,
|
|
104
99
|
fetchCommentModContentData,
|
|
105
|
-
fetchCourseOverview,
|
|
106
100
|
fetchFoundation,
|
|
107
101
|
fetchGenreLessons,
|
|
108
102
|
fetchHierarchy,
|
|
@@ -112,30 +106,22 @@ import {
|
|
|
112
106
|
fetchMethod,
|
|
113
107
|
fetchMethodChildren,
|
|
114
108
|
fetchMethodChildrenIds,
|
|
115
|
-
fetchMethodNextLesson,
|
|
116
109
|
fetchMethodPreviousNextLesson,
|
|
117
|
-
fetchMethods,
|
|
118
110
|
fetchNewReleases,
|
|
119
111
|
fetchNextPreviousLesson,
|
|
120
112
|
fetchPackAll,
|
|
121
|
-
fetchPackChildren,
|
|
122
113
|
fetchPackData,
|
|
123
|
-
fetchParentByRailContentId,
|
|
124
114
|
fetchParentForDownload,
|
|
125
115
|
fetchPlayAlongsCount,
|
|
126
116
|
fetchRelatedLessons,
|
|
127
|
-
fetchRelatedMethodLessons,
|
|
128
117
|
fetchRelatedSongs,
|
|
129
118
|
fetchSanity,
|
|
130
119
|
fetchScheduledReleases,
|
|
131
120
|
fetchShowsData,
|
|
132
121
|
fetchSongArtistCount,
|
|
133
122
|
fetchSongById,
|
|
134
|
-
fetchSongCount,
|
|
135
|
-
fetchSongFilterOptions,
|
|
136
123
|
fetchTopLevelParentId,
|
|
137
124
|
fetchUpcomingEvents,
|
|
138
|
-
fetchWorkouts,
|
|
139
125
|
getSortOrder,
|
|
140
126
|
jumpToContinueContent
|
|
141
127
|
} from './services/sanity.js';
|
|
@@ -162,22 +148,17 @@ declare module 'musora-content-services' {
|
|
|
162
148
|
fetchAllCompletedStates,
|
|
163
149
|
fetchAllFilterOptions,
|
|
164
150
|
fetchAllPacks,
|
|
165
|
-
fetchAllSongs,
|
|
166
151
|
fetchArtistLessons,
|
|
167
152
|
fetchArtists,
|
|
168
|
-
fetchAssignments,
|
|
169
153
|
fetchByRailContentId,
|
|
170
154
|
fetchByRailContentIds,
|
|
171
155
|
fetchByReference,
|
|
172
156
|
fetchCarouselCardData,
|
|
173
|
-
fetchCatalogMetadata,
|
|
174
157
|
fetchChallengeIndexMetadata,
|
|
175
158
|
fetchChallengeLessonData,
|
|
176
159
|
fetchChallengeMetadata,
|
|
177
|
-
fetchChallengeOverview,
|
|
178
160
|
fetchChallengeUserActiveChallenges,
|
|
179
161
|
fetchChatAndLiveEnvent,
|
|
180
|
-
fetchChildren,
|
|
181
162
|
fetchCoachLessons,
|
|
182
163
|
fetchCommentModContentData,
|
|
183
164
|
fetchCompletedChallenges,
|
|
@@ -186,7 +167,6 @@ declare module 'musora-content-services' {
|
|
|
186
167
|
fetchContentInProgress,
|
|
187
168
|
fetchContentPageUserData,
|
|
188
169
|
fetchContentProgress,
|
|
189
|
-
fetchCourseOverview,
|
|
190
170
|
fetchFoundation,
|
|
191
171
|
fetchGenreLessons,
|
|
192
172
|
fetchHandler,
|
|
@@ -197,17 +177,13 @@ declare module 'musora-content-services' {
|
|
|
197
177
|
fetchMethod,
|
|
198
178
|
fetchMethodChildren,
|
|
199
179
|
fetchMethodChildrenIds,
|
|
200
|
-
fetchMethodNextLesson,
|
|
201
180
|
fetchMethodPreviousNextLesson,
|
|
202
|
-
fetchMethods,
|
|
203
181
|
fetchNewReleases,
|
|
204
182
|
fetchNextContentDataForParent,
|
|
205
183
|
fetchNextPreviousLesson,
|
|
206
184
|
fetchOwnedChallenges,
|
|
207
185
|
fetchPackAll,
|
|
208
|
-
fetchPackChildren,
|
|
209
186
|
fetchPackData,
|
|
210
|
-
fetchParentByRailContentId,
|
|
211
187
|
fetchParentForDownload,
|
|
212
188
|
fetchPinnedPlaylists,
|
|
213
189
|
fetchPlayAlongsCount,
|
|
@@ -215,15 +191,12 @@ declare module 'musora-content-services' {
|
|
|
215
191
|
fetchPlaylistItem,
|
|
216
192
|
fetchPlaylistItems,
|
|
217
193
|
fetchRelatedLessons,
|
|
218
|
-
fetchRelatedMethodLessons,
|
|
219
194
|
fetchRelatedSongs,
|
|
220
195
|
fetchSanity,
|
|
221
196
|
fetchScheduledReleases,
|
|
222
197
|
fetchShowsData,
|
|
223
198
|
fetchSongArtistCount,
|
|
224
199
|
fetchSongById,
|
|
225
|
-
fetchSongCount,
|
|
226
|
-
fetchSongFilterOptions,
|
|
227
200
|
fetchSongsInProgress,
|
|
228
201
|
fetchTopLevelParentId,
|
|
229
202
|
fetchUpcomingEvents,
|
|
@@ -234,7 +207,6 @@ declare module 'musora-content-services' {
|
|
|
234
207
|
fetchUserPermissions,
|
|
235
208
|
fetchUserPermissionsData,
|
|
236
209
|
fetchUserPlaylists,
|
|
237
|
-
fetchWorkouts,
|
|
238
210
|
getAllCompleted,
|
|
239
211
|
getAllStarted,
|
|
240
212
|
getAllStartedOrCompleted,
|
package/src/index.js
CHANGED
|
@@ -89,20 +89,14 @@ import {
|
|
|
89
89
|
fetchAll,
|
|
90
90
|
fetchAllFilterOptions,
|
|
91
91
|
fetchAllPacks,
|
|
92
|
-
fetchAllSongs,
|
|
93
92
|
fetchArtistLessons,
|
|
94
93
|
fetchArtists,
|
|
95
|
-
fetchAssignments,
|
|
96
94
|
fetchByRailContentId,
|
|
97
95
|
fetchByRailContentIds,
|
|
98
96
|
fetchByReference,
|
|
99
|
-
fetchCatalogMetadata,
|
|
100
|
-
fetchChallengeOverview,
|
|
101
97
|
fetchChatAndLiveEnvent,
|
|
102
|
-
fetchChildren,
|
|
103
98
|
fetchCoachLessons,
|
|
104
99
|
fetchCommentModContentData,
|
|
105
|
-
fetchCourseOverview,
|
|
106
100
|
fetchFoundation,
|
|
107
101
|
fetchGenreLessons,
|
|
108
102
|
fetchHierarchy,
|
|
@@ -112,30 +106,22 @@ import {
|
|
|
112
106
|
fetchMethod,
|
|
113
107
|
fetchMethodChildren,
|
|
114
108
|
fetchMethodChildrenIds,
|
|
115
|
-
fetchMethodNextLesson,
|
|
116
109
|
fetchMethodPreviousNextLesson,
|
|
117
|
-
fetchMethods,
|
|
118
110
|
fetchNewReleases,
|
|
119
111
|
fetchNextPreviousLesson,
|
|
120
112
|
fetchPackAll,
|
|
121
|
-
fetchPackChildren,
|
|
122
113
|
fetchPackData,
|
|
123
|
-
fetchParentByRailContentId,
|
|
124
114
|
fetchParentForDownload,
|
|
125
115
|
fetchPlayAlongsCount,
|
|
126
116
|
fetchRelatedLessons,
|
|
127
|
-
fetchRelatedMethodLessons,
|
|
128
117
|
fetchRelatedSongs,
|
|
129
118
|
fetchSanity,
|
|
130
119
|
fetchScheduledReleases,
|
|
131
120
|
fetchShowsData,
|
|
132
121
|
fetchSongArtistCount,
|
|
133
122
|
fetchSongById,
|
|
134
|
-
fetchSongCount,
|
|
135
|
-
fetchSongFilterOptions,
|
|
136
123
|
fetchTopLevelParentId,
|
|
137
124
|
fetchUpcomingEvents,
|
|
138
|
-
fetchWorkouts,
|
|
139
125
|
getSortOrder,
|
|
140
126
|
jumpToContinueContent
|
|
141
127
|
} from './services/sanity.js';
|
|
@@ -161,22 +147,17 @@ export {
|
|
|
161
147
|
fetchAllCompletedStates,
|
|
162
148
|
fetchAllFilterOptions,
|
|
163
149
|
fetchAllPacks,
|
|
164
|
-
fetchAllSongs,
|
|
165
150
|
fetchArtistLessons,
|
|
166
151
|
fetchArtists,
|
|
167
|
-
fetchAssignments,
|
|
168
152
|
fetchByRailContentId,
|
|
169
153
|
fetchByRailContentIds,
|
|
170
154
|
fetchByReference,
|
|
171
155
|
fetchCarouselCardData,
|
|
172
|
-
fetchCatalogMetadata,
|
|
173
156
|
fetchChallengeIndexMetadata,
|
|
174
157
|
fetchChallengeLessonData,
|
|
175
158
|
fetchChallengeMetadata,
|
|
176
|
-
fetchChallengeOverview,
|
|
177
159
|
fetchChallengeUserActiveChallenges,
|
|
178
160
|
fetchChatAndLiveEnvent,
|
|
179
|
-
fetchChildren,
|
|
180
161
|
fetchCoachLessons,
|
|
181
162
|
fetchCommentModContentData,
|
|
182
163
|
fetchCompletedChallenges,
|
|
@@ -185,7 +166,6 @@ export {
|
|
|
185
166
|
fetchContentInProgress,
|
|
186
167
|
fetchContentPageUserData,
|
|
187
168
|
fetchContentProgress,
|
|
188
|
-
fetchCourseOverview,
|
|
189
169
|
fetchFoundation,
|
|
190
170
|
fetchGenreLessons,
|
|
191
171
|
fetchHandler,
|
|
@@ -196,17 +176,13 @@ export {
|
|
|
196
176
|
fetchMethod,
|
|
197
177
|
fetchMethodChildren,
|
|
198
178
|
fetchMethodChildrenIds,
|
|
199
|
-
fetchMethodNextLesson,
|
|
200
179
|
fetchMethodPreviousNextLesson,
|
|
201
|
-
fetchMethods,
|
|
202
180
|
fetchNewReleases,
|
|
203
181
|
fetchNextContentDataForParent,
|
|
204
182
|
fetchNextPreviousLesson,
|
|
205
183
|
fetchOwnedChallenges,
|
|
206
184
|
fetchPackAll,
|
|
207
|
-
fetchPackChildren,
|
|
208
185
|
fetchPackData,
|
|
209
|
-
fetchParentByRailContentId,
|
|
210
186
|
fetchParentForDownload,
|
|
211
187
|
fetchPinnedPlaylists,
|
|
212
188
|
fetchPlayAlongsCount,
|
|
@@ -214,15 +190,12 @@ export {
|
|
|
214
190
|
fetchPlaylistItem,
|
|
215
191
|
fetchPlaylistItems,
|
|
216
192
|
fetchRelatedLessons,
|
|
217
|
-
fetchRelatedMethodLessons,
|
|
218
193
|
fetchRelatedSongs,
|
|
219
194
|
fetchSanity,
|
|
220
195
|
fetchScheduledReleases,
|
|
221
196
|
fetchShowsData,
|
|
222
197
|
fetchSongArtistCount,
|
|
223
198
|
fetchSongById,
|
|
224
|
-
fetchSongCount,
|
|
225
|
-
fetchSongFilterOptions,
|
|
226
199
|
fetchSongsInProgress,
|
|
227
200
|
fetchTopLevelParentId,
|
|
228
201
|
fetchUpcomingEvents,
|
|
@@ -233,7 +206,6 @@ export {
|
|
|
233
206
|
fetchUserPermissions,
|
|
234
207
|
fetchUserPermissionsData,
|
|
235
208
|
fetchUserPlaylists,
|
|
236
|
-
fetchWorkouts,
|
|
237
209
|
getAllCompleted,
|
|
238
210
|
getAllStarted,
|
|
239
211
|
getAllStartedOrCompleted,
|
package/src/services/config.js
CHANGED
|
File without changes
|
|
File without changes
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
postRecordWatchSession
|
|
6
6
|
} from "./railcontent.js";
|
|
7
7
|
import {DataContext, ContentProgressVersionKey} from "./dataContext.js";
|
|
8
|
-
import {
|
|
8
|
+
import {fetchHierarchy} from "./sanity.js";
|
|
9
9
|
|
|
10
10
|
const STATE_STARTED = 'started';
|
|
11
11
|
const STATE_COMPLETED = 'completed';
|
|
File without changes
|
|
File without changes
|
|
File without changes
|