@stackfactor/client-api 1.1.152 → 1.1.154

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.
Files changed (138) hide show
  1. package/dist/cjs/actionNotifications.js.map +1 -1
  2. package/dist/cjs/address.js.map +1 -1
  3. package/dist/cjs/aiAssistant.js.map +1 -1
  4. package/dist/cjs/avatar.js.map +1 -1
  5. package/dist/cjs/axiosClient.js.map +1 -1
  6. package/dist/cjs/config.js.map +1 -1
  7. package/dist/cjs/constants.js.map +1 -1
  8. package/dist/cjs/dashboard.js.map +1 -1
  9. package/dist/cjs/departmentTrainingPlans.d.ts +4 -4
  10. package/dist/cjs/departmentTrainingPlans.js +2 -2
  11. package/dist/cjs/departmentTrainingPlans.js.map +1 -1
  12. package/dist/cjs/groups.js.map +1 -1
  13. package/dist/cjs/index.js.map +1 -1
  14. package/dist/cjs/integration.d.ts +2 -2
  15. package/dist/cjs/integration.d.ts.map +1 -1
  16. package/dist/cjs/integration.js +1 -1
  17. package/dist/cjs/integration.js.map +1 -1
  18. package/dist/cjs/integrationConfiguration.d.ts +2 -2
  19. package/dist/cjs/integrationConfiguration.js +1 -1
  20. package/dist/cjs/integrationConfiguration.js.map +1 -1
  21. package/dist/cjs/integrations/contentGenerator.js.map +1 -1
  22. package/dist/cjs/learningContent.js.map +1 -1
  23. package/dist/cjs/learningPath.js.map +1 -1
  24. package/dist/cjs/logger.js.map +1 -1
  25. package/dist/cjs/microSkillsQuizes.js.map +1 -1
  26. package/dist/cjs/quotas.js.map +1 -1
  27. package/dist/cjs/role.js.map +1 -1
  28. package/dist/cjs/roleTemplate.js.map +1 -1
  29. package/dist/cjs/security.js.map +1 -1
  30. package/dist/cjs/skill.js.map +1 -1
  31. package/dist/cjs/skillAssessmentTestingSession.d.ts +2 -2
  32. package/dist/cjs/skillAssessmentTestingSession.d.ts.map +1 -1
  33. package/dist/cjs/skillAssessmentTestingSession.js +1 -1
  34. package/dist/cjs/skillAssessmentTestingSession.js.map +1 -1
  35. package/dist/cjs/skillAssessments.d.ts +2 -2
  36. package/dist/cjs/skillAssessments.js +1 -1
  37. package/dist/cjs/skillAssessments.js.map +1 -1
  38. package/dist/cjs/skillTemplate.js.map +1 -1
  39. package/dist/cjs/talentTransfromation.js.map +1 -1
  40. package/dist/cjs/teams.js.map +1 -1
  41. package/dist/cjs/tenants.d.ts +2 -2
  42. package/dist/cjs/tenants.d.ts.map +1 -1
  43. package/dist/cjs/tenants.js +1 -1
  44. package/dist/cjs/tenants.js.map +1 -1
  45. package/dist/cjs/trainingPlans.js.map +1 -1
  46. package/dist/cjs/trainingPlansProficiencyLevels.js.map +1 -1
  47. package/dist/cjs/userInformation.js.map +1 -1
  48. package/dist/cjs/users.d.ts +1 -1
  49. package/dist/cjs/users.d.ts.map +1 -1
  50. package/dist/cjs/users.js.map +1 -1
  51. package/dist/cjs/utils.js.map +1 -1
  52. package/dist/esm/actionNotifications.js.map +1 -1
  53. package/dist/esm/address.js.map +1 -1
  54. package/dist/esm/aiAssistant.js.map +1 -1
  55. package/dist/esm/avatar.js.map +1 -1
  56. package/dist/esm/axiosClient.js.map +1 -1
  57. package/dist/esm/config.js.map +1 -1
  58. package/dist/esm/constants.js.map +1 -1
  59. package/dist/esm/dashboard.js.map +1 -1
  60. package/dist/esm/departmentTrainingPlans.d.ts +4 -4
  61. package/dist/esm/departmentTrainingPlans.js +2 -2
  62. package/dist/esm/departmentTrainingPlans.js.map +1 -1
  63. package/dist/esm/groups.js.map +1 -1
  64. package/dist/esm/index.js.map +1 -1
  65. package/dist/esm/integration.d.ts +2 -2
  66. package/dist/esm/integration.d.ts.map +1 -1
  67. package/dist/esm/integration.js +1 -1
  68. package/dist/esm/integration.js.map +1 -1
  69. package/dist/esm/integrationConfiguration.d.ts +2 -2
  70. package/dist/esm/integrationConfiguration.js +1 -1
  71. package/dist/esm/integrationConfiguration.js.map +1 -1
  72. package/dist/esm/integrations/contentGenerator.js.map +1 -1
  73. package/dist/esm/learningContent.js.map +1 -1
  74. package/dist/esm/learningPath.js.map +1 -1
  75. package/dist/esm/logger.js.map +1 -1
  76. package/dist/esm/microSkillsQuizes.js.map +1 -1
  77. package/dist/esm/quotas.js.map +1 -1
  78. package/dist/esm/role.js.map +1 -1
  79. package/dist/esm/roleTemplate.js.map +1 -1
  80. package/dist/esm/security.js.map +1 -1
  81. package/dist/esm/skill.js.map +1 -1
  82. package/dist/esm/skillAssessmentTestingSession.d.ts +2 -2
  83. package/dist/esm/skillAssessmentTestingSession.d.ts.map +1 -1
  84. package/dist/esm/skillAssessmentTestingSession.js +1 -1
  85. package/dist/esm/skillAssessmentTestingSession.js.map +1 -1
  86. package/dist/esm/skillAssessments.d.ts +2 -2
  87. package/dist/esm/skillAssessments.js +1 -1
  88. package/dist/esm/skillAssessments.js.map +1 -1
  89. package/dist/esm/skillTemplate.js.map +1 -1
  90. package/dist/esm/talentTransfromation.js.map +1 -1
  91. package/dist/esm/teams.js.map +1 -1
  92. package/dist/esm/tenants.d.ts +2 -2
  93. package/dist/esm/tenants.d.ts.map +1 -1
  94. package/dist/esm/tenants.js +1 -1
  95. package/dist/esm/tenants.js.map +1 -1
  96. package/dist/esm/trainingPlans.js.map +1 -1
  97. package/dist/esm/trainingPlansProficiencyLevels.js.map +1 -1
  98. package/dist/esm/userInformation.js.map +1 -1
  99. package/dist/esm/users.d.ts +1 -1
  100. package/dist/esm/users.d.ts.map +1 -1
  101. package/dist/esm/users.js.map +1 -1
  102. package/dist/esm/utils.js.map +1 -1
  103. package/package.json +1 -1
  104. package/dist/actionNotifications.js +0 -73
  105. package/dist/address.js +0 -22
  106. package/dist/aiAssistant.js +0 -134
  107. package/dist/avatar.js +0 -32
  108. package/dist/axiosClient.js +0 -89
  109. package/dist/config.js +0 -63
  110. package/dist/constants.js +0 -94
  111. package/dist/dashboard.js +0 -74
  112. package/dist/departmentTrainingPlans.js +0 -154
  113. package/dist/exports.js +0 -77
  114. package/dist/groups.js +0 -273
  115. package/dist/index.js +0 -77
  116. package/dist/integration.js +0 -319
  117. package/dist/integrationConfiguration.js +0 -86
  118. package/dist/integrations/contentGenerator.js +0 -70
  119. package/dist/learningContent.js +0 -394
  120. package/dist/learningPath.js +0 -205
  121. package/dist/logger.js +0 -57
  122. package/dist/microSkillsQuizes.js +0 -53
  123. package/dist/quotas.js +0 -50
  124. package/dist/role.js +0 -363
  125. package/dist/roleTemplate.js +0 -236
  126. package/dist/security.js +0 -79
  127. package/dist/skill.js +0 -439
  128. package/dist/skillAssessmentTestingSession.js +0 -156
  129. package/dist/skillAssessments.js +0 -156
  130. package/dist/skillTemplate.js +0 -281
  131. package/dist/talentTransfromation.js +0 -100
  132. package/dist/teams.js +0 -252
  133. package/dist/tenants.js +0 -52
  134. package/dist/trainingPlans.js +0 -308
  135. package/dist/trainingPlansProficiencyLevels.js +0 -98
  136. package/dist/userInformation.js +0 -81
  137. package/dist/users.js +0 -694
  138. package/dist/utils.js +0 -65
