@stackfactor/client-api 1.1.3 → 1.1.5

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.
@@ -78,6 +78,39 @@ export const discardLearningContentChanges = (id, token) => {
78
78
  });
79
79
  };
80
80
 
81
+ /**
82
+ * Generate the learning activity content
83
+ * @param {String} skillId
84
+ * @param {String} microSkillId
85
+ * @param {List<String>} sections
86
+ */
87
+ export const generateLearningActivityContent = (
88
+ skillId,
89
+ microSkillId,
90
+ sections
91
+ ) => {
92
+ return new Promise(function (resolve, reject) {
93
+ const data = {
94
+ microSkillId: microSkillId,
95
+ sections: sections,
96
+ };
97
+ const request = client.get(
98
+ `api/v1/learningcontent/generatelearningactivitycontent/${skillId}`,
99
+ {
100
+ headers: { authorization: token },
101
+ data: data,
102
+ }
103
+ );
104
+ request
105
+ .then((response) => {
106
+ resolve(response.data);
107
+ })
108
+ .catch((error) => {
109
+ reject(error);
110
+ });
111
+ });
112
+ };
113
+
81
114
  /**
82
115
  * Get the learning content information by id
83
116
  * @param {String} id The id of the learning content
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stackfactor/client-api",
3
- "version": "1.1.3",
3
+ "version": "1.1.5",
4
4
  "description": "Node.js library for the StackFactor API",
5
5
  "main": "index.js",
6
6
  "exports": {