musora-content-services 1.3.3 → 1.3.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/.github/workflows/node.js.yml +0 -0
  2. package/.prettierignore +0 -0
  3. package/.prettierrc +0 -0
  4. package/CHANGELOG.md +8 -0
  5. package/README.md +0 -0
  6. package/babel.config.cjs +0 -0
  7. package/docs/config.js.html +0 -0
  8. package/docs/fonts/Montserrat/Montserrat-Bold.eot +0 -0
  9. package/docs/fonts/Montserrat/Montserrat-Bold.ttf +0 -0
  10. package/docs/fonts/Montserrat/Montserrat-Bold.woff +0 -0
  11. package/docs/fonts/Montserrat/Montserrat-Bold.woff2 +0 -0
  12. package/docs/fonts/Montserrat/Montserrat-Regular.eot +0 -0
  13. package/docs/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
  14. package/docs/fonts/Montserrat/Montserrat-Regular.woff +0 -0
  15. package/docs/fonts/Montserrat/Montserrat-Regular.woff2 +0 -0
  16. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.eot +0 -0
  17. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg +0 -0
  18. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.ttf +0 -0
  19. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff +0 -0
  20. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff2 +0 -0
  21. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.eot +0 -0
  22. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.svg +0 -0
  23. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.ttf +0 -0
  24. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff +0 -0
  25. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff2 +0 -0
  26. package/docs/index.html +0 -0
  27. package/docs/module-Config.html +0 -0
  28. package/docs/module-Railcontent-Services.html +0 -0
  29. package/docs/module-Sanity-Services.html +0 -0
  30. package/docs/railcontent.js.html +0 -0
  31. package/docs/sanity.js.html +0 -0
  32. package/docs/scripts/collapse.js +0 -0
  33. package/docs/scripts/commonNav.js +0 -0
  34. package/docs/scripts/linenumber.js +0 -0
  35. package/docs/scripts/nav.js +0 -0
  36. package/docs/scripts/polyfill.js +0 -0
  37. package/docs/scripts/prettify/Apache-License-2.0.txt +0 -0
  38. package/docs/scripts/prettify/lang-css.js +0 -0
  39. package/docs/scripts/prettify/prettify.js +0 -0
  40. package/docs/scripts/search.js +0 -0
  41. package/docs/styles/jsdoc.css +0 -0
  42. package/docs/styles/prettify.css +0 -0
  43. package/jest.config.js +0 -0
  44. package/jsdoc.json +0 -0
  45. package/package.json +1 -1
  46. package/src/contentMetaData.js +90 -0
  47. package/src/contentTypeConfig.js +24 -0
  48. package/src/filterBuilder.js +0 -0
  49. package/src/index.d.ts +250 -227
  50. package/src/index.js +249 -226
  51. package/src/services/config.js +0 -0
  52. package/src/services/contentLikes.js +0 -0
  53. package/src/services/contentProgress.js +0 -0
  54. package/src/services/dataContext.js +0 -0
  55. package/src/services/lastUpdated.js +0 -0
  56. package/src/services/railcontent.js +1 -1
  57. package/src/services/sanity.js +112 -10
  58. package/src/services/userPermissions.js +0 -0
  59. package/test/contentLikes.test.js +0 -0
  60. package/test/contentProgress.test.js +0 -0
  61. package/test/initializeTests.js +0 -0
  62. package/test/lastUpdated.test.js +0 -0
  63. package/test/live/contentProgressLive.test.js +0 -0
  64. package/test/live/railcontentLive.test.js +0 -0
  65. package/test/localStorageMock.js +0 -0
  66. package/test/log.js +0 -0
  67. package/test/sanityQueryService.test.js +23 -0
  68. package/test/userPermissions.test.js +0 -0
  69. package/tools/generate-index.cjs +0 -0
  70. package/.yarnrc.yml +0 -1
package/src/index.d.ts CHANGED
@@ -1,240 +1,263 @@
1
1
  /*** This file was generated automatically. To recreate, please run `npm run build-index`. ***/
2
2
 
3
- import { globalConfig, initializeService } from './services/config.js'
3
+ import {
4
+ globalConfig,
5
+ initializeService
6
+ } from './services/config.js';
4
7
 