package/dist/security.js DELETED
@@ -1,79 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const axiosClient_1 = require("./axiosClient");
4
- /**
5
- * Get the enabled authentication connections for current organization.
6
- * @param {String} authToken - Authorization token
7
- * @returns {Promise<Object>}
8
- */
9
- const getAuthConnections = (authToken) => {
10
- return new Promise((resolve, reject) => {
11
- const getConfigInformationRequest = axiosClient_1.client.get(`api/v1/security/authconnections`, { headers: { authorization: authToken } });
12
- getConfigInformationRequest
13
- .then((response) => {
14
- resolve(response.data);
15
- })
16
- .catch((error) => {
17
- reject(error);
18
- });
19
- });
20
- };
21
- /**
22
- * Set the enabled authentication connections for current organization.
23
- * @param {Object} data - the object containing the updated configuration
24
- * @param {String} authToken - Authorization token
25
- * @returns {Promise<Object>}
26
- */
27
- const setAuthConnections = (data, authToken) => {
28
- return new Promise((resolve, reject) => {
29
- const setConfigInformationRequest = axiosClient_1.client.post(`api/v1/security/authconnections`, { data: data }, { headers: { authorization: authToken } });
30
- setConfigInformationRequest
31
- .then((response) => {
32
- resolve(response.data);
33
- })
34
- .catch((error) => {
35
- reject(error);
36
- });
37
- });
38
- };
39
- /**
40
- * Reset the MFA for the user.
41
- * @param {String} userId
42
- * @param {String} authToken
43
- * @returns {Promise<Object>}
44
- */
45
- const resetMFA = (userId, authToken) => {
46
- return new Promise((resolve, reject) => {
47
- const resetMFARequest = axiosClient_1.client.post(`api/v1/security/resetmfa`, userId ? {} : { userId: userId }, { headers: { authorization: authToken } });
48
- resetMFARequest
49
- .then((response) => {
50
- resolve(response.data);
51
- })
52
- .catch((error) => {
53
- reject(error);
54
- });
55
- });
56
- };
57
- /**
58
- * Synchronize the authentication connections with Auth0.
59
- * @param {String} authToken
60
- * @returns {Promise<Object>}
61
- */
62
- const synchronizeWithAuth0 = (authToken) => {
63
- return new Promise((resolve, reject) => {
64
- const synchronizeRequest = axiosClient_1.client.get(`api/v1/security/synchronizewithauth0`, { headers: { authorization: authToken } });
65
- synchronizeRequest
66
- .then((response) => {
67
- resolve(response.data);
68
- })
69
- .catch((error) => {
70
- reject(error);
71
- });
72
- });
73
- };
74
- exports.default = {
75
- getAuthConnections,
76
- resetMFA,
77
- setAuthConnections,
78
- synchronizeWithAuth0,
79
- };
package/dist/skill.js DELETED
@@ -1,439 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const axiosClient_1 = require("./axiosClient");
4
- /**
5
- * Create skill and set information
6
- * @param {Object} data
7
- * @param {String} token Authorization token
8
- * @returns {Promise<Object>}
9
- */
10
- const createSkill = (data, token) => {
11
- return new Promise((resolve, reject) => {
12
- let confirmationRequest = axiosClient_1.client.put("api/v1/skills", { data: data }, {
13
- headers: { authorization: token },
14
- });
15
- confirmationRequest
16
- .then((response) => {
17
- resolve(response.data);
18
- })
19
- .catch((error) => {
20
- reject(error);
21
- });
22
- });
23
- };
24
- /**
25
- * Create skills from templates
26
- * @param {Array<String>} templateIds
27
- * @param {String} token Authorization token
28
- * @returns {Promise<Object>}
29
- */
30
- const createSkillsFromTemplates = (templateIds, token) => {
31
- return new Promise((resolve, reject) => {
32
- const requestData = {
33
- templateIds: templateIds,
34
- };
35
- let confirmationRequest = axiosClient_1.client.put("api/v1/skills/createfromtemplate/", requestData, {
36
- headers: { authorization: token },
37
- });
38
- confirmationRequest
39
- .then((response) => {
40
- resolve(response.data);
41
- })
42
- .catch((error) => {
43
- reject(error);
44
- });
45
- });
46
- };
47
- /**
48
- * Delete skill
49
- * @param {String} id The id of the skill to be deleted
50
- * @param {String} comments The comments included with the deletion
51
- * @param {String} token Authorization token
52
- * @returns {Promise<Object>}
53
- */
54
- const deleteSkill = (id, comments, token) => {
55
- return new Promise((resolve, reject) => {
56
- const data = {
57
- id: id,
58
- };
59
- if (comments)
60
- data.comments = comments;
61
- const request = axiosClient_1.client.delete(`api/v1/skills/`, {
62
- headers: { authorization: token },
63
- data: data,
64
- });
65
- request
66
- .then((response) => {
67
- resolve(response.data);
68
- })
69
- .catch((error) => {
70
- reject(error);
71
- });
72
- });
73
- };
74
- /**
75
- * Discard the skill draft changes
76
- * @param {String} id The id of the skill to be discarded
77
- * @param {String} token Authorization token
78
- * @returns {Promise<Object>}
79
- */
80
- const discardSkillChanges = (id, token) => {
81
- return new Promise((resolve, reject) => {
82
- const data = {};
83
- const request = axiosClient_1.client.get(`api/v1/skills/discard/${id}`, {
84
- headers: { authorization: token },
85
- data: data,
86
- });
87
- request
88
- .then((response) => {
89
- resolve(response.data);
90
- })
91
- .catch((error) => {
92
- reject(error);
93
- });
94
- });
95
- };
96
- /**
97
- * Get the list of imported skill templates
98
- * @param {String} token Authorization token
99
- * @returns {Promise<Object>}
100
- */
101
- const getImportedSkillTemplates = (token) => {
102
- return new Promise((resolve, reject) => {
103
- const request = axiosClient_1.client.get(`api/v1/skills/getimportedskilltemplates`, {
104
- headers: { authorization: token },
105
- });
106
- request
107
- .then((response) => {
108
- resolve(response.data);
109
- })
110
- .catch((error) => {
111
- reject(error);
112
- });
113
- });
114
- };
115
- /**
116
- * Get the skill related roles
117
- * @param {String} id
118
- * @param {String} token Authorization token
119
- * @param {Boolean} includeRoleInformation
120
- * @returns {Promise<Object>}
121
- */
122
- const getSkillRelatedRoles = (id, token, includeRoleInformation = false) => {
123
- return new Promise((resolve, reject) => {
124
- let confirmationRequest = axiosClient_1.client.get(`api/v1/skills/getskillrelatedroles/${id}/${includeRoleInformation}`, {
125
- headers: { authorization: token },
126
- });
127
- confirmationRequest
128
- .then((response) => {
129
- resolve(response.data);
130
- })
131
- .catch((error) => {
132
- reject(error);
133
- });
134
- });
135
- };
136
- /**
137
- * Get skill required assessment type
138
- * @param {String} id
139
- * @param {String} token Authorization token
140
- * @returns {Promise<Object>}
141
- */
142
- const getSkillRequiredAssessmentType = (id, token) => {
143
- return new Promise((resolve, reject) => {
144
- let confirmationRequest = axiosClient_1.client.get(`api/v1/skills/getrequiredassessmenttype/${id}`, {
145
- headers: { authorization: token },
146
- });
147
- confirmationRequest
148
- .then((response) => {
149
- resolve(response.data);
150
- })
151
- .catch((error) => {
152
- reject(error);
153
- });
154
- });
155
- };
156
- /**
157
- * Get skill information
158
- * @param {String} id The id of the skill
159
- * @param {String} version The version of the skill
160
- * @param {Boolean} returnNullIfVersionNotFound When true it will return null if the version is not found
161
- * @param {String} token Authorization token
162
- * @returns {Promise<Object>}
163
- */
164
- const getSkillInformationById = (id, version, returnNullIfVersionNotFound, token) => {
165
- return new Promise((resolve, reject) => {
166
- let confirmationRequest = axiosClient_1.client.get(`api/v1/skills/skill/${id}/${version}/${returnNullIfVersionNotFound}`, {
167
- headers: { authorization: token },
168
- });
169
- confirmationRequest
170
- .then((response) => {
171
- resolve(response.data);
172
- })
173
- .catch((error) => {
174
- reject(error);
175
- });
176
- });
177
- };
178
- /**
179
- * Get skill list
180
- * @param {Array<String>} filter The filter used to select the skill
181
- * @param {String} version The version to be retrieved
182
- * @param {Boolean} includeDeleted If true it will return deleted records as well
183
- * @param {Boolean} returnDefaultIfVersionNotAvailable Return the default version if published not available
184
- * @param {Boolean} namesOnly Return only the names of the skills
185
- * @param {String} token Authorization token
186
- * @returns {Promise<Object>}
187
- */
188
- const getSkillList = (filter, version, includeDeleted, returnDefaultIfVersionNotAvailable, namesOnly, token) => {
189
- return new Promise((resolve, reject) => {
190
- const requestData = {
191
- includeDeleted: includeDeleted,
192
- namesOnly: namesOnly,
193
- returnDefaultIfVersionNotAvailable: returnDefaultIfVersionNotAvailable,
194
- version: version,
195
- filter: filter,
196
- };
197
- if (filter)
198
- requestData.filter = filter;
199
- let confirmationRequest = axiosClient_1.client.post(`api/v1/skills`, requestData, {
200
- headers: { authorization: token },
201
- });
202
- confirmationRequest
203
- .then((response) => {
204
- resolve(response.data);
205
- })
206
- .catch((error) => {
207
- reject(error);
208
- });
209
- });
210
- };
211
- /**
212
- * Get skills for team by id
213
- * @param {String} teamId The ID of the team for which skills will be loaded
214
- * @param {Number} maxDepth How many levels down in the organization the skills will be loaded
215
- * @param {Boolean} returnNullIfVersionNotFound Return null if the version is not found
216
- * @param {String} token Authorization token
217
- * @returns {Promise<Object>}
218
- */
219
- const getTeamSkillsById = (teamId, maxDepth, returnNullIfVersionNotFound, token) => {
220
- return new Promise((resolve, reject) => {
221
- let confirmationRequest = axiosClient_1.client.get(`api/v1/skills/getteambyid/${teamId}/${maxDepth}/${returnNullIfVersionNotFound}`, {
222
- headers: { authorization: token },
223
- });
224
- confirmationRequest
225
- .then((response) => {
226
- resolve(response.data);
227
- })
228
- .catch((error) => {
229
- reject(error);
230
- });
231
- });
232
- };
233
- /**
234
- * Get current user team skills
235
- * @param {Number} maxDepth How many levels down in the organization the skills will be loaded
236
- * @param {String} token Authorization token
237
- * @returns {Promise<Object>}
238
- */
239
- const getCurrentUserTeamSkills = (maxDepth, token) => {
240
- return new Promise((resolve, reject) => {
241
- let confirmationRequest = axiosClient_1.client.get(`api/v1/skills/getcurrentuserteam/${maxDepth}`, {
242
- headers: { authorization: token },
243
- });
244
- confirmationRequest
245
- .then((response) => {
246
- resolve(response.data);
247
- })
248
- .catch((error) => {
249
- reject(error);
250
- });
251
- });
252
- };
253
- /**
254
- * Get skill template updates
255
- * @param {String} id The skill id
256
- * @param {String} token Authorization token
257
- * @returns {Promise<Object>}
258
- */
259
- const getSkillTemplateUpdates = (id, token) => {
260
- return new Promise((resolve, reject) => {
261
- let confirmationRequest = axiosClient_1.client.get(`api/v1/skills/getskilltemplateupdates/${id}`, {
262
- headers: { authorization: token },
263
- });
264
- confirmationRequest
265
- .then((response) => {
266
- resolve(response.data);
267
- })
268
- .catch((error) => {
269
- reject(error);
270
- });
271
- });
272
- };
273
- /**
274
- * Import skill templates
275
- * @param {Array<String>} data The list of role templates to be imported
276
- * @param {Boolean} publish If true the imported templates will be published
277
- * @param {String} token Authorization token
278
- * @returns {Promise<Object>}
279
- */
280
- const importSkillTemplates = (data, publish, token) => {
281
- return new Promise((resolve, reject) => {
282
- const requestData = {
283
- data: data,
284
- publish: publish,
285
- };
286
- let confirmationRequest = axiosClient_1.client.post(`api/v1/skills/importtemplates`, requestData, {
287
- headers: { authorization: token },
288
- });
289
- confirmationRequest
290
- .then((response) => {
291
- resolve(response.data);
292
- })
293
- .catch((error) => {
294
- reject(error);
295
- });
296
- });
297
- };
298
- /**
299
- * Publish skill
300
- * @param {String} id The id of the skill to be published
301
- * @param {String} comments The comments to be include with the request
302
- * @param {String} token Authorization token
303
- * @returns {Promise<Object>}
304
- */
305
- const publishSkill = (id, comments, token) => {
306
- return new Promise((resolve, reject) => {
307
- let data = {};
308
- if (comments)
309
- data.comments = comments;
310
- let confirmationRequest = axiosClient_1.client.post(`api/v1/skills/publish/${id}`, data, {
311
- headers: { authorization: token },
312
- });
313
- confirmationRequest
314
- .then((response) => {
315
- resolve(response.data);
316
- })
317
- .catch((error) => {
318
- reject(error);
319
- });
320
- });
321
- };
322
- /**
323
- * Set skill information
324
- * @param {String} id The id of the skill to be updated
325
- * @param {Object} data Data used to update the skill
326
- * @param {String} token Authorization token
327
- * @returns {Promise<Object>}
328
- */
329
- const setSkillInformation = (id, data, token) => {
330
- return new Promise((resolve, reject) => {
331
- const requestData = {
332
- data: data,
333
- id: id,
334
- };
335
- let confirmationRequest = axiosClient_1.client.post(`api/v1/skills/update/`, requestData, {
336
- headers: { authorization: token },
337
- });
338
- confirmationRequest
339
- .then((response) => {
340
- resolve(response.data);
341
- })
342
- .catch((error) => {
343
- reject(error);
344
- });
345
- });
346
- };
347
- /**
348
- * Set the skill information from template
349
- * @param {String} id The id of the skill to be updated
350
- * @param {Object} data Data used to update the skill
351
- * @param {String} token Authorization token
352
- * @returns {Promise<Object>}
353
- */
354
- const setSkillInformationFromTemplate = (id, data, token) => {
355
- return new Promise((resolve, reject) => {
356
- const requestData = {
357
- data: data,
358
- id: id,
359
- };
360
- let confirmationRequest = axiosClient_1.client.post(`api/v1/skills/updatefromtemplate/`, requestData, {
361
- headers: { authorization: token },
362
- });
363
- confirmationRequest
364
- .then((response) => {
365
- resolve(response.data);
366
- })
367
- .catch((error) => {
368
- reject(error);
369
- });
370
- });
371
- };
372
- /**
373
- * Validate skill information
374
- * @param {String} id The id of the skill to be updated
375
- * @param {String} token Authorization token
376
- * @returns {Promise<Object>}
377
- */
378
- const validateSkill = (id, token) => {
379
- return new Promise((resolve, reject) => {
380
- const requestData = {
381
- id: id,
382
- };
383
- let confirmationRequest = axiosClient_1.client.post(`api/v1/skills/validate/`, requestData, {
384
- headers: { authorization: token },
385
- });
386
- confirmationRequest
387
- .then((response) => {
388
- resolve(response.data);
389
- })
390
- .catch((error) => {
391
- reject(error);
392
- });
393
- });
394
- };
395
- /**
396
- * Watch skill
397
- * @param {String} id The id of the skill to be updated
398
- * @param {Boolean} watch Set to true or false
399
- * @param {String} token Authorization token
400
- * @returns {Promise<Object>}
401
- */
402
- const watchSkill = (id, watch, token) => {
403
- return new Promise((resolve, reject) => {
404
- const requestData = {
405
- id: id,
406
- watch: watch,
407
- };
408
- let confirmationRequest = axiosClient_1.client.post(`api/v1/skills/watch`, requestData, {
409
- headers: { authorization: token },
410
- });
411
- confirmationRequest
412
- .then((response) => {
413
- resolve(response.data);
414
- })
415
- .catch((error) => {
416
- reject(error);
417
- });
418
- });
419
- };
420
- exports.default = {
421
- createSkill,
422
- createSkillsFromTemplates,
423
- deleteSkill,
424
- discardSkillChanges,
425
- getImportedSkillTemplates,
426
- getSkillRelatedRoles,
427
- getSkillRequiredAssessmentType,
428
- getSkillInformationById,
429
- getSkillList,
430
- getSkillTemplateUpdates,
431
- getTeamSkillsById,
432
- getCurrentUserTeamSkills,
433
- importSkillTemplates,
434
- publishSkill,
435
- setSkillInformation,
436
- setSkillInformationFromTemplate,
437
- validateSkill,
438
- watchSkill,
439
- };
@@ -1,156 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const axiosClient_1 = require("./axiosClient");
4
- /**
5
- * Add new entry skill assessment
6
- * @param {String} id
7
- * @param {Object} data
8
- * @param {String} comments
9
- * @param {String} token Authorization token
10
- * @returns {Promise<Object>}
11
- */
12
- const addEntry = (id, data, comments, token) => {
13
- return new Promise((resolve, reject) => {
14
- const requestData = {
15
- comments: comments,
16
- data: data,
17
- id: id,
18
- };
19
- let confirmationRequest = axiosClient_1.client.put("api/v1/skillassessments/addentry", requestData, {
20
- headers: { authorization: token },
21
- });
22
- confirmationRequest
23
- .then((response) => {
24
- resolve(response.data);
25
- })
26
- .catch((error) => {
27
- reject(error);
28
- });
29
- });
30
- };
31
- /**
32
- * Create skill assessment
33
- * @param {Object} data
34
- * @param {String} comments
35
- * @param {String} userId
36
- * @param {String} token Authorization token
37
- * @returns {Promise<Object>}
38
- */
39
- const create = (data, comments, userId, token) => {
40
- return new Promise((resolve, reject) => {
41
- const requestData = {
42
- comments: comments,
43
- data: data,
44
- userId: userId,
45
- };
46
- let confirmationRequest = axiosClient_1.client.put("api/v1/skillassessments/", requestData, {
47
- headers: { authorization: token },
48
- });
49
- confirmationRequest
50
- .then((response) => {
51
- resolve(response.data);
52
- })
53
- .catch((error) => {
54
- reject(error);
55
- });
56
- });
57
- };
58
- /**
59
- * Delete skill assessment
60
- * @param {number} id The id of the skill to be deleted
61
- * @param {String} comments The comments included with the deletion
62
- * @param {String} token Authorization token
63
- * @returns {Promise<Object>}
64
- */
65
- const deleteSkillAssessment = (id, comments, token) => {
66
- return new Promise((resolve, reject) => {
67
- const data = {
68
- id: id,
69
- };
70
- if (comments)
71
- data.comments = comments;
72
- const request = axiosClient_1.client.delete(`api/v1/skillassessments`, {
73
- headers: { authorization: token },
74
- data: data,
75
- });
76
- request
77
- .then((response) => {
78
- resolve(response.data);
79
- })
80
- .catch((error) => {
81
- reject(error);
82
- });
83
- });
84
- };
85
- /**
86
- * Get skill assessment by id
87
- * @param {String} id
88
- * @param {String} token
89
- * @returns {Promise<Object>}
90
- */
91
- const getById = (id, token) => {
92
- return new Promise((resolve, reject) => {
93
- let confirmationRequest = axiosClient_1.client.get(`api/v1/skillassessments/${id}`, {
94
- headers: { authorization: token },
95
- });
96
- confirmationRequest
97
- .then((response) => {
98
- resolve(response.data);
99
- })
100
- .catch((error) => {
101
- reject(error);
102
- });
103
- });
104
- };
105
- /**
106
- * Get skill assessment by user and skill
107
- * @param {String} userId
108
- * @param {String} skillId
109
- * @param {String} token
110
- * @returns {Promise<Object>} The skill assessment
111
- */
112
- const getByUserAndSkill = (userId, skillId, token) => {
113
- return new Promise((resolve, reject) => {
114
- let confirmationRequest = axiosClient_1.client.get(`api/v1/skillassessments/getbyuserandskill/${userId}/${skillId}`, {
115
- headers: { authorization: token },
116
- });
117
- confirmationRequest
118
- .then((response) => {
119
- resolve(response.data);
120
- })
121
- .catch((error) => {
122
- reject(error);
123
- });
124
- });
125
- };
126
- /**
127
- * Get list
128
- * @param {String} userId The user used to select the skill
129
- * @param {String} token Authorization token
130
- * @returns {Promise<Object>}
131
- */
132
- const getList = (userId, token) => {
133
- return new Promise((resolve, reject) => {
134
- const requestData = {};
135
- if (userId)
136
- requestData.userId = userId;
137
- let confirmationRequest = axiosClient_1.client.post(`api/v1/skillassessments`, requestData, {
138
- headers: { authorization: token },
139
- });
140
- confirmationRequest
141
- .then((response) => {
142
- resolve(response.data);
143
- })
144
- .catch((error) => {
145
- reject(error);
146
- });
147
- });
148
- };
149
- exports.default = {
150
- addEntry,
151
- create,
152
- deleteSkillAssessment,
153
- getById,
154
- getByUserAndSkill,
155
- getList,
156
- };