@stackfactor/client-api 1.1.152 → 1.1.153
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/dist/cjs/actionNotifications.js.map +1 -1
- package/dist/cjs/address.js.map +1 -1
- package/dist/cjs/aiAssistant.js.map +1 -1
- package/dist/cjs/avatar.js.map +1 -1
- package/dist/cjs/axiosClient.js.map +1 -1
- package/dist/cjs/config.js.map +1 -1
- package/dist/cjs/constants.js.map +1 -1
- package/dist/cjs/dashboard.js.map +1 -1
- package/dist/cjs/departmentTrainingPlans.d.ts +4 -4
- package/dist/cjs/departmentTrainingPlans.js +2 -2
- package/dist/cjs/departmentTrainingPlans.js.map +1 -1
- package/dist/cjs/groups.js.map +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/integration.d.ts +2 -2
- package/dist/cjs/integration.d.ts.map +1 -1
- package/dist/cjs/integration.js +1 -1
- package/dist/cjs/integration.js.map +1 -1
- package/dist/cjs/integrationConfiguration.d.ts +2 -2
- package/dist/cjs/integrationConfiguration.js +1 -1
- package/dist/cjs/integrationConfiguration.js.map +1 -1
- package/dist/cjs/integrations/contentGenerator.js.map +1 -1
- package/dist/cjs/learningContent.js.map +1 -1
- package/dist/cjs/learningPath.js.map +1 -1
- package/dist/cjs/logger.js.map +1 -1
- package/dist/cjs/microSkillsQuizes.js.map +1 -1
- package/dist/cjs/quotas.js.map +1 -1
- package/dist/cjs/role.js.map +1 -1
- package/dist/cjs/roleTemplate.js.map +1 -1
- package/dist/cjs/security.js.map +1 -1
- package/dist/cjs/skill.js.map +1 -1
- package/dist/cjs/skillAssessmentTestingSession.d.ts +2 -2
- package/dist/cjs/skillAssessmentTestingSession.d.ts.map +1 -1
- package/dist/cjs/skillAssessmentTestingSession.js +1 -1
- package/dist/cjs/skillAssessmentTestingSession.js.map +1 -1
- package/dist/cjs/skillAssessments.d.ts +2 -2
- package/dist/cjs/skillAssessments.js +1 -1
- package/dist/cjs/skillAssessments.js.map +1 -1
- package/dist/cjs/skillTemplate.js.map +1 -1
- package/dist/cjs/talentTransfromation.js.map +1 -1
- package/dist/cjs/teams.js.map +1 -1
- package/dist/cjs/tenants.d.ts +2 -2
- package/dist/cjs/tenants.d.ts.map +1 -1
- package/dist/cjs/tenants.js +1 -1
- package/dist/cjs/tenants.js.map +1 -1
- package/dist/cjs/trainingPlans.js.map +1 -1
- package/dist/cjs/trainingPlansProficiencyLevels.js.map +1 -1
- package/dist/cjs/userInformation.js.map +1 -1
- package/dist/cjs/users.d.ts +1 -1
- package/dist/cjs/users.d.ts.map +1 -1
- package/dist/cjs/users.js.map +1 -1
- package/dist/cjs/utils.js.map +1 -1
- package/dist/esm/actionNotifications.js.map +1 -1
- package/dist/esm/address.js.map +1 -1
- package/dist/esm/aiAssistant.js.map +1 -1
- package/dist/esm/avatar.js.map +1 -1
- package/dist/esm/axiosClient.js.map +1 -1
- package/dist/esm/config.js.map +1 -1
- package/dist/esm/constants.js.map +1 -1
- package/dist/esm/dashboard.js.map +1 -1
- package/dist/esm/departmentTrainingPlans.d.ts +4 -4
- package/dist/esm/departmentTrainingPlans.js +2 -2
- package/dist/esm/departmentTrainingPlans.js.map +1 -1
- package/dist/esm/groups.js.map +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/integration.d.ts +2 -2
- package/dist/esm/integration.d.ts.map +1 -1
- package/dist/esm/integration.js +1 -1
- package/dist/esm/integration.js.map +1 -1
- package/dist/esm/integrationConfiguration.d.ts +2 -2
- package/dist/esm/integrationConfiguration.js +1 -1
- package/dist/esm/integrationConfiguration.js.map +1 -1
- package/dist/esm/integrations/contentGenerator.js.map +1 -1
- package/dist/esm/learningContent.js.map +1 -1
- package/dist/esm/learningPath.js.map +1 -1
- package/dist/esm/logger.js.map +1 -1
- package/dist/esm/microSkillsQuizes.js.map +1 -1
- package/dist/esm/quotas.js.map +1 -1
- package/dist/esm/role.js.map +1 -1
- package/dist/esm/roleTemplate.js.map +1 -1
- package/dist/esm/security.js.map +1 -1
- package/dist/esm/skill.js.map +1 -1
- package/dist/esm/skillAssessmentTestingSession.d.ts +2 -2
- package/dist/esm/skillAssessmentTestingSession.d.ts.map +1 -1
- package/dist/esm/skillAssessmentTestingSession.js +1 -1
- package/dist/esm/skillAssessmentTestingSession.js.map +1 -1
- package/dist/esm/skillAssessments.d.ts +2 -2
- package/dist/esm/skillAssessments.js +1 -1
- package/dist/esm/skillAssessments.js.map +1 -1
- package/dist/esm/skillTemplate.js.map +1 -1
- package/dist/esm/talentTransfromation.js.map +1 -1
- package/dist/esm/teams.js.map +1 -1
- package/dist/esm/tenants.d.ts +2 -2
- package/dist/esm/tenants.d.ts.map +1 -1
- package/dist/esm/tenants.js +1 -1
- package/dist/esm/tenants.js.map +1 -1
- package/dist/esm/trainingPlans.js.map +1 -1
- package/dist/esm/trainingPlansProficiencyLevels.js.map +1 -1
- package/dist/esm/userInformation.js.map +1 -1
- package/dist/esm/users.d.ts +1 -1
- package/dist/esm/users.d.ts.map +1 -1
- package/dist/esm/users.js.map +1 -1
- package/dist/esm/utils.js.map +1 -1
- package/package.json +1 -1
- package/dist/actionNotifications.js +0 -73
- package/dist/address.js +0 -22
- package/dist/aiAssistant.js +0 -134
- package/dist/avatar.js +0 -32
- package/dist/axiosClient.js +0 -89
- package/dist/config.js +0 -63
- package/dist/constants.js +0 -94
- package/dist/dashboard.js +0 -74
- package/dist/departmentTrainingPlans.js +0 -154
- package/dist/exports.js +0 -77
- package/dist/groups.js +0 -273
- package/dist/index.js +0 -77
- package/dist/integration.js +0 -319
- package/dist/integrationConfiguration.js +0 -86
- package/dist/integrations/contentGenerator.js +0 -70
- package/dist/learningContent.js +0 -394
- package/dist/learningPath.js +0 -205
- package/dist/logger.js +0 -57
- package/dist/microSkillsQuizes.js +0 -53
- package/dist/quotas.js +0 -50
- package/dist/role.js +0 -363
- package/dist/roleTemplate.js +0 -236
- package/dist/security.js +0 -79
- package/dist/skill.js +0 -439
- package/dist/skillAssessmentTestingSession.js +0 -156
- package/dist/skillAssessments.js +0 -156
- package/dist/skillTemplate.js +0 -281
- package/dist/talentTransfromation.js +0 -100
- package/dist/teams.js +0 -252
- package/dist/tenants.js +0 -52
- package/dist/trainingPlans.js +0 -308
- package/dist/trainingPlansProficiencyLevels.js +0 -98
- package/dist/userInformation.js +0 -81
- package/dist/users.js +0 -694
- package/dist/utils.js +0 -65
package/dist/learningContent.js
DELETED
|
@@ -1,394 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const axiosClient_1 = require("./axiosClient");
|
|
4
|
-
/**
|
|
5
|
-
* Create learning content and set information
|
|
6
|
-
* @param {Object} data Learning content data
|
|
7
|
-
* @param {String} token Authorization token
|
|
8
|
-
* @returns {Promise<Object>} The created learning content
|
|
9
|
-
*/
|
|
10
|
-
const createLearningContent = (data, token) => {
|
|
11
|
-
return new Promise((resolve, reject) => {
|
|
12
|
-
const requestData = {
|
|
13
|
-
data: data,
|
|
14
|
-
};
|
|
15
|
-
let confirmationRequest = axiosClient_1.client.put("api/v1/learningcontent", requestData, {
|
|
16
|
-
headers: { authorization: token },
|
|
17
|
-
});
|
|
18
|
-
confirmationRequest
|
|
19
|
-
.then((response) => {
|
|
20
|
-
resolve(response.data);
|
|
21
|
-
})
|
|
22
|
-
.catch((error) => {
|
|
23
|
-
reject(error);
|
|
24
|
-
});
|
|
25
|
-
});
|
|
26
|
-
};
|
|
27
|
-
/**
|
|
28
|
-
* Delete learning content
|
|
29
|
-
* @param {String} id The id of the learning content to be deleted
|
|
30
|
-
* @param {String} comments The comments included with the deletion
|
|
31
|
-
* @param {String} token Authorization token
|
|
32
|
-
* @returns {Promise<Object>} The response from the server
|
|
33
|
-
*/
|
|
34
|
-
const deleteLearningContent = (id, comments, token) => {
|
|
35
|
-
const data = {
|
|
36
|
-
id: id,
|
|
37
|
-
};
|
|
38
|
-
if (comments)
|
|
39
|
-
data.comments = comments;
|
|
40
|
-
return new Promise((resolve, reject) => {
|
|
41
|
-
const request = axiosClient_1.client.delete(`api/v1/learningcontent/`, {
|
|
42
|
-
headers: { authorization: token },
|
|
43
|
-
data: data,
|
|
44
|
-
});
|
|
45
|
-
request
|
|
46
|
-
.then((response) => {
|
|
47
|
-
resolve(response.data);
|
|
48
|
-
})
|
|
49
|
-
.catch((error) => {
|
|
50
|
-
reject(error);
|
|
51
|
-
});
|
|
52
|
-
});
|
|
53
|
-
};
|
|
54
|
-
/**
|
|
55
|
-
* Discard the learning content draft changes
|
|
56
|
-
* @param {String} id The id of the learning content to be deleted
|
|
57
|
-
* @param {String} token Authorization token
|
|
58
|
-
* @returns {Promise<Object>} The response from the server
|
|
59
|
-
*/
|
|
60
|
-
const discardLearningContentChanges = (id, token) => {
|
|
61
|
-
return new Promise((resolve, reject) => {
|
|
62
|
-
const data = {};
|
|
63
|
-
const request = axiosClient_1.client.get(`api/v1/learningcontent/discard/${id}`, {
|
|
64
|
-
headers: { authorization: token },
|
|
65
|
-
data: data,
|
|
66
|
-
});
|
|
67
|
-
request
|
|
68
|
-
.then((response) => {
|
|
69
|
-
resolve(response.data);
|
|
70
|
-
})
|
|
71
|
-
.catch((error) => {
|
|
72
|
-
reject(error);
|
|
73
|
-
});
|
|
74
|
-
});
|
|
75
|
-
};
|
|
76
|
-
/**
|
|
77
|
-
* Generate the learning activity content
|
|
78
|
-
* @param {String} learningObjectives
|
|
79
|
-
* @param {String} skillId
|
|
80
|
-
* @param {String} microSkillId
|
|
81
|
-
* @param {Object} learningActivity
|
|
82
|
-
* @param {List<String>} otherLearningActivities
|
|
83
|
-
* @param {List<String>} sections
|
|
84
|
-
* @param {String} token
|
|
85
|
-
*/
|
|
86
|
-
const generateLearningActivityContent = (learningObjectives, skillId, microSkillId, learningActivity, otherLearningActivities, sections, token) => {
|
|
87
|
-
return new Promise((resolve, reject) => {
|
|
88
|
-
const requestData = {
|
|
89
|
-
learningObjectives: learningObjectives,
|
|
90
|
-
learningActivity: learningActivity,
|
|
91
|
-
microSkillId: microSkillId,
|
|
92
|
-
sections: sections,
|
|
93
|
-
};
|
|
94
|
-
if (otherLearningActivities) {
|
|
95
|
-
requestData.otherLearningActivities = otherLearningActivities;
|
|
96
|
-
}
|
|
97
|
-
const request = axiosClient_1.client.post(`api/v1/learningcontent/generatelearningactivitycontent/${skillId}`, requestData, {
|
|
98
|
-
headers: { authorization: token },
|
|
99
|
-
});
|
|
100
|
-
request
|
|
101
|
-
.then((response) => {
|
|
102
|
-
resolve(response.data);
|
|
103
|
-
})
|
|
104
|
-
.catch((error) => {
|
|
105
|
-
reject(error);
|
|
106
|
-
});
|
|
107
|
-
});
|
|
108
|
-
};
|
|
109
|
-
/**
|
|
110
|
-
* Generate micro skill test knowledge
|
|
111
|
-
* @param {String} microSkill
|
|
112
|
-
* @param {String} token
|
|
113
|
-
* @returns {Promise<Object>}
|
|
114
|
-
*/
|
|
115
|
-
const generateMicroSkillTestKnowledge = (microSkill, token) => {
|
|
116
|
-
return new Promise((resolve, reject) => {
|
|
117
|
-
let data = {
|
|
118
|
-
microSkill: microSkill,
|
|
119
|
-
};
|
|
120
|
-
let confirmationRequest = axiosClient_1.client.post(`api/v1/learningcontent/generatemicroskilltestknowledge`, data, {
|
|
121
|
-
headers: { authorization: token },
|
|
122
|
-
});
|
|
123
|
-
confirmationRequest
|
|
124
|
-
.then((response) => {
|
|
125
|
-
resolve(response.data);
|
|
126
|
-
})
|
|
127
|
-
.catch((error) => {
|
|
128
|
-
reject(error);
|
|
129
|
-
});
|
|
130
|
-
});
|
|
131
|
-
};
|
|
132
|
-
/**
|
|
133
|
-
* Get the learning content information by id
|
|
134
|
-
* @param {String} id The id of the learning content
|
|
135
|
-
* @param {String} version The version of the learning content
|
|
136
|
-
* @param {String} token Authorization token
|
|
137
|
-
* @returns {Promise<Object>} The response from the server
|
|
138
|
-
*/
|
|
139
|
-
const getLearningContentInformationById = (id, version, token) => {
|
|
140
|
-
return new Promise((resolve, reject) => {
|
|
141
|
-
let confirmationRequest = axiosClient_1.client.get(`api/v1/learningcontent/${id}/${version}`, {
|
|
142
|
-
headers: { authorization: token },
|
|
143
|
-
});
|
|
144
|
-
confirmationRequest
|
|
145
|
-
.then((response) => {
|
|
146
|
-
resolve(response.data);
|
|
147
|
-
})
|
|
148
|
-
.catch((error) => {
|
|
149
|
-
reject(error);
|
|
150
|
-
});
|
|
151
|
-
});
|
|
152
|
-
};
|
|
153
|
-
/**
|
|
154
|
-
* Get the list of available content types
|
|
155
|
-
* @param {Array<String>} filter The filter used to select the learning content
|
|
156
|
-
* @param {String} version The version to be retrieved
|
|
157
|
-
* @param {boolean} includeDeleted When true it will return the deleted records as well
|
|
158
|
-
* @param {String} token Authorization token
|
|
159
|
-
* @returns {Promise<Array<Object>>} The list of available content
|
|
160
|
-
*/
|
|
161
|
-
const getLearningContentList = (filter, version, includeDeleted, token) => {
|
|
162
|
-
return new Promise((resolve, reject) => {
|
|
163
|
-
const requestData = {
|
|
164
|
-
version: version,
|
|
165
|
-
includeDeleted: includeDeleted,
|
|
166
|
-
};
|
|
167
|
-
if (filter)
|
|
168
|
-
requestData.filter = filter;
|
|
169
|
-
let confirmationRequest = axiosClient_1.client.post(`api/v1/learningcontent`, requestData, {
|
|
170
|
-
headers: { authorization: token },
|
|
171
|
-
});
|
|
172
|
-
confirmationRequest
|
|
173
|
-
.then((response) => {
|
|
174
|
-
resolve(response.data);
|
|
175
|
-
})
|
|
176
|
-
.catch((error) => {
|
|
177
|
-
reject(error);
|
|
178
|
-
});
|
|
179
|
-
});
|
|
180
|
-
};
|
|
181
|
-
/**
|
|
182
|
-
* Migrate learning content storage
|
|
183
|
-
* @param {String} id The id of the content to be migrated
|
|
184
|
-
* @param {String} token Authorization token
|
|
185
|
-
* @returns {Promise<Object>} The response from the server
|
|
186
|
-
*/
|
|
187
|
-
const migrateLearningContentStorageType = (id, token) => {
|
|
188
|
-
return new Promise((resolve, reject) => {
|
|
189
|
-
let data = {};
|
|
190
|
-
let confirmationRequest = axiosClient_1.client.post(`api/v1/learningcontent/migratestorage/${id}`, data, {
|
|
191
|
-
headers: { authorization: token },
|
|
192
|
-
});
|
|
193
|
-
confirmationRequest
|
|
194
|
-
.then((response) => {
|
|
195
|
-
resolve(response.data);
|
|
196
|
-
})
|
|
197
|
-
.catch((error) => {
|
|
198
|
-
reject(error);
|
|
199
|
-
});
|
|
200
|
-
});
|
|
201
|
-
};
|
|
202
|
-
/**
|
|
203
|
-
* Publish learning content
|
|
204
|
-
* @param {String} id The id of the content to be published
|
|
205
|
-
* @param {String} comments The comments to be include with the request
|
|
206
|
-
* @param {String} token Authorization token
|
|
207
|
-
* @returns {Promise<Object>} The response from the server
|
|
208
|
-
*/
|
|
209
|
-
const publishLearningContent = (id, comments, token) => {
|
|
210
|
-
return new Promise((resolve, reject) => {
|
|
211
|
-
let data = {};
|
|
212
|
-
if (comments)
|
|
213
|
-
data.comments = comments;
|
|
214
|
-
let confirmationRequest = axiosClient_1.client.post(`api/v1/learningcontent/publish/${id}`, data, {
|
|
215
|
-
headers: { authorization: token },
|
|
216
|
-
});
|
|
217
|
-
confirmationRequest
|
|
218
|
-
.then((response) => {
|
|
219
|
-
resolve(response.data);
|
|
220
|
-
})
|
|
221
|
-
.catch((error) => {
|
|
222
|
-
reject(error);
|
|
223
|
-
});
|
|
224
|
-
});
|
|
225
|
-
};
|
|
226
|
-
/**
|
|
227
|
-
* Set learning content information
|
|
228
|
-
* @param {String} id The id of the learning content to be updated
|
|
229
|
-
* @param {Object} data Data used to update the learning content
|
|
230
|
-
* @param {String} token Authorization token
|
|
231
|
-
* @returns {Promise<Object>} The updated learning content
|
|
232
|
-
*/
|
|
233
|
-
const setLearningContentInformation = (id, data, token) => {
|
|
234
|
-
return new Promise((resolve, reject) => {
|
|
235
|
-
const requestData = {
|
|
236
|
-
data: data,
|
|
237
|
-
id: id,
|
|
238
|
-
};
|
|
239
|
-
let confirmationRequest = axiosClient_1.client.post(`api/v1/learningcontent/update`, requestData, {
|
|
240
|
-
headers: { authorization: token },
|
|
241
|
-
});
|
|
242
|
-
confirmationRequest
|
|
243
|
-
.then((response) => {
|
|
244
|
-
resolve(response.data);
|
|
245
|
-
})
|
|
246
|
-
.catch((error) => {
|
|
247
|
-
reject(error);
|
|
248
|
-
});
|
|
249
|
-
});
|
|
250
|
-
};
|
|
251
|
-
/**
|
|
252
|
-
* Set partial content information
|
|
253
|
-
* @param {String} id
|
|
254
|
-
* @param {Object} data
|
|
255
|
-
* @param {String} token
|
|
256
|
-
* @returns {Promise<Object>}
|
|
257
|
-
*/
|
|
258
|
-
const setLearningContentPartialContentInformation = (id, data, token) => {
|
|
259
|
-
return new Promise((resolve, reject) => {
|
|
260
|
-
const requestData = {
|
|
261
|
-
data: data,
|
|
262
|
-
id: id,
|
|
263
|
-
};
|
|
264
|
-
let confirmationRequest = axiosClient_1.client.post(`api/v1/learningcontent/updatepartialcontent/${id}`, requestData, {
|
|
265
|
-
headers: { authorization: token },
|
|
266
|
-
});
|
|
267
|
-
confirmationRequest
|
|
268
|
-
.then((response) => {
|
|
269
|
-
resolve(response.data);
|
|
270
|
-
})
|
|
271
|
-
.catch((error) => {
|
|
272
|
-
reject(error);
|
|
273
|
-
});
|
|
274
|
-
});
|
|
275
|
-
};
|
|
276
|
-
/**
|
|
277
|
-
* Set the content for a specific learning activity
|
|
278
|
-
* @param {String} id
|
|
279
|
-
* @param {String} learningcontentid
|
|
280
|
-
* @param {String} microSkillId
|
|
281
|
-
* @param {Object} data
|
|
282
|
-
* @param {String} token
|
|
283
|
-
* @returns {Promise<String>} OK word if the operation was successful
|
|
284
|
-
*/
|
|
285
|
-
const setLearningContentLearningContentInformation = (id, learningcontentid, microSkillId, data, token) => {
|
|
286
|
-
return new Promise((resolve, reject) => {
|
|
287
|
-
const requestData = {
|
|
288
|
-
data: data,
|
|
289
|
-
id: id,
|
|
290
|
-
learningcontentid: learningcontentid,
|
|
291
|
-
microSkillId: microSkillId,
|
|
292
|
-
};
|
|
293
|
-
let confirmationRequest = axiosClient_1.client.post(`api/v1/learningcontent/updatelearningcontent/`, requestData, {
|
|
294
|
-
headers: { authorization: token },
|
|
295
|
-
});
|
|
296
|
-
confirmationRequest
|
|
297
|
-
.then((response) => {
|
|
298
|
-
resolve(response.data);
|
|
299
|
-
})
|
|
300
|
-
.catch((error) => {
|
|
301
|
-
reject(error);
|
|
302
|
-
});
|
|
303
|
-
});
|
|
304
|
-
};
|
|
305
|
-
/**
|
|
306
|
-
* Set all the learning content for a specific micro skill
|
|
307
|
-
* @param {String} id
|
|
308
|
-
* @param {String} microskillid
|
|
309
|
-
* @param {Object} data
|
|
310
|
-
* @param {String} token
|
|
311
|
-
* @returns {Promise<String>} OK word if the operation was successful
|
|
312
|
-
*/
|
|
313
|
-
const setLearningContentLearningMicroSkillContentInformation = (id, microskillid, data, token) => {
|
|
314
|
-
return new Promise((resolve, reject) => {
|
|
315
|
-
const requestData = {
|
|
316
|
-
data: data,
|
|
317
|
-
};
|
|
318
|
-
let confirmationRequest = axiosClient_1.client.post(`api/v1/learningcontent/updatemicroskilllearningcontent/${id}/${microskillid}`, requestData, {
|
|
319
|
-
headers: { authorization: token },
|
|
320
|
-
});
|
|
321
|
-
confirmationRequest
|
|
322
|
-
.then((response) => {
|
|
323
|
-
resolve(response.data);
|
|
324
|
-
})
|
|
325
|
-
.catch((error) => {
|
|
326
|
-
reject(error);
|
|
327
|
-
});
|
|
328
|
-
});
|
|
329
|
-
};
|
|
330
|
-
/**
|
|
331
|
-
* Update the learning content tags
|
|
332
|
-
* @param {String} id The id of the learning to be updated
|
|
333
|
-
* @param {Object} tags Updated learning content tags
|
|
334
|
-
* @param {String} token Authorization token
|
|
335
|
-
*/
|
|
336
|
-
const setLearningContentTags = (id, tags, token) => {
|
|
337
|
-
return new Promise((resolve, reject) => {
|
|
338
|
-
const requestData = {
|
|
339
|
-
tags: tags,
|
|
340
|
-
id: id,
|
|
341
|
-
};
|
|
342
|
-
let confirmationRequest = axiosClient_1.client.post(`api/v1/learningcontent/updatetags/`, requestData, {
|
|
343
|
-
headers: { authorization: token },
|
|
344
|
-
});
|
|
345
|
-
confirmationRequest
|
|
346
|
-
.then((response) => {
|
|
347
|
-
resolve(response.data);
|
|
348
|
-
})
|
|
349
|
-
.catch((error) => {
|
|
350
|
-
reject(error);
|
|
351
|
-
});
|
|
352
|
-
});
|
|
353
|
-
};
|
|
354
|
-
/**
|
|
355
|
-
* Watch learning content
|
|
356
|
-
* @param {String} id The id of the learning content to be updated
|
|
357
|
-
* @param {Boolean} watch Set to true or false
|
|
358
|
-
* @param {String} token Authorization token
|
|
359
|
-
*/
|
|
360
|
-
const watchLearningContent = (id, watch, token) => {
|
|
361
|
-
return new Promise((resolve, reject) => {
|
|
362
|
-
const requestData = {
|
|
363
|
-
id: id,
|
|
364
|
-
watch: watch,
|
|
365
|
-
};
|
|
366
|
-
let confirmationRequest = axiosClient_1.client.post(`api/v1/learningcontent/watch`, requestData, {
|
|
367
|
-
headers: { authorization: token },
|
|
368
|
-
});
|
|
369
|
-
confirmationRequest
|
|
370
|
-
.then((response) => {
|
|
371
|
-
resolve(response.data);
|
|
372
|
-
})
|
|
373
|
-
.catch((error) => {
|
|
374
|
-
reject(error);
|
|
375
|
-
});
|
|
376
|
-
});
|
|
377
|
-
};
|
|
378
|
-
exports.default = {
|
|
379
|
-
createLearningContent,
|
|
380
|
-
deleteLearningContent,
|
|
381
|
-
discardLearningContentChanges,
|
|
382
|
-
getLearningContentInformationById,
|
|
383
|
-
generateLearningActivityContent,
|
|
384
|
-
generateMicroSkillTestKnowledge,
|
|
385
|
-
getLearningContentList,
|
|
386
|
-
migrateLearningContentStorageType,
|
|
387
|
-
publishLearningContent,
|
|
388
|
-
setLearningContentPartialContentInformation,
|
|
389
|
-
setLearningContentLearningContentInformation,
|
|
390
|
-
setLearningContentLearningMicroSkillContentInformation,
|
|
391
|
-
setLearningContentInformation,
|
|
392
|
-
setLearningContentTags,
|
|
393
|
-
watchLearningContent,
|
|
394
|
-
};
|
package/dist/learningPath.js
DELETED
|
@@ -1,205 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const axiosClient_1 = require("./axiosClient");
|
|
4
|
-
/**
|
|
5
|
-
* Create learning path and set information
|
|
6
|
-
* @param {Object} data
|
|
7
|
-
* @param {String} token Authorization token
|
|
8
|
-
* @returns {Promise<Object>}
|
|
9
|
-
*/
|
|
10
|
-
const createLearningPath = (data, token) => {
|
|
11
|
-
return new Promise((resolve, reject) => {
|
|
12
|
-
let confirmationRequest = axiosClient_1.client.put("api/v1/learningpaths", { data: data }, {
|
|
13
|
-
headers: { authorization: token },
|
|
14
|
-
});
|
|
15
|
-
confirmationRequest
|
|
16
|
-
.then((response) => {
|
|
17
|
-
resolve(response.data);
|
|
18
|
-
})
|
|
19
|
-
.catch((error) => {
|
|
20
|
-
reject(error);
|
|
21
|
-
});
|
|
22
|
-
});
|
|
23
|
-
};
|
|
24
|
-
/**
|
|
25
|
-
* Delete learning path
|
|
26
|
-
* @param {String} id The id of the template to be deleted
|
|
27
|
-
* @param {String} comments The comments for approver
|
|
28
|
-
* @param {String} token Authorization token
|
|
29
|
-
* @returns {Promise<Object>}
|
|
30
|
-
*/
|
|
31
|
-
const deleteLearningPath = (id, comments, token) => {
|
|
32
|
-
return new Promise((resolve, reject) => {
|
|
33
|
-
const data = {
|
|
34
|
-
id: id,
|
|
35
|
-
};
|
|
36
|
-
if (comments)
|
|
37
|
-
data.comments = comments;
|
|
38
|
-
const request = axiosClient_1.client.delete(`api/v1/learningpaths/`, {
|
|
39
|
-
headers: { authorization: token },
|
|
40
|
-
data: data,
|
|
41
|
-
});
|
|
42
|
-
request
|
|
43
|
-
.then((response) => {
|
|
44
|
-
resolve(response.data);
|
|
45
|
-
})
|
|
46
|
-
.catch((error) => {
|
|
47
|
-
reject(error);
|
|
48
|
-
});
|
|
49
|
-
});
|
|
50
|
-
};
|
|
51
|
-
/**
|
|
52
|
-
* Discard the training plan draft changes
|
|
53
|
-
* @param {String} id The id of the training plan to be deleted
|
|
54
|
-
* @param {String} token Authorization token
|
|
55
|
-
* @returns {Promise<Object>}
|
|
56
|
-
*/
|
|
57
|
-
const discardLearningPathChanges = (id, token) => {
|
|
58
|
-
return new Promise((resolve, reject) => {
|
|
59
|
-
const data = {};
|
|
60
|
-
const request = axiosClient_1.client.get(`api/v1/learningpaths/discard/${id}`, {
|
|
61
|
-
headers: { authorization: token },
|
|
62
|
-
data: data,
|
|
63
|
-
});
|
|
64
|
-
request
|
|
65
|
-
.then((response) => {
|
|
66
|
-
resolve(response.data);
|
|
67
|
-
})
|
|
68
|
-
.catch((error) => {
|
|
69
|
-
reject(error);
|
|
70
|
-
});
|
|
71
|
-
});
|
|
72
|
-
};
|
|
73
|
-
/**
|
|
74
|
-
* Get training plan template information
|
|
75
|
-
* @param {String} id The id of the template
|
|
76
|
-
* @param {String} version The version of the template
|
|
77
|
-
* @param {String} token Authorization token
|
|
78
|
-
* @returns {Promise<Object>}
|
|
79
|
-
*/
|
|
80
|
-
const getLearningPathInformationById = (id, version, token) => {
|
|
81
|
-
return new Promise((resolve, reject) => {
|
|
82
|
-
let confirmationRequest = axiosClient_1.client.get(`api/v1/learningpaths/${id}/${version}`, {
|
|
83
|
-
headers: { authorization: token },
|
|
84
|
-
});
|
|
85
|
-
confirmationRequest
|
|
86
|
-
.then((response) => {
|
|
87
|
-
resolve(response.data);
|
|
88
|
-
})
|
|
89
|
-
.catch((error) => {
|
|
90
|
-
reject(error);
|
|
91
|
-
});
|
|
92
|
-
});
|
|
93
|
-
};
|
|
94
|
-
/**
|
|
95
|
-
* Get learning path list
|
|
96
|
-
* @param {Array<String>} list The filter used to select the skill
|
|
97
|
-
* @param {String} version The version to be retrieved
|
|
98
|
-
* @param {boolean} includeDeleted When true it will return the deleted records as well
|
|
99
|
-
* @param {String} token Authorization token
|
|
100
|
-
* @returns {Promise<Array<Object>>} The list of available content
|
|
101
|
-
*/
|
|
102
|
-
const getLearningPathsList = (list, version, includeDeleted, token) => {
|
|
103
|
-
return new Promise((resolve, reject) => {
|
|
104
|
-
const requestData = {
|
|
105
|
-
version: version,
|
|
106
|
-
includeDeleted: includeDeleted,
|
|
107
|
-
};
|
|
108
|
-
if (list)
|
|
109
|
-
requestData.list = list;
|
|
110
|
-
let confirmationRequest = axiosClient_1.client.post(`api/v1/learningpaths`, requestData, {
|
|
111
|
-
headers: { authorization: token },
|
|
112
|
-
});
|
|
113
|
-
confirmationRequest
|
|
114
|
-
.then((response) => {
|
|
115
|
-
resolve(response.data);
|
|
116
|
-
})
|
|
117
|
-
.catch((error) => {
|
|
118
|
-
reject(error);
|
|
119
|
-
});
|
|
120
|
-
});
|
|
121
|
-
};
|
|
122
|
-
/**
|
|
123
|
-
* Publish training plan template
|
|
124
|
-
* @param {String} id The id of the template to be published
|
|
125
|
-
* @param {String} comments The comments to be include with the request
|
|
126
|
-
* @param {String} token Authorization token
|
|
127
|
-
* @returns {Promise<Object>}
|
|
128
|
-
*/
|
|
129
|
-
const publishLearningPath = (id, comments, token) => {
|
|
130
|
-
return new Promise((resolve, reject) => {
|
|
131
|
-
let data = {};
|
|
132
|
-
if (comments)
|
|
133
|
-
data.comments = comments;
|
|
134
|
-
let confirmationRequest = axiosClient_1.client.post(`api/v1/learningpaths/publish/${id}`, data, {
|
|
135
|
-
headers: { authorization: token },
|
|
136
|
-
});
|
|
137
|
-
confirmationRequest
|
|
138
|
-
.then((response) => {
|
|
139
|
-
resolve(response.data);
|
|
140
|
-
})
|
|
141
|
-
.catch((error) => {
|
|
142
|
-
reject(error);
|
|
143
|
-
});
|
|
144
|
-
});
|
|
145
|
-
};
|
|
146
|
-
/**
|
|
147
|
-
* Set learning path profile information
|
|
148
|
-
* @param {String} id The id of the template to be updated
|
|
149
|
-
* @param {Object} data Data used to update the template
|
|
150
|
-
* @param {String} token Authorization token
|
|
151
|
-
* @returns {Promise<Object>}
|
|
152
|
-
*/
|
|
153
|
-
const setLearningPathInformation = (id, data, token) => {
|
|
154
|
-
return new Promise((resolve, reject) => {
|
|
155
|
-
const requestData = {
|
|
156
|
-
data: data,
|
|
157
|
-
id: id,
|
|
158
|
-
};
|
|
159
|
-
let confirmationRequest = axiosClient_1.client.post(`api/v1/learningpaths/update/`, requestData, {
|
|
160
|
-
headers: { authorization: token },
|
|
161
|
-
});
|
|
162
|
-
confirmationRequest
|
|
163
|
-
.then((response) => {
|
|
164
|
-
resolve(response.data);
|
|
165
|
-
})
|
|
166
|
-
.catch((error) => {
|
|
167
|
-
reject(error);
|
|
168
|
-
});
|
|
169
|
-
});
|
|
170
|
-
};
|
|
171
|
-
/**
|
|
172
|
-
* Update learning path tags
|
|
173
|
-
* @param {String} id The id of the template to be updated
|
|
174
|
-
* @param {Object} tags The updated tags
|
|
175
|
-
* @param {String} token Authorization token
|
|
176
|
-
* @returns {Promise<Object>}
|
|
177
|
-
*/
|
|
178
|
-
const setLearningPathTags = (id, tags, token) => {
|
|
179
|
-
return new Promise((resolve, reject) => {
|
|
180
|
-
const requestData = {
|
|
181
|
-
tags: tags,
|
|
182
|
-
id: id,
|
|
183
|
-
};
|
|
184
|
-
let confirmationRequest = axiosClient_1.client.post(`api/v1/learningpaths/updatetags/`, requestData, {
|
|
185
|
-
headers: { authorization: token },
|
|
186
|
-
});
|
|
187
|
-
confirmationRequest
|
|
188
|
-
.then((response) => {
|
|
189
|
-
resolve(response.data);
|
|
190
|
-
})
|
|
191
|
-
.catch((error) => {
|
|
192
|
-
reject(error);
|
|
193
|
-
});
|
|
194
|
-
});
|
|
195
|
-
};
|
|
196
|
-
exports.default = {
|
|
197
|
-
createLearningPath,
|
|
198
|
-
deleteLearningPath,
|
|
199
|
-
discardLearningPathChanges,
|
|
200
|
-
getLearningPathInformationById,
|
|
201
|
-
getLearningPathsList,
|
|
202
|
-
publishLearningPath,
|
|
203
|
-
setLearningPathInformation,
|
|
204
|
-
setLearningPathTags,
|
|
205
|
-
};
|
package/dist/logger.js
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const axiosClient_1 = require("./axiosClient");
|
|
4
|
-
/**
|
|
5
|
-
* Create comments for a specified element id
|
|
6
|
-
* @param {String} elementId
|
|
7
|
-
* @param {String} elementType
|
|
8
|
-
* @param {Object} data
|
|
9
|
-
* @param {String} token Authorization token
|
|
10
|
-
* @returns {Promise<Object>}
|
|
11
|
-
*/
|
|
12
|
-
const comments = (elementId, elementType, data, token) => {
|
|
13
|
-
return new Promise((resolve, reject) => {
|
|
14
|
-
let confirmationRequest = axiosClient_1.client.post("api/v1/logger/comments/", {
|
|
15
|
-
data: data,
|
|
16
|
-
elementId: elementId,
|
|
17
|
-
elementType: elementType,
|
|
18
|
-
}, {
|
|
19
|
-
headers: { authorization: token },
|
|
20
|
-
});
|
|
21
|
-
confirmationRequest
|
|
22
|
-
.then((response) => {
|
|
23
|
-
resolve(response.data);
|
|
24
|
-
})
|
|
25
|
-
.catch((error) => {
|
|
26
|
-
reject(error);
|
|
27
|
-
});
|
|
28
|
-
});
|
|
29
|
-
};
|
|
30
|
-
/**
|
|
31
|
-
* Get the list of logger entries for selected element
|
|
32
|
-
* @param {String} elementId
|
|
33
|
-
* @param {Number} page The results page
|
|
34
|
-
* @param {Number} elementsPerPage The number of elements per page
|
|
35
|
-
* @param {String} token
|
|
36
|
-
* @returns {Promise<Object>}
|
|
37
|
-
*/
|
|
38
|
-
const getListByElementId = (elementId, page, elementsPerPage, token) => {
|
|
39
|
-
return new Promise((resolve, reject) => {
|
|
40
|
-
let data = {};
|
|
41
|
-
if (elementsPerPage !== null)
|
|
42
|
-
data.elementsPerPage = elementsPerPage;
|
|
43
|
-
if (page !== null)
|
|
44
|
-
data.page = page;
|
|
45
|
-
const getTokensRequest = axiosClient_1.client.post(`api/v1/logger/${elementId}`, data, {
|
|
46
|
-
headers: { authorization: token },
|
|
47
|
-
});
|
|
48
|
-
getTokensRequest
|
|
49
|
-
.then((result) => {
|
|
50
|
-
resolve(result.data);
|
|
51
|
-
})
|
|
52
|
-
.catch((error) => {
|
|
53
|
-
reject(error);
|
|
54
|
-
});
|
|
55
|
-
});
|
|
56
|
-
};
|
|
57
|
-
exports.default = { comments, getListByElementId };
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const axiosClient_1 = require("./axiosClient");
|
|
4
|
-
/**
|
|
5
|
-
* Get responses for a microskill quiz
|
|
6
|
-
* @param {String} learningContentId
|
|
7
|
-
* @param {String} microSkillId
|
|
8
|
-
* @param {String} token
|
|
9
|
-
* @returns {Promise<Object>}
|
|
10
|
-
*/
|
|
11
|
-
const getResponses = (learningContentId, microSkillId, token) => {
|
|
12
|
-
return new Promise((resolve, reject) => {
|
|
13
|
-
let confirmationRequest = axiosClient_1.client.get(`api/v1/microskillsresponses/${learningContentId}/${microSkillId}`, {
|
|
14
|
-
headers: { authorization: token },
|
|
15
|
-
});
|
|
16
|
-
confirmationRequest
|
|
17
|
-
.then((response) => {
|
|
18
|
-
resolve(response.data);
|
|
19
|
-
})
|
|
20
|
-
.catch((error) => {
|
|
21
|
-
reject(error);
|
|
22
|
-
});
|
|
23
|
-
});
|
|
24
|
-
};
|
|
25
|
-
/**
|
|
26
|
-
* Save responses for a microskill quiz
|
|
27
|
-
* @param {String} learningContentId
|
|
28
|
-
* @param {String} microSkillId
|
|
29
|
-
* @param {Array<Object>} responses
|
|
30
|
-
* @param {String} token Authorization token
|
|
31
|
-
* @returns {Promise<Object>}
|
|
32
|
-
*/
|
|
33
|
-
const saveResponses = (learningContentId, microSkillId, responses, token) => {
|
|
34
|
-
return new Promise((resolve, reject) => {
|
|
35
|
-
let data = {
|
|
36
|
-
responses: responses,
|
|
37
|
-
};
|
|
38
|
-
let confirmationRequest = axiosClient_1.client.post(`api/v1/microskillsresponses/${learningContentId}/${microSkillId}`, data, {
|
|
39
|
-
headers: { authorization: token },
|
|
40
|
-
});
|
|
41
|
-
confirmationRequest
|
|
42
|
-
.then((response) => {
|
|
43
|
-
resolve(response.data);
|
|
44
|
-
})
|
|
45
|
-
.catch((error) => {
|
|
46
|
-
reject(error);
|
|
47
|
-
});
|
|
48
|
-
});
|
|
49
|
-
};
|
|
50
|
-
exports.default = {
|
|
51
|
-
getResponses,
|
|
52
|
-
saveResponses,
|
|
53
|
-
};
|