@stackfactor/client-api 1.0.86 → 1.0.87
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/lib/role.js +14 -4
- package/lib/skill.js +9 -2
- package/package.json +1 -1
package/lib/role.js
CHANGED
|
@@ -129,14 +129,24 @@ export const getImportedRoleTemplates = (token) => {
|
|
|
129
129
|
/**
|
|
130
130
|
* Get role information
|
|
131
131
|
* @param {number} id The id of the role
|
|
132
|
+
* @param {String} version The version to be retrieved
|
|
133
|
+
* @param {Boolean} returnNullIfVersionNotFound Return null if the version is not found
|
|
132
134
|
* @param {String} token Authorization token
|
|
133
135
|
* @returns {Promise}
|
|
134
136
|
*/
|
|
135
|
-
export const getRoleInformationById = (
|
|
137
|
+
export const getRoleInformationById = (
|
|
138
|
+
id,
|
|
139
|
+
version,
|
|
140
|
+
returnNullIfVersionNotFound,
|
|
141
|
+
token
|
|
142
|
+
) => {
|
|
136
143
|
return new Promise(function (resolve, reject) {
|
|
137
|
-
let confirmationRequest = client.get(
|
|
138
|
-
|
|
139
|
-
|
|
144
|
+
let confirmationRequest = client.get(
|
|
145
|
+
`api/v1/roles/role/${id}/${version}/${returnNullIfVersionNotFound}`,
|
|
146
|
+
{
|
|
147
|
+
headers: { authorization: token },
|
|
148
|
+
}
|
|
149
|
+
);
|
|
140
150
|
confirmationRequest
|
|
141
151
|
.then((response) => {
|
|
142
152
|
resolve(response.data);
|
package/lib/skill.js
CHANGED
|
@@ -175,13 +175,20 @@ export const getSkillRequiredAssessmentType = (id, token) => {
|
|
|
175
175
|
/**
|
|
176
176
|
* Get skill skill information
|
|
177
177
|
* @param {String} id The id of the skill
|
|
178
|
+
* @param {String} version The version of the skill
|
|
179
|
+
* @param {Boolean} returnNullIfVersionNotFound When true it will return null if the version is not found
|
|
178
180
|
* @param {String} token Authorization token
|
|
179
181
|
* @returns {Promise}
|
|
180
182
|
*/
|
|
181
|
-
export const getSkillInformationById = (
|
|
183
|
+
export const getSkillInformationById = (
|
|
184
|
+
id,
|
|
185
|
+
version,
|
|
186
|
+
returnNullIfVersionNotFound,
|
|
187
|
+
token
|
|
188
|
+
) => {
|
|
182
189
|
return new Promise(function (resolve, reject) {
|
|
183
190
|
let confirmationRequest = client.get(
|
|
184
|
-
`api/v1/skills/skill/${id}/${version}`,
|
|
191
|
+
`api/v1/skills/skill/${id}/${version}/${returnNullIfVersionNotFound}`,
|
|
185
192
|
{
|
|
186
193
|
headers: { authorization: token },
|
|
187
194
|
}
|