musora-content-services 2.23.0 → 2.23.1

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,8 @@
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.23.1](https://github.com/railroadmedia/musora-content-services/compare/v2.23.0...v2.23.1) (2025-07-16)
6
+
5
7
  ## [2.23.0](https://github.com/railroadmedia/musora-content-services/compare/v2.22.0...v2.23.0) (2025-07-16)
6
8
 
7
9
 
package/link_mcs.sh CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "musora-content-services",
3
- "version": "2.23.0",
3
+ "version": "2.23.1",
4
4
  "description": "A package for Musoras content services ",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -213,8 +213,15 @@ export const recentTypes = {
213
213
  }
214
214
 
215
215
  export let contentTypeConfig = {
216
+ 'tab-data': {
217
+ fields: [
218
+ 'enrollment_start_time',
219
+ 'enrollment_end_time',
220
+ ],
221
+ },
216
222
  'progress-tracker': {
217
- fields: ['"parent_content_data": parent_content_data[].id',
223
+ fields: [
224
+ '"parent_content_data": parent_content_data[].id',
218
225
  '"badge" : badge.asset->url',
219
226
  '"lessons": child[]->{' +
220
227
  '"id": railcontent_id,' +
@@ -230,7 +237,7 @@ export let contentTypeConfig = {
230
237
  '"brand":brand},' +
231
238
  '"thumbnail": thumbnail.asset->url,' +
232
239
  'published_on,' +
233
- '}'
240
+ '}',
234
241
  ],
235
242
 
236
243
 
File without changes
@@ -551,7 +551,7 @@ export async function fetchContentRows(brand, pageName, contentRowSlug)
551
551
  brand,
552
552
  name,
553
553
  'slug': slug.current,
554
- 'content': content[]->{ ${getFieldsForContentType()} }
554
+ 'content': content[]->{ ${getFieldsForContentType('tab-data')} }
555
555
  }`, true)
556
556
  }
557
557
 
@@ -2358,13 +2358,12 @@ export async function fetchTabData(
2358
2358
 
2359
2359
  // limits the results to supplied progressIds for started & completed filters
2360
2360
  const progressFilter = await getProgressFilter(progress, progressIds)
2361
- if(sort == "recommended"){
2361
+ if (sort === "recommended"){
2362
2362
  progressIds = await recommendations(brand);
2363
2363
  withoutPagination = true;
2364
2364
  }
2365
2365
 
2366
- let fields = DEFAULT_FIELDS
2367
- let fieldsString = fields.join(',')
2366
+ const fieldsString = getFieldsForContentType('tab-data');
2368
2367
 
2369
2368
  // Determine the group by clause
2370
2369
  let query = ''
@@ -2374,7 +2373,7 @@ export async function fetchTabData(
2374
2373
  filter = `brand == "${brand}" ${includedFieldsFilter} ${progressFilter}`
2375
2374
  const childrenFilter = await new FilterBuilder(``, { isChildrenFilter: true }).buildFilter()
2376
2375
  entityFieldsString =
2377
- ` ${fieldsString},
2376
+ ` ${fieldsString}
2378
2377
  'children': child[${childrenFilter}]->{'id': railcontent_id},
2379
2378
  'lesson_count': coalesce(count(child[${childrenFilter}]->), 0),
2380
2379
  'length_in_seconds': coalesce(
@@ -2385,7 +2384,6 @@ export async function fetchTabData(
2385
2384
  ),
2386
2385
  length_in_seconds
2387
2386
  ),`
2388
-
2389
2387
  const filterWithRestrictions = await new FilterBuilder(filter, {}).buildFilter()
2390
2388
  query = buildEntityAndTotalQuery(filterWithRestrictions, entityFieldsString, {
2391
2389
  sortOrder: sortOrder,