musora-content-services 1.0.169 → 1.0.171

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.0.171](https://github.com/railroadmedia/musora-content-services/compare/v1.0.170...v1.0.171) (2024-11-12)
6
+
7
+ ### [1.0.170](https://github.com/railroadmedia/musora-content-services/compare/v1.0.169...v1.0.170) (2024-11-12)
8
+
5
9
  ### [1.0.169](https://github.com/railroadmedia/musora-content-services/compare/v1.0.168...v1.0.169) (2024-11-11)
6
10
 
7
11
  ### [1.0.168](https://github.com/railroadmedia/musora-content-services/compare/v1.0.167...v1.0.168) (2024-11-11)
package/README.md CHANGED
File without changes
File without changes
package/docs/index.html CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/jest.config.js CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "musora-content-services",
3
- "version": "1.0.169",
3
+ "version": "1.0.171",
4
4
  "description": "A package for Musoras content services ",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
File without changes
File without changes
package/src/index.d.ts CHANGED
@@ -36,6 +36,7 @@ import {
36
36
  fetchChallengeIndexMetadata,
37
37
  fetchChallengeLessonData,
38
38
  fetchChallengeMetadata,
39
+ fetchChallengeUserActiveChallenges,
39
40
  fetchCompletedContent,
40
41
  fetchCompletedState,
41
42
  fetchContentInProgress,
@@ -151,6 +152,7 @@ declare module 'musora-content-services' {
151
152
  fetchChallengeLessonData,
152
153
  fetchChallengeMetadata,
153
154
  fetchChallengeOverview,
155
+ fetchChallengeUserActiveChallenges,
154
156
  fetchChildren,
155
157
  fetchCoachLessons,
156
158
  fetchCommentModContentData,
package/src/index.js CHANGED
@@ -36,6 +36,7 @@ import {
36
36
  fetchChallengeIndexMetadata,
37
37
  fetchChallengeLessonData,
38
38
  fetchChallengeMetadata,
39
+ fetchChallengeUserActiveChallenges,
39
40
  fetchCompletedContent,
40
41
  fetchCompletedState,
41
42
  fetchContentInProgress,
@@ -150,6 +151,7 @@ export {
150
151
  fetchChallengeLessonData,
151
152
  fetchChallengeMetadata,
152
153
  fetchChallengeOverview,
154
+ fetchChallengeUserActiveChallenges,
153
155
  fetchChildren,
154
156
  fetchCoachLessons,
155
157
  fetchCommentModContentData,
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -370,6 +370,17 @@ export async function fetchChallengeIndexMetadata(contentIds) {
370
370
  return await fetchHandler(url, 'get');
371
371
  }
372
372
 
373
+ /**
374
+ * Get active brand challenges for the authorized user
375
+ *
376
+ * @returns {Promise<any|null>}
377
+ */
378
+ export async function fetchChallengeUserActiveChallenges(brand = null) {
379
+ let brandParam = brand ? `?brand=${brand}` : '';
380
+ let url = `/challenges/user_active_challenges/get${brandParam}`;
381
+ return await fetchHandler(url, 'get');
382
+ }
383
+
373
384
  /**
374
385
  * Fetch all completed badges for the user ordered by completion date descending
375
386
  *
@@ -1448,7 +1448,7 @@ export async function fetchCommentModContentData(ids) {
1448
1448
  const query = await buildQuery(`railcontent_id in [${idsString}]`,
1449
1449
  {bypassPermissions: true},
1450
1450
  fields,
1451
- {});
1451
+ {end:50});
1452
1452
  let data = await fetchSanity(query, true);
1453
1453
  let mapped = {};
1454
1454
  data.forEach(function (content) {
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/test/log.js CHANGED
File without changes
File without changes
File without changes
File without changes