musora-content-services 1.2.2 → 1.2.4
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/.yarnrc.yml +1 -0
- 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 +2 -28
- package/src/index.js +2 -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 +0 -285
- package/src/services/userPermissions.js +0 -0
- package/test/contentLikes.test.js +0 -0
- package/test/contentProgress.test.js +1 -1
- 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/tools/generate-index.cjs +9 -3
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
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/*** This file was generated automatically. To recreate, please run `npm run build-index`. ***/
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
|
+
globalConfig,
|
|
4
5
|
initializeService
|
|
5
6
|
} from './services/config.js';
|
|
6
7
|
|
|
@@ -88,20 +89,14 @@ import {
|
|
|
88
89
|
fetchAll,
|
|
89
90
|
fetchAllFilterOptions,
|
|
90
91
|
fetchAllPacks,
|
|
91
|
-
fetchAllSongs,
|
|
92
92
|
fetchArtistLessons,
|
|
93
93
|
fetchArtists,
|
|
94
|
-
fetchAssignments,
|
|
95
94
|
fetchByRailContentId,
|
|
96
95
|
fetchByRailContentIds,
|
|
97
96
|
fetchByReference,
|
|
98
|
-
fetchCatalogMetadata,
|
|
99
|
-
fetchChallengeOverview,
|
|
100
97
|
fetchChatAndLiveEnvent,
|
|
101
|
-
fetchChildren,
|
|
102
98
|
fetchCoachLessons,
|
|
103
99
|
fetchCommentModContentData,
|
|
104
|
-
fetchCourseOverview,
|
|
105
100
|
fetchFoundation,
|
|
106
101
|
fetchGenreLessons,
|
|
107
102
|
fetchHierarchy,
|
|
@@ -111,30 +106,22 @@ import {
|
|
|
111
106
|
fetchMethod,
|
|
112
107
|
fetchMethodChildren,
|
|
113
108
|
fetchMethodChildrenIds,
|
|
114
|
-
fetchMethodNextLesson,
|
|
115
109
|
fetchMethodPreviousNextLesson,
|
|
116
|
-
fetchMethods,
|
|
117
110
|
fetchNewReleases,
|
|
118
111
|
fetchNextPreviousLesson,
|
|
119
112
|
fetchPackAll,
|
|
120
|
-
fetchPackChildren,
|
|
121
113
|
fetchPackData,
|
|
122
|
-
fetchParentByRailContentId,
|
|
123
114
|
fetchParentForDownload,
|
|
124
115
|
fetchPlayAlongsCount,
|
|
125
116
|
fetchRelatedLessons,
|
|
126
|
-
fetchRelatedMethodLessons,
|
|
127
117
|
fetchRelatedSongs,
|
|
128
118
|
fetchSanity,
|
|
129
119
|
fetchScheduledReleases,
|
|
130
120
|
fetchShowsData,
|
|
131
121
|
fetchSongArtistCount,
|
|
132
122
|
fetchSongById,
|
|
133
|
-
fetchSongCount,
|
|
134
|
-
fetchSongFilterOptions,
|
|
135
123
|
fetchTopLevelParentId,
|
|
136
124
|
fetchUpcomingEvents,
|
|
137
|
-
fetchWorkouts,
|
|
138
125
|
getSortOrder,
|
|
139
126
|
jumpToContinueContent
|
|
140
127
|
} from './services/sanity.js';
|
|
@@ -161,22 +148,17 @@ declare module 'musora-content-services' {
|
|
|
161
148
|
fetchAllCompletedStates,
|
|
162
149
|
fetchAllFilterOptions,
|
|
163
150
|
fetchAllPacks,
|
|
164
|
-
fetchAllSongs,
|
|
165
151
|
fetchArtistLessons,
|
|
166
152
|
fetchArtists,
|
|
167
|
-
fetchAssignments,
|
|
168
153
|
fetchByRailContentId,
|
|
169
154
|
fetchByRailContentIds,
|
|
170
155
|
fetchByReference,
|
|
171
156
|
fetchCarouselCardData,
|
|
172
|
-
fetchCatalogMetadata,
|
|
173
157
|
fetchChallengeIndexMetadata,
|
|
174
158
|
fetchChallengeLessonData,
|
|
175
159
|
fetchChallengeMetadata,
|
|
176
|
-
fetchChallengeOverview,
|
|
177
160
|
fetchChallengeUserActiveChallenges,
|
|
178
161
|
fetchChatAndLiveEnvent,
|
|
179
|
-
fetchChildren,
|
|
180
162
|
fetchCoachLessons,
|
|
181
163
|
fetchCommentModContentData,
|
|
182
164
|
fetchCompletedChallenges,
|
|
@@ -185,7 +167,6 @@ declare module 'musora-content-services' {
|
|
|
185
167
|
fetchContentInProgress,
|
|
186
168
|
fetchContentPageUserData,
|
|
187
169
|
fetchContentProgress,
|
|
188
|
-
fetchCourseOverview,
|
|
189
170
|
fetchFoundation,
|
|
190
171
|
fetchGenreLessons,
|
|
191
172
|
fetchHandler,
|
|
@@ -196,17 +177,13 @@ declare module 'musora-content-services' {
|
|
|
196
177
|
fetchMethod,
|
|
197
178
|
fetchMethodChildren,
|
|
198
179
|
fetchMethodChildrenIds,
|
|
199
|
-
fetchMethodNextLesson,
|
|
200
180
|
fetchMethodPreviousNextLesson,
|
|
201
|
-
fetchMethods,
|
|
202
181
|
fetchNewReleases,
|
|
203
182
|
fetchNextContentDataForParent,
|
|
204
183
|
fetchNextPreviousLesson,
|
|
205
184
|
fetchOwnedChallenges,
|
|
206
185
|
fetchPackAll,
|
|
207
|
-
fetchPackChildren,
|
|
208
186
|
fetchPackData,
|
|
209
|
-
fetchParentByRailContentId,
|
|
210
187
|
fetchParentForDownload,
|
|
211
188
|
fetchPinnedPlaylists,
|
|
212
189
|
fetchPlayAlongsCount,
|
|
@@ -214,15 +191,12 @@ declare module 'musora-content-services' {
|
|
|
214
191
|
fetchPlaylistItem,
|
|
215
192
|
fetchPlaylistItems,
|
|
216
193
|
fetchRelatedLessons,
|
|
217
|
-
fetchRelatedMethodLessons,
|
|
218
194
|
fetchRelatedSongs,
|
|
219
195
|
fetchSanity,
|
|
220
196
|
fetchScheduledReleases,
|
|
221
197
|
fetchShowsData,
|
|
222
198
|
fetchSongArtistCount,
|
|
223
199
|
fetchSongById,
|
|
224
|
-
fetchSongCount,
|
|
225
|
-
fetchSongFilterOptions,
|
|
226
200
|
fetchSongsInProgress,
|
|
227
201
|
fetchTopLevelParentId,
|
|
228
202
|
fetchUpcomingEvents,
|
|
@@ -233,7 +207,6 @@ declare module 'musora-content-services' {
|
|
|
233
207
|
fetchUserPermissions,
|
|
234
208
|
fetchUserPermissionsData,
|
|
235
209
|
fetchUserPlaylists,
|
|
236
|
-
fetchWorkouts,
|
|
237
210
|
getAllCompleted,
|
|
238
211
|
getAllStarted,
|
|
239
212
|
getAllStartedOrCompleted,
|
|
@@ -243,6 +216,7 @@ declare module 'musora-content-services' {
|
|
|
243
216
|
getProgressStateByIds,
|
|
244
217
|
getResumeTimeSeconds,
|
|
245
218
|
getSortOrder,
|
|
219
|
+
globalConfig,
|
|
246
220
|
initializeService,
|
|
247
221
|
isContentLiked,
|
|
248
222
|
jumpToContinueContent,
|
package/src/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/*** This file was generated automatically. To recreate, please run `npm run build-index`. ***/
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
|
+
globalConfig,
|
|
4
5
|
initializeService
|
|
5
6
|
} from './services/config.js';
|
|
6
7
|
|
|
@@ -88,20 +89,14 @@ import {
|
|
|
88
89
|
fetchAll,
|
|
89
90
|
fetchAllFilterOptions,
|
|
90
91
|
fetchAllPacks,
|
|
91
|
-
fetchAllSongs,
|
|
92
92
|
fetchArtistLessons,
|
|
93
93
|
fetchArtists,
|
|
94
|
-
fetchAssignments,
|
|
95
94
|
fetchByRailContentId,
|
|
96
95
|
fetchByRailContentIds,
|
|
97
96
|
fetchByReference,
|
|
98
|
-
fetchCatalogMetadata,
|
|
99
|
-
fetchChallengeOverview,
|
|
100
97
|
fetchChatAndLiveEnvent,
|
|
101
|
-
fetchChildren,
|
|
102
98
|
fetchCoachLessons,
|
|
103
99
|
fetchCommentModContentData,
|
|
104
|
-
fetchCourseOverview,
|
|
105
100
|
fetchFoundation,
|
|
106
101
|
fetchGenreLessons,
|
|
107
102
|
fetchHierarchy,
|
|
@@ -111,30 +106,22 @@ import {
|
|
|
111
106
|
fetchMethod,
|
|
112
107
|
fetchMethodChildren,
|
|
113
108
|
fetchMethodChildrenIds,
|
|
114
|
-
fetchMethodNextLesson,
|
|
115
109
|
fetchMethodPreviousNextLesson,
|
|
116
|
-
fetchMethods,
|
|
117
110
|
fetchNewReleases,
|
|
118
111
|
fetchNextPreviousLesson,
|
|
119
112
|
fetchPackAll,
|
|
120
|
-
fetchPackChildren,
|
|
121
113
|
fetchPackData,
|
|
122
|
-
fetchParentByRailContentId,
|
|
123
114
|
fetchParentForDownload,
|
|
124
115
|
fetchPlayAlongsCount,
|
|
125
116
|
fetchRelatedLessons,
|
|
126
|
-
fetchRelatedMethodLessons,
|
|
127
117
|
fetchRelatedSongs,
|
|
128
118
|
fetchSanity,
|
|
129
119
|
fetchScheduledReleases,
|
|
130
120
|
fetchShowsData,
|
|
131
121
|
fetchSongArtistCount,
|
|
132
122
|
fetchSongById,
|
|
133
|
-
fetchSongCount,
|
|
134
|
-
fetchSongFilterOptions,
|
|
135
123
|
fetchTopLevelParentId,
|
|
136
124
|
fetchUpcomingEvents,
|
|
137
|
-
fetchWorkouts,
|
|
138
125
|
getSortOrder,
|
|
139
126
|
jumpToContinueContent
|
|
140
127
|
} from './services/sanity.js';
|
|
@@ -160,22 +147,17 @@ export {
|
|
|
160
147
|
fetchAllCompletedStates,
|
|
161
148
|
fetchAllFilterOptions,
|
|
162
149
|
fetchAllPacks,
|
|
163
|
-
fetchAllSongs,
|
|
164
150
|
fetchArtistLessons,
|
|
165
151
|
fetchArtists,
|
|
166
|
-
fetchAssignments,
|
|
167
152
|
fetchByRailContentId,
|
|
168
153
|
fetchByRailContentIds,
|
|
169
154
|
fetchByReference,
|
|
170
155
|
fetchCarouselCardData,
|
|
171
|
-
fetchCatalogMetadata,
|
|
172
156
|
fetchChallengeIndexMetadata,
|
|
173
157
|
fetchChallengeLessonData,
|
|
174
158
|
fetchChallengeMetadata,
|
|
175
|
-
fetchChallengeOverview,
|
|
176
159
|
fetchChallengeUserActiveChallenges,
|
|
177
160
|
fetchChatAndLiveEnvent,
|
|
178
|
-
fetchChildren,
|
|
179
161
|
fetchCoachLessons,
|
|
180
162
|
fetchCommentModContentData,
|
|
181
163
|
fetchCompletedChallenges,
|
|
@@ -184,7 +166,6 @@ export {
|
|
|
184
166
|
fetchContentInProgress,
|
|
185
167
|
fetchContentPageUserData,
|
|
186
168
|
fetchContentProgress,
|
|
187
|
-
fetchCourseOverview,
|
|
188
169
|
fetchFoundation,
|
|
189
170
|
fetchGenreLessons,
|
|
190
171
|
fetchHandler,
|
|
@@ -195,17 +176,13 @@ export {
|
|
|
195
176
|
fetchMethod,
|
|
196
177
|
fetchMethodChildren,
|
|
197
178
|
fetchMethodChildrenIds,
|
|
198
|
-
fetchMethodNextLesson,
|
|
199
179
|
fetchMethodPreviousNextLesson,
|
|
200
|
-
fetchMethods,
|
|
201
180
|
fetchNewReleases,
|
|
202
181
|
fetchNextContentDataForParent,
|
|
203
182
|
fetchNextPreviousLesson,
|
|
204
183
|
fetchOwnedChallenges,
|
|
205
184
|
fetchPackAll,
|
|
206
|
-
fetchPackChildren,
|
|
207
185
|
fetchPackData,
|
|
208
|
-
fetchParentByRailContentId,
|
|
209
186
|
fetchParentForDownload,
|
|
210
187
|
fetchPinnedPlaylists,
|
|
211
188
|
fetchPlayAlongsCount,
|
|
@@ -213,15 +190,12 @@ export {
|
|
|
213
190
|
fetchPlaylistItem,
|
|
214
191
|
fetchPlaylistItems,
|
|
215
192
|
fetchRelatedLessons,
|
|
216
|
-
fetchRelatedMethodLessons,
|
|
217
193
|
fetchRelatedSongs,
|
|
218
194
|
fetchSanity,
|
|
219
195
|
fetchScheduledReleases,
|
|
220
196
|
fetchShowsData,
|
|
221
197
|
fetchSongArtistCount,
|
|
222
198
|
fetchSongById,
|
|
223
|
-
fetchSongCount,
|
|
224
|
-
fetchSongFilterOptions,
|
|
225
199
|
fetchSongsInProgress,
|
|
226
200
|
fetchTopLevelParentId,
|
|
227
201
|
fetchUpcomingEvents,
|
|
@@ -232,7 +206,6 @@ export {
|
|
|
232
206
|
fetchUserPermissions,
|
|
233
207
|
fetchUserPermissionsData,
|
|
234
208
|
fetchUserPlaylists,
|
|
235
|
-
fetchWorkouts,
|
|
236
209
|
getAllCompleted,
|
|
237
210
|
getAllStarted,
|
|
238
211
|
getAllStartedOrCompleted,
|
|
@@ -242,6 +215,7 @@ export {
|
|
|
242
215
|
getProgressStateByIds,
|
|
243
216
|
getResumeTimeSeconds,
|
|
244
217
|
getSortOrder,
|
|
218
|
+
globalConfig,
|
|
245
219
|
initializeService,
|
|
246
220
|
isContentLiked,
|
|
247
221
|
jumpToContinueContent,
|
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
|