musora-content-services 1.7.0 → 1.7.2
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 +9 -0
- package/docs/v2/Content.html +269 -0
- package/docs/v2/ContentOrganization.html +2 -2
- package/docs/v2/Forums.html +2 -2
- package/docs/v2/Gamification.html +2 -2
- package/docs/v2/TestUser.html +2 -2
- package/docs/v2/UserManagementSystem.html +2 -2
- package/docs/v2/api_types.js.html +2 -2
- package/docs/v2/config.js.html +5 -2
- package/docs/v2/content-org_content-org.js.html +2 -2
- package/docs/v2/content-org_guided-courses.ts.html +2 -2
- package/docs/v2/content-org_learning-paths.ts.html +194 -59
- package/docs/v2/content-org_playlists-types.js.html +2 -2
- package/docs/v2/content-org_playlists.js.html +2 -2
- package/docs/v2/content.js.html +88 -10
- package/docs/v2/content_artist.ts.html +206 -0
- package/docs/v2/content_content.ts.html +77 -0
- package/docs/v2/content_genre.ts.html +209 -0
- package/docs/v2/content_instructor.ts.html +206 -0
- package/docs/v2/forums_categories.ts.html +22 -3
- package/docs/v2/forums_forums.ts.html +2 -2
- package/docs/v2/forums_posts.ts.html +22 -3
- package/docs/v2/forums_threads.ts.html +23 -10
- package/docs/v2/gamification_awards.ts.html +26 -12
- package/docs/v2/gamification_gamification.js.html +2 -2
- package/docs/v2/global.html +56 -8
- package/docs/v2/index.html +2 -2
- package/docs/v2/liveTesting.ts.html +2 -2
- package/docs/v2/module-Accounts.html +202 -13
- package/docs/v2/module-Artist.html +993 -0
- package/docs/v2/module-Awards.html +106 -6
- package/docs/v2/module-Config.html +5 -4
- package/docs/v2/module-Content-Services-V2.html +440 -9
- package/docs/v2/module-Forums.html +1398 -192
- package/docs/v2/module-Genre.html +981 -0
- package/docs/v2/module-GuidedCourses.html +2 -2
- package/docs/v2/module-Instructor.html +929 -0
- package/docs/v2/module-Interests.html +2 -2
- package/docs/v2/module-LearningPaths.html +1276 -182
- package/docs/v2/module-Onboarding.html +32 -8
- package/docs/v2/module-Payments.html +2 -2
- package/docs/v2/module-Permissions.html +2 -2
- package/docs/v2/module-Playlists.html +2 -2
- package/docs/v2/module-ProgressRow.html +2 -2
- package/docs/v2/module-Railcontent-Services.html +34 -626
- package/docs/v2/module-Sanity-Services.html +803 -1722
- package/docs/v2/module-Sessions.html +2 -2
- package/docs/v2/module-UserActivity.html +70 -116
- package/docs/v2/module-UserChat.html +2 -2
- package/docs/v2/module-UserManagement.html +2 -2
- package/docs/v2/module-UserMemberships.html +2 -2
- package/docs/v2/module-UserNotifications.html +2 -2
- package/docs/v2/module-UserProfile.html +2 -2
- package/docs/v2/progress-row_method-card.js.html +46 -47
- package/docs/v2/railcontent.js.html +14 -125
- package/docs/v2/sanity.js.html +247 -320
- package/docs/v2/userActivity.js.html +93 -169
- package/docs/v2/user_account.ts.html +41 -13
- package/docs/v2/user_chat.js.html +2 -2
- package/docs/v2/user_interests.js.html +2 -2
- package/docs/v2/user_management.js.html +2 -2
- package/docs/v2/user_memberships.ts.html +2 -2
- package/docs/v2/user_notifications.js.html +2 -2
- package/docs/v2/user_onboarding.ts.html +99 -4
- package/docs/v2/user_payments.ts.html +2 -2
- package/docs/v2/user_permissions.js.html +3 -3
- package/docs/v2/user_profile.js.html +2 -2
- package/docs/v2/user_sessions.js.html +2 -2
- package/docs/v2/user_types.js.html +4 -2
- package/docs/v2/user_user-management-system.js.html +2 -2
- package/link_mcs.sh +0 -0
- package/package.json +1 -1
- package/src/services/sanity.js +3 -3
package/package.json
CHANGED
package/src/services/sanity.js
CHANGED
|
@@ -979,7 +979,7 @@ export async function fetchAllFilterOptions(
|
|
|
979
979
|
|
|
980
980
|
return coachId
|
|
981
981
|
? `brand == '${brand}' && status == "published" && references(*[_type=='instructor' && railcontent_id == ${coachId}]._id) ${filterWithoutOption || ''} ${term ? ` && (title match "${term}" || album match "${term}" || artist->name match "${term}" || genre[]->name match "${term}")` : ''}`
|
|
982
|
-
: `_type == '${contentType}' && brand == "${brand}"${includeStatusFilter ? statusFilter : ''}${style && excludeFilter !== 'style' ? ` && '${style}' in genre[]->name` : ''}${artist && excludeFilter !== 'artist' ? ` && artist->name ==
|
|
982
|
+
: `_type == '${contentType}' && brand == "${brand}"${includeStatusFilter ? statusFilter : ''}${style && excludeFilter !== 'style' ? ` && '${style}' in genre[]->name` : ''}${artist && excludeFilter !== 'artist' ? ` && artist->name == "${artist}"` : ''} ${progressFilter} ${filterWithoutOption || ''} ${term ? ` && (title match "${term}" || album match "${term}" || artist->name match "${term}" || genre[]->name match "${term}")` : ''}`
|
|
983
983
|
}
|
|
984
984
|
|
|
985
985
|
const metaData = processMetadata(brand, contentType, true)
|
|
@@ -1743,7 +1743,7 @@ export async function fetchArtistLessons(
|
|
|
1743
1743
|
const now = getSanityDate(new Date())
|
|
1744
1744
|
const query = `{
|
|
1745
1745
|
"entity":
|
|
1746
|
-
*[_type == 'artist' && name ==
|
|
1746
|
+
*[_type == 'artist' && name == "${name}"]
|
|
1747
1747
|
{'type': _type, name, 'thumbnail_url':thumbnail_url.asset->url,
|
|
1748
1748
|
'lessons_count': count(*[${addType} brand == '${brand}' && references(^._id)]),
|
|
1749
1749
|
'lessons': *[${addType} brand == '${brand}' && references(^._id) && (status in ['published'] || (status == 'scheduled' && defined(published_on) && published_on >= '${now}')) ${searchFilter} ${includedFieldsFilter} ${progressFilter}]{${fieldsString}}
|
|
@@ -1797,7 +1797,7 @@ export async function fetchGenreLessons(
|
|
|
1797
1797
|
const now = getSanityDate(new Date())
|
|
1798
1798
|
const query = `{
|
|
1799
1799
|
"entity":
|
|
1800
|
-
*[_type == 'genre' && name ==
|
|
1800
|
+
*[_type == 'genre' && name == "${name}"]
|
|
1801
1801
|
{'type': _type, name, 'thumbnail_url':thumbnail_url.asset->url,
|
|
1802
1802
|
'lessons_count': count(*[${addType} brand == '${brand}' && references(^._id)]),
|
|
1803
1803
|
'lessons': *[${addType} brand == '${brand}' && references(^._id) && (status in ['published'] || (status == 'scheduled' && defined(published_on) && published_on >= '${now}')) ${searchFilter} ${includedFieldsFilter} ${progressFilter}]{${fieldsString}}
|