musora-content-services 1.3.5 → 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.
- package/CHANGELOG.md +4 -0
- package/link_mcs.sh +0 -0
- package/package.json +1 -1
- package/src/index.d.ts +250 -227
- package/src/index.js +249 -226
- package/src/services/sanity.js +60 -16
- package/test/sanityQueryService.test.js +16 -6
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.3.7](https://github.com/railroadmedia/musora-content-services/compare/v1.3.6...v1.3.7) (2025-02-20)
|
|
6
|
+
|
|
7
|
+
### [1.3.6](https://github.com/railroadmedia/musora-content-services/compare/v1.3.5...v1.3.6) (2025-02-18)
|
|
8
|
+
|
|
5
9
|
### [1.3.5](https://github.com/railroadmedia/musora-content-services/compare/v1.3.4...v1.3.5) (2025-02-14)
|
|
6
10
|
|
|
7
11
|
### [1.3.4](https://github.com/railroadmedia/musora-content-services/compare/v1.3.2...v1.3.4) (2025-02-14)
|
package/link_mcs.sh
CHANGED
|
File without changes
|
package/package.json
CHANGED
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 {
|
|
3
|
+
import {
|
|
4
|
+
globalConfig,
|
|
5
|
+
initializeService
|
|
6
|
+
} from './services/config.js';
|
|
4
7
|
|
|
5
|
-
import {
|
|
8
|
+
import {
|
|
9
|
+
isContentLiked,
|
|
10
|
+
likeContent,
|
|
11
|
+
unlikeContent
|
|
12
|
+
} from './services/contentLikes.js';
|
|
6
13
|
|
|
7
14
|
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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
|
-
|
|
25
|
-
|
|
26
|
-
|
|
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
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
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 {
|
|
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
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
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
|
}
|
package/src/index.js
CHANGED
|
@@ -1,238 +1,261 @@
|
|
|
1
1
|
/*** This file was generated automatically. To recreate, please run `npm run build-index`. ***/
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
globalConfig,
|
|
5
|
+
initializeService
|
|
6
|
+
} from './services/config.js';
|
|
4
7
|
|
|
5
|
-
import {
|
|
8
|
+
import {
|
|
9
|
+
isContentLiked,
|
|
10
|
+
likeContent,
|
|
11
|
+
unlikeContent
|
|
12
|
+
} from './services/contentLikes.js';
|
|
6
13
|
|
|
7
14
|
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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
|
-
|
|
25
|
-
|
|
26
|
-
|
|
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
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
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 {
|
|
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
|
export {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
143
|
+
addItemToPlaylist,
|
|
144
|
+
assignmentStatusCompleted,
|
|
145
|
+
assignmentStatusReset,
|
|
146
|
+
contentStatusCompleted,
|
|
147
|
+
contentStatusReset,
|
|
148
|
+
countAssignmentsAndLessons,
|
|
149
|
+
createPlaylist,
|
|
150
|
+
deletePlaylist,
|
|
151
|
+
deletePlaylistItem,
|
|
152
|
+
deletePlaylistLike,
|
|
153
|
+
duplicatePlaylist,
|
|
154
|
+
fetchAll,
|
|
155
|
+
fetchAllCompletedStates,
|
|
156
|
+
fetchAllFilterOptions,
|
|
157
|
+
fetchAllPacks,
|
|
158
|
+
fetchArtistLessons,
|
|
159
|
+
fetchArtists,
|
|
160
|
+
fetchByRailContentId,
|
|
161
|
+
fetchByRailContentIds,
|
|
162
|
+
fetchByReference,
|
|
163
|
+
fetchCarouselCardData,
|
|
164
|
+
fetchChallengeIndexMetadata,
|
|
165
|
+
fetchChallengeLessonData,
|
|
166
|
+
fetchChallengeMetadata,
|
|
167
|
+
fetchChallengeUserActiveChallenges,
|
|
168
|
+
fetchChatAndLiveEnvent,
|
|
169
|
+
fetchCoachLessons,
|
|
170
|
+
fetchComingSoon,
|
|
171
|
+
fetchCommentModContentData,
|
|
172
|
+
fetchCompletedChallenges,
|
|
173
|
+
fetchCompletedContent,
|
|
174
|
+
fetchCompletedState,
|
|
175
|
+
fetchContentInProgress,
|
|
176
|
+
fetchContentPageUserData,
|
|
177
|
+
fetchContentProgress,
|
|
178
|
+
fetchFoundation,
|
|
179
|
+
fetchGenreLessons,
|
|
180
|
+
fetchHandler,
|
|
181
|
+
fetchHierarchy,
|
|
182
|
+
fetchLeaving,
|
|
183
|
+
fetchLessonContent,
|
|
184
|
+
fetchLiveEvent,
|
|
185
|
+
fetchMetadata,
|
|
186
|
+
fetchMethod,
|
|
187
|
+
fetchMethodChildren,
|
|
188
|
+
fetchMethodChildrenIds,
|
|
189
|
+
fetchMethodPreviousNextLesson,
|
|
190
|
+
fetchNewReleases,
|
|
191
|
+
fetchNextContentDataForParent,
|
|
192
|
+
fetchNextPreviousLesson,
|
|
193
|
+
fetchOwnedChallenges,
|
|
194
|
+
fetchPackAll,
|
|
195
|
+
fetchPackData,
|
|
196
|
+
fetchParentForDownload,
|
|
197
|
+
fetchPinnedPlaylists,
|
|
198
|
+
fetchPlayAlongsCount,
|
|
199
|
+
fetchPlaylist,
|
|
200
|
+
fetchPlaylistItem,
|
|
201
|
+
fetchPlaylistItems,
|
|
202
|
+
fetchRelatedLessons,
|
|
203
|
+
fetchRelatedSongs,
|
|
204
|
+
fetchReturning,
|
|
205
|
+
fetchSanity,
|
|
206
|
+
fetchScheduledReleases,
|
|
207
|
+
fetchShowsData,
|
|
208
|
+
fetchSongArtistCount,
|
|
209
|
+
fetchSongById,
|
|
210
|
+
fetchSongsInProgress,
|
|
211
|
+
fetchTopLevelParentId,
|
|
212
|
+
fetchUpcomingEvents,
|
|
213
|
+
fetchUserAward,
|
|
214
|
+
fetchUserBadges,
|
|
215
|
+
fetchUserChallengeProgress,
|
|
216
|
+
fetchUserLikes,
|
|
217
|
+
fetchUserPermissions,
|
|
218
|
+
fetchUserPermissionsData,
|
|
219
|
+
fetchUserPlaylists,
|
|
220
|
+
getAllCompleted,
|
|
221
|
+
getAllStarted,
|
|
222
|
+
getAllStartedOrCompleted,
|
|
223
|
+
getProgressPercentage,
|
|
224
|
+
getProgressPercentageByIds,
|
|
225
|
+
getProgressState,
|
|
226
|
+
getProgressStateByIds,
|
|
227
|
+
getResumeTimeSeconds,
|
|
228
|
+
getSortOrder,
|
|
229
|
+
globalConfig,
|
|
230
|
+
initializeService,
|
|
231
|
+
isContentLiked,
|
|
232
|
+
jumpToContinueContent,
|
|
233
|
+
likeContent,
|
|
234
|
+
likePlaylist,
|
|
235
|
+
pinPlaylist,
|
|
236
|
+
playback,
|
|
237
|
+
postChallengesCommunityNotification,
|
|
238
|
+
postChallengesCompleteLesson,
|
|
239
|
+
postChallengesEnroll,
|
|
240
|
+
postChallengesEnrollmentNotification,
|
|
241
|
+
postChallengesHideCompletedBanner,
|
|
242
|
+
postChallengesLeave,
|
|
243
|
+
postChallengesSetStartDate,
|
|
244
|
+
postChallengesSoloNotification,
|
|
245
|
+
postChallengesUnlock,
|
|
246
|
+
postContentCompleted,
|
|
247
|
+
postContentLiked,
|
|
248
|
+
postContentReset,
|
|
249
|
+
postContentUnliked,
|
|
250
|
+
postRecordWatchSession,
|
|
251
|
+
recordWatchSession,
|
|
252
|
+
reportPlaylist,
|
|
253
|
+
reset,
|
|
254
|
+
setLastUpdatedTime,
|
|
255
|
+
setStudentViewForUser,
|
|
256
|
+
unlikeContent,
|
|
257
|
+
unpinPlaylist,
|
|
258
|
+
updatePlaylist,
|
|
259
|
+
updatePlaylistItem,
|
|
260
|
+
wasLastUpdateOlderThanXSeconds,
|
|
261
|
+
};
|
package/src/services/sanity.js
CHANGED
|
@@ -66,30 +66,74 @@ export async function fetchSongById(documentId) {
|
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
/**
|
|
69
|
-
* fetches from Sanity all content marked for removal next quarter
|
|
70
|
-
*
|
|
71
|
-
* @string brand
|
|
72
|
-
* @
|
|
73
|
-
|
|
74
|
-
|
|
69
|
+
* fetches from Sanity all content marked for removal next quarter
|
|
70
|
+
*
|
|
71
|
+
* @string brand
|
|
72
|
+
* @number pageNumber
|
|
73
|
+
* @number contentPerPage
|
|
74
|
+
* @returns {Promise<Object|null>}
|
|
75
|
+
*/
|
|
76
|
+
export async function fetchLeaving(
|
|
77
|
+
brand,
|
|
78
|
+
{ pageNumber = 1, contentPerPage = 20 } = {}) {
|
|
75
79
|
const nextQuarter = getNextAndPreviousQuarterDates()['next'];
|
|
76
80
|
const filterString = `brand == '${brand}' && quarter_removed == '${nextQuarter}'`
|
|
77
|
-
const
|
|
78
|
-
|
|
81
|
+
const startEndOrder = getQueryFromPage(pageNumber, contentPerPage);
|
|
82
|
+
const sortOrder = {sortOrder: "published_on desc, id desc", start: startEndOrder['start'], end: startEndOrder['end']};
|
|
83
|
+
const query = await buildQuery(filterString, {pullFutureContent: false, availableContentStatuses: ["published"]}, getFieldsForContentType(), sortOrder);
|
|
84
|
+
return fetchSanity(query, true);
|
|
79
85
|
}
|
|
80
86
|
|
|
81
87
|
/**
|
|
82
|
-
* fetches from Sanity all content marked for
|
|
88
|
+
* fetches from Sanity all content marked for return next quarter
|
|
83
89
|
*
|
|
84
90
|
* @string brand
|
|
91
|
+
* @number pageNumber
|
|
92
|
+
* @number contentPerPage
|
|
85
93
|
* @returns {Promise<Object|null>}
|
|
86
94
|
*/
|
|
87
|
-
export async function
|
|
95
|
+
export async function fetchReturning(
|
|
96
|
+
brand,
|
|
97
|
+
{ pageNumber = 1, contentPerPage = 20 } = {}) {
|
|
88
98
|
const nextQuarter = getNextAndPreviousQuarterDates()['next'];
|
|
89
99
|
const filterString = `brand == '${brand}' && quarter_published == '${nextQuarter}'`;
|
|
90
|
-
const
|
|
100
|
+
const startEndOrder = getQueryFromPage(pageNumber, contentPerPage);
|
|
101
|
+
const sortOrder = {sortOrder: "published_on desc, id desc", start: startEndOrder['start'], end: startEndOrder['end']};
|
|
102
|
+
const query = await buildQuery(filterString, {pullFutureContent: true, availableContentStatuses: ["draft"]}, getFieldsForContentType(), sortOrder);
|
|
103
|
+
|
|
104
|
+
return fetchSanity(query, true);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* fetches from Sanity all songs coming soon (new) next quarter
|
|
109
|
+
*
|
|
110
|
+
* @string brand
|
|
111
|
+
* @number pageNumber
|
|
112
|
+
* @number contentPerPage
|
|
113
|
+
* @returns {Promise<Object|null>}
|
|
114
|
+
*/
|
|
115
|
+
export async function fetchComingSoon(
|
|
116
|
+
brand,
|
|
117
|
+
{ pageNumber = 1, contentPerPage = 20 } = {}) {
|
|
118
|
+
const filterString = `brand == '${brand}' && _type == 'song'`;
|
|
119
|
+
const startEndOrder = getQueryFromPage(pageNumber, contentPerPage);
|
|
120
|
+
const sortOrder = {sortOrder: "published_on desc, id desc", start: startEndOrder['start'], end: startEndOrder['end']};
|
|
121
|
+
const query = await buildQuery(filterString, {getFutureContentOnly: true}, getFieldsForContentType(), sortOrder);
|
|
122
|
+
return fetchSanity(query, true);
|
|
123
|
+
}
|
|
91
124
|
|
|
92
|
-
|
|
125
|
+
/**
|
|
126
|
+
*
|
|
127
|
+
* @number page
|
|
128
|
+
* @returns {number[]}
|
|
129
|
+
*/
|
|
130
|
+
function getQueryFromPage(pageNumber, contentPerPage) {
|
|
131
|
+
const start = contentPerPage*(pageNumber-1);
|
|
132
|
+
const end = contentPerPage*pageNumber;
|
|
133
|
+
let result = [];
|
|
134
|
+
result['start'] = start;
|
|
135
|
+
result['end'] = end;
|
|
136
|
+
return result;
|
|
93
137
|
}
|
|
94
138
|
|
|
95
139
|
/**
|
|
@@ -97,7 +141,7 @@ export async function fetchQuarterPublished(brand) {
|
|
|
97
141
|
*
|
|
98
142
|
* @returns {*[]}
|
|
99
143
|
*/
|
|
100
|
-
|
|
144
|
+
function getNextAndPreviousQuarterDates() {
|
|
101
145
|
const january = 1;
|
|
102
146
|
const april = 4;
|
|
103
147
|
const july = 7;
|
|
@@ -1913,7 +1957,7 @@ function checkSanityConfig(config) {
|
|
|
1913
1957
|
function buildRawQuery(
|
|
1914
1958
|
filter = '',
|
|
1915
1959
|
fields = '...',
|
|
1916
|
-
{ sortOrder = 'published_on desc', start = 0, end = 10, isSingle = false
|
|
1960
|
+
{ sortOrder = 'published_on desc', start = 0, end = 10, isSingle = false}
|
|
1917
1961
|
) {
|
|
1918
1962
|
const sortString = sortOrder ? `order(${sortOrder})` : ''
|
|
1919
1963
|
const countString = isSingle ? '[0...1]' : `[${start}...${end}]`
|
|
@@ -1927,10 +1971,10 @@ async function buildQuery(
|
|
|
1927
1971
|
baseFilter = '',
|
|
1928
1972
|
filterParams = { pullFutureContent: false },
|
|
1929
1973
|
fields = '...',
|
|
1930
|
-
{ sortOrder = 'published_on desc', start = 0, end = 10, isSingle = false
|
|
1974
|
+
{ sortOrder = 'published_on desc', start = 0, end = 10, isSingle = false}
|
|
1931
1975
|
) {
|
|
1932
1976
|
const filter = await new FilterBuilder(baseFilter, filterParams).buildFilter()
|
|
1933
|
-
return buildRawQuery(filter, fields, { sortOrder, start, end, isSingle
|
|
1977
|
+
return buildRawQuery(filter, fields, { sortOrder, start, end, isSingle})
|
|
1934
1978
|
}
|
|
1935
1979
|
|
|
1936
1980
|
function buildEntityAndTotalQuery(
|
|
@@ -14,8 +14,9 @@ import { fetchOwnedChallenges } from '../src'
|
|
|
14
14
|
const {
|
|
15
15
|
fetchSongById,
|
|
16
16
|
fetchArtists,
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
fetchReturning,
|
|
18
|
+
fetchLeaving,
|
|
19
|
+
fetchComingSoon,
|
|
19
20
|
fetchSongArtistCount,
|
|
20
21
|
fetchRelatedSongs,
|
|
21
22
|
fetchNewReleases,
|
|
@@ -58,14 +59,23 @@ describe('Sanity Queries', function () {
|
|
|
58
59
|
expect(response.id).toBe(id)
|
|
59
60
|
})
|
|
60
61
|
|
|
61
|
-
test('
|
|
62
|
+
test('fetchReturning', async () => {
|
|
62
63
|
const brand = 'guitareo'
|
|
63
|
-
const
|
|
64
|
+
const page = 1
|
|
65
|
+
const response = await fetchReturning(brand, {pageNumber: 1})
|
|
66
|
+
expect(response).toBeDefined()
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
test('fetchLeaving', async () => {
|
|
70
|
+
const brand = 'guitareo'
|
|
71
|
+
const response = await fetchLeaving(brand, {pageNumber: 1})
|
|
72
|
+
expect(response).toBeDefined()
|
|
64
73
|
});
|
|
65
74
|
|
|
66
|
-
test('
|
|
75
|
+
test('fetchComingSoon', async () => {
|
|
67
76
|
const brand = 'guitareo'
|
|
68
|
-
const response = await
|
|
77
|
+
const response = await fetchComingSoon(brand, {pageNumber: 2, contentPerPage: 20})
|
|
78
|
+
expect(response).toBeDefined()
|
|
69
79
|
});
|
|
70
80
|
|
|
71
81
|
|