@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,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 all permissions
|
|
6
6
|
* @param {String} token The authentication token
|
|
@@ -8,7 +8,7 @@ const axiosClient_js_1 = require("./axiosClient.js");
|
|
|
8
8
|
*/
|
|
9
9
|
const getAllUserNotifications = (token) => {
|
|
10
10
|
return new Promise((resolve, reject) => {
|
|
11
|
-
const request =
|
|
11
|
+
const request = axiosClient_1.client.get(`api/v1/actionnotifications`, {
|
|
12
12
|
headers: { authorization: token },
|
|
13
13
|
});
|
|
14
14
|
request
|
|
@@ -29,7 +29,7 @@ const getAllUserNotifications = (token) => {
|
|
|
29
29
|
*/
|
|
30
30
|
const markNotifications = (ids, status, authToken) => {
|
|
31
31
|
return new Promise((resolve, reject) => {
|
|
32
|
-
const request =
|
|
32
|
+
const request = axiosClient_1.client.put(`api/v1/actionnotifications/mark`, {
|
|
33
33
|
ids: ids,
|
|
34
34
|
status: status,
|
|
35
35
|
}, { headers: { authorization: authToken } });
|
|
@@ -52,7 +52,7 @@ const markNotifications = (ids, status, authToken) => {
|
|
|
52
52
|
*/
|
|
53
53
|
const processNotification = (id, action, comments, authToken) => {
|
|
54
54
|
return new Promise((resolve, reject) => {
|
|
55
|
-
const request =
|
|
55
|
+
const request = axiosClient_1.client.put(`api/v1/actionnotifications/process`, {
|
|
56
56
|
id: id,
|
|
57
57
|
action: action,
|
|
58
58
|
comments: comments,
|
package/dist/address.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
|
* Validate Address
|
|
6
6
|
* @param {String} input - the address in raw format
|
|
@@ -9,7 +9,7 @@ const axiosClient_js_1 = require("./axiosClient.js");
|
|
|
9
9
|
*/
|
|
10
10
|
const autoComplete = (input, authToken) => {
|
|
11
11
|
return new Promise((resolve, reject) => {
|
|
12
|
-
const getAddressesRequest =
|
|
12
|
+
const getAddressesRequest = axiosClient_1.client.post(`api/v1/address/autocomplete/`, { input: input }, { headers: { authorization: authToken } });
|
|
13
13
|
getAddressesRequest
|
|
14
14
|
.then((response) => {
|
|
15
15
|
resolve(response.data);
|
package/dist/aiAssistant.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
|
* Ask Question to the AI
|
|
6
6
|
* @param {String} conversationId
|
|
@@ -16,7 +16,7 @@ const askQuestion = (conversationId, question, updatedContext, token) => {
|
|
|
16
16
|
question: question,
|
|
17
17
|
updatedContext: updatedContext,
|
|
18
18
|
};
|
|
19
|
-
let confirmationRequest =
|
|
19
|
+
let confirmationRequest = axiosClient_1.client.post("/api/v1/aiassistant/askquestion", data, {
|
|
20
20
|
headers: { authorization: token },
|
|
21
21
|
});
|
|
22
22
|
confirmationRequest
|
|
@@ -39,7 +39,7 @@ const endConversation = (conversationId, token) => {
|
|
|
39
39
|
let data = {
|
|
40
40
|
conversationId: conversationId,
|
|
41
41
|
};
|
|
42
|
-
let confirmationRequest =
|
|
42
|
+
let confirmationRequest = axiosClient_1.client.post("/api/v1/aiassistant/endconversation", data, {
|
|
43
43
|
headers: { authorization: token },
|
|
44
44
|
});
|
|
45
45
|
confirmationRequest
|
|
@@ -59,7 +59,7 @@ const endConversation = (conversationId, token) => {
|
|
|
59
59
|
*/
|
|
60
60
|
const getConversationByElementId = (elementId, token) => {
|
|
61
61
|
return new Promise((resolve, reject) => {
|
|
62
|
-
let confirmationRequest =
|
|
62
|
+
let confirmationRequest = axiosClient_1.client.get(`/api/v1/aiassistant/getconversation/${elementId}`, {
|
|
63
63
|
headers: { authorization: token },
|
|
64
64
|
});
|
|
65
65
|
confirmationRequest
|
|
@@ -79,7 +79,7 @@ const getConversationByElementId = (elementId, token) => {
|
|
|
79
79
|
*/
|
|
80
80
|
const getVoiceAssistantUrl = (language, token) => {
|
|
81
81
|
return new Promise((resolve, reject) => {
|
|
82
|
-
let confirmationRequest =
|
|
82
|
+
let confirmationRequest = axiosClient_1.client.get(`/api/v1/aiassistant/getvoiceassistanturl/${language}`, {
|
|
83
83
|
headers: { authorization: token },
|
|
84
84
|
});
|
|
85
85
|
confirmationRequest
|
|
@@ -113,7 +113,7 @@ const startConversation = (elementId, elementType, question, context, autoContex
|
|
|
113
113
|
if (conversationId) {
|
|
114
114
|
data.conversationId = conversationId;
|
|
115
115
|
}
|
|
116
|
-
let confirmationRequest =
|
|
116
|
+
let confirmationRequest = axiosClient_1.client.post("/api/v1/aiassistant/startconversation", data, {
|
|
117
117
|
headers: { authorization: token },
|
|
118
118
|
});
|
|
119
119
|
confirmationRequest
|
package/dist/avatar.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 avatar for an elementId
|
|
6
6
|
* @param {String} elementId
|
|
@@ -12,7 +12,7 @@ const axiosClient_js_1 = require("./axiosClient.js");
|
|
|
12
12
|
*/
|
|
13
13
|
const getAvatar = (elementId, type, width, height, token) => {
|
|
14
14
|
return new Promise((resolve, reject) => {
|
|
15
|
-
let confirmationRequest =
|
|
15
|
+
let confirmationRequest = axiosClient_1.client.get(`/api/v1/avatar/getavatar/${elementId}/${type}/${width}/${height}`, {
|
|
16
16
|
headers: {
|
|
17
17
|
authorization: token,
|
|
18
18
|
},
|
package/dist/axiosClient.js
CHANGED
|
@@ -5,9 +5,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.shouldReturnError = exports.getErrorInformation = exports.getErrorType = exports.errorToString = exports.client = void 0;
|
|
7
7
|
const axios_1 = __importDefault(require("axios"));
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const baseUrl =
|
|
8
|
+
const constants_1 = require("./constants");
|
|
9
|
+
const utils_1 = __importDefault(require("./utils"));
|
|
10
|
+
const baseUrl = utils_1.default.getBaseUrl();
|
|
11
11
|
const client = axios_1.default.create({
|
|
12
12
|
baseURL: baseUrl,
|
|
13
13
|
withCredentials: true,
|
|
@@ -57,7 +57,7 @@ const getErrorType = (error) => {
|
|
|
57
57
|
return error.response.status;
|
|
58
58
|
}
|
|
59
59
|
else
|
|
60
|
-
return
|
|
60
|
+
return constants_1.RESPONSE_TYPE.SERVICE_UNAVAILABLE;
|
|
61
61
|
};
|
|
62
62
|
exports.getErrorType = getErrorType;
|
|
63
63
|
/**
|
|
@@ -79,7 +79,7 @@ exports.getErrorInformation = getErrorInformation;
|
|
|
79
79
|
* @returns {boolean}
|
|
80
80
|
*/
|
|
81
81
|
const shouldReturnError = (returnAllExceptions, error) => {
|
|
82
|
-
if (getErrorType(error) ===
|
|
82
|
+
if (getErrorType(error) === constants_1.RESPONSE_TYPE.UNAUTHORIZED) {
|
|
83
83
|
return returnAllExceptions;
|
|
84
84
|
}
|
|
85
85
|
else {
|
package/dist/config.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 specified configuration by Id. It returns a promise
|
|
6
6
|
* @param {String} id - the id of the configuration element
|
|
@@ -9,7 +9,7 @@ const axiosClient_js_1 = require("./axiosClient.js");
|
|
|
9
9
|
*/
|
|
10
10
|
const getConfigurationById = (id, authToken) => {
|
|
11
11
|
return new Promise((resolve, reject) => {
|
|
12
|
-
const getConfigInformationRequest =
|
|
12
|
+
const getConfigInformationRequest = axiosClient_1.client.get(`api/v1/configurations/configuration/id/${id}`, { headers: { authorization: authToken } });
|
|
13
13
|
getConfigInformationRequest
|
|
14
14
|
.then((response) => {
|
|
15
15
|
resolve(response.data);
|
|
@@ -27,7 +27,7 @@ const getConfigurationById = (id, authToken) => {
|
|
|
27
27
|
*/
|
|
28
28
|
const getConfigurationByType = (type, authToken) => {
|
|
29
29
|
return new Promise((resolve, reject) => {
|
|
30
|
-
const getConfigInformationRequest =
|
|
30
|
+
const getConfigInformationRequest = axiosClient_1.client.get(`api/v1/configurations/configuration/type/${type}`, { headers: { authorization: authToken } });
|
|
31
31
|
getConfigInformationRequest
|
|
32
32
|
.then((response) => {
|
|
33
33
|
resolve(response.data);
|
|
@@ -46,7 +46,7 @@ const getConfigurationByType = (type, authToken) => {
|
|
|
46
46
|
*/
|
|
47
47
|
const setConfigurationById = (id, data, authToken) => {
|
|
48
48
|
return new Promise((resolve, reject) => {
|
|
49
|
-
const getConfigInformationRequest =
|
|
49
|
+
const getConfigInformationRequest = axiosClient_1.client.post(`api/v1/configurations/configuration/${id}`, { data: data }, { headers: { authorization: authToken } });
|
|
50
50
|
getConfigInformationRequest
|
|
51
51
|
.then((response) => {
|
|
52
52
|
resolve(response.data);
|
package/dist/dashboard.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
|
* Add a card to the dashboard
|
|
6
6
|
* @param {String} id - the id of the card to be added to the dashboard
|
|
@@ -11,7 +11,7 @@ const axiosClient_js_1 = require("./axiosClient.js");
|
|
|
11
11
|
*/
|
|
12
12
|
const addCardToDashboard = (id, position, data, authToken) => {
|
|
13
13
|
return new Promise((resolve, reject) => {
|
|
14
|
-
const request =
|
|
14
|
+
const request = axiosClient_1.client.put(`/api/v1/dashboard/card`, {
|
|
15
15
|
id: id,
|
|
16
16
|
position: position,
|
|
17
17
|
data: data || {},
|
|
@@ -32,7 +32,7 @@ const addCardToDashboard = (id, position, data, authToken) => {
|
|
|
32
32
|
*/
|
|
33
33
|
const getDashboardCardsList = (authToken) => {
|
|
34
34
|
return new Promise((resolve, reject) => {
|
|
35
|
-
const request =
|
|
35
|
+
const request = axiosClient_1.client.get(`/api/v1/dashboard/card`, {
|
|
36
36
|
headers: { authorization: authToken },
|
|
37
37
|
});
|
|
38
38
|
request
|
|
@@ -52,7 +52,7 @@ const getDashboardCardsList = (authToken) => {
|
|
|
52
52
|
*/
|
|
53
53
|
const removeCardFromDashboard = (id, authToken) => {
|
|
54
54
|
return new Promise((resolve, reject) => {
|
|
55
|
-
const request =
|
|
55
|
+
const request = axiosClient_1.client.delete(`/api/v1/dashboard/card`, {
|
|
56
56
|
headers: { authorization: authToken },
|
|
57
57
|
data: {
|
|
58
58
|
id: id,
|
|
@@ -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 department training plan and set information
|
|
6
6
|
* @param {String} name
|
|
@@ -18,7 +18,7 @@ const createDepartmentTrainingPlan = (name, summary, skill, activities, token) =
|
|
|
18
18
|
skill: skill || "",
|
|
19
19
|
activities: activities || [],
|
|
20
20
|
};
|
|
21
|
-
let confirmationRequest =
|
|
21
|
+
let confirmationRequest = axiosClient_1.client.put("api/v1/departmentTrainingPlans", requestData, {
|
|
22
22
|
headers: { authorization: token },
|
|
23
23
|
});
|
|
24
24
|
confirmationRequest
|
|
@@ -38,7 +38,7 @@ const createDepartmentTrainingPlan = (name, summary, skill, activities, token) =
|
|
|
38
38
|
*/
|
|
39
39
|
const deleteDepartmentTrainingPlan = (id, token) => {
|
|
40
40
|
return new Promise((resolve, reject) => {
|
|
41
|
-
const request =
|
|
41
|
+
const request = axiosClient_1.client.delete(`api/v1/departmenttrainingplans/`, {
|
|
42
42
|
headers: { authorization: token },
|
|
43
43
|
data: {
|
|
44
44
|
id: id,
|
|
@@ -62,7 +62,7 @@ const deleteDepartmentTrainingPlan = (id, token) => {
|
|
|
62
62
|
*/
|
|
63
63
|
const getDepartmentTrainingPlanInformationById = (id, version, token) => {
|
|
64
64
|
return new Promise((resolve, reject) => {
|
|
65
|
-
let confirmationRequest =
|
|
65
|
+
let confirmationRequest = axiosClient_1.client.get(`api/v1/departmenttrainingplans/${id}/${version}`, {
|
|
66
66
|
headers: { authorization: token },
|
|
67
67
|
});
|
|
68
68
|
confirmationRequest
|
|
@@ -87,7 +87,7 @@ const getDepartmentTrainingPlanList = (filter, version, token) => {
|
|
|
87
87
|
filter: filter || "",
|
|
88
88
|
version: version,
|
|
89
89
|
};
|
|
90
|
-
let confirmationRequest =
|
|
90
|
+
let confirmationRequest = axiosClient_1.client.post(`api/v1/departmenttrainingplans`, requestData, {
|
|
91
91
|
headers: { authorization: token },
|
|
92
92
|
});
|
|
93
93
|
confirmationRequest
|
|
@@ -107,7 +107,7 @@ const getDepartmentTrainingPlanList = (filter, version, token) => {
|
|
|
107
107
|
*/
|
|
108
108
|
const publishDepartmentTrainingPlan = (id, token) => {
|
|
109
109
|
return new Promise((resolve, reject) => {
|
|
110
|
-
let confirmationRequest =
|
|
110
|
+
let confirmationRequest = axiosClient_1.client.post(`api/v1/departmenttrainingplans/publish/${id}`, {}, {
|
|
111
111
|
headers: { authorization: token },
|
|
112
112
|
});
|
|
113
113
|
confirmationRequest
|
|
@@ -131,7 +131,7 @@ const setDepartmentTrainingPlanInformation = (id, data, token) => {
|
|
|
131
131
|
const requestData = {
|
|
132
132
|
data: data,
|
|
133
133
|
};
|
|
134
|
-
let confirmationRequest =
|
|
134
|
+
let confirmationRequest = axiosClient_1.client.post(`api/v1/departmenttrainingplans/${id}`, requestData, {
|
|
135
135
|
headers: { authorization: token },
|
|
136
136
|
});
|
|
137
137
|
confirmationRequest
|
package/dist/groups.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
|
* Add permissions to group
|
|
6
6
|
* @param {String} groupId The group Id
|
|
@@ -10,7 +10,7 @@ const axiosClient_js_1 = require("./axiosClient.js");
|
|
|
10
10
|
*/
|
|
11
11
|
const addPermissionsToGroup = (groupId, permissions, authToken) => {
|
|
12
12
|
return new Promise((resolve, reject) => {
|
|
13
|
-
const request =
|
|
13
|
+
const request = axiosClient_1.client.post(`api/v1/groups/permissions/add`, {
|
|
14
14
|
groupId: groupId,
|
|
15
15
|
permissions: permissions,
|
|
16
16
|
}, { headers: { authorization: authToken } });
|
|
@@ -32,7 +32,7 @@ const addPermissionsToGroup = (groupId, permissions, authToken) => {
|
|
|
32
32
|
*/
|
|
33
33
|
const addUsersToGroup = (groupId, users, authToken) => {
|
|
34
34
|
return new Promise((resolve, reject) => {
|
|
35
|
-
const request =
|
|
35
|
+
const request = axiosClient_1.client.post(`api/v1/groups/users/add`, {
|
|
36
36
|
groupId: groupId,
|
|
37
37
|
users: users,
|
|
38
38
|
}, { headers: { authorization: authToken } });
|
|
@@ -54,7 +54,7 @@ const addUsersToGroup = (groupId, users, authToken) => {
|
|
|
54
54
|
*/
|
|
55
55
|
const createGroup = (name, description, authToken) => {
|
|
56
56
|
return new Promise((resolve, reject) => {
|
|
57
|
-
const request =
|
|
57
|
+
const request = axiosClient_1.client.post(`api/v1/groups/group`, {
|
|
58
58
|
name: name,
|
|
59
59
|
description: description,
|
|
60
60
|
}, { headers: { authorization: authToken } });
|
|
@@ -76,7 +76,7 @@ const createGroup = (name, description, authToken) => {
|
|
|
76
76
|
*/
|
|
77
77
|
const deleteGroup = (groupId, defaultGroupId, authToken) => {
|
|
78
78
|
return new Promise((resolve, reject) => {
|
|
79
|
-
const request =
|
|
79
|
+
const request = axiosClient_1.client.delete(`api/v1/groups/delete`, {
|
|
80
80
|
headers: { authorization: authToken },
|
|
81
81
|
data: {
|
|
82
82
|
id: groupId,
|
|
@@ -99,7 +99,7 @@ const deleteGroup = (groupId, defaultGroupId, authToken) => {
|
|
|
99
99
|
*/
|
|
100
100
|
const getAllPermissions = (authToken) => {
|
|
101
101
|
return new Promise((resolve, reject) => {
|
|
102
|
-
const request =
|
|
102
|
+
const request = axiosClient_1.client.get(`api/v1/groups/permissions/getAllPermissions`, {
|
|
103
103
|
headers: { authorization: authToken },
|
|
104
104
|
});
|
|
105
105
|
request
|
|
@@ -119,7 +119,7 @@ const getAllPermissions = (authToken) => {
|
|
|
119
119
|
*/
|
|
120
120
|
const getGroupById = (groupId, authToken) => {
|
|
121
121
|
return new Promise((resolve, reject) => {
|
|
122
|
-
const request =
|
|
122
|
+
const request = axiosClient_1.client.get(`api/v1/groups/group/${groupId}`, {
|
|
123
123
|
headers: { authorization: authToken },
|
|
124
124
|
});
|
|
125
125
|
request
|
|
@@ -138,7 +138,7 @@ const getGroupById = (groupId, authToken) => {
|
|
|
138
138
|
*/
|
|
139
139
|
const getGroups = (authToken) => {
|
|
140
140
|
return new Promise((resolve, reject) => {
|
|
141
|
-
const request =
|
|
141
|
+
const request = axiosClient_1.client.get(`api/v1/groups/`, {
|
|
142
142
|
headers: { authorization: authToken },
|
|
143
143
|
});
|
|
144
144
|
request
|
|
@@ -157,7 +157,7 @@ const getGroups = (authToken) => {
|
|
|
157
157
|
*/
|
|
158
158
|
const getUserPermissions = (authToken) => {
|
|
159
159
|
return new Promise((resolve, reject) => {
|
|
160
|
-
const request =
|
|
160
|
+
const request = axiosClient_1.client.get(`api/v1/groups/users/getuserpermissions`, {
|
|
161
161
|
headers: { authorization: authToken },
|
|
162
162
|
});
|
|
163
163
|
request
|
|
@@ -178,7 +178,7 @@ const getUserPermissions = (authToken) => {
|
|
|
178
178
|
*/
|
|
179
179
|
const removePermissionsFromGroup = (groupId, permissions, authToken) => {
|
|
180
180
|
return new Promise((resolve, reject) => {
|
|
181
|
-
const request =
|
|
181
|
+
const request = axiosClient_1.client.post(`api/v1/groups/permissions/remove/`, {
|
|
182
182
|
groupId: groupId,
|
|
183
183
|
permissions: permissions,
|
|
184
184
|
}, { headers: { authorization: authToken } });
|
|
@@ -200,7 +200,7 @@ const removePermissionsFromGroup = (groupId, permissions, authToken) => {
|
|
|
200
200
|
*/
|
|
201
201
|
const removeUsersFromGroup = (groupId, users, authToken) => {
|
|
202
202
|
return new Promise((resolve, reject) => {
|
|
203
|
-
const request =
|
|
203
|
+
const request = axiosClient_1.client.post(`api/v1/groups/users/remove/`, {
|
|
204
204
|
groupId: groupId,
|
|
205
205
|
users: users,
|
|
206
206
|
}, { headers: { authorization: authToken } });
|
|
@@ -221,7 +221,7 @@ const removeUsersFromGroup = (groupId, users, authToken) => {
|
|
|
221
221
|
*/
|
|
222
222
|
const setDefault = (groupId, authToken) => {
|
|
223
223
|
return new Promise((resolve, reject) => {
|
|
224
|
-
const request =
|
|
224
|
+
const request = axiosClient_1.client.put(`api/v1/groups/setDefault/`, {
|
|
225
225
|
id: groupId,
|
|
226
226
|
}, { headers: { authorization: authToken } });
|
|
227
227
|
request
|
|
@@ -243,7 +243,7 @@ const setDefault = (groupId, authToken) => {
|
|
|
243
243
|
*/
|
|
244
244
|
const updateGroup = (groupId, name, description, authToken) => {
|
|
245
245
|
return new Promise((resolve, reject) => {
|
|
246
|
-
const request =
|
|
246
|
+
const request = axiosClient_1.client.patch(`api/v1/groups/group/`, {
|
|
247
247
|
id: groupId,
|
|
248
248
|
name: name,
|
|
249
249
|
description: description,
|
package/dist/index.js
CHANGED
|
@@ -1,17 +1,77 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
4
|
};
|
|
16
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
|
|
6
|
+
exports.users = exports.userInformation = exports.trainingPlanProficiencyLevel = exports.trainingPlan = exports.tenant = exports.team = exports.talentTransfromation = exports.skillTemplate = exports.skillAssessmentTestingSession = exports.skillAssessment = exports.skill = exports.shouldReturnError = exports.security = exports.roleTemplate = exports.role = exports.RESPONSE_TYPE = exports.quotas = exports.PERMISSION_DESCRIPTIONS = exports.PERMISSIONS = exports.microSkillsQuizes = exports.logger = exports.learningPath = exports.learningContent = exports.groups = exports.departmentTraingPlans = exports.integrationConfiguration = exports.integration = exports.DOCUMENT_VERSION = exports.getErrorType = exports.getErrorInformation = exports.errorToString = exports.dashboard = exports.contentGenerator = exports.config = exports.client = exports.avatar = exports.aiAssistant = exports.address = exports.actionNotifications = void 0;
|
|
7
|
+
const actionNotifications_1 = __importDefault(require("./actionNotifications"));
|
|
8
|
+
exports.actionNotifications = actionNotifications_1.default;
|
|
9
|
+
const axiosClient_1 = require("./axiosClient");
|
|
10
|
+
Object.defineProperty(exports, "client", { enumerable: true, get: function () { return axiosClient_1.client; } });
|
|
11
|
+
Object.defineProperty(exports, "errorToString", { enumerable: true, get: function () { return axiosClient_1.errorToString; } });
|
|
12
|
+
Object.defineProperty(exports, "getErrorInformation", { enumerable: true, get: function () { return axiosClient_1.getErrorInformation; } });
|
|
13
|
+
Object.defineProperty(exports, "getErrorType", { enumerable: true, get: function () { return axiosClient_1.getErrorType; } });
|
|
14
|
+
Object.defineProperty(exports, "shouldReturnError", { enumerable: true, get: function () { return axiosClient_1.shouldReturnError; } });
|
|
15
|
+
const aiAssistant_1 = __importDefault(require("./aiAssistant"));
|
|
16
|
+
exports.aiAssistant = aiAssistant_1.default;
|
|
17
|
+
const avatar_1 = __importDefault(require("./avatar"));
|
|
18
|
+
exports.avatar = avatar_1.default;
|
|
19
|
+
const address_1 = __importDefault(require("./address"));
|
|
20
|
+
exports.address = address_1.default;
|
|
21
|
+
const config_1 = __importDefault(require("./config"));
|
|
22
|
+
exports.config = config_1.default;
|
|
23
|
+
const constants_1 = require("./constants");
|
|
24
|
+
Object.defineProperty(exports, "DOCUMENT_VERSION", { enumerable: true, get: function () { return constants_1.DOCUMENT_VERSION; } });
|
|
25
|
+
Object.defineProperty(exports, "PERMISSIONS", { enumerable: true, get: function () { return constants_1.PERMISSIONS; } });
|
|
26
|
+
Object.defineProperty(exports, "PERMISSION_DESCRIPTIONS", { enumerable: true, get: function () { return constants_1.PERMISSION_DESCRIPTIONS; } });
|
|
27
|
+
Object.defineProperty(exports, "RESPONSE_TYPE", { enumerable: true, get: function () { return constants_1.RESPONSE_TYPE; } });
|
|
28
|
+
const contentGenerator_1 = __importDefault(require("./integrations/contentGenerator"));
|
|
29
|
+
exports.contentGenerator = contentGenerator_1.default;
|
|
30
|
+
const dashboard_1 = __importDefault(require("./dashboard"));
|
|
31
|
+
exports.dashboard = dashboard_1.default;
|
|
32
|
+
const departmentTrainingPlans_1 = __importDefault(require("./departmentTrainingPlans"));
|
|
33
|
+
exports.departmentTraingPlans = departmentTrainingPlans_1.default;
|
|
34
|
+
const integration_1 = __importDefault(require("./integration"));
|
|
35
|
+
exports.integration = integration_1.default;
|
|
36
|
+
const integrationConfiguration_1 = __importDefault(require("./integrationConfiguration"));
|
|
37
|
+
exports.integrationConfiguration = integrationConfiguration_1.default;
|
|
38
|
+
const groups_1 = __importDefault(require("./groups"));
|
|
39
|
+
exports.groups = groups_1.default;
|
|
40
|
+
const learningContent_1 = __importDefault(require("./learningContent"));
|
|
41
|
+
exports.learningContent = learningContent_1.default;
|
|
42
|
+
const learningPath_1 = __importDefault(require("./learningPath"));
|
|
43
|
+
exports.learningPath = learningPath_1.default;
|
|
44
|
+
const logger_1 = __importDefault(require("./logger"));
|
|
45
|
+
exports.logger = logger_1.default;
|
|
46
|
+
const microSkillsQuizes_1 = __importDefault(require("./microSkillsQuizes"));
|
|
47
|
+
exports.microSkillsQuizes = microSkillsQuizes_1.default;
|
|
48
|
+
const quotas_1 = __importDefault(require("./quotas"));
|
|
49
|
+
exports.quotas = quotas_1.default;
|
|
50
|
+
const role_1 = __importDefault(require("./role"));
|
|
51
|
+
exports.role = role_1.default;
|
|
52
|
+
const roleTemplate_1 = __importDefault(require("./roleTemplate"));
|
|
53
|
+
exports.roleTemplate = roleTemplate_1.default;
|
|
54
|
+
const security_1 = __importDefault(require("./security"));
|
|
55
|
+
exports.security = security_1.default;
|
|
56
|
+
const skill_1 = __importDefault(require("./skill"));
|
|
57
|
+
exports.skill = skill_1.default;
|
|
58
|
+
const skillAssessments_1 = __importDefault(require("./skillAssessments"));
|
|
59
|
+
exports.skillAssessment = skillAssessments_1.default;
|
|
60
|
+
const skillAssessmentTestingSession_1 = __importDefault(require("./skillAssessmentTestingSession"));
|
|
61
|
+
exports.skillAssessmentTestingSession = skillAssessmentTestingSession_1.default;
|
|
62
|
+
const skillTemplate_1 = __importDefault(require("./skillTemplate"));
|
|
63
|
+
exports.skillTemplate = skillTemplate_1.default;
|
|
64
|
+
const talentTransfromation_1 = __importDefault(require("./talentTransfromation"));
|
|
65
|
+
exports.talentTransfromation = talentTransfromation_1.default;
|
|
66
|
+
const teams_1 = __importDefault(require("./teams"));
|
|
67
|
+
exports.team = teams_1.default;
|
|
68
|
+
const tenants_1 = __importDefault(require("./tenants"));
|
|
69
|
+
exports.tenant = tenants_1.default;
|
|
70
|
+
const trainingPlans_1 = __importDefault(require("./trainingPlans"));
|
|
71
|
+
exports.trainingPlan = trainingPlans_1.default;
|
|
72
|
+
const trainingPlansProficiencyLevels_1 = __importDefault(require("./trainingPlansProficiencyLevels"));
|
|
73
|
+
exports.trainingPlanProficiencyLevel = trainingPlansProficiencyLevels_1.default;
|
|
74
|
+
const userInformation_1 = __importDefault(require("./userInformation"));
|
|
75
|
+
exports.userInformation = userInformation_1.default;
|
|
76
|
+
const users_1 = __importDefault(require("./users"));
|
|
77
|
+
exports.users = users_1.default;
|
package/dist/integration.js
CHANGED
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.setDefaultIntegration = exports.setIntegrationInformation = exports.publishIntegration = exports.getEnabledContentProviders = exports.getContentInformationByUrlFromBrowser = exports.getContentInformationByUrl = exports.getIntegrationsList = exports.getIntegrationInformationById = exports.discardIntegrationChanges = exports.deleteIntegration = exports.createIntegration = void 0;
|
|
7
|
-
const
|
|
7
|
+
const axiosClient_1 = require("./axiosClient");
|
|
8
8
|
const axios_1 = __importDefault(require("axios"));
|
|
9
9
|
const node_html_parser_1 = __importDefault(require("node-html-parser"));
|
|
10
10
|
const html2plaintext_1 = __importDefault(require("html2plaintext"));
|
|
@@ -18,7 +18,7 @@ const createIntegration = (data, token) => {
|
|
|
18
18
|
const requestData = {
|
|
19
19
|
data: data,
|
|
20
20
|
};
|
|
21
|
-
let confirmationRequest =
|
|
21
|
+
let confirmationRequest = axiosClient_1.client.put("api/v1/integrations/", requestData, {
|
|
22
22
|
headers: { authorization: token },
|
|
23
23
|
});
|
|
24
24
|
confirmationRequest
|
|
@@ -38,7 +38,7 @@ exports.createIntegration = createIntegration;
|
|
|
38
38
|
*/
|
|
39
39
|
const deleteIntegration = (id, token) => {
|
|
40
40
|
return new Promise((resolve, reject) => {
|
|
41
|
-
const request =
|
|
41
|
+
const request = axiosClient_1.client.delete(`api/v1/integrations/`, {
|
|
42
42
|
headers: { authorization: token },
|
|
43
43
|
data: {
|
|
44
44
|
id: id,
|
|
@@ -62,7 +62,7 @@ exports.deleteIntegration = deleteIntegration;
|
|
|
62
62
|
const discardIntegrationChanges = (id, token) => {
|
|
63
63
|
return new Promise((resolve, reject) => {
|
|
64
64
|
const data = {};
|
|
65
|
-
const request =
|
|
65
|
+
const request = axiosClient_1.client.get(`api/v1/integrations/discard/${id}`, {
|
|
66
66
|
headers: { authorization: token },
|
|
67
67
|
data: data,
|
|
68
68
|
});
|
|
@@ -84,7 +84,7 @@ exports.discardIntegrationChanges = discardIntegrationChanges;
|
|
|
84
84
|
*/
|
|
85
85
|
const getIntegrationInformationById = (id, version, token) => {
|
|
86
86
|
return new Promise((resolve, reject) => {
|
|
87
|
-
let confirmationRequest =
|
|
87
|
+
let confirmationRequest = axiosClient_1.client.get(`api/v1/integrations/${id}/${version}`, {
|
|
88
88
|
headers: { authorization: token },
|
|
89
89
|
});
|
|
90
90
|
confirmationRequest
|
|
@@ -115,7 +115,7 @@ const getIntegrationsList = (filter, type, version, includeSupportedCapabilities
|
|
|
115
115
|
requestData.filter = filter;
|
|
116
116
|
if (type)
|
|
117
117
|
requestData.type = type;
|
|
118
|
-
let confirmationRequest =
|
|
118
|
+
let confirmationRequest = axiosClient_1.client.post(`api/v1/integrations`, requestData, {
|
|
119
119
|
headers: { authorization: token },
|
|
120
120
|
});
|
|
121
121
|
confirmationRequest
|
|
@@ -140,7 +140,7 @@ const getContentInformationByUrl = (url, verb, token) => {
|
|
|
140
140
|
url: url,
|
|
141
141
|
verb: verb,
|
|
142
142
|
};
|
|
143
|
-
let confirmationRequest =
|
|
143
|
+
let confirmationRequest = axiosClient_1.client.post(`api/v1/contentproviders/getcontentinformationbyurl`, requestData, {
|
|
144
144
|
headers: { authorization: token },
|
|
145
145
|
});
|
|
146
146
|
confirmationRequest
|
|
@@ -215,7 +215,7 @@ const getContentInformationByUrlFromBrowser = (url) => {
|
|
|
215
215
|
}
|
|
216
216
|
})
|
|
217
217
|
.catch((error) => {
|
|
218
|
-
reject(new Error((0,
|
|
218
|
+
reject(new Error((0, axiosClient_1.errorToString)(error)));
|
|
219
219
|
});
|
|
220
220
|
});
|
|
221
221
|
};
|
|
@@ -227,7 +227,7 @@ exports.getContentInformationByUrlFromBrowser = getContentInformationByUrlFromBr
|
|
|
227
227
|
*/
|
|
228
228
|
const getEnabledContentProviders = (userId, token) => {
|
|
229
229
|
return new Promise((resolve, reject) => {
|
|
230
|
-
let confirmationRequest =
|
|
230
|
+
let confirmationRequest = axiosClient_1.client.get(`api/v1/contentproviders/getenabledcontentproviders/${userId}`, {
|
|
231
231
|
headers: { authorization: token },
|
|
232
232
|
});
|
|
233
233
|
confirmationRequest
|
|
@@ -247,7 +247,7 @@ exports.getEnabledContentProviders = getEnabledContentProviders;
|
|
|
247
247
|
*/
|
|
248
248
|
const publishIntegration = (id, token) => {
|
|
249
249
|
return new Promise((resolve, reject) => {
|
|
250
|
-
let confirmationRequest =
|
|
250
|
+
let confirmationRequest = axiosClient_1.client.post(`api/v1/integrations/publish/${id}`, {}, {
|
|
251
251
|
headers: { authorization: token },
|
|
252
252
|
});
|
|
253
253
|
confirmationRequest
|
|
@@ -271,7 +271,7 @@ const setIntegrationInformation = (id, data, token) => {
|
|
|
271
271
|
const requestData = {
|
|
272
272
|
data: data,
|
|
273
273
|
};
|
|
274
|
-
let confirmationRequest =
|
|
274
|
+
let confirmationRequest = axiosClient_1.client.post(`api/v1/integrations/${id}`, requestData, {
|
|
275
275
|
headers: { authorization: token },
|
|
276
276
|
});
|
|
277
277
|
confirmationRequest
|
|
@@ -291,7 +291,7 @@ exports.setIntegrationInformation = setIntegrationInformation;
|
|
|
291
291
|
*/
|
|
292
292
|
const setDefaultIntegration = (id, token) => {
|
|
293
293
|
return new Promise((resolve, reject) => {
|
|
294
|
-
let confirmationRequest =
|
|
294
|
+
let confirmationRequest = axiosClient_1.client.post(`api/v1/integrations/${id}/default`, "", {
|
|
295
295
|
headers: { authorization: token },
|
|
296
296
|
});
|
|
297
297
|
confirmationRequest
|
|
@@ -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 integration configuration
|
|
6
6
|
* @param {Array<String>} ids
|
|
@@ -13,7 +13,7 @@ const getIntegrationsConfiguration = (ids, type, token) => {
|
|
|
13
13
|
let requestData = { type: type };
|
|
14
14
|
if (ids)
|
|
15
15
|
requestData.ids = ids;
|
|
16
|
-
let confirmationRequest =
|
|
16
|
+
let confirmationRequest = axiosClient_1.client.post("api/v1/integrationsconfiguration", requestData, {
|
|
17
17
|
headers: { authorization: token },
|
|
18
18
|
});
|
|
19
19
|
confirmationRequest
|
|
@@ -40,7 +40,7 @@ const saveIntegrationConfiguration = (id, type, configuration, token) => {
|
|
|
40
40
|
configuration: configuration,
|
|
41
41
|
type: type,
|
|
42
42
|
};
|
|
43
|
-
let confirmationRequest =
|
|
43
|
+
let confirmationRequest = axiosClient_1.client.put(`api/v1/integrationsconfiguration`, requestData, {
|
|
44
44
|
headers: { authorization: token },
|
|
45
45
|
});
|
|
46
46
|
confirmationRequest
|
|
@@ -67,7 +67,7 @@ const testIntegrationConfiguration = (id, type, configuration, token) => {
|
|
|
67
67
|
configuration: configuration,
|
|
68
68
|
type: type,
|
|
69
69
|
};
|
|
70
|
-
let confirmationRequest =
|
|
70
|
+
let confirmationRequest = axiosClient_1.client.post(`api/v1/integrationsconfiguration/testConfiguration`, requestData, {
|
|
71
71
|
headers: { authorization: token },
|
|
72
72
|
});
|
|
73
73
|
confirmationRequest
|