musora-content-services 2.27.5 → 2.28.1
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/.claude/settings.local.json +8 -0
- package/.coderabbit.yaml +0 -0
- package/.editorconfig +0 -0
- package/.github/pull_request_template.md +0 -0
- package/.github/workflows/conventional-commits.yaml +0 -0
- package/.github/workflows/docs.js.yml +0 -0
- package/.github/workflows/node.js.yml +0 -0
- package/.prettierignore +0 -0
- package/.prettierrc +0 -0
- package/CHANGELOG.md +19 -0
- package/README.md +0 -0
- package/babel.config.cjs +0 -0
- package/docs/Content-Organization.html +0 -0
- package/docs/ContentOrganization.html +0 -0
- package/docs/Gamification.html +0 -0
- package/docs/UserManagement.html +0 -0
- package/docs/UserManagementSystem.html +0 -0
- package/docs/api_types.js.html +0 -0
- package/docs/config.js.html +0 -0
- package/docs/content-org_content-org.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.js.html +0 -0
- package/docs/fonts/Montserrat/Montserrat-Bold.eot +0 -0
- package/docs/fonts/Montserrat/Montserrat-Bold.ttf +0 -0
- package/docs/fonts/Montserrat/Montserrat-Bold.woff +0 -0
- package/docs/fonts/Montserrat/Montserrat-Bold.woff2 +0 -0
- package/docs/fonts/Montserrat/Montserrat-Regular.eot +0 -0
- package/docs/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
- package/docs/fonts/Montserrat/Montserrat-Regular.woff +0 -0
- package/docs/fonts/Montserrat/Montserrat-Regular.woff2 +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.eot +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.ttf +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff2 +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.eot +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.svg +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.ttf +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff2 +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/global.html#User +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-Services-V2.html +0 -0
- package/docs/module-Interests.html +0 -0
- package/docs/module-Notifications.html +0 -0
- package/docs/module-Permissions.html +0 -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-Sessions.html +0 -0
- package/docs/module-User-Activity.html +0 -0
- package/docs/module-User-Management.html +0 -0
- package/docs/module-User-Permissions.html +0 -0
- package/docs/module-UserActivity.html +0 -0
- package/docs/module-UserChat.html +0 -0
- package/docs/module-UserManagement.html +0 -0
- package/docs/module-UserNotifications.html +0 -0
- package/docs/module-UserProfile.html +0 -0
- package/docs/railcontent.js.html +0 -0
- package/docs/sanity.js.html +0 -0
- package/docs/scripts/collapse.js +0 -0
- package/docs/scripts/commonNav.js +0 -0
- package/docs/scripts/linenumber.js +0 -0
- package/docs/scripts/nav.js +0 -0
- package/docs/scripts/polyfill.js +0 -0
- package/docs/scripts/prettify/Apache-License-2.0.txt +0 -0
- package/docs/scripts/prettify/lang-css.js +0 -0
- package/docs/scripts/prettify/prettify.js +0 -0
- package/docs/scripts/search.js +0 -0
- package/docs/styles/jsdoc.css +0 -0
- package/docs/styles/prettify.css +0 -0
- package/docs/types.js.html +0 -0
- package/docs/userActivity.js.html +0 -0
- package/docs/user_chat.js.html +0 -0
- package/docs/user_interests.js.html +0 -0
- package/docs/user_management.js.html +0 -0
- package/docs/user_notifications.js.html +0 -0
- package/docs/user_permissions.js.html +0 -0
- package/docs/user_profile.js.html +0 -0
- package/docs/user_sessions.js.html +0 -0
- package/docs/user_types.js.html +0 -0
- package/docs/user_user-management-system.js.html +0 -0
- package/docs/user_user-management.js.html +0 -0
- package/jest.config.js +0 -0
- package/jsdoc.json +0 -0
- package/link_mcs.sh +0 -0
- package/package.json +1 -1
- package/src/contentMetaData.js +0 -0
- package/src/contentTypeConfig.js +18 -7
- package/src/filterBuilder.js +0 -0
- package/src/index.d.ts +0 -0
- package/src/index.js +0 -0
- package/src/infrastructure/http/HttpClient.ts +0 -0
- package/src/infrastructure/http/executors/FetchRequestExecutor.ts +0 -0
- package/src/infrastructure/http/index.ts +0 -0
- package/src/infrastructure/http/interfaces/HeaderProvider.ts +0 -0
- package/src/infrastructure/http/interfaces/HttpError.ts +0 -0
- package/src/infrastructure/http/interfaces/NetworkError.ts +0 -0
- package/src/infrastructure/http/interfaces/RequestExecutor.ts +0 -0
- package/src/infrastructure/http/interfaces/RequestOptions.ts +0 -0
- package/src/infrastructure/http/providers/DefaultHeaderProvider.ts +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/content-org.js +0 -0
- package/src/services/content-org/guided-courses.ts +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 +0 -0
- package/src/services/contentAggregator.js +0 -0
- package/src/services/contentLikes.js +0 -0
- package/src/services/contentProgress.js +0 -0
- package/src/services/dataContext.js +0 -0
- package/src/services/dateUtils.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/imageSRCBuilder.js +0 -0
- package/src/services/imageSRCVerify.js +0 -0
- package/src/services/railcontent.js +0 -0
- package/src/services/recommendations.js +0 -0
- package/src/services/sanity.js +11 -38
- package/src/services/types.js +0 -0
- package/src/services/user/account.ts +0 -0
- package/src/services/user/chat.js +0 -0
- package/src/services/user/interests.js +0 -0
- package/src/services/user/management.js +0 -0
- package/src/services/user/notifications.js +0 -0
- package/src/services/user/permissions.js +0 -0
- package/src/services/user/profile.js +5 -2
- package/src/services/user/sessions.js +0 -0
- package/src/services/user/types.js +0 -0
- package/src/services/user/user-management-system.js +0 -0
- package/src/services/userActivity.js +0 -0
- package/test/HttpClient.test.js +0 -0
- 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/imageSRCBuilder.test.js +0 -0
- package/test/imageSRCVerify.test.js +0 -0
- package/test/initializeTests.js +0 -0
- package/test/lib/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/mockData/mockData_fetchByRailContentIds_one_content.json +0 -0
- package/test/mockData/mockData_progress_content.json +0 -0
- package/test/mockData/mockData_sanity_progress_content.json +0 -0
- package/test/mockData/mockData_user_practices.json +0 -0
- package/test/notifications.test.js +0 -0
- package/test/progressRows.test.js +0 -0
- package/test/sanityQueryService.test.js +0 -0
- package/test/streakMessage.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/.yarnrc.yml +0 -1
package/.coderabbit.yaml
CHANGED
|
File without changes
|
package/.editorconfig
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/.prettierignore
CHANGED
|
File without changes
|
package/.prettierrc
CHANGED
|
File without changes
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,25 @@
|
|
|
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.28.1](https://github.com/railroadmedia/musora-content-services/compare/v2.28.0...v2.28.1) (2025-07-24)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **T3PS-134:** playalong artist field fix ([#371](https://github.com/railroadmedia/musora-content-services/issues/371)) ([21da213](https://github.com/railroadmedia/musora-content-services/commit/21da2132abb7c2b008260277a73f9f17527e8aeb))
|
|
11
|
+
|
|
12
|
+
## [2.28.0](https://github.com/railroadmedia/musora-content-services/compare/v2.27.5...v2.28.0) (2025-07-24)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* added parent id for multi-level content ([#366](https://github.com/railroadmedia/musora-content-services/issues/366)) ([67f7847](https://github.com/railroadmedia/musora-content-services/commit/67f7847af2147095b5b7c91066a2f2756539c137))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* **T3PS-306:** fix function return ([#378](https://github.com/railroadmedia/musora-content-services/issues/378)) ([c5abf09](https://github.com/railroadmedia/musora-content-services/commit/c5abf09cd7bd9ab7d1a298d7a1158d8162fa9cc7))
|
|
23
|
+
|
|
5
24
|
### [2.27.5](https://github.com/railroadmedia/musora-content-services/compare/v2.27.3...v2.27.5) (2025-07-23)
|
|
6
25
|
|
|
7
26
|
|
package/README.md
CHANGED
|
File without changes
|
package/babel.config.cjs
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/docs/Gamification.html
CHANGED
|
File without changes
|
package/docs/UserManagement.html
CHANGED
|
File without changes
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/docs/global.html
CHANGED
|
File without changes
|
package/docs/global.html#User
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
|
|
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
|
|
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
|
package/docs/scripts/collapse.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/docs/scripts/nav.js
CHANGED
|
File without changes
|
package/docs/scripts/polyfill.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/docs/scripts/search.js
CHANGED
|
File without changes
|
package/docs/styles/jsdoc.css
CHANGED
|
File without changes
|
package/docs/styles/prettify.css
CHANGED
|
File without changes
|
package/docs/types.js.html
CHANGED
|
File without changes
|
|
File without changes
|
package/docs/user_chat.js.html
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/docs/user_types.js.html
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/jest.config.js
CHANGED
|
File without changes
|
package/jsdoc.json
CHANGED
|
File without changes
|
package/link_mcs.sh
CHANGED
|
File without changes
|
package/package.json
CHANGED
package/src/contentMetaData.js
CHANGED
|
File without changes
|
package/src/contentTypeConfig.js
CHANGED
|
@@ -14,7 +14,7 @@ export const DEFAULT_FIELDS = [
|
|
|
14
14
|
"'id': railcontent_id",
|
|
15
15
|
'railcontent_id',
|
|
16
16
|
artistOrInstructorName(),
|
|
17
|
-
'artist',
|
|
17
|
+
"'artist': artist->{ 'name': name, 'thumbnail': thumbnail_url.asset->url}",
|
|
18
18
|
'title',
|
|
19
19
|
"'image': thumbnail.asset->url",
|
|
20
20
|
"'thumbnail': thumbnail.asset->url",
|
|
@@ -33,6 +33,7 @@ export const DEFAULT_FIELDS = [
|
|
|
33
33
|
'xp',
|
|
34
34
|
'child_count',
|
|
35
35
|
'"lesson_count": coalesce(count(child[]->.child[]->), child_count)',
|
|
36
|
+
'"parent_id": parent_content_data[0].id',
|
|
36
37
|
]
|
|
37
38
|
export const DEFAULT_CHILD_FIELDS = [
|
|
38
39
|
`"id": railcontent_id`,
|
|
@@ -42,6 +43,21 @@ export const DEFAULT_CHILD_FIELDS = [
|
|
|
42
43
|
`length_in_seconds`,
|
|
43
44
|
]
|
|
44
45
|
|
|
46
|
+
export const instructorField = `instructor[]->{
|
|
47
|
+
"id": railcontent_id,
|
|
48
|
+
name,
|
|
49
|
+
short_bio,
|
|
50
|
+
"biography": short_bio[0].children[0].text,
|
|
51
|
+
"coach_card_image": coach_card_image.asset->url,
|
|
52
|
+
"coach_profile_image": thumbnail_url.asset->url
|
|
53
|
+
}`
|
|
54
|
+
|
|
55
|
+
export const chapterField = `chapter[]{
|
|
56
|
+
chapter_description,
|
|
57
|
+
chapter_timecode,
|
|
58
|
+
"chapter_thumbnail_url": chapter_thumbnail_url.asset->url
|
|
59
|
+
}`
|
|
60
|
+
|
|
45
61
|
export const descriptionField = 'description[0].children[0].text'
|
|
46
62
|
// this pulls both any defined resources for the document as well as any resources in the parent document
|
|
47
63
|
export const resourcesField = `[
|
|
@@ -345,7 +361,6 @@ export let contentTypeConfig = {
|
|
|
345
361
|
published_on,
|
|
346
362
|
"type":_type,
|
|
347
363
|
"image": thumbnail.asset->url,
|
|
348
|
-
"instructors": instructor[]->name,
|
|
349
364
|
length_in_seconds,
|
|
350
365
|
"resources": ${resourcesField},
|
|
351
366
|
difficulty,
|
|
@@ -353,11 +368,7 @@ export let contentTypeConfig = {
|
|
|
353
368
|
artist->,
|
|
354
369
|
"thumbnail_url":thumbnail.asset->url,
|
|
355
370
|
"description": description[0].children[0].text,
|
|
356
|
-
"chapters":
|
|
357
|
-
chapter_description,
|
|
358
|
-
chapter_timecode,
|
|
359
|
-
"chapter_thumbnail_url": chapter_thumbnail_url.asset->url
|
|
360
|
-
},
|
|
371
|
+
"chapters": ${chapterField},
|
|
361
372
|
"instructors":instructor[]->name,
|
|
362
373
|
"instructor": instructor[]->{
|
|
363
374
|
"id":railcontent_id,
|
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
|
|
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
|
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
|
|
File without changes
|
|
File without changes
|
package/src/services/content.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
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
|
package/src/services/sanity.js
CHANGED
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import {
|
|
5
5
|
artistOrInstructorName,
|
|
6
|
+
instructorField,
|
|
7
|
+
chapterField,
|
|
6
8
|
assignmentsField,
|
|
7
9
|
descriptionField,
|
|
8
10
|
resourcesField,
|
|
@@ -1294,41 +1296,16 @@ export async function jumpToContinueContent(railcontentId) {
|
|
|
1294
1296
|
*/
|
|
1295
1297
|
export async function fetchLessonContent(railContentId) {
|
|
1296
1298
|
const filterParams = { isSingle: true, pullFutureContent: true }
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
// If you're unsure, message Adrian, or just add them.
|
|
1300
|
-
const fields = `title,
|
|
1301
|
-
published_on,
|
|
1302
|
-
"type":_type,
|
|
1299
|
+
|
|
1300
|
+
const fields = `${getFieldsForContentType()}
|
|
1303
1301
|
"resources": ${resourcesField},
|
|
1304
|
-
difficulty,
|
|
1305
|
-
difficulty_string,
|
|
1306
|
-
brand,
|
|
1307
|
-
status,
|
|
1308
1302
|
soundslice,
|
|
1309
1303
|
instrumentless,
|
|
1310
|
-
railcontent_id,
|
|
1311
|
-
"id":railcontent_id,
|
|
1312
|
-
slug, artist->,
|
|
1313
|
-
"thumbnail":thumbnail.asset->url,
|
|
1314
1304
|
soundslice_slug,
|
|
1315
|
-
"description":
|
|
1316
|
-
"chapters":
|
|
1317
|
-
chapter_description,
|
|
1318
|
-
chapter_timecode,
|
|
1319
|
-
"chapter_thumbnail_url": chapter_thumbnail_url.asset->url
|
|
1320
|
-
},
|
|
1321
|
-
'artist': { 'name': artist->name, 'thumbnail': artist->thumbnail_url.asset->url},
|
|
1305
|
+
"description": ${descriptionField},
|
|
1306
|
+
"chapters": ${chapterField},
|
|
1322
1307
|
"instructors":instructor[]->name,
|
|
1323
|
-
"instructor":
|
|
1324
|
-
"id":railcontent_id,
|
|
1325
|
-
name,
|
|
1326
|
-
short_bio,
|
|
1327
|
-
"biography": short_bio[0].children[0].text,
|
|
1328
|
-
web_url_path,
|
|
1329
|
-
"coach_card_image": coach_card_image.asset->url,
|
|
1330
|
-
"coach_profile_image":thumbnail_url.asset->url
|
|
1331
|
-
},
|
|
1308
|
+
"instructor": ${instructorField},
|
|
1332
1309
|
${assignmentsField}
|
|
1333
1310
|
video,
|
|
1334
1311
|
length_in_seconds,
|
|
@@ -1346,9 +1323,6 @@ export async function fetchLessonContent(railContentId) {
|
|
|
1346
1323
|
"dark_mode_logo": *[railcontent_id == ^.id][0].dark_mode_logo_url.asset->url,
|
|
1347
1324
|
"light_mode_logo": *[railcontent_id == ^.id][0].light_mode_logo_url.asset->url,
|
|
1348
1325
|
},
|
|
1349
|
-
sort,
|
|
1350
|
-
xp,
|
|
1351
|
-
stbs,ds2stbs, bdsStbs,
|
|
1352
1326
|
...select(
|
|
1353
1327
|
defined(live_event_start_time) => {
|
|
1354
1328
|
"live_event_start_time": live_event_start_time,
|
|
@@ -1361,6 +1335,7 @@ export async function fetchLessonContent(railContentId) {
|
|
|
1361
1335
|
const query = await buildQuery(`railcontent_id == ${railContentId}`, filterParams, fields, {
|
|
1362
1336
|
isSingle: true,
|
|
1363
1337
|
})
|
|
1338
|
+
console.log('query', query)
|
|
1364
1339
|
const chapterProcess = (result) => {
|
|
1365
1340
|
const now = getSanityDate(new Date(), false)
|
|
1366
1341
|
if (result.live_event_start_time && result.live_event_end_time) {
|
|
@@ -1372,6 +1347,7 @@ export async function fetchLessonContent(railContentId) {
|
|
|
1372
1347
|
...chapter,
|
|
1373
1348
|
chapter_thumbnail_url: `https://musora-web-platform.s3.amazonaws.com/chapters/${result.brand}/Chapter${index + 1}.jpg`,
|
|
1374
1349
|
}))
|
|
1350
|
+
console.log('result', result)
|
|
1375
1351
|
return result
|
|
1376
1352
|
}
|
|
1377
1353
|
|
|
@@ -1470,7 +1446,7 @@ export async function fetchSiblingContent(railContentId, brand)
|
|
|
1470
1446
|
}).buildFilter()
|
|
1471
1447
|
const childrenFilter = await new FilterBuilder(``, { isChildrenFilter: true }).buildFilter()
|
|
1472
1448
|
|
|
1473
|
-
const queryFields = `_id, "id":railcontent_id, published_on, "instructor": instructor[0]->name, title, "thumbnail":thumbnail.asset->url, length_in_seconds, status, "type": _type, difficulty, difficulty_string, artist->, "permission_id": permission[]->railcontent_id, "genre": genre[]->name`
|
|
1449
|
+
const queryFields = `_id, "id":railcontent_id, published_on, "instructor": instructor[0]->name, title, "thumbnail":thumbnail.asset->url, length_in_seconds, status, "type": _type, difficulty, difficulty_string, artist->, "permission_id": permission[]->railcontent_id, "genre": genre[]->name, "parent_id": parent_content_data[0].id`
|
|
1474
1450
|
|
|
1475
1451
|
const query = `*[railcontent_id == ${railContentId} && brand == "${brand}"]{
|
|
1476
1452
|
_type, parent_type, 'parent_id': parent_content_data[0].id, railcontent_id,
|
|
@@ -1622,10 +1598,7 @@ export async function fetchLiveEvent(brand, forcedContentId = null) {
|
|
|
1622
1598
|
"thumbnail": thumbnail.asset->url,
|
|
1623
1599
|
${artistOrInstructorName()},
|
|
1624
1600
|
difficulty_string,
|
|
1625
|
-
"instructors":
|
|
1626
|
-
name,
|
|
1627
|
-
web_url_path,
|
|
1628
|
-
},
|
|
1601
|
+
"instructors": ${instructorField},
|
|
1629
1602
|
'videoId': coalesce(live_event_youtube_id, video.external_id),
|
|
1630
1603
|
} | order(live_event_start_time)[0...1]`
|
|
1631
1604
|
: `*[status == 'scheduled' && brand == '${brand}' && defined(live_event_start_time) && live_event_start_time <= '${getSanityDate(startDateTemp, false)}' && live_event_end_time >= '${getSanityDate(endDateTemp, false)}']{
|
package/src/services/types.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -32,6 +32,11 @@ export async function otherStats(userId = globalConfig.sessionConfig.userId) {
|
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
+
/**
|
|
36
|
+
* Delete profile picture for the authenticated user
|
|
37
|
+
*
|
|
38
|
+
* @returns {Promise<void>}
|
|
39
|
+
*/
|
|
35
40
|
export async function deleteProfilePicture() {
|
|
36
41
|
const url = `${baseUrl}/v1/users/profile_picture`
|
|
37
42
|
const response = await fetchHandler(url, 'DELETE')
|
|
@@ -41,6 +46,4 @@ export async function deleteProfilePicture() {
|
|
|
41
46
|
console.log('Error deleting profile picture:', problemDetails.detail)
|
|
42
47
|
throw new Error(`Delete failed: ${problemDetails.detail}`)
|
|
43
48
|
}
|
|
44
|
-
|
|
45
|
-
return response.json()
|
|
46
49
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/test/HttpClient.test.js
CHANGED
|
File without changes
|
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
|
|
File without changes
|
|
File without changes
|
package/test/initializeTests.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/test/localStorageMock.js
CHANGED
|
File without changes
|
package/test/log.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
|
|
File without changes
|
package/tools/generate-index.cjs
CHANGED
|
File without changes
|
package/.yarnrc.yml
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
nodeLinker: node-modules
|