musora-content-services 2.134.4 → 2.134.6
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,21 @@
|
|
|
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.134.6](https://github.com/railroadmedia/musora-content-services/compare/v2.134.5...v2.134.6) (2026-02-17)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* child cta for new releases ([#822](https://github.com/railroadmedia/musora-content-services/issues/822)) ([d0d2aae](https://github.com/railroadmedia/musora-content-services/commit/d0d2aae729050f918f3c9a6a4cceb4523c03ef70))
|
|
11
|
+
* return status field in response ([#823](https://github.com/railroadmedia/musora-content-services/issues/823)) ([371bbd3](https://github.com/railroadmedia/musora-content-services/commit/371bbd3a92ef99a4ae3454facb43135084943b7a))
|
|
12
|
+
|
|
13
|
+
### [2.134.5](https://github.com/railroadmedia/musora-content-services/compare/v2.134.4...v2.134.5) (2026-02-13)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
|
|
18
|
+
* **T3PS-2286:** lessons page lp lessons ([#813](https://github.com/railroadmedia/musora-content-services/issues/813)) ([254b744](https://github.com/railroadmedia/musora-content-services/commit/254b7443fdd96dd9868349ab43a36220d1257a78))
|
|
19
|
+
|
|
5
20
|
### [2.134.4](https://github.com/railroadmedia/musora-content-services/compare/v2.134.3...v2.134.4) (2026-02-13)
|
|
6
21
|
|
|
7
22
|
|
package/package.json
CHANGED
|
@@ -575,8 +575,11 @@ export async function onContentCompletedLearningPathActions(
|
|
|
575
575
|
export async function mapContentsThatWereLastProgressedFromMethod(objects: any[]) {
|
|
576
576
|
if (!objects || objects.length === 0) return objects
|
|
577
577
|
|
|
578
|
-
const
|
|
579
|
-
|
|
578
|
+
const validIds = objects
|
|
579
|
+
.filter((obj) => ['skill-pack-lesson', 'song-tutorial-lesson'].includes(obj.type))
|
|
580
|
+
.map((obj) => obj.id) as number[]
|
|
581
|
+
|
|
582
|
+
const trueIds = await getIdsWhereLastAccessedFromMethod(validIds)
|
|
580
583
|
|
|
581
584
|
if (trueIds.length === 0) return objects
|
|
582
585
|
|
package/src/services/content.js
CHANGED
|
@@ -438,12 +438,18 @@ export async function getScheduleContentRows(brand, contentRowId = null, { page
|
|
|
438
438
|
const pagination = isNewReleases ? { page: 1, limit: 30 } : { page: 1, limit: Number.MAX_SAFE_INTEGER };
|
|
439
439
|
const items = await section.fetchMethod(brand, pagination)
|
|
440
440
|
|
|
441
|
+
const content = await addContextToContent(() => items, {
|
|
442
|
+
addProgressPercentage: true,
|
|
443
|
+
addProgressStatus: true,
|
|
444
|
+
addNavigateTo: true,
|
|
445
|
+
})
|
|
446
|
+
|
|
441
447
|
return {
|
|
442
448
|
id,
|
|
443
449
|
title: section.title,
|
|
444
450
|
// TODO: Remove content after FE/MA updates the existing code to use items
|
|
445
|
-
content:
|
|
446
|
-
items:
|
|
451
|
+
content: content,
|
|
452
|
+
items: content
|
|
447
453
|
};
|
|
448
454
|
})
|
|
449
455
|
);
|
package/src/services/sanity.js
CHANGED
|
@@ -324,8 +324,12 @@ export async function fetchNewReleases(
|
|
|
324
324
|
const sortOrder = getSortOrder(sort, brand)
|
|
325
325
|
const now = getDateOnly()
|
|
326
326
|
const filter = `_type in ${typesString} && brand == '${brand}' && (status == 'published' && show_in_new_feed == true && published_on <= '${now}')`
|
|
327
|
-
|
|
327
|
+
|
|
328
|
+
let fields = await getFieldsForContentTypeWithFilteredChildren(null)
|
|
329
|
+
|
|
330
|
+
const entityFieldsString = `${fields}
|
|
328
331
|
"id": railcontent_id,
|
|
332
|
+
status,
|
|
329
333
|
title,
|
|
330
334
|
"image": thumbnail.asset->url,
|
|
331
335
|
"thumbnail": thumbnail.asset->url,
|
|
@@ -340,7 +344,7 @@ export async function fetchNewReleases(
|
|
|
340
344
|
web_url_path,
|
|
341
345
|
"permission_id": permission_v2,
|
|
342
346
|
`
|
|
343
|
-
const query = buildRawQuery(filter,
|
|
347
|
+
const query = buildRawQuery(filter, entityFieldsString, { sortOrder: sortOrder, start, end: end })
|
|
344
348
|
return fetchSanity(query, true)
|
|
345
349
|
}
|
|
346
350
|
|
|
@@ -364,6 +368,7 @@ export async function fetchUpcomingEvents(brand, { page = 1, limit = 10 } = {})
|
|
|
364
368
|
const end = start + limit
|
|
365
369
|
const fields = `
|
|
366
370
|
"id": railcontent_id,
|
|
371
|
+
status,
|
|
367
372
|
title,
|
|
368
373
|
"image": thumbnail.asset->url,
|
|
369
374
|
"thumbnail": thumbnail.asset->url,
|
|
@@ -417,6 +422,7 @@ export async function fetchScheduledReleases(brand, { page = 1, limit = 10 }) {
|
|
|
417
422
|
const end = start + limit
|
|
418
423
|
const query = `*[_type in [${typesString}] && brand == '${brand}' && status in ['published','scheduled'] && (!defined(live_event_end_time) || live_event_end_time < '${now}' ) && published_on > '${now}']{
|
|
419
424
|
"id": railcontent_id,
|
|
425
|
+
status,
|
|
420
426
|
title,
|
|
421
427
|
"image": thumbnail.asset->url,
|
|
422
428
|
"thumbnail": thumbnail.asset->url,
|
|
@@ -250,8 +250,9 @@ export default class ProgressRepository extends SyncRepository<ContentProgress>
|
|
|
250
250
|
Q.where('collection_id', COLLECTION_ID_SELF),
|
|
251
251
|
Q.where('last_interacted_a_la_carte', Q.notEq(null)),
|
|
252
252
|
),
|
|
253
|
-
Q.and( // learning paths (parents
|
|
253
|
+
Q.and( // learning paths (parents)
|
|
254
254
|
Q.where('collection_type', COLLECTION_TYPE.LEARNING_PATH),
|
|
255
|
+
Q.where('content_id', Q.eq(Q.column('collection_id')))
|
|
255
256
|
)
|
|
256
257
|
)
|
|
257
258
|
|