5
- import { isContentLiked, likeContent, unlikeContent } from './services/contentLikes.js'
8
+ import {
9
+ isContentLiked,
10
+ likeContent,
11
+ unlikeContent
12
+ } from './services/contentLikes.js';
6
13
 
7
14
  import {
8
- assignmentStatusCompleted,
9
- assignmentStatusReset,
10
- contentStatusCompleted,
11
- contentStatusReset,
12
- getAllCompleted,
13
- getAllStarted,
14
- getAllStartedOrCompleted,
15
- getProgressPercentage,
16
- getProgressPercentageByIds,
17
- getProgressState,
18
- getProgressStateByIds,
19
- getResumeTimeSeconds,
20
- recordWatchSession,
21
- } from './services/contentProgress.js'
15
+ assignmentStatusCompleted,
16
+ assignmentStatusReset,
17
+ contentStatusCompleted,
18
+ contentStatusReset,
19
+ getAllCompleted,
20
+ getAllStarted,
21
+ getAllStartedOrCompleted,
22
+ getProgressPercentage,
23
+ getProgressPercentageByIds,
24
+ getProgressState,
25
+ getProgressStateByIds,
26
+ getResumeTimeSeconds,
27
+ recordWatchSession
28
+ } from './services/contentProgress.js';
22
29
 
23
30
  import {
24
- addItemToPlaylist,
25
- countAssignmentsAndLessons,
26
- createPlaylist,
27
- deletePlaylist,
28
- deletePlaylistItem,
29
- deletePlaylistLike,
30
- duplicatePlaylist,
31
- fetchAllCompletedStates,
32
- fetchCarouselCardData,
33
- fetchChallengeIndexMetadata,
34
- fetchChallengeLessonData,
35
- fetchChallengeMetadata,
36
- fetchChallengeUserActiveChallenges,
37
- fetchCompletedChallenges,
38
- fetchCompletedContent,
39
- fetchCompletedState,
40
- fetchContentInProgress,
41
- fetchContentPageUserData,
42
- fetchContentProgress,
43
- fetchHandler,
44
- fetchNextContentDataForParent,
45
- fetchOwnedChallenges,
46
- fetchPinnedPlaylists,
47
- fetchPlaylist,
48
- fetchPlaylistItem,
49
- fetchPlaylistItems,
50
- fetchSongsInProgress,
51
- fetchUserAward,
52
- fetchUserBadges,
53
- fetchUserChallengeProgress,
54
- fetchUserLikes,
55
- fetchUserPermissionsData,
56
- fetchUserPlaylists,
57
- likePlaylist,
58
- pinPlaylist,
59
- playback,
60
- postChallengesCommunityNotification,
61
- postChallengesCompleteLesson,
62
- postChallengesEnroll,
63
- postChallengesEnrollmentNotification,
64
- postChallengesHideCompletedBanner,
65
- postChallengesLeave,
66
- postChallengesSetStartDate,
67
- postChallengesSoloNotification,
68
- postChallengesUnlock,
69
- postContentCompleted,
70
- postContentLiked,
71
- postContentReset,
72
- postContentUnliked,
73
- postRecordWatchSession,
74
- reportPlaylist,
75
- setStudentViewForUser,
76
- unpinPlaylist,
77
- updatePlaylist,
78
- updatePlaylistItem,
79
- } from './services/railcontent.js'
31
+ setLastUpdatedTime,
32
+ wasLastUpdateOlderThanXSeconds
33
+ } from './services/lastUpdated.js';
80
34
 
