@stackfactor/client-api 1.1.148 → 1.1.150
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/actionNotifications.js +73 -0
- package/dist/address.js +22 -0
- package/dist/aiAssistant.js +134 -0
- package/dist/avatar.js +32 -0
- package/dist/axiosClient.js +89 -0
- 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/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/config.js +63 -0
- package/dist/constants.js +94 -0
- package/dist/dashboard.js +74 -0
- package/dist/departmentTrainingPlans.js +154 -0
- 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/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/exports.js +77 -0
- package/dist/groups.js +273 -0
- package/dist/index.js +77 -0
- package/dist/integration.js +319 -0
- package/dist/integrationConfiguration.js +86 -0
- package/dist/integrations/contentGenerator.js +70 -0
- package/dist/learningContent.js +394 -0
- package/dist/learningPath.js +205 -0
- package/dist/logger.js +57 -0
- package/dist/microSkillsQuizes.js +53 -0
- package/dist/quotas.js +50 -0
- package/dist/role.js +363 -0
- package/dist/roleTemplate.js +236 -0
- package/dist/security.js +79 -0
- package/dist/skill.js +439 -0
- package/dist/skillAssessmentTestingSession.js +156 -0
- package/dist/skillAssessments.js +156 -0
- package/dist/skillTemplate.js +281 -0
- package/dist/talentTransfromation.js +100 -0
- package/dist/teams.js +252 -0
- package/dist/tenants.js +52 -0
- package/dist/trainingPlans.js +308 -0
- package/dist/trainingPlansProficiencyLevels.js +98 -0
- package/dist/userInformation.js +81 -0
- package/dist/users.js +694 -0
- package/dist/utils.js +65 -0
- package/package.json +1 -1
|
@@ -0,0 +1,205 @@
|
|
|
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
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
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 };
|
|
@@ -0,0 +1,53 @@
|
|
|
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
|
+
};
|
package/dist/quotas.js
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const axiosClient_1 = require("./axiosClient");
|
|
4
|
+
/**
|
|
5
|
+
* Get the current quota for the user and tenant
|
|
6
|
+
* @param {String} token
|
|
7
|
+
* @returns {Promise<Object>}
|
|
8
|
+
*/
|
|
9
|
+
const getAllQuota = (token) => {
|
|
10
|
+
return new Promise((resolve, reject) => {
|
|
11
|
+
let confirmationRequest = axiosClient_1.client.get(`/api/v1/quotas/getallquota`, {
|
|
12
|
+
headers: { authorization: token },
|
|
13
|
+
});
|
|
14
|
+
confirmationRequest
|
|
15
|
+
.then((response) => {
|
|
16
|
+
resolve(response.data);
|
|
17
|
+
})
|
|
18
|
+
.catch((error) => {
|
|
19
|
+
reject(error);
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Increase quota utilization
|
|
25
|
+
* @param {String} quotaId
|
|
26
|
+
* @param {Number} value
|
|
27
|
+
* @param {String} token
|
|
28
|
+
* @returns {Promise<Object>}
|
|
29
|
+
*/
|
|
30
|
+
const increaseQuotaUtilization = (quotaId, value, token) => {
|
|
31
|
+
return new Promise((resolve, reject) => {
|
|
32
|
+
let confirmationRequest = axiosClient_1.client.post(`/api/v1/quotas/increaseutilization`, {
|
|
33
|
+
id: quotaId,
|
|
34
|
+
value: value,
|
|
35
|
+
}, {
|
|
36
|
+
headers: { authorization: token },
|
|
37
|
+
});
|
|
38
|
+
confirmationRequest
|
|
39
|
+
.then((response) => {
|
|
40
|
+
resolve(response.data);
|
|
41
|
+
})
|
|
42
|
+
.catch((error) => {
|
|
43
|
+
reject(error);
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
exports.default = {
|
|
48
|
+
getAllQuota,
|
|
49
|
+
increaseQuotaUtilization,
|
|
50
|
+
};
|