@stackfactor/client-api 1.1.3 → 1.1.4

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