81
35
  import {
82
- fetchAll,
83
- fetchAllFilterOptions,
84
- fetchAllPacks,
85
- fetchArtistLessons,
86
- fetchArtists,
87
- fetchByRailContentId,
88
- fetchByRailContentIds,
89
- fetchByReference,
90
- fetchChatAndLiveEnvent,
91
- fetchCoachLessons,
92
- fetchCommentModContentData,
93
- fetchFoundation,
94
- fetchGenreLessons,
95
- fetchHierarchy,
96
- fetchLessonContent,
97
- fetchLiveEvent,
98
- fetchMetadata,
99
- fetchMethod,
100
- fetchMethodChildren,
101
- fetchMethodChildrenIds,
102
- fetchMethodPreviousNextLesson,
103
- fetchNewReleases,
104
- fetchNextPreviousLesson,
105
- fetchPackAll,
106
- fetchPackData,
107
- fetchParentForDownload,
108
- fetchPlayAlongsCount,
109
- fetchRelatedLessons,
110
- fetchRelatedSongs,
111
- fetchSanity,
112
- fetchScheduledReleases,
113
- fetchShowsData,
114
- fetchSongArtistCount,
115
- fetchSongById,
116
- fetchTopLevelParentId,
117
- fetchUpcomingEvents,
118
- getSortOrder,
119
- jumpToContinueContent,
120
- } from './services/sanity.js'
36
+ addItemToPlaylist,
37
+ countAssignmentsAndLessons,
38
+ createPlaylist,
39
+ deletePlaylist,
40
+ deletePlaylistItem,
41
+ deletePlaylistLike,
42
+ duplicatePlaylist,
43
+ fetchAllCompletedStates,
44
+ fetchCarouselCardData,
45
+ fetchChallengeIndexMetadata,
46
+ fetchChallengeLessonData,
47
+ fetchChallengeMetadata,
48
+ fetchChallengeUserActiveChallenges,
49
+ fetchCompletedChallenges,
50
+ fetchCompletedContent,
51
+ fetchCompletedState,
52
+ fetchContentInProgress,
53
+ fetchContentPageUserData,
54
+ fetchContentProgress,
55
+ fetchHandler,
56
+ fetchNextContentDataForParent,
57
+ fetchOwnedChallenges,
58
+ fetchPinnedPlaylists,
59
+ fetchPlaylist,
60
+ fetchPlaylistItem,
61
+ fetchPlaylistItems,
62
+ fetchSongsInProgress,
63
+ fetchUserAward,
64
+ fetchUserBadges,
65
+ fetchUserChallengeProgress,
66
+ fetchUserLikes,
67
+ fetchUserPermissionsData,
68
+ fetchUserPlaylists,
69
+ likePlaylist,
70
+ pinPlaylist,
71
+ playback,
72
+ postChallengesCommunityNotification,
73
+ postChallengesCompleteLesson,
74
+ postChallengesEnroll,
75
+ postChallengesEnrollmentNotification,
76
+ postChallengesHideCompletedBanner,
77
+ postChallengesLeave,
78
+ postChallengesSetStartDate,
79
+ postChallengesSoloNotification,
80
+ postChallengesUnlock,
81
+ postContentCompleted,
82
+ postContentLiked,
83
+ postContentReset,
84
+ postContentUnliked,
85
+ postRecordWatchSession,
86
+ reportPlaylist,
87
+ setStudentViewForUser,
88
+ unpinPlaylist,
89
+ updatePlaylist,
90
+ updatePlaylistItem
91
+ } from './services/railcontent.js';
121
92
 
122
- import { fetchUserPermissions, reset } from './services/userPermissions.js'
93
+ import {
94
+ fetchAll,
95
+ fetchAllFilterOptions,
96
+ fetchAllPacks,
97
+ fetchArtistLessons,
98
+ fetchArtists,
99
+ fetchByRailContentId,
100
+ fetchByRailContentIds,
101
+ fetchByReference,
102
+ fetchChatAndLiveEnvent,
103
+ fetchCoachLessons,
104
+ fetchComingSoon,
105
+ fetchCommentModContentData,
106
+ fetchFoundation,
107
+ fetchGenreLessons,
108
+ fetchHierarchy,
109
+ fetchLeaving,
110
+ fetchLessonContent,
111
+ fetchLiveEvent,
112
+ fetchMetadata,
113
+ fetchMethod,
114
+ fetchMethodChildren,
115
+ fetchMethodChildrenIds,
116
+ fetchMethodPreviousNextLesson,
117
+ fetchNewReleases,
118
+ fetchNextPreviousLesson,
119
+ fetchPackAll,
120
+ fetchPackData,
121
+ fetchParentForDownload,
122
+ fetchPlayAlongsCount,
123
+ fetchRelatedLessons,
124
+ fetchRelatedSongs,
125
+ fetchReturning,
126
+ fetchSanity,
127
+ fetchScheduledReleases,
128
+ fetchShowsData,
129
+ fetchSongArtistCount,
130
+ fetchSongById,
131
+ fetchTopLevelParentId,
132
+ fetchUpcomingEvents,
133
+ getSortOrder,
134
+ jumpToContinueContent
135
+ } from './services/sanity.js';
136
+
137
+ import {
138
+ fetchUserPermissions,
139
+ reset
140
+ } from './services/userPermissions.js';
123
141
 
