@stackfactor/client-api 1.1.26 → 1.1.28

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.
@@ -116,6 +116,34 @@ export const generateLearningActivityContent = (
116
116
  });
117
117
  };
118
118
 
119
+ /**
120
+ * Generate micro skill test knowledge
121
+ * @param {String} microSkill
122
+ * @param {String} token
123
+ * @returns {Promise}
124
+ */
125
+ const generateMicroSkillTestKnowledge = (microSkill, token) => {
126
+ return new Promise(function (resolve, reject) {
127
+ let data = {
128
+ microSkill: microSkill,
129
+ };
130
+ let confirmationRequest = client.post(
131
+ `api/v1/learningcontent/generatemicroskilltestknowledge`,
132
+ data,
133
+ {
134
+ headers: { authorization: token },
135
+ }
136
+ );
137
+ confirmationRequest
138
+ .then((response) => {
139
+ resolve(response.data);
140
+ })
141
+ .catch((error) => {
142
+ reject(error);
143
+ });
144
+ });
145
+ };
146
+
119
147
  /**
120
148
  * Get the learning content information by id
121
149
  * @param {String} id The id of the learning content
@@ -371,6 +399,7 @@ const learningContent = {
371
399
  discardLearningContentChanges,
372
400
  getLearningContentInformationById,
373
401
  generateLearningActivityContent,
402
+ generateMicroSkillTestKnowledge,
374
403
  getLearningContentList,
375
404
  publishLearningContent,
376
405
  setLearningContentLearningContentInformation,
@@ -33,12 +33,7 @@ const getResponses = (learningContentId, microSkillId, token) => {
33
33
  * @param {String} token Authorization token
34
34
  * @returns {Promise}
35
35
  */
36
- export const saveResponses = (
37
- learningContentId,
38
- microSkillId,
39
- responses,
40
- token
41
- ) => {
36
+ const saveResponses = (learningContentId, microSkillId, responses, token) => {
42
37
  return new Promise(function (resolve, reject) {
43
38
  let data = {
44
39
  responses: responses,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stackfactor/client-api",
3
- "version": "1.1.26",
3
+ "version": "1.1.28",
4
4
  "description": "Node.js library for the StackFactor API",
5
5
  "main": "index.js",
6
6
  "exports": {