musora-content-services 2.88.4 → 2.90.0

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,20 @@
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.90.0](https://github.com/railroadmedia/musora-content-services/compare/v2.89.0...v2.90.0) (2025-11-27)
6
+
7
+
8
+ ### Features
9
+
10
+ * method learning path child fields ([#597](https://github.com/railroadmedia/musora-content-services/issues/597)) ([71654ea](https://github.com/railroadmedia/musora-content-services/commit/71654ea29cb1c46f354ed878dab261e93cb01e7c))
11
+
12
+ ## [2.89.0](https://github.com/railroadmedia/musora-content-services/compare/v2.88.4...v2.89.0) (2025-11-27)
13
+
14
+
15
+ ### Features
16
+
17
+ * add collection ([#592](https://github.com/railroadmedia/musora-content-services/issues/592)) ([3acd884](https://github.com/railroadmedia/musora-content-services/commit/3acd884475c0359eb7fcee09e8a02ab8415e3927))
18
+
5
19
  ### [2.88.4](https://github.com/railroadmedia/musora-content-services/compare/v2.88.3...v2.88.4) (2025-11-26)
6
20
 
7
21
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "musora-content-services",
3
- "version": "2.88.4",
3
+ "version": "2.90.0",
4
4
  "description": "A package for Musoras content services ",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -497,6 +497,12 @@ export let contentTypeConfig = {
497
497
  ][0].badge.asset->url`,
498
498
  ],
499
499
  includeChildFields: true,
500
+ childFields: [
501
+ `"parent_data": parent_content_data[0] {
502
+ "id": id,
503
+ "title": *[railcontent_id == ^.id][0].title,
504
+ }`,
505
+ ],
500
506
  },
501
507
  workout: {
502
508
  fields: [artistOrInstructorNameAsArray()],
@@ -240,9 +240,8 @@ export async function completeMethodIntroVideo(introVideoId: number, brand: stri
240
240
  const methodStructure = await fetchMethodV2Structure(brand)
241
241
  const learningPathId = methodStructure.learningPaths[0].id
242
242
 
243
- const url: string = `${LEARNING_PATHS_PATH}/start`
244
- const body = { learning_path_id: learningPathId, brand: brand }
245
- response.active_path_response = await fetchHandler(url, 'POST', null, body)
243
+ response.active_path_response = await startLearningPath(brand, learningPathId)
244
+
246
245
 
247
246
  return response
248
247
  }
@@ -267,14 +266,16 @@ export async function completeLearningPathIntroVideo(introVideoId: number, learn
267
266
 
268
267
  response.intro_video_response = await completeIfNotCompleted(introVideoId)
269
268
 
269
+ const collection = { id: learningPathId, type: 'learning-path-v2' }
270
+
270
271
  if (!lessonsToImport) {
271
272
  // returns nothing now, but it will when watermelon comes 'round
272
- response.learning_path_reset_response = await contentStatusReset(learningPathId)
273
- } else {
273
+ response.learning_path_reset_response = await contentStatusReset(learningPathId, collection)
274
274
 
275
- // todo: add collection context + optimize with bulk calls with watermelon
275
+ } else {
276
+ response.lesson_import_response = {}
276
277
  for (const contentId of lessonsToImport) {
277
- response.lesson_import_response[contentId] = await contentStatusCompleted(contentId)
278
+ response.lesson_import_response[contentId] = await contentStatusCompleted(contentId, collection)
278
279
  }
279
280
  }
280
281