@stackfactor/client-api 1.1.126 → 1.1.128
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/learningContent.js +27 -0
- package/lib/skill.js +3 -2
- package/package.json +1 -1
package/lib/learningContent.js
CHANGED
|
@@ -211,6 +211,32 @@ const getLearningContentList = (filter, version, includeDeleted, token) => {
|
|
|
211
211
|
});
|
|
212
212
|
};
|
|
213
213
|
|
|
214
|
+
/**
|
|
215
|
+
* Migrate learning content storage
|
|
216
|
+
* @param {String} id The id of the content to be migrated
|
|
217
|
+
* @param {String} token Authorization token
|
|
218
|
+
* @returns {Promise<Object>} The response from the server
|
|
219
|
+
*/
|
|
220
|
+
const migrateLearningContentStorageType = (id, token) => {
|
|
221
|
+
return new Promise(function (resolve, reject) {
|
|
222
|
+
let data = {};
|
|
223
|
+
let confirmationRequest = client.post(
|
|
224
|
+
`api/v1/learningcontent/migratestorage/${id}`,
|
|
225
|
+
data,
|
|
226
|
+
{
|
|
227
|
+
headers: { authorization: token },
|
|
228
|
+
}
|
|
229
|
+
);
|
|
230
|
+
confirmationRequest
|
|
231
|
+
.then((response) => {
|
|
232
|
+
resolve(response.data);
|
|
233
|
+
})
|
|
234
|
+
.catch((error) => {
|
|
235
|
+
reject(error);
|
|
236
|
+
});
|
|
237
|
+
});
|
|
238
|
+
};
|
|
239
|
+
|
|
214
240
|
/**
|
|
215
241
|
* Publish learning content
|
|
216
242
|
* @param {String} id The id of the content to be published
|
|
@@ -441,6 +467,7 @@ export default {
|
|
|
441
467
|
generateLearningActivityContent,
|
|
442
468
|
generateMicroSkillTestKnowledge,
|
|
443
469
|
getLearningContentList,
|
|
470
|
+
migrateLearningContentStorageType,
|
|
444
471
|
publishLearningContent,
|
|
445
472
|
setLearningContentPartialContentInformation,
|
|
446
473
|
setLearningContentLearningContentInformation,
|
package/lib/skill.js
CHANGED
|
@@ -130,12 +130,13 @@ const getImportedSkillTemplates = (token) => {
|
|
|
130
130
|
* Get the skill related roles
|
|
131
131
|
* @param {String} id
|
|
132
132
|
* @param {String} token
|
|
133
|
+
* @param {Boolean} includeRoleInformation
|
|
133
134
|
* @returns {Promise}
|
|
134
135
|
*/
|
|
135
|
-
const getSkillRelatedRoles = (id, token) => {
|
|
136
|
+
const getSkillRelatedRoles = (id, token, includeRoleInformation = false) => {
|
|
136
137
|
return new Promise(function (resolve, reject) {
|
|
137
138
|
let confirmationRequest = client.get(
|
|
138
|
-
`api/v1/skills/getskillrelatedroles/${id}`,
|
|
139
|
+
`api/v1/skills/getskillrelatedroles/${id}/${includeRoleInformation}`,
|
|
139
140
|
{
|
|
140
141
|
headers: { authorization: token },
|
|
141
142
|
}
|