124
142
  declare module 'musora-content-services' {
125
- export {
126
- addItemToPlaylist,
127
- assignmentStatusCompleted,
128
- assignmentStatusReset,
129
- contentStatusCompleted,
130
- contentStatusReset,
131
- countAssignmentsAndLessons,
132
- createPlaylist,
133
- deletePlaylist,
134
- deletePlaylistItem,
135
- deletePlaylistLike,
136
- duplicatePlaylist,
137
- fetchAll,
138
- fetchAllCompletedStates,
139
- fetchAllFilterOptions,
140
- fetchAllPacks,
141
- fetchArtistLessons,
142
- fetchArtists,
143
- fetchByRailContentId,
144
- fetchByRailContentIds,
145
- fetchByReference,
146
- fetchCarouselCardData,
147
- fetchChallengeIndexMetadata,
148
- fetchChallengeLessonData,
149
- fetchChallengeMetadata,
150
- fetchChallengeUserActiveChallenges,
151
- fetchChatAndLiveEnvent,
152
- fetchCoachLessons,
153
- fetchCommentModContentData,
154
- fetchCompletedChallenges,
155
- fetchCompletedContent,
156
- fetchCompletedState,
157
- fetchContentInProgress,
158
- fetchContentPageUserData,
159
- fetchContentProgress,
160
- fetchFoundation,
161
- fetchGenreLessons,
162
- fetchHandler,
163
- fetchHierarchy,
164
- fetchLessonContent,
165
- fetchLiveEvent,
166
- fetchMetadata,
167
- fetchMethod,
168
- fetchMethodChildren,
169
- fetchMethodChildrenIds,
170
- fetchMethodPreviousNextLesson,
171
- fetchNewReleases,
172
- fetchNextContentDataForParent,
173
- fetchNextPreviousLesson,
174
- fetchOwnedChallenges,
175
- fetchPackAll,
176
- fetchPackData,
177
- fetchParentForDownload,
178
- fetchPinnedPlaylists,
179
- fetchPlayAlongsCount,
180
- fetchPlaylist,
181
- fetchPlaylistItem,
182
- fetchPlaylistItems,
183
- fetchRelatedLessons,
184
- fetchRelatedSongs,
185
- fetchSanity,
186
- fetchScheduledReleases,
187
- fetchShowsData,
188
- fetchSongArtistCount,
189
- fetchSongById,
190
- fetchSongsInProgress,
191
- fetchTopLevelParentId,
192
- fetchUpcomingEvents,
193
- fetchUserAward,
194
- fetchUserBadges,
195
- fetchUserChallengeProgress,
196
- fetchUserLikes,
197
- fetchUserPermissions,
198
- fetchUserPermissionsData,
199
- fetchUserPlaylists,
200
- getAllCompleted,
201
- getAllStarted,
202
- getAllStartedOrCompleted,
203
- getProgressPercentage,
204
- getProgressPercentageByIds,
205
- getProgressState,
206
- getProgressStateByIds,
207
- getResumeTimeSeconds,
208
- getSortOrder,
209
- globalConfig,
210
- initializeService,
211
- isContentLiked,
212
- jumpToContinueContent,
213
- likeContent,
214
- likePlaylist,
215
- pinPlaylist,
216
- playback,
217
- postChallengesCommunityNotification,
218
- postChallengesCompleteLesson,
219
- postChallengesEnroll,
220
- postChallengesEnrollmentNotification,
221
- postChallengesHideCompletedBanner,
222
- postChallengesLeave,
223
- postChallengesSetStartDate,
224
- postChallengesSoloNotification,
225
- postChallengesUnlock,
226
- postContentCompleted,
227
- postContentLiked,
228
- postContentReset,
229
- postContentUnliked,
230
- postRecordWatchSession,
231
- recordWatchSession,
232
- reportPlaylist,
233
- reset,
234
- setStudentViewForUser,
235
- unlikeContent,
236
- unpinPlaylist,
237
- updatePlaylist,
238
- updatePlaylistItem,
239
- }
143
+ export {
144
+ addItemToPlaylist,
145
+ assignmentStatusCompleted,
146
+ assignmentStatusReset,
147
+ contentStatusCompleted,
148
+ contentStatusReset,
149
+ countAssignmentsAndLessons,
150
+ createPlaylist,
151
+ deletePlaylist,
152
+ deletePlaylistItem,
153
+ deletePlaylistLike,
154
+ duplicatePlaylist,
155
+ fetchAll,
156
+ fetchAllCompletedStates,
157
+ fetchAllFilterOptions,
158
+ fetchAllPacks,
159
+ fetchArtistLessons,
160
+ fetchArtists,
161
+ fetchByRailContentId,
162
+ fetchByRailContentIds,
163
+ fetchByReference,
164
+ fetchCarouselCardData,
165
+ fetchChallengeIndexMetadata,
166
+ fetchChallengeLessonData,
167
+ fetchChallengeMetadata,
168
+ fetchChallengeUserActiveChallenges,
169
+ fetchChatAndLiveEnvent,
170
+ fetchCoachLessons,
171
+ fetchComingSoon,
172
+ fetchCommentModContentData,
173
+ fetchCompletedChallenges,
174
+ fetchCompletedContent,
175
+ fetchCompletedState,
176
+ fetchContentInProgress,
177
+ fetchContentPageUserData,
178
+ fetchContentProgress,
179
+ fetchFoundation,
180
+ fetchGenreLessons,
181
+ fetchHandler,
182
+ fetchHierarchy,
183
+ fetchLeaving,
184
+ fetchLessonContent,
185
+ fetchLiveEvent,
186
+ fetchMetadata,
187
+ fetchMethod,
188
+ fetchMethodChildren,
189
+ fetchMethodChildrenIds,
190
+ fetchMethodPreviousNextLesson,
191
+ fetchNewReleases,
192
+ fetchNextContentDataForParent,
193
+ fetchNextPreviousLesson,
194
+ fetchOwnedChallenges,
195
+ fetchPackAll,
196
+ fetchPackData,
197
+ fetchParentForDownload,
198
+ fetchPinnedPlaylists,
199
+ fetchPlayAlongsCount,
200
+ fetchPlaylist,
201
+ fetchPlaylistItem,
202
+ fetchPlaylistItems,
203
+ fetchRelatedLessons,
204
+ fetchRelatedSongs,
205
+ fetchReturning,
206
+ fetchSanity,
207
+ fetchScheduledReleases,
208
+ fetchShowsData,
209
+ fetchSongArtistCount,
210
+ fetchSongById,
211
+ fetchSongsInProgress,
212
+ fetchTopLevelParentId,
213
+ fetchUpcomingEvents,
214
+ fetchUserAward,
215
+ fetchUserBadges,
216
+ fetchUserChallengeProgress,
217
+ fetchUserLikes,
218
+ fetchUserPermissions,
219
+ fetchUserPermissionsData,
220
+ fetchUserPlaylists,
221
+ getAllCompleted,
222
+ getAllStarted,
223
+ getAllStartedOrCompleted,
224
+ getProgressPercentage,
225
+ getProgressPercentageByIds,
226
+ getProgressState,
227
+ getProgressStateByIds,
228
+ getResumeTimeSeconds,
229
+ getSortOrder,
230
+ globalConfig,
231
+ initializeService,
232
+ isContentLiked,
233
+ jumpToContinueContent,
234
+ likeContent,
235
+ likePlaylist,
236
+ pinPlaylist,
237
+ playback,
238
+ postChallengesCommunityNotification,
239
+ postChallengesCompleteLesson,
240
+ postChallengesEnroll,
241
+ postChallengesEnrollmentNotification,
242
+ postChallengesHideCompletedBanner,
243
+ postChallengesLeave,
244
+ postChallengesSetStartDate,
245
+ postChallengesSoloNotification,
246
+ postChallengesUnlock,
247
+ postContentCompleted,
248
+ postContentLiked,
249
+ postContentReset,
250
+ postContentUnliked,
251
+ postRecordWatchSession,
252
+ recordWatchSession,
253
+ reportPlaylist,
254
+ reset,
255
+ setLastUpdatedTime,
256
+ setStudentViewForUser,
257
+ unlikeContent,
258
+ unpinPlaylist,
259
+ updatePlaylist,
260
+ updatePlaylistItem,
261
+ wasLastUpdateOlderThanXSeconds,
262
+ }
240
263
  }