@stackfactor/client-api 1.1.74 → 1.1.76
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/actionNotifications.js +2 -3
- package/lib/address.js +1 -1
- package/lib/aiAssistant.js +0 -4
- package/lib/avatar.js +0 -1
- package/lib/axiosClient.js +2 -0
- package/lib/config.js +3 -3
- package/lib/dashboard.js +2 -3
- package/lib/departmentTrainingPlans.js +1 -6
- package/lib/groups.js +7 -12
- package/lib/integration.js +0 -10
- package/lib/integrationConfiguration.js +0 -3
- package/lib/integrations/contentGenerator.js +0 -2
- package/lib/learningContent.js +2 -14
- package/lib/learningPath.js +2 -8
- package/lib/logger.js +0 -2
- package/lib/microSkillsQuizes.js +0 -2
- package/lib/role.js +2 -14
- package/lib/roleTemplate.js +2 -9
- package/lib/skill.js +2 -18
- package/lib/skillAssessmentTestingSession.js +0 -5
- package/lib/skillAssessments.js +1 -5
- package/lib/skillTemplate.js +2 -11
- package/lib/talentTransfromation.js +1 -3
- package/lib/teams.js +9 -11
- package/lib/tenants.js +0 -2
- package/lib/trainingPlans.js +1 -12
- package/lib/trainingPlansProficiencyLevels.js +0 -4
- package/lib/userInformation.js +0 -3
- package/lib/users.js +3 -18
- package/lib/utils.js +1 -1
- package/package.json +1 -1
package/lib/trainingPlans.js
CHANGED
|
@@ -9,7 +9,6 @@ const archiveTrainingPlan = (id, token) => {
|
|
|
9
9
|
return new Promise(function (resolve, reject) {
|
|
10
10
|
const request = client.get(`api/v1/trainingplans/archive/${id}`, {
|
|
11
11
|
headers: { authorization: token },
|
|
12
|
-
withCredentials: true,
|
|
13
12
|
});
|
|
14
13
|
request
|
|
15
14
|
.then((response) => {
|
|
@@ -39,7 +38,6 @@ const createTrainingPlan = (data, type, saveAsDraft, token) => {
|
|
|
39
38
|
};
|
|
40
39
|
let confirmationRequest = client.put("api/v1/trainingplans", requestData, {
|
|
41
40
|
headers: { authorization: token },
|
|
42
|
-
withCredentials: true,
|
|
43
41
|
});
|
|
44
42
|
confirmationRequest
|
|
45
43
|
.then((response) => {
|
|
@@ -65,7 +63,7 @@ const deleteTrainingPlan = (id, comments, token) => {
|
|
|
65
63
|
if (comments) data.comments = comments;
|
|
66
64
|
const request = client.delete(`api/v1/trainingplans/`, {
|
|
67
65
|
headers: { authorization: token },
|
|
68
|
-
|
|
66
|
+
|
|
69
67
|
data: data,
|
|
70
68
|
});
|
|
71
69
|
request
|
|
@@ -87,7 +85,6 @@ const discardTrainingPlanChanges = (id, token) => {
|
|
|
87
85
|
return new Promise(function (resolve, reject) {
|
|
88
86
|
const request = client.get(`api/v1/trainingplans/discard/${id}`, {
|
|
89
87
|
headers: { authorization: token },
|
|
90
|
-
withCredentials: true,
|
|
91
88
|
});
|
|
92
89
|
request
|
|
93
90
|
.then((response) => {
|
|
@@ -126,7 +123,6 @@ const generateNewBaseline = (
|
|
|
126
123
|
requestData,
|
|
127
124
|
{
|
|
128
125
|
headers: { authorization: token },
|
|
129
|
-
withCredentials: true,
|
|
130
126
|
}
|
|
131
127
|
);
|
|
132
128
|
confirmationRequest
|
|
@@ -150,7 +146,6 @@ const getTrainingPlanById = (id, version, token) => {
|
|
|
150
146
|
`api/v1/trainingplans/${id}/${version}`,
|
|
151
147
|
{
|
|
152
148
|
headers: { authorization: token },
|
|
153
|
-
withCredentials: true,
|
|
154
149
|
}
|
|
155
150
|
);
|
|
156
151
|
confirmationRequest
|
|
@@ -171,7 +166,6 @@ const getAllTrainingPlansTasksSummary = async (token = null) => {
|
|
|
171
166
|
return new Promise(function (resolve, reject) {
|
|
172
167
|
let confirmationRequest = client.get(`api/v1/trainingplans/taskssummary`, {
|
|
173
168
|
headers: token ? { authorization: token } : {},
|
|
174
|
-
withCredentials: true,
|
|
175
169
|
});
|
|
176
170
|
confirmationRequest
|
|
177
171
|
.then((response) => {
|
|
@@ -214,7 +208,6 @@ const getListOfTrainingPlans = (
|
|
|
214
208
|
if (users) requestData.users = users;
|
|
215
209
|
let confirmationRequest = client.post(`api/v1/trainingplans`, requestData, {
|
|
216
210
|
headers: { authorization: token },
|
|
217
|
-
withCredentials: true,
|
|
218
211
|
});
|
|
219
212
|
confirmationRequest
|
|
220
213
|
.then((response) => {
|
|
@@ -241,7 +234,6 @@ const publishTrainingPlan = (id, comments, token) => {
|
|
|
241
234
|
data,
|
|
242
235
|
{
|
|
243
236
|
headers: { authorization: token },
|
|
244
|
-
withCredentials: true,
|
|
245
237
|
}
|
|
246
238
|
);
|
|
247
239
|
confirmationRequest
|
|
@@ -272,7 +264,6 @@ const updateTrainingPlan = (planId, data, saveAsDraft, token) => {
|
|
|
272
264
|
requestData,
|
|
273
265
|
{
|
|
274
266
|
headers: { authorization: token },
|
|
275
|
-
withCredentials: true,
|
|
276
267
|
}
|
|
277
268
|
);
|
|
278
269
|
confirmationRequest
|
|
@@ -300,7 +291,6 @@ const updateTrainingPlanTaskStatus = (id, status, token) => {
|
|
|
300
291
|
};
|
|
301
292
|
let confirmationRequest = client.post(`api/v1/trainingplans/task`, data, {
|
|
302
293
|
headers: { authorization: token },
|
|
303
|
-
withCredentials: true,
|
|
304
294
|
});
|
|
305
295
|
confirmationRequest
|
|
306
296
|
.then(() => {
|
|
@@ -327,7 +317,6 @@ const updateActivities = (planId, data, token) => {
|
|
|
327
317
|
data,
|
|
328
318
|
{
|
|
329
319
|
headers: { authorization: token },
|
|
330
|
-
withCredentials: true,
|
|
331
320
|
}
|
|
332
321
|
);
|
|
333
322
|
confirmationRequest
|
|
@@ -12,7 +12,6 @@ const getTrainingPlanProficiencyLevel = (proficiencyLevelId, token) => {
|
|
|
12
12
|
`api/v1/trainingplans/proficiencylevels/${proficiencyLevelId}`,
|
|
13
13
|
{
|
|
14
14
|
headers: { authorization: token },
|
|
15
|
-
withCredentials: true,
|
|
16
15
|
}
|
|
17
16
|
);
|
|
18
17
|
confirmationRequest
|
|
@@ -49,7 +48,6 @@ const getTrainingPlanProficiencyLevelList = (
|
|
|
49
48
|
requestData,
|
|
50
49
|
{
|
|
51
50
|
headers: { authorization: token },
|
|
52
|
-
withCredentials: true,
|
|
53
51
|
}
|
|
54
52
|
);
|
|
55
53
|
confirmationRequest
|
|
@@ -75,7 +73,6 @@ const reorderTrainingPlansProficiencyLevels = (order, token) => {
|
|
|
75
73
|
{ order: order },
|
|
76
74
|
{
|
|
77
75
|
headers: { authorization: token },
|
|
78
|
-
withCredentials: true,
|
|
79
76
|
}
|
|
80
77
|
);
|
|
81
78
|
confirmationRequest
|
|
@@ -107,7 +104,6 @@ const updateTrainingPlanProficiencyLevel = (
|
|
|
107
104
|
data,
|
|
108
105
|
{
|
|
109
106
|
headers: { authorization: token },
|
|
110
|
-
withCredentials: true,
|
|
111
107
|
}
|
|
112
108
|
);
|
|
113
109
|
confirmationRequest
|
package/lib/userInformation.js
CHANGED
|
@@ -17,7 +17,6 @@ const addEntryToArrayBusinessProperty = (userId, property, data, token) => {
|
|
|
17
17
|
requestData,
|
|
18
18
|
{
|
|
19
19
|
headers: { authorization: token },
|
|
20
|
-
withCredentials: true,
|
|
21
20
|
}
|
|
22
21
|
);
|
|
23
22
|
confirmationRequest
|
|
@@ -43,7 +42,6 @@ const removeEntryFromArrayBusinessProperty = (userId, property, id, token) => {
|
|
|
43
42
|
`api/v1/user/arrayproperty/${userId}/${property}/${id}`,
|
|
44
43
|
{
|
|
45
44
|
headers: { authorization: token },
|
|
46
|
-
withCredentials: true,
|
|
47
45
|
}
|
|
48
46
|
);
|
|
49
47
|
confirmationRequest
|
|
@@ -80,7 +78,6 @@ const updateEntryfromArrayBusinessProperty = (
|
|
|
80
78
|
requestData,
|
|
81
79
|
{
|
|
82
80
|
headers: { authorization: token },
|
|
83
|
-
withCredentials: true,
|
|
84
81
|
}
|
|
85
82
|
);
|
|
86
83
|
confirmationRequest
|
package/lib/users.js
CHANGED
|
@@ -17,7 +17,6 @@ const addAPIToken = (name, expiration, token) => {
|
|
|
17
17
|
requestData,
|
|
18
18
|
{
|
|
19
19
|
headers: { authorization: token },
|
|
20
|
-
withCredentials: true,
|
|
21
20
|
}
|
|
22
21
|
);
|
|
23
22
|
addTokenRequest
|
|
@@ -72,7 +71,6 @@ const confirmPhone = (validationCode, token) => {
|
|
|
72
71
|
requestData,
|
|
73
72
|
{
|
|
74
73
|
headers: { authorization: token },
|
|
75
|
-
withCredentials: true,
|
|
76
74
|
}
|
|
77
75
|
);
|
|
78
76
|
confirmationRequest
|
|
@@ -100,7 +98,6 @@ const confirmPhoneGenerateCode = (phoneNumber, token) => {
|
|
|
100
98
|
requestData,
|
|
101
99
|
{
|
|
102
100
|
headers: { authorization: token },
|
|
103
|
-
withCredentials: true,
|
|
104
101
|
}
|
|
105
102
|
);
|
|
106
103
|
confirmationRequest
|
|
@@ -209,7 +206,7 @@ const deleteAPIToken = (token, authToken) => {
|
|
|
209
206
|
return new Promise(function (resolve, reject) {
|
|
210
207
|
const deleteTokenRequest = client.delete(`api/v1/users/user/token`, {
|
|
211
208
|
headers: { authorization: authToken },
|
|
212
|
-
|
|
209
|
+
|
|
213
210
|
data: {
|
|
214
211
|
token: token,
|
|
215
212
|
},
|
|
@@ -233,7 +230,7 @@ const deleteUsers = (userIds, token) => {
|
|
|
233
230
|
return new Promise(function (resolve, reject) {
|
|
234
231
|
const deleteTokenRequest = client.delete(`api/v1/users/`, {
|
|
235
232
|
headers: { authorization: token },
|
|
236
|
-
|
|
233
|
+
|
|
237
234
|
data: {
|
|
238
235
|
userIds: userIds,
|
|
239
236
|
},
|
|
@@ -256,7 +253,6 @@ const getAPITokens = (token) => {
|
|
|
256
253
|
return new Promise(function (resolve, reject) {
|
|
257
254
|
const getTokensRequest = client.get(`api/v1/users/getapitokens`, {
|
|
258
255
|
headers: { authorization: token },
|
|
259
|
-
withCredentials: true,
|
|
260
256
|
});
|
|
261
257
|
getTokensRequest
|
|
262
258
|
.then((result) => {
|
|
@@ -277,7 +273,6 @@ const getUserById = (id, token) => {
|
|
|
277
273
|
return new Promise(function (resolve, reject) {
|
|
278
274
|
const getUserInformationRequest = client.get(`api/v1/users/user/${id}`, {
|
|
279
275
|
headers: { authorization: token },
|
|
280
|
-
withCredentials: true,
|
|
281
276
|
});
|
|
282
277
|
getUserInformationRequest
|
|
283
278
|
.then((result) => {
|
|
@@ -305,7 +300,6 @@ const getUserInformation = (userId, category, token) => {
|
|
|
305
300
|
`api/v1/users/user/${userId || 0}/${category || "*"}`,
|
|
306
301
|
{
|
|
307
302
|
headers: { authorization: token },
|
|
308
|
-
withCredentials: true,
|
|
309
303
|
}
|
|
310
304
|
);
|
|
311
305
|
confirmationRequest
|
|
@@ -332,7 +326,6 @@ const getUsers = (filter, fields, token) => {
|
|
|
332
326
|
};
|
|
333
327
|
let confirmationRequest = client.post(`api/v1/users/`, requestData, {
|
|
334
328
|
headers: { authorization: token },
|
|
335
|
-
withCredentials: true,
|
|
336
329
|
});
|
|
337
330
|
confirmationRequest
|
|
338
331
|
.then((response) => {
|
|
@@ -361,7 +354,6 @@ const inviteUsers = (invitees, groupId, teamId, authToken) => {
|
|
|
361
354
|
};
|
|
362
355
|
let request = client.post("api/v1/users/invite", requestData, {
|
|
363
356
|
headers: { authorization: authToken },
|
|
364
|
-
withCredentials: true,
|
|
365
357
|
});
|
|
366
358
|
request
|
|
367
359
|
.then((response) => {
|
|
@@ -405,7 +397,6 @@ const logout = (token) => {
|
|
|
405
397
|
return new Promise(function (resolve, reject) {
|
|
406
398
|
const options = {
|
|
407
399
|
headers: { authorization: token },
|
|
408
|
-
withCredentials: true,
|
|
409
400
|
};
|
|
410
401
|
let request = client.post("api/v1/auth/logout", {}, options);
|
|
411
402
|
request
|
|
@@ -425,7 +416,7 @@ const logout = (token) => {
|
|
|
425
416
|
*/
|
|
426
417
|
const refreshToken = (token) => {
|
|
427
418
|
return new Promise(function (resolve, reject) {
|
|
428
|
-
let options = { headers: { authorization: token }
|
|
419
|
+
let options = { headers: { authorization: token } };
|
|
429
420
|
let request = client.post("api/v1/auth/refreshToken", {}, options);
|
|
430
421
|
request
|
|
431
422
|
.then((response) => {
|
|
@@ -452,7 +443,6 @@ const removeAPIToken = (id, authToken) => {
|
|
|
452
443
|
requestData,
|
|
453
444
|
{
|
|
454
445
|
headers: { authorization: authToken },
|
|
455
|
-
withCredentials: true,
|
|
456
446
|
}
|
|
457
447
|
);
|
|
458
448
|
removeTokenRequest
|
|
@@ -478,7 +468,6 @@ const resendInvitationEmails = (invitees, authToken) => {
|
|
|
478
468
|
};
|
|
479
469
|
let request = client.post("api/v1/users/resendinvite", requestData, {
|
|
480
470
|
headers: { authorization: authToken },
|
|
481
|
-
withCredentials: true,
|
|
482
471
|
});
|
|
483
472
|
request
|
|
484
473
|
.then((response) => {
|
|
@@ -552,7 +541,6 @@ const setUserInformation = (userId, category, data, token) => {
|
|
|
552
541
|
};
|
|
553
542
|
let confirmationRequest = client.post("api/v1/users/user", requestData, {
|
|
554
543
|
headers: { authorization: token },
|
|
555
|
-
withCredentials: true,
|
|
556
544
|
});
|
|
557
545
|
confirmationRequest
|
|
558
546
|
.then((response) => {
|
|
@@ -581,7 +569,6 @@ const updateUserEmail = (email, password, token) => {
|
|
|
581
569
|
requestData,
|
|
582
570
|
{
|
|
583
571
|
headers: { authorization: token },
|
|
584
|
-
withCredentials: true,
|
|
585
572
|
}
|
|
586
573
|
);
|
|
587
574
|
confirmationRequest
|
|
@@ -611,7 +598,6 @@ const updateUserGroups = (userId, groups, token) => {
|
|
|
611
598
|
requestData,
|
|
612
599
|
{
|
|
613
600
|
headers: { authorization: token },
|
|
614
|
-
withCredentials: true,
|
|
615
601
|
}
|
|
616
602
|
);
|
|
617
603
|
confirmationRequest
|
|
@@ -641,7 +627,6 @@ const updateUserPassword = (password, newPassword, token) => {
|
|
|
641
627
|
requestData,
|
|
642
628
|
{
|
|
643
629
|
headers: { authorization: token },
|
|
644
|
-
withCredentials: true,
|
|
645
630
|
}
|
|
646
631
|
);
|
|
647
632
|
confirmationRequest
|
package/lib/utils.js
CHANGED