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.
Files changed (73) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/docs/v2/Content.html +269 -0
  3. package/docs/v2/ContentOrganization.html +2 -2
  4. package/docs/v2/Forums.html +2 -2
  5. package/docs/v2/Gamification.html +2 -2
  6. package/docs/v2/TestUser.html +2 -2
  7. package/docs/v2/UserManagementSystem.html +2 -2
  8. package/docs/v2/api_types.js.html +2 -2
  9. package/docs/v2/config.js.html +5 -2
  10. package/docs/v2/content-org_content-org.js.html +2 -2
  11. package/docs/v2/content-org_guided-courses.ts.html +2 -2
  12. package/docs/v2/content-org_learning-paths.ts.html +194 -59
  13. package/docs/v2/content-org_playlists-types.js.html +2 -2
  14. package/docs/v2/content-org_playlists.js.html +2 -2
  15. package/docs/v2/content.js.html +88 -10
  16. package/docs/v2/content_artist.ts.html +206 -0
  17. package/docs/v2/content_content.ts.html +77 -0
  18. package/docs/v2/content_genre.ts.html +209 -0
  19. package/docs/v2/content_instructor.ts.html +206 -0
  20. package/docs/v2/forums_categories.ts.html +22 -3
  21. package/docs/v2/forums_forums.ts.html +2 -2
  22. package/docs/v2/forums_posts.ts.html +22 -3
  23. package/docs/v2/forums_threads.ts.html +23 -10
  24. package/docs/v2/gamification_awards.ts.html +26 -12
  25. package/docs/v2/gamification_gamification.js.html +2 -2
  26. package/docs/v2/global.html +56 -8
  27. package/docs/v2/index.html +2 -2
  28. package/docs/v2/liveTesting.ts.html +2 -2
  29. package/docs/v2/module-Accounts.html +202 -13
  30. package/docs/v2/module-Artist.html +993 -0
  31. package/docs/v2/module-Awards.html +106 -6
  32. package/docs/v2/module-Config.html +5 -4
  33. package/docs/v2/module-Content-Services-V2.html +440 -9
  34. package/docs/v2/module-Forums.html +1398 -192
  35. package/docs/v2/module-Genre.html +981 -0
  36. package/docs/v2/module-GuidedCourses.html +2 -2
  37. package/docs/v2/module-Instructor.html +929 -0
  38. package/docs/v2/module-Interests.html +2 -2
  39. package/docs/v2/module-LearningPaths.html +1276 -182
  40. package/docs/v2/module-Onboarding.html +32 -8
  41. package/docs/v2/module-Payments.html +2 -2
  42. package/docs/v2/module-Permissions.html +2 -2
  43. package/docs/v2/module-Playlists.html +2 -2
  44. package/docs/v2/module-ProgressRow.html +2 -2
  45. package/docs/v2/module-Railcontent-Services.html +34 -626
  46. package/docs/v2/module-Sanity-Services.html +803 -1722
  47. package/docs/v2/module-Sessions.html +2 -2
  48. package/docs/v2/module-UserActivity.html +70 -116
  49. package/docs/v2/module-UserChat.html +2 -2
  50. package/docs/v2/module-UserManagement.html +2 -2
  51. package/docs/v2/module-UserMemberships.html +2 -2
  52. package/docs/v2/module-UserNotifications.html +2 -2
  53. package/docs/v2/module-UserProfile.html +2 -2
  54. package/docs/v2/progress-row_method-card.js.html +46 -47
  55. package/docs/v2/railcontent.js.html +14 -125
  56. package/docs/v2/sanity.js.html +247 -320
  57. package/docs/v2/userActivity.js.html +93 -169
  58. package/docs/v2/user_account.ts.html +41 -13
  59. package/docs/v2/user_chat.js.html +2 -2
  60. package/docs/v2/user_interests.js.html +2 -2
  61. package/docs/v2/user_management.js.html +2 -2
  62. package/docs/v2/user_memberships.ts.html +2 -2
  63. package/docs/v2/user_notifications.js.html +2 -2
  64. package/docs/v2/user_onboarding.ts.html +99 -4
  65. package/docs/v2/user_payments.ts.html +2 -2
  66. package/docs/v2/user_permissions.js.html +3 -3
  67. package/docs/v2/user_profile.js.html +2 -2
  68. package/docs/v2/user_sessions.js.html +2 -2
  69. package/docs/v2/user_types.js.html +4 -2
  70. package/docs/v2/user_user-management-system.js.html +2 -2
  71. package/link_mcs.sh +0 -0
  72. package/package.json +1 -1
  73. package/src/services/sanity.js +3 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "musora-content-services",
3
- "version": "1.7.0",
3
+ "version": "1.7.2",
4
4
  "description": "A package for Musoras content services ",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -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 == '${artist}'` : ''} ${progressFilter} ${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 == "${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 == '${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 == '${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}}