musora-content-services 1.3.16 → 1.3.18

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 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.18](https://github.com/railroadmedia/musora-content-services/compare/v1.3.17...v1.3.18) (2025-03-18)
6
+
7
+ ### [1.3.17](https://github.com/railroadmedia/musora-content-services/compare/v1.3.16...v1.3.17) (2025-03-17)
8
+
5
9
  ### [1.3.16](https://github.com/railroadmedia/musora-content-services/compare/v1.3.15...v1.3.16) (2025-03-14)
6
10
 
7
11
  ### [1.3.15](https://github.com/railroadmedia/musora-content-services/compare/v1.3.14...v1.3.15) (2025-03-10)
package/jsdoc.json CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "musora-content-services",
3
- "version": "1.3.16",
3
+ "version": "1.3.18",
4
4
  "description": "A package for Musoras content services ",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -1029,13 +1029,11 @@ const contentMetadata = {
1029
1029
  {
1030
1030
  name: 'Completed',
1031
1031
  short_name: 'COMPLETED',
1032
- is_group_by: true,
1033
1032
  value: 'completed',
1034
1033
  },
1035
1034
  {
1036
1035
  name: 'Owned Challenges',
1037
1036
  short_name: 'OWNED CHALLENGES',
1038
- is_group_by: true,
1039
1037
  value: 'owned',
1040
1038
  },
1041
1039
  ],
@@ -1158,13 +1156,11 @@ const contentMetadata = {
1158
1156
  {
1159
1157
  name: 'Completed',
1160
1158
  short_name: 'COMPLETED',
1161
- is_group_by: true,
1162
1159
  value: 'completed',
1163
1160
  },
1164
1161
  {
1165
1162
  name: 'Owned Challenges',
1166
1163
  short_name: 'OWNED CHALLENGES',
1167
- is_group_by: true,
1168
1164
  value: 'owned',
1169
1165
  },
1170
1166
  ],
File without changes
File without changes
File without changes
File without changes
@@ -1297,15 +1297,16 @@ export async function fetchRelatedLessons(railContentId, brand) {
1297
1297
  ).buildFilter()
1298
1298
  const filterNeighbouringSiblings = await new FilterBuilder(`references(^._id)`).buildFilter()
1299
1299
  const childrenFilter = await new FilterBuilder(``, { isChildrenFilter: true }).buildFilter()
1300
-
1300
+ const queryFields = `_id, "id":railcontent_id, published_on, "instructor": instructor[0]->name, title, "thumbnail_url":thumbnail.asset->url, length_in_seconds, web_url_path, "type": _type, difficulty, difficulty_string, railcontent_id, artist->,"permission_id": permission[]->railcontent_id,_type, "genre": genre[]->name`
1301
+ const queryFieldsWithSort = queryFields + ', sort'
1301
1302
  const query = `*[railcontent_id == ${railContentId} && brand == "${brand}" && (!defined(permission) || references(*[_type=='permission']._id))]{
1302
1303
  _type, parent_type, railcontent_id,
1303
1304
  "related_lessons" : array::unique([
1304
- ...(*[${filterNeighbouringSiblings}][0].child[${childrenFilter}]->{_id, "id":railcontent_id, published_on, "instructor": instructor[0]->name, title, "thumbnail_url":thumbnail.asset->url, length_in_seconds, web_url_path, "type": _type, difficulty, difficulty_string, railcontent_id, artist->,"permission_id": permission[]->railcontent_id,_type}),
1305
- ...(*[${filterSongSameArtist}]{_id, "id":railcontent_id, published_on, "instructor": instructor[0]->name, title, "thumbnail_url":thumbnail.asset->url, length_in_seconds, web_url_path, "type": _type, difficulty, difficulty_string, railcontent_id, artist->,"permission_id": permission[]->railcontent_id,_type}|order(published_on desc, title asc)[0...10]),
1306
- ...(*[${filterSongSameGenre}]{_id, "id":railcontent_id, published_on, "instructor": instructor[0]->name, title, "thumbnail_url":thumbnail.asset->url, length_in_seconds, web_url_path, "type": _type, difficulty, difficulty_string, railcontent_id, artist->,"permission_id": permission[]->railcontent_id,_type}|order(published_on desc, title asc)[0...10]),
1307
- ...(*[${filterSameTypeAndSortOrder}]{_id, "id":railcontent_id, published_on, "instructor": instructor[0]->name, title, "thumbnail_url":thumbnail.asset->url, length_in_seconds, web_url_path, "type": _type, difficulty, difficulty_string, railcontent_id, artist->,"permission_id": permission[]->railcontent_id,_type, sort}|order(sort asc, title asc)[0...10]),
1308
- ...(*[${filterSameType}]{_id, "id":railcontent_id, published_on, "instructor": instructor[0]->name, title, "thumbnail_url":thumbnail.asset->url, length_in_seconds, web_url_path, "type": _type, difficulty, difficulty_string, railcontent_id, artist->,"permission_id": permission[]->railcontent_id,_type}|order(published_on desc, title asc)[0...10])
1305
+ ...(*[${filterNeighbouringSiblings}][0].child[${childrenFilter}]->{${queryFields}}),
1306
+ ...(*[${filterSongSameArtist}]{${queryFields}}|order(published_on desc, title asc)[0...10]),
1307
+ ...(*[${filterSongSameGenre}]{${queryFields}}|order(published_on desc, title asc)[0...10]),
1308
+ ...(*[${filterSameTypeAndSortOrder}]{${queryFieldsWithSort}}|order(sort asc, title asc)[0...10]),
1309
+ ...(*[${filterSameType}]{${queryFields}}|order(published_on desc, title asc)[0...10])
1309
1310
  ,
1310
1311
  ])[0...10]}`
1311
1312
  return fetchSanity(query, false)
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes