@stackfactor/client-api 1.1.133 → 1.1.134
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 +4 -4
- package/dist/address.js +2 -2
- package/dist/aiAssistant.js +6 -6
- package/dist/avatar.js +2 -2
- package/dist/axiosClient.js +5 -5
- package/dist/config.js +4 -4
- package/dist/dashboard.js +4 -4
- package/dist/departmentTrainingPlans.js +7 -7
- package/dist/groups.js +13 -13
- package/dist/index.js +74 -14
- package/dist/integration.js +12 -12
- package/dist/integrationConfiguration.js +4 -4
- package/dist/integrations/contentGenerator.js +3 -3
- package/dist/learningContent.js +16 -16
- package/dist/learningPath.js +9 -9
- package/dist/logger.js +3 -3
- package/dist/microSkillsQuizes.js +3 -3
- package/dist/quotas.js +3 -3
- package/dist/role.js +15 -15
- package/dist/roleTemplate.js +10 -10
- package/dist/security.js +5 -5
- package/dist/skill.js +19 -19
- package/dist/skillAssessmentTestingSession.js +7 -7
- package/dist/skillAssessments.js +7 -7
- package/dist/skillTemplate.js +12 -12
- package/dist/talentTransfromation.js +5 -5
- package/dist/teams.js +12 -12
- package/dist/tenants.js +3 -3
- package/dist/trainingPlans.js +13 -13
- package/dist/trainingPlansProficiencyLevels.js +5 -5
- package/dist/userInformation.js +4 -4
- package/dist/users.js +28 -28
- package/package.json +1 -1
- package/src/lib/actionNotifications.ts +1 -1
- package/src/lib/address.ts +1 -1
- package/src/lib/aiAssistant.ts +1 -1
- package/src/lib/avatar.ts +1 -1
- package/src/lib/axiosClient.ts +2 -2
- package/src/lib/config.ts +1 -1
- package/src/lib/dashboard.ts +1 -1
- package/src/lib/departmentTrainingPlans.ts +1 -1
- package/src/lib/groups.ts +1 -1
- package/src/lib/index.ts +85 -1
- package/src/lib/integration.ts +1 -1
- package/src/lib/integrationConfiguration.ts +1 -1
- package/src/lib/integrations/contentGenerator.ts +1 -1
- package/src/lib/learningContent.ts +1 -1
- package/src/lib/learningPath.ts +1 -1
- package/src/lib/logger.ts +1 -1
- package/src/lib/microSkillsQuizes.ts +1 -1
- package/src/lib/quotas.ts +1 -1
- package/src/lib/role.ts +1 -1
- package/src/lib/roleTemplate.ts +1 -1
- package/src/lib/security.ts +1 -1
- package/src/lib/skill.ts +1 -1
- package/src/lib/skillAssessmentTestingSession.ts +1 -1
- package/src/lib/skillAssessments.ts +1 -1
- package/src/lib/skillTemplate.ts +1 -1
- package/src/lib/talentTransfromation.ts +1 -1
- package/src/lib/teams.ts +1 -1
- package/src/lib/tenants.ts +1 -1
- package/src/lib/trainingPlans.ts +1 -1
- package/src/lib/trainingPlansProficiencyLevels.ts +1 -1
- package/src/lib/userInformation.ts +1 -1
- package/src/lib/users.ts +1 -1
- package/src/lib/exports.ts +0 -85
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.generateContentAsync = exports.generateContent = void 0;
|
|
4
|
-
const
|
|
4
|
+
const axiosClient_1 = require("../axiosClient");
|
|
5
5
|
/**
|
|
6
6
|
* Generate content
|
|
7
7
|
* @param {Array<String>} data
|
|
@@ -18,7 +18,7 @@ const generateContent = (data, contentType, integrationId, token) => {
|
|
|
18
18
|
};
|
|
19
19
|
if (integrationId)
|
|
20
20
|
data_.integrationId = integrationId;
|
|
21
|
-
const request =
|
|
21
|
+
const request = axiosClient_1.client.post(`api/v1/contentgenerators/generate`, data_, {
|
|
22
22
|
headers: { authorization: token },
|
|
23
23
|
});
|
|
24
24
|
request
|
|
@@ -53,7 +53,7 @@ const generateContentAsync = (id, data, contentType, elementType, integrationId,
|
|
|
53
53
|
};
|
|
54
54
|
if (integrationId)
|
|
55
55
|
data_.integrationId = integrationId;
|
|
56
|
-
const request =
|
|
56
|
+
const request = axiosClient_1.client.post(`api/v1/contentgenerators/generateasync`, data_, {
|
|
57
57
|
headers: { authorization: token },
|
|
58
58
|
});
|
|
59
59
|
request
|
package/dist/learningContent.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
3
|
+
const axiosClient_1 = require("./axiosClient");
|
|
4
4
|
/**
|
|
5
5
|
* Create learning content and set information
|
|
6
6
|
* @param {Object} data Learning content data
|
|
@@ -12,7 +12,7 @@ const createLearningContent = (data, token) => {
|
|
|
12
12
|
const requestData = {
|
|
13
13
|
data: data,
|
|
14
14
|
};
|
|
15
|
-
let confirmationRequest =
|
|
15
|
+
let confirmationRequest = axiosClient_1.client.put("api/v1/learningcontent", requestData, {
|
|
16
16
|
headers: { authorization: token },
|
|
17
17
|
});
|
|
18
18
|
confirmationRequest
|
|
@@ -38,7 +38,7 @@ const deleteLearningContent = (id, comments, token) => {
|
|
|
38
38
|
if (comments)
|
|
39
39
|
data.comments = comments;
|
|
40
40
|
return new Promise((resolve, reject) => {
|
|
41
|
-
const request =
|
|
41
|
+
const request = axiosClient_1.client.delete(`api/v1/learningcontent/`, {
|
|
42
42
|
headers: { authorization: token },
|
|
43
43
|
data: data,
|
|
44
44
|
});
|
|
@@ -60,7 +60,7 @@ const deleteLearningContent = (id, comments, token) => {
|
|
|
60
60
|
const discardLearningContentChanges = (id, token) => {
|
|
61
61
|
return new Promise((resolve, reject) => {
|
|
62
62
|
const data = {};
|
|
63
|
-
const request =
|
|
63
|
+
const request = axiosClient_1.client.get(`api/v1/learningcontent/discard/${id}`, {
|
|
64
64
|
headers: { authorization: token },
|
|
65
65
|
data: data,
|
|
66
66
|
});
|
|
@@ -94,7 +94,7 @@ const generateLearningActivityContent = (learningObjectives, skillId, microSkill
|
|
|
94
94
|
if (otherLearningActivities) {
|
|
95
95
|
requestData.otherLearningActivities = otherLearningActivities;
|
|
96
96
|
}
|
|
97
|
-
const request =
|
|
97
|
+
const request = axiosClient_1.client.post(`api/v1/learningcontent/generatelearningactivitycontent/${skillId}`, requestData, {
|
|
98
98
|
headers: { authorization: token },
|
|
99
99
|
});
|
|
100
100
|
request
|
|
@@ -117,7 +117,7 @@ const generateMicroSkillTestKnowledge = (microSkill, token) => {
|
|
|
117
117
|
let data = {
|
|
118
118
|
microSkill: microSkill,
|
|
119
119
|
};
|
|
120
|
-
let confirmationRequest =
|
|
120
|
+
let confirmationRequest = axiosClient_1.client.post(`api/v1/learningcontent/generatemicroskilltestknowledge`, data, {
|
|
121
121
|
headers: { authorization: token },
|
|
122
122
|
});
|
|
123
123
|
confirmationRequest
|
|
@@ -138,7 +138,7 @@ const generateMicroSkillTestKnowledge = (microSkill, token) => {
|
|
|
138
138
|
*/
|
|
139
139
|
const getLearningContentInformationById = (id, version, token) => {
|
|
140
140
|
return new Promise((resolve, reject) => {
|
|
141
|
-
let confirmationRequest =
|
|
141
|
+
let confirmationRequest = axiosClient_1.client.get(`api/v1/learningcontent/${id}/${version}`, {
|
|
142
142
|
headers: { authorization: token },
|
|
143
143
|
});
|
|
144
144
|
confirmationRequest
|
|
@@ -166,7 +166,7 @@ const getLearningContentList = (filter, version, includeDeleted, token) => {
|
|
|
166
166
|
};
|
|
167
167
|
if (filter)
|
|
168
168
|
requestData.filter = filter;
|
|
169
|
-
let confirmationRequest =
|
|
169
|
+
let confirmationRequest = axiosClient_1.client.post(`api/v1/learningcontent`, requestData, {
|
|
170
170
|
headers: { authorization: token },
|
|
171
171
|
});
|
|
172
172
|
confirmationRequest
|
|
@@ -187,7 +187,7 @@ const getLearningContentList = (filter, version, includeDeleted, token) => {
|
|
|
187
187
|
const migrateLearningContentStorageType = (id, token) => {
|
|
188
188
|
return new Promise((resolve, reject) => {
|
|
189
189
|
let data = {};
|
|
190
|
-
let confirmationRequest =
|
|
190
|
+
let confirmationRequest = axiosClient_1.client.post(`api/v1/learningcontent/migratestorage/${id}`, data, {
|
|
191
191
|
headers: { authorization: token },
|
|
192
192
|
});
|
|
193
193
|
confirmationRequest
|
|
@@ -211,7 +211,7 @@ const publishLearningContent = (id, comments, token) => {
|
|
|
211
211
|
let data = {};
|
|
212
212
|
if (comments)
|
|
213
213
|
data.comments = comments;
|
|
214
|
-
let confirmationRequest =
|
|
214
|
+
let confirmationRequest = axiosClient_1.client.post(`api/v1/learningcontent/publish/${id}`, data, {
|
|
215
215
|
headers: { authorization: token },
|
|
216
216
|
});
|
|
217
217
|
confirmationRequest
|
|
@@ -236,7 +236,7 @@ const setLearningContentInformation = (id, data, token) => {
|
|
|
236
236
|
data: data,
|
|
237
237
|
id: id,
|
|
238
238
|
};
|
|
239
|
-
let confirmationRequest =
|
|
239
|
+
let confirmationRequest = axiosClient_1.client.post(`api/v1/learningcontent/update`, requestData, {
|
|
240
240
|
headers: { authorization: token },
|
|
241
241
|
});
|
|
242
242
|
confirmationRequest
|
|
@@ -261,7 +261,7 @@ const setLearningContentPartialContentInformation = (id, data, token) => {
|
|
|
261
261
|
data: data,
|
|
262
262
|
id: id,
|
|
263
263
|
};
|
|
264
|
-
let confirmationRequest =
|
|
264
|
+
let confirmationRequest = axiosClient_1.client.post(`api/v1/learningcontent/updatepartialcontent/${id}`, requestData, {
|
|
265
265
|
headers: { authorization: token },
|
|
266
266
|
});
|
|
267
267
|
confirmationRequest
|
|
@@ -290,7 +290,7 @@ const setLearningContentLearningContentInformation = (id, learningcontentid, mic
|
|
|
290
290
|
learningcontentid: learningcontentid,
|
|
291
291
|
microSkillId: microSkillId,
|
|
292
292
|
};
|
|
293
|
-
let confirmationRequest =
|
|
293
|
+
let confirmationRequest = axiosClient_1.client.post(`api/v1/learningcontent/updatelearningcontent/`, requestData, {
|
|
294
294
|
headers: { authorization: token },
|
|
295
295
|
});
|
|
296
296
|
confirmationRequest
|
|
@@ -315,7 +315,7 @@ const setLearningContentLearningMicroSkillContentInformation = (id, microskillid
|
|
|
315
315
|
const requestData = {
|
|
316
316
|
data: data,
|
|
317
317
|
};
|
|
318
|
-
let confirmationRequest =
|
|
318
|
+
let confirmationRequest = axiosClient_1.client.post(`api/v1/learningcontent/updatemicroskilllearningcontent/${id}/${microskillid}`, requestData, {
|
|
319
319
|
headers: { authorization: token },
|
|
320
320
|
});
|
|
321
321
|
confirmationRequest
|
|
@@ -339,7 +339,7 @@ const setLearningContentTags = (id, tags, token) => {
|
|
|
339
339
|
tags: tags,
|
|
340
340
|
id: id,
|
|
341
341
|
};
|
|
342
|
-
let confirmationRequest =
|
|
342
|
+
let confirmationRequest = axiosClient_1.client.post(`api/v1/learningcontent/updatetags/`, requestData, {
|
|
343
343
|
headers: { authorization: token },
|
|
344
344
|
});
|
|
345
345
|
confirmationRequest
|
|
@@ -363,7 +363,7 @@ const watchLearningContent = (id, watch, token) => {
|
|
|
363
363
|
id: id,
|
|
364
364
|
watch: watch,
|
|
365
365
|
};
|
|
366
|
-
let confirmationRequest =
|
|
366
|
+
let confirmationRequest = axiosClient_1.client.post(`api/v1/learningcontent/watch`, requestData, {
|
|
367
367
|
headers: { authorization: token },
|
|
368
368
|
});
|
|
369
369
|
confirmationRequest
|
package/dist/learningPath.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
3
|
+
const axiosClient_1 = require("./axiosClient");
|
|
4
4
|
/**
|
|
5
5
|
* Create learning path and set information
|
|
6
6
|
* @param {Object} data
|
|
@@ -9,7 +9,7 @@ const axiosClient_js_1 = require("./axiosClient.js");
|
|
|
9
9
|
*/
|
|
10
10
|
const createLearningPath = (data, token) => {
|
|
11
11
|
return new Promise((resolve, reject) => {
|
|
12
|
-
let confirmationRequest =
|
|
12
|
+
let confirmationRequest = axiosClient_1.client.put("api/v1/learningpaths", { data: data }, {
|
|
13
13
|
headers: { authorization: token },
|
|
14
14
|
});
|
|
15
15
|
confirmationRequest
|
|
@@ -35,7 +35,7 @@ const deleteLearningPath = (id, comments, token) => {
|
|
|
35
35
|
};
|
|
36
36
|
if (comments)
|
|
37
37
|
data.comments = comments;
|
|
38
|
-
const request =
|
|
38
|
+
const request = axiosClient_1.client.delete(`api/v1/learningpaths/`, {
|
|
39
39
|
headers: { authorization: token },
|
|
40
40
|
data: data,
|
|
41
41
|
});
|
|
@@ -57,7 +57,7 @@ const deleteLearningPath = (id, comments, token) => {
|
|
|
57
57
|
const discardLearningPathChanges = (id, token) => {
|
|
58
58
|
return new Promise((resolve, reject) => {
|
|
59
59
|
const data = {};
|
|
60
|
-
const request =
|
|
60
|
+
const request = axiosClient_1.client.get(`api/v1/learningpaths/discard/${id}`, {
|
|
61
61
|
headers: { authorization: token },
|
|
62
62
|
data: data,
|
|
63
63
|
});
|
|
@@ -79,7 +79,7 @@ const discardLearningPathChanges = (id, token) => {
|
|
|
79
79
|
*/
|
|
80
80
|
const getLearningPathInformationById = (id, version, token) => {
|
|
81
81
|
return new Promise((resolve, reject) => {
|
|
82
|
-
let confirmationRequest =
|
|
82
|
+
let confirmationRequest = axiosClient_1.client.get(`api/v1/learningpaths/${id}/${version}`, {
|
|
83
83
|
headers: { authorization: token },
|
|
84
84
|
});
|
|
85
85
|
confirmationRequest
|
|
@@ -107,7 +107,7 @@ const getLearningPathsList = (list, version, includeDeleted, token) => {
|
|
|
107
107
|
};
|
|
108
108
|
if (list)
|
|
109
109
|
requestData.list = list;
|
|
110
|
-
let confirmationRequest =
|
|
110
|
+
let confirmationRequest = axiosClient_1.client.post(`api/v1/learningpaths`, requestData, {
|
|
111
111
|
headers: { authorization: token },
|
|
112
112
|
});
|
|
113
113
|
confirmationRequest
|
|
@@ -131,7 +131,7 @@ const publishLearningPath = (id, comments, token) => {
|
|
|
131
131
|
let data = {};
|
|
132
132
|
if (comments)
|
|
133
133
|
data.comments = comments;
|
|
134
|
-
let confirmationRequest =
|
|
134
|
+
let confirmationRequest = axiosClient_1.client.post(`api/v1/learningpaths/publish/${id}`, data, {
|
|
135
135
|
headers: { authorization: token },
|
|
136
136
|
});
|
|
137
137
|
confirmationRequest
|
|
@@ -156,7 +156,7 @@ const setLearningPathInformation = (id, data, token) => {
|
|
|
156
156
|
data: data,
|
|
157
157
|
id: id,
|
|
158
158
|
};
|
|
159
|
-
let confirmationRequest =
|
|
159
|
+
let confirmationRequest = axiosClient_1.client.post(`api/v1/learningpaths/update/`, requestData, {
|
|
160
160
|
headers: { authorization: token },
|
|
161
161
|
});
|
|
162
162
|
confirmationRequest
|
|
@@ -181,7 +181,7 @@ const setLearningPathTags = (id, tags, token) => {
|
|
|
181
181
|
tags: tags,
|
|
182
182
|
id: id,
|
|
183
183
|
};
|
|
184
|
-
let confirmationRequest =
|
|
184
|
+
let confirmationRequest = axiosClient_1.client.post(`api/v1/learningpaths/updatetags/`, requestData, {
|
|
185
185
|
headers: { authorization: token },
|
|
186
186
|
});
|
|
187
187
|
confirmationRequest
|
package/dist/logger.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
3
|
+
const axiosClient_1 = require("./axiosClient");
|
|
4
4
|
/**
|
|
5
5
|
* Create comments for a specified element id
|
|
6
6
|
* @param {String} elementId
|
|
@@ -11,7 +11,7 @@ const axiosClient_js_1 = require("./axiosClient.js");
|
|
|
11
11
|
*/
|
|
12
12
|
const comments = (elementId, elementType, data, token) => {
|
|
13
13
|
return new Promise((resolve, reject) => {
|
|
14
|
-
let confirmationRequest =
|
|
14
|
+
let confirmationRequest = axiosClient_1.client.post("api/v1/logger/comments/", {
|
|
15
15
|
data: data,
|
|
16
16
|
elementId: elementId,
|
|
17
17
|
elementType: elementType,
|
|
@@ -42,7 +42,7 @@ const getListByElementId = (elementId, page, elementsPerPage, token) => {
|
|
|
42
42
|
data.elementsPerPage = elementsPerPage;
|
|
43
43
|
if (page !== null)
|
|
44
44
|
data.page = page;
|
|
45
|
-
const getTokensRequest =
|
|
45
|
+
const getTokensRequest = axiosClient_1.client.post(`api/v1/logger/${elementId}`, data, {
|
|
46
46
|
headers: { authorization: token },
|
|
47
47
|
});
|
|
48
48
|
getTokensRequest
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
3
|
+
const axiosClient_1 = require("./axiosClient");
|
|
4
4
|
/**
|
|
5
5
|
* Get responses for a microskill quiz
|
|
6
6
|
* @param {String} learningContentId
|
|
@@ -10,7 +10,7 @@ const axiosClient_js_1 = require("./axiosClient.js");
|
|
|
10
10
|
*/
|
|
11
11
|
const getResponses = (learningContentId, microSkillId, token) => {
|
|
12
12
|
return new Promise((resolve, reject) => {
|
|
13
|
-
let confirmationRequest =
|
|
13
|
+
let confirmationRequest = axiosClient_1.client.get(`api/v1/microskillsresponses/${learningContentId}/${microSkillId}`, {
|
|
14
14
|
headers: { authorization: token },
|
|
15
15
|
});
|
|
16
16
|
confirmationRequest
|
|
@@ -35,7 +35,7 @@ const saveResponses = (learningContentId, microSkillId, responses, token) => {
|
|
|
35
35
|
let data = {
|
|
36
36
|
responses: responses,
|
|
37
37
|
};
|
|
38
|
-
let confirmationRequest =
|
|
38
|
+
let confirmationRequest = axiosClient_1.client.post(`api/v1/microskillsresponses/${learningContentId}/${microSkillId}`, data, {
|
|
39
39
|
headers: { authorization: token },
|
|
40
40
|
});
|
|
41
41
|
confirmationRequest
|
package/dist/quotas.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
3
|
+
const axiosClient_1 = require("./axiosClient");
|
|
4
4
|
/**
|
|
5
5
|
* Get the current quota for the user and tenant
|
|
6
6
|
* @param {String} token
|
|
@@ -8,7 +8,7 @@ const axiosClient_js_1 = require("./axiosClient.js");
|
|
|
8
8
|
*/
|
|
9
9
|
const getAllQuota = (token) => {
|
|
10
10
|
return new Promise((resolve, reject) => {
|
|
11
|
-
let confirmationRequest =
|
|
11
|
+
let confirmationRequest = axiosClient_1.client.get(`/api/v1/quotas/getallquota`, {
|
|
12
12
|
headers: { authorization: token },
|
|
13
13
|
});
|
|
14
14
|
confirmationRequest
|
|
@@ -29,7 +29,7 @@ const getAllQuota = (token) => {
|
|
|
29
29
|
*/
|
|
30
30
|
const increaseQuotaUtilization = (quotaId, value, token) => {
|
|
31
31
|
return new Promise((resolve, reject) => {
|
|
32
|
-
let confirmationRequest =
|
|
32
|
+
let confirmationRequest = axiosClient_1.client.post(`/api/v1/quotas/increaseutilization`, {
|
|
33
33
|
id: quotaId,
|
|
34
34
|
value: value,
|
|
35
35
|
}, {
|
package/dist/role.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
3
|
+
const axiosClient_1 = require("./axiosClient");
|
|
4
4
|
/**
|
|
5
5
|
* Create role and set information
|
|
6
6
|
* @param {Object} data
|
|
@@ -9,7 +9,7 @@ const axiosClient_js_1 = require("./axiosClient.js");
|
|
|
9
9
|
*/
|
|
10
10
|
const createRole = (data, token) => {
|
|
11
11
|
return new Promise((resolve, reject) => {
|
|
12
|
-
let confirmationRequest =
|
|
12
|
+
let confirmationRequest = axiosClient_1.client.put("api/v1/roles", { data: data }, {
|
|
13
13
|
headers: { authorization: token },
|
|
14
14
|
});
|
|
15
15
|
confirmationRequest
|
|
@@ -38,7 +38,7 @@ const createRoleFromTemplate = (templateId, data, token) => {
|
|
|
38
38
|
returnDefaultIfVersionNotAvailable: false,
|
|
39
39
|
version: "1.0",
|
|
40
40
|
};
|
|
41
|
-
let confirmationRequest =
|
|
41
|
+
let confirmationRequest = axiosClient_1.client.put("api/v1/roles/createfromtemplate/", requestData, {
|
|
42
42
|
headers: { authorization: token },
|
|
43
43
|
});
|
|
44
44
|
confirmationRequest
|
|
@@ -64,7 +64,7 @@ const deleteRole = (id, comments, token) => {
|
|
|
64
64
|
};
|
|
65
65
|
if (comments)
|
|
66
66
|
data.comments = comments;
|
|
67
|
-
const request =
|
|
67
|
+
const request = axiosClient_1.client.delete(`api/v1/roles/`, {
|
|
68
68
|
headers: { authorization: token },
|
|
69
69
|
data: data,
|
|
70
70
|
});
|
|
@@ -86,7 +86,7 @@ const deleteRole = (id, comments, token) => {
|
|
|
86
86
|
const discardRoleChanges = (id, token) => {
|
|
87
87
|
return new Promise((resolve, reject) => {
|
|
88
88
|
const data = {};
|
|
89
|
-
const request =
|
|
89
|
+
const request = axiosClient_1.client.get(`api/v1/roles/discard/${id}`, {
|
|
90
90
|
headers: { authorization: token },
|
|
91
91
|
data: data,
|
|
92
92
|
});
|
|
@@ -106,7 +106,7 @@ const discardRoleChanges = (id, token) => {
|
|
|
106
106
|
*/
|
|
107
107
|
const getImportedRoleTemplates = (token) => {
|
|
108
108
|
return new Promise((resolve, reject) => {
|
|
109
|
-
const request =
|
|
109
|
+
const request = axiosClient_1.client.get(`api/v1/roles/getimportedroletemplates`, {
|
|
110
110
|
headers: { authorization: token },
|
|
111
111
|
});
|
|
112
112
|
request
|
|
@@ -128,7 +128,7 @@ const getImportedRoleTemplates = (token) => {
|
|
|
128
128
|
*/
|
|
129
129
|
const getRoleInformationById = (id, version, returnNullIfVersionNotFound, token) => {
|
|
130
130
|
return new Promise((resolve, reject) => {
|
|
131
|
-
let confirmationRequest =
|
|
131
|
+
let confirmationRequest = axiosClient_1.client.get(`api/v1/roles/role/${id}/${version}/${returnNullIfVersionNotFound}`, {
|
|
132
132
|
headers: { authorization: token },
|
|
133
133
|
});
|
|
134
134
|
confirmationRequest
|
|
@@ -162,7 +162,7 @@ const getRolesList = (filter, version, includeDeleted, includeDetailedInformatio
|
|
|
162
162
|
};
|
|
163
163
|
if (filter)
|
|
164
164
|
requestData.filter = filter;
|
|
165
|
-
let confirmationRequest =
|
|
165
|
+
let confirmationRequest = axiosClient_1.client.post(`api/v1/roles`, requestData, {
|
|
166
166
|
headers: { authorization: token },
|
|
167
167
|
});
|
|
168
168
|
confirmationRequest
|
|
@@ -182,7 +182,7 @@ const getRolesList = (filter, version, includeDeleted, includeDetailedInformatio
|
|
|
182
182
|
*/
|
|
183
183
|
const getRoleTemplateUpdates = (id, token) => {
|
|
184
184
|
return new Promise((resolve, reject) => {
|
|
185
|
-
let confirmationRequest =
|
|
185
|
+
let confirmationRequest = axiosClient_1.client.get(`api/v1/roles/getroletemplateupdates/${id}`, {
|
|
186
186
|
headers: { authorization: token },
|
|
187
187
|
});
|
|
188
188
|
confirmationRequest
|
|
@@ -206,7 +206,7 @@ const importRoleTemplates = (data, token) => {
|
|
|
206
206
|
roles: data,
|
|
207
207
|
jobDescription: "default job description", // Add a default job description or pass it as a parameter
|
|
208
208
|
};
|
|
209
|
-
let confirmationRequest =
|
|
209
|
+
let confirmationRequest = axiosClient_1.client.post(`api/v1/roles/importRoleTemplates`, requestData, {
|
|
210
210
|
headers: { authorization: token },
|
|
211
211
|
});
|
|
212
212
|
confirmationRequest
|
|
@@ -230,7 +230,7 @@ const publishRole = (id, comments, token) => {
|
|
|
230
230
|
let data = {};
|
|
231
231
|
if (comments)
|
|
232
232
|
data.comments = comments;
|
|
233
|
-
let confirmationRequest =
|
|
233
|
+
let confirmationRequest = axiosClient_1.client.post(`api/v1/roles/publish/${id}`, data, {
|
|
234
234
|
headers: { authorization: token },
|
|
235
235
|
});
|
|
236
236
|
confirmationRequest
|
|
@@ -255,7 +255,7 @@ const setRoleInformation = (id, data, token) => {
|
|
|
255
255
|
data: data,
|
|
256
256
|
id: id,
|
|
257
257
|
};
|
|
258
|
-
let confirmationRequest =
|
|
258
|
+
let confirmationRequest = axiosClient_1.client.post(`api/v1/roles/update`, requestData, {
|
|
259
259
|
headers: { authorization: token },
|
|
260
260
|
});
|
|
261
261
|
confirmationRequest
|
|
@@ -280,7 +280,7 @@ const setRoleInformationFromTemplate = (id, data, token) => {
|
|
|
280
280
|
data: data,
|
|
281
281
|
id: id,
|
|
282
282
|
};
|
|
283
|
-
let confirmationRequest =
|
|
283
|
+
let confirmationRequest = axiosClient_1.client.post(`api/v1/roles/updatefromtemplate/`, requestData, {
|
|
284
284
|
headers: { authorization: token },
|
|
285
285
|
});
|
|
286
286
|
confirmationRequest
|
|
@@ -308,7 +308,7 @@ const setUserRoles = (id, roles, jobDescription, token) => {
|
|
|
308
308
|
};
|
|
309
309
|
if (id)
|
|
310
310
|
requestData.userid = id;
|
|
311
|
-
let request =
|
|
311
|
+
let request = axiosClient_1.client.post(`api/v1/roles/settouser/`, requestData, {
|
|
312
312
|
headers: { authorization: token },
|
|
313
313
|
});
|
|
314
314
|
request
|
|
@@ -333,7 +333,7 @@ const watchRole = (id, watch, token) => {
|
|
|
333
333
|
id: id,
|
|
334
334
|
watch: watch,
|
|
335
335
|
};
|
|
336
|
-
let confirmationRequest =
|
|
336
|
+
let confirmationRequest = axiosClient_1.client.post(`api/v1/roles/watch`, requestData, {
|
|
337
337
|
headers: { authorization: token },
|
|
338
338
|
});
|
|
339
339
|
confirmationRequest
|
package/dist/roleTemplate.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
3
|
+
const axiosClient_1 = require("./axiosClient");
|
|
4
4
|
/**
|
|
5
5
|
* Create role template and set information
|
|
6
6
|
* @param {Object} data
|
|
@@ -12,7 +12,7 @@ const createRoleTemplate = (data, token) => {
|
|
|
12
12
|
const requestData = {
|
|
13
13
|
data: data,
|
|
14
14
|
};
|
|
15
|
-
let confirmationRequest =
|
|
15
|
+
let confirmationRequest = axiosClient_1.client.put("api/v1/roletemplates", requestData, {
|
|
16
16
|
headers: { authorization: token },
|
|
17
17
|
});
|
|
18
18
|
confirmationRequest
|
|
@@ -38,7 +38,7 @@ const deleteRoleTemplate = (id, comments, token) => {
|
|
|
38
38
|
};
|
|
39
39
|
if (comments)
|
|
40
40
|
data.comments = comments;
|
|
41
|
-
const request =
|
|
41
|
+
const request = axiosClient_1.client.delete(`api/v1/roletemplates/`, {
|
|
42
42
|
headers: { authorization: token },
|
|
43
43
|
data: data,
|
|
44
44
|
});
|
|
@@ -60,7 +60,7 @@ const deleteRoleTemplate = (id, comments, token) => {
|
|
|
60
60
|
const discardRoleTemplateChanges = (id, token) => {
|
|
61
61
|
return new Promise((resolve, reject) => {
|
|
62
62
|
const data = {};
|
|
63
|
-
const request =
|
|
63
|
+
const request = axiosClient_1.client.get(`api/v1/roletemplates/discard/${id}`, {
|
|
64
64
|
headers: { authorization: token },
|
|
65
65
|
data: data,
|
|
66
66
|
});
|
|
@@ -82,7 +82,7 @@ const discardRoleTemplateChanges = (id, token) => {
|
|
|
82
82
|
*/
|
|
83
83
|
const getRoleTemplateInformationById = (id, version, token) => {
|
|
84
84
|
return new Promise((resolve, reject) => {
|
|
85
|
-
let confirmationRequest =
|
|
85
|
+
let confirmationRequest = axiosClient_1.client.get(`api/v1/roletemplates/${id}/${version}`, {
|
|
86
86
|
headers: { authorization: token },
|
|
87
87
|
});
|
|
88
88
|
confirmationRequest
|
|
@@ -112,7 +112,7 @@ const getRoleTemplateList = (filter, version, includeDeleted, namesOnly, token)
|
|
|
112
112
|
};
|
|
113
113
|
if (filter)
|
|
114
114
|
requestData.filter = filter;
|
|
115
|
-
let confirmationRequest =
|
|
115
|
+
let confirmationRequest = axiosClient_1.client.post(`api/v1/roletemplates`, requestData, {
|
|
116
116
|
headers: { authorization: token },
|
|
117
117
|
});
|
|
118
118
|
confirmationRequest
|
|
@@ -136,7 +136,7 @@ const publishTemplate = (id, comments, token) => {
|
|
|
136
136
|
let data = {};
|
|
137
137
|
if (comments)
|
|
138
138
|
data.comments = comments;
|
|
139
|
-
let confirmationRequest =
|
|
139
|
+
let confirmationRequest = axiosClient_1.client.post(`api/v1/roletemplates/publish/${id}`, data, {
|
|
140
140
|
headers: { authorization: token },
|
|
141
141
|
});
|
|
142
142
|
confirmationRequest
|
|
@@ -161,7 +161,7 @@ const setTemplateInformation = (id, data, token) => {
|
|
|
161
161
|
data: data,
|
|
162
162
|
id: id,
|
|
163
163
|
};
|
|
164
|
-
let confirmationRequest =
|
|
164
|
+
let confirmationRequest = axiosClient_1.client.post(`api/v1/roletemplates/update`, requestData, {
|
|
165
165
|
headers: { authorization: token },
|
|
166
166
|
});
|
|
167
167
|
confirmationRequest
|
|
@@ -186,7 +186,7 @@ const setTemplateTags = (id, tags, token) => {
|
|
|
186
186
|
tags: tags,
|
|
187
187
|
id: id,
|
|
188
188
|
};
|
|
189
|
-
let confirmationRequest =
|
|
189
|
+
let confirmationRequest = axiosClient_1.client.post(`api/v1/roletemplates/updatetags/`, requestData, {
|
|
190
190
|
headers: { authorization: token },
|
|
191
191
|
});
|
|
192
192
|
confirmationRequest
|
|
@@ -211,7 +211,7 @@ const watchRoleTemplate = (id, watch, token) => {
|
|
|
211
211
|
id: id,
|
|
212
212
|
watch: watch,
|
|
213
213
|
};
|
|
214
|
-
let confirmationRequest =
|
|
214
|
+
let confirmationRequest = axiosClient_1.client.post(`api/v1/roletemplates/watch`, requestData, {
|
|
215
215
|
headers: { authorization: token },
|
|
216
216
|
});
|
|
217
217
|
confirmationRequest
|
package/dist/security.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
3
|
+
const axiosClient_1 = require("./axiosClient");
|
|
4
4
|
/**
|
|
5
5
|
* Get the enabled authentication connections for current organization.
|
|
6
6
|
* @param {String} authToken - Authorization token
|
|
@@ -8,7 +8,7 @@ const axiosClient_js_1 = require("./axiosClient.js");
|
|
|
8
8
|
*/
|
|
9
9
|
const getAuthConnections = (authToken) => {
|
|
10
10
|
return new Promise((resolve, reject) => {
|
|
11
|
-
const getConfigInformationRequest =
|
|
11
|
+
const getConfigInformationRequest = axiosClient_1.client.get(`api/v1/security/authconnections`, { headers: { authorization: authToken } });
|
|
12
12
|
getConfigInformationRequest
|
|
13
13
|
.then((response) => {
|
|
14
14
|
resolve(response.data);
|
|
@@ -26,7 +26,7 @@ const getAuthConnections = (authToken) => {
|
|
|
26
26
|
*/
|
|
27
27
|
const setAuthConnections = (data, authToken) => {
|
|
28
28
|
return new Promise((resolve, reject) => {
|
|
29
|
-
const setConfigInformationRequest =
|
|
29
|
+
const setConfigInformationRequest = axiosClient_1.client.post(`api/v1/security/authconnections`, { data: data }, { headers: { authorization: authToken } });
|
|
30
30
|
setConfigInformationRequest
|
|
31
31
|
.then((response) => {
|
|
32
32
|
resolve(response.data);
|
|
@@ -44,7 +44,7 @@ const setAuthConnections = (data, authToken) => {
|
|
|
44
44
|
*/
|
|
45
45
|
const resetMFA = (userId, authToken) => {
|
|
46
46
|
return new Promise((resolve, reject) => {
|
|
47
|
-
const resetMFARequest =
|
|
47
|
+
const resetMFARequest = axiosClient_1.client.post(`api/v1/security/resetmfa`, userId ? {} : { userId: userId }, { headers: { authorization: authToken } });
|
|
48
48
|
resetMFARequest
|
|
49
49
|
.then((response) => {
|
|
50
50
|
resolve(response.data);
|
|
@@ -61,7 +61,7 @@ const resetMFA = (userId, authToken) => {
|
|
|
61
61
|
*/
|
|
62
62
|
const synchronizeWithAuth0 = (authToken) => {
|
|
63
63
|
return new Promise((resolve, reject) => {
|
|
64
|
-
const synchronizeRequest =
|
|
64
|
+
const synchronizeRequest = axiosClient_1.client.get(`api/v1/security/synchronizewithauth0`, { headers: { authorization: authToken } });
|
|
65
65
|
synchronizeRequest
|
|
66
66
|
.then((response) => {
|
|
67
67
|
resolve(response.data);
|