musora-content-services 2.66.0 → 2.67.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.
@@ -0,0 +1,8 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Bash(rg:*)"
5
+ ],
6
+ "deny": []
7
+ }
8
+ }
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.67.0](https://github.com/railroadmedia/musora-content-services/compare/v2.66.0...v2.67.0) (2025-11-04)
6
+
7
+
8
+ ### Features
9
+
10
+ * **BEH-1377:** active path ([#533](https://github.com/railroadmedia/musora-content-services/issues/533)) ([1135271](https://github.com/railroadmedia/musora-content-services/commit/11352714d4228e21f5ac2974d59e6c2805fe900f))
11
+
5
12
  ## [2.66.0](https://github.com/railroadmedia/musora-content-services/compare/v2.65.0...v2.66.0) (2025-11-03)
6
13
 
7
14
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "musora-content-services",
3
- "version": "2.66.0",
3
+ "version": "2.67.0",
4
4
  "description": "A package for Musoras content services ",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
package/src/index.d.ts CHANGED
@@ -13,7 +13,9 @@ import {
13
13
  } from './services/content-org/guided-courses.ts';
14
14
 
15
15
  import {
16
+ getActivePath,
16
17
  getDailySession,
18
+ updateActivePath,
17
19
  updateDailySession
18
20
  } from './services/content-org/learning-paths.ts';
19
21
 
@@ -514,6 +516,7 @@ declare module 'musora-content-services' {
514
516
  findIncompleteLesson,
515
517
  followThread,
516
518
  getActiveDiscussions,
519
+ getActivePath,
517
520
  getAllCompleted,
518
521
  getAllStarted,
519
522
  getAllStartedOrCompleted,
@@ -636,6 +639,7 @@ declare module 'musora-content-services' {
636
639
  unlockThread,
637
640
  unpinProgressRow,
638
641
  unpinThread,
642
+ updateActivePath,
639
643
  updateDailySession,
640
644
  updateDisplayName,
641
645
  updateForumCategory,
package/src/index.js CHANGED
@@ -13,7 +13,9 @@ import {
13
13
  } from './services/content-org/guided-courses.ts';
14
14
 
15
15
  import {
16
+ getActivePath,
16
17
  getDailySession,
18
+ updateActivePath,
17
19
  updateDailySession
18
20
  } from './services/content-org/learning-paths.ts';
19
21
 
@@ -513,6 +515,7 @@ export {
513
515
  findIncompleteLesson,
514
516
  followThread,
515
517
  getActiveDiscussions,
518
+ getActivePath,
516
519
  getAllCompleted,
517
520
  getAllStarted,
518
521
  getAllStartedOrCompleted,
@@ -635,6 +638,7 @@ export {
635
638
  unlockThread,
636
639
  unpinProgressRow,
637
640
  unpinThread,
641
+ updateActivePath,
638
642
  updateDailySession,
639
643
  updateDisplayName,
640
644
  updateForumCategory,
@@ -29,3 +29,23 @@ export async function updateDailySession(brand: string, userDate: Date, keepFirs
29
29
  const body = { brand: brand, userDate: stringDate, keepFirstLearningPath: keepFirstLearningPath }
30
30
  return await fetchHandler(url, 'POST', null, body)
31
31
  }
32
+
33
+ /**
34
+ * Gets user's active learning path.
35
+ * @param brand
36
+ */
37
+ export async function getActivePath(brand: string) {
38
+ const url: string = `${BASE_PATH}/v1/user/learning-paths/active-path/get-or-create`
39
+ const body = { brand: brand }
40
+ return await fetchHandler(url, 'POST', null, body)
41
+ }
42
+
43
+ /**
44
+ * Updates user's active learning path.
45
+ * @param brand
46
+ */
47
+ export async function updateActivePath(brand: string) {
48
+ const url: string = `${BASE_PATH}/v1/user/learning-paths/active-path/update`
49
+ const body = { brand: brand }
50
+ return await fetchHandler(url, 'POST', null, body)
51
+ }