@stackfactor/client-api 1.0.85 → 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 +17 -4
- package/lib/skillTemplate.js +8 -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
|
}
|
|
@@ -239,13 +246,19 @@ export const getSkillList = (
|
|
|
239
246
|
* Get skills for team by id
|
|
240
247
|
* @param {String} teamId The ID of the team for which skills will be loaded
|
|
241
248
|
* @param {Number} maxDepth How many levels down in the organization the skills will be loaded
|
|
249
|
+
* @param {Boolean} returnNullIfVersionNotFound Return null if the version is not found
|
|
242
250
|
* @param {String} token Authorization token
|
|
243
251
|
* @returns {Promise}
|
|
244
252
|
*/
|
|
245
|
-
export const getTeamSkillsById = (
|
|
253
|
+
export const getTeamSkillsById = (
|
|
254
|
+
teamId,
|
|
255
|
+
maxDepth,
|
|
256
|
+
returnNullIfVersionNotFound,
|
|
257
|
+
token
|
|
258
|
+
) => {
|
|
246
259
|
return new Promise(function (resolve, reject) {
|
|
247
260
|
let confirmationRequest = client.get(
|
|
248
|
-
`api/v1/skills/getteambyid/${teamId}/${maxDepth}`,
|
|
261
|
+
`api/v1/skills/getteambyid/${teamId}/${maxDepth}/${returnNullIfVersionNotFound}`,
|
|
249
262
|
{
|
|
250
263
|
headers: { authorization: token },
|
|
251
264
|
}
|
package/lib/skillTemplate.js
CHANGED
|
@@ -75,12 +75,18 @@ export const discardSkillTemplateChanges = (id, token) => {
|
|
|
75
75
|
* Get skill template information
|
|
76
76
|
* @param {String} id The id of the template
|
|
77
77
|
* @param {String} version The version of the template
|
|
78
|
+
* @param {Boolean} returnNullIfVersionNotFound When true it will return null if the version is not found
|
|
78
79
|
* @param {String} token Authorization token
|
|
79
80
|
*/
|
|
80
|
-
export const getSkillTemplateInformationById = (
|
|
81
|
+
export const getSkillTemplateInformationById = (
|
|
82
|
+
id,
|
|
83
|
+
version,
|
|
84
|
+
returnNullIfVersionNotFound,
|
|
85
|
+
token
|
|
86
|
+
) => {
|
|
81
87
|
return new Promise(function (resolve, reject) {
|
|
82
88
|
let confirmationRequest = client.get(
|
|
83
|
-
`api/v1/skilltemplates/${id}/${version}`,
|
|
89
|
+
`api/v1/skilltemplates/${id}/${version}/${returnNullIfVersionNotFound}`,
|
|
84
90
|
{
|
|
85
91
|
headers: { authorization: token },
|
|
86
92
|
}
|