@stackfactor/client-api 1.1.27 → 1.1.29
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/lib/constants.js +2 -0
- package/lib/learningContent.js +29 -0
- package/lib/microSkillsQuizes.js +0 -29
- package/package.json +1 -1
package/lib/constants.js
CHANGED
|
@@ -83,6 +83,7 @@ const PERMISSIONS = {
|
|
|
83
83
|
BETA_TESTER: "5fac210b6c8f874bd7137b97",
|
|
84
84
|
MANAGE_BILLING: "5e1570cd03f676213bfdcd08",
|
|
85
85
|
MANAGE_CONTENT_PROVIDERS: "5f0fa12f16a720fde58ea820",
|
|
86
|
+
MANAGE_EXECUTIVE: "5fac2111b7e49e10c779b4a5",
|
|
86
87
|
MANAGE_GROUPS: "5dd612fe59e518ac87b8cf8e",
|
|
87
88
|
MANAGE_LEARNING_CONTENT: "64f54d20b7e49e10c779b4a6",
|
|
88
89
|
MANAGE_LEARNING_PATHS: "5dd61305a73c68b44c3f0827",
|
|
@@ -104,6 +105,7 @@ const PERMISSION_DESCRIPTIONS = {
|
|
|
104
105
|
"5fac210560e43de7c6b4a208": "Author content",
|
|
105
106
|
"5e1570cd03f676213bfdcd08": "Manage billing",
|
|
106
107
|
"5f0fa12f16a720fde58ea820": "Manage content providers",
|
|
108
|
+
"5fac2111b7e49e10c779b4a5": "Manage executive",
|
|
107
109
|
"5dd612fe59e518ac87b8cf8e": "Manage groups",
|
|
108
110
|
"64f54d20b7e49e10c779b4a6": "Manage learning content",
|
|
109
111
|
"5dd61305a73c68b44c3f0827": "Manage learning paths",
|
package/lib/learningContent.js
CHANGED
|
@@ -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,
|
package/lib/microSkillsQuizes.js
CHANGED
|
@@ -1,33 +1,5 @@
|
|
|
1
1
|
import { client } from "./axiosClient.js";
|
|
2
2
|
|
|
3
|
-
/**
|
|
4
|
-
* Get responses for a microskill quiz
|
|
5
|
-
* @param {String} microSkill
|
|
6
|
-
* @param {String} token
|
|
7
|
-
* @returns {Promise}
|
|
8
|
-
*/
|
|
9
|
-
const generateQuestions = (microSkill, token) => {
|
|
10
|
-
return new Promise(function (resolve, reject) {
|
|
11
|
-
let data = {
|
|
12
|
-
microSkill: microSkill,
|
|
13
|
-
};
|
|
14
|
-
let confirmationRequest = client.post(
|
|
15
|
-
`api/v1/microskillsresponses/generatequestions`,
|
|
16
|
-
data,
|
|
17
|
-
{
|
|
18
|
-
headers: { authorization: token },
|
|
19
|
-
}
|
|
20
|
-
);
|
|
21
|
-
confirmationRequest
|
|
22
|
-
.then((response) => {
|
|
23
|
-
resolve(response.data);
|
|
24
|
-
})
|
|
25
|
-
.catch((error) => {
|
|
26
|
-
reject(error);
|
|
27
|
-
});
|
|
28
|
-
});
|
|
29
|
-
};
|
|
30
|
-
|
|
31
3
|
/**
|
|
32
4
|
* Get responses for a microskill quiz
|
|
33
5
|
* @param {String} learningContentId
|
|
@@ -84,7 +56,6 @@ const saveResponses = (learningContentId, microSkillId, responses, token) => {
|
|
|
84
56
|
};
|
|
85
57
|
|
|
86
58
|
const microSkillsQuizes = {
|
|
87
|
-
generateQuestions,
|
|
88
59
|
getResponses,
|
|
89
60
|
saveResponses,
|
|
90
61
|
};
|