@stackfactor/client-api 1.0.32 → 1.0.33
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/index.js +0 -2
- package/lib/actionNotifications.js +202 -226
- package/lib/address.js +21 -27
- package/lib/axiosClient.js +1 -1
- package/lib/config.js +62 -66
- package/lib/dashboard.js +64 -68
- package/lib/departmentTrainingPlans.js +159 -153
- package/lib/groups.js +266 -291
- package/lib/integration.js +307 -312
- package/lib/integrationConfiguration.js +96 -90
- package/lib/integrations/contentGenerator.js +71 -74
- package/lib/learningContent.js +239 -240
- package/lib/logger.js +51 -56
- package/lib/role.js +238 -245
- package/lib/roleTemplate.js +247 -255
- package/lib/skill.js +299 -311
- package/lib/skillAssessmentTestingSession.js +132 -137
- package/lib/skillAssessments.js +125 -129
- package/lib/skillTemplate.js +250 -255
- package/lib/teams.js +261 -257
- package/lib/tenants.js +48 -52
- package/lib/trainingPlanTemplate.js +203 -202
- package/lib/trainingPlans.js +249 -251
- package/lib/userInformation.js +97 -85
- package/lib/users.js +557 -555
- package/lib/utils.js +38 -42
- package/package.json +1 -1
- package/lib/templates.js +0 -148
package/lib/userInformation.js
CHANGED
|
@@ -1,89 +1,101 @@
|
|
|
1
|
-
import
|
|
1
|
+
import axios from "./axiosClient";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
.
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Add an entry to an array type business property such as experience, education or certifications
|
|
5
|
+
* @param {String} userId
|
|
6
|
+
* @param {String} property
|
|
7
|
+
* @param {Object} data
|
|
8
|
+
* @param {String} token Authorization token
|
|
9
|
+
*/
|
|
10
|
+
export const addEntryToArrayBusinessProperty = (
|
|
11
|
+
userId,
|
|
12
|
+
property,
|
|
13
|
+
data,
|
|
14
|
+
token
|
|
15
|
+
) => {
|
|
16
|
+
return new Promise(function (resolve, reject) {
|
|
17
|
+
const requestData = {
|
|
18
|
+
data: data,
|
|
19
|
+
};
|
|
20
|
+
let confirmationRequest = axios.post(
|
|
21
|
+
`api/v1/user/arrayproperty/${userId}/${property}`,
|
|
22
|
+
requestData,
|
|
23
|
+
{
|
|
24
|
+
headers: { authorization: token },
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
confirmationRequest
|
|
28
|
+
.then((response) => {
|
|
29
|
+
resolve(response.data);
|
|
30
|
+
})
|
|
31
|
+
.catch((error) => {
|
|
32
|
+
reject(error);
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
};
|
|
34
36
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
37
|
+
/**
|
|
38
|
+
* Update an entry from an array type business property such as experience, education or certifications
|
|
39
|
+
* @param {String} userId
|
|
40
|
+
* @param {String} property
|
|
41
|
+
* @param {String} id
|
|
42
|
+
* @param {String} token Authorization token
|
|
43
|
+
*/
|
|
44
|
+
export const removeEntryFromArrayBusinessProperty = (
|
|
45
|
+
userId,
|
|
46
|
+
property,
|
|
47
|
+
id,
|
|
48
|
+
token
|
|
49
|
+
) => {
|
|
50
|
+
return new Promise(function (resolve, reject) {
|
|
51
|
+
const confirmationRequest = axios.delete(
|
|
52
|
+
`api/v1/user/arrayproperty/${userId}/${property}/${id}`,
|
|
53
|
+
{
|
|
54
|
+
headers: { authorization: token },
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
confirmationRequest
|
|
58
|
+
.then((response) => {
|
|
59
|
+
resolve(response.data);
|
|
60
|
+
})
|
|
61
|
+
.catch((error) => {
|
|
62
|
+
reject(error);
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
};
|
|
59
66
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
67
|
+
/**
|
|
68
|
+
* Update an entry from an array type business property such as experience, education or certifications
|
|
69
|
+
* @param {String} userId
|
|
70
|
+
* @param {String} property
|
|
71
|
+
* @param {String} id
|
|
72
|
+
* @param {Object} data
|
|
73
|
+
* @param {String} token Authorization token
|
|
74
|
+
*/
|
|
75
|
+
export const updateEntryfromArrayBusinessProperty = (
|
|
76
|
+
userId,
|
|
77
|
+
property,
|
|
78
|
+
id,
|
|
79
|
+
data,
|
|
80
|
+
token
|
|
81
|
+
) => {
|
|
82
|
+
return new Promise(function (resolve, reject) {
|
|
83
|
+
const requestData = {
|
|
84
|
+
data: data,
|
|
85
|
+
};
|
|
86
|
+
let confirmationRequest = axios.patch(
|
|
87
|
+
`api/v1/user/arrayproperty/${userId}/${property}/${id}`,
|
|
88
|
+
requestData,
|
|
89
|
+
{
|
|
90
|
+
headers: { authorization: token },
|
|
91
|
+
}
|
|
92
|
+
);
|
|
93
|
+
confirmationRequest
|
|
94
|
+
.then((response) => {
|
|
95
|
+
resolve(response.data);
|
|
96
|
+
})
|
|
97
|
+
.catch((error) => {
|
|
98
|
+
reject(error);
|
|
99
|
+
});
|
|
100
|
+
});
|
|
89
101
|
};
|