musora-content-services 2.102.2 → 2.102.3

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,13 @@
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.102.3](https://github.com/railroadmedia/musora-content-services/compare/v2.102.2...v2.102.3) (2025-12-11)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * **agi:** rollback total on fetchAGILessons ([a02be05](https://github.com/railroadmedia/musora-content-services/commit/a02be0592dd8b195da7971f13ea062674510c8bb))
11
+
5
12
  ### [2.102.2](https://github.com/railroadmedia/musora-content-services/compare/v2.102.1...v2.102.2) (2025-12-11)
6
13
 
7
14
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "musora-content-services",
3
- "version": "2.102.2",
3
+ "version": "2.102.3",
4
4
  "description": "A package for Musoras content services ",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -149,7 +149,7 @@ export async function fetchGenreLessons(
149
149
  f.referencesIDWithFilter(f.combine(f.type('genre'), f.slug(slug)))
150
150
  )
151
151
 
152
- const q = query()
152
+ const data = query()
153
153
  .and(f.brand(brand))
154
154
  .and(f.searchMatch('title', searchTerm))
155
155
  .and(f.includedFields(includedFields))
@@ -160,5 +160,12 @@ export async function fetchGenreLessons(
160
160
  .select(getFieldsForContentType(contentType) as string)
161
161
  .build()
162
162
 
163
+ const total = query().and(restrictions).build()
164
+
165
+ const q = `{
166
+ "data": ${data},
167
+ "total": count(${total})
168
+ }`
169
+
163
170
  return fetchSanity(q, true, { processNeedAccess: false, processPageType: false })
164
171
  }
@@ -148,7 +148,7 @@ export async function fetchInstructorLessons(
148
148
  f.referencesIDWithFilter(f.combine(f.type('instructor'), f.slug(slug)))
149
149
  )
150
150
 
151
- const q = query()
151
+ const data = query()
152
152
  .and(f.brand(brand))
153
153
  .and(f.searchMatch('title', searchTerm))
154
154
  .and(f.includedFields(includedFields))
@@ -158,5 +158,12 @@ export async function fetchInstructorLessons(
158
158
  .select(getFieldsForContentType() as string)
159
159
  .build()
160
160
 
161
+ const total = query().and(restrictions).build()
162
+
163
+ const q = `{
164
+ "data": ${data},
165
+ "total": count(${total})
166
+ }`
167
+
161
168
  return fetchSanity(q, true, { processNeedAccess: false, processPageType: false })
162
169
  }