@stackfactor/client-api 1.1.73 → 1.1.74

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 CHANGED
@@ -13,6 +13,7 @@ const createRole = (data, token) => {
13
13
  { data: data },
14
14
  {
15
15
  headers: { authorization: token },
16
+ withCredentials: true,
16
17
  }
17
18
  );
18
19
  confirmationRequest
@@ -43,6 +44,7 @@ const createRoleFromTemplate = (templateId, data, token) => {
43
44
  requestData,
44
45
  {
45
46
  headers: { authorization: token },
47
+ withCredentials: true,
46
48
  }
47
49
  );
48
50
  confirmationRequest
@@ -70,6 +72,7 @@ const deleteRole = (id, comments, token) => {
70
72
  if (comments) data.comments = comments;
71
73
  const request = client.delete(`api/v1/roles/`, {
72
74
  headers: { authorization: token },
75
+ withCredentials: true,
73
76
  data: data,
74
77
  });
75
78
  request
@@ -93,6 +96,7 @@ const discardRoleChanges = (id, token) => {
93
96
  const data = {};
94
97
  const request = client.get(`api/v1/roles/discard/${id}`, {
95
98
  headers: { authorization: token },
99
+ withCredentials: true,
96
100
  data: data,
97
101
  });
98
102
  request
@@ -114,6 +118,7 @@ const getImportedRoleTemplates = (token) => {
114
118
  return new Promise(function (resolve, reject) {
115
119
  const request = client.get(`api/v1/roles/getimportedroletemplates`, {
116
120
  headers: { authorization: token },
121
+ withCredentials: true,
117
122
  });
118
123
  request
119
124
 
@@ -145,6 +150,7 @@ const getRoleInformationById = (
145
150
  `api/v1/roles/role/${id}/${version}/${returnNullIfVersionNotFound}`,
146
151
  {
147
152
  headers: { authorization: token },
153
+ withCredentials: true,
148
154
  }
149
155
  );
150
156
  confirmationRequest
@@ -188,6 +194,7 @@ const getRolesList = (
188
194
  if (filter) requestData.filter = filter;
189
195
  let confirmationRequest = client.post(`api/v1/roles`, requestData, {
190
196
  headers: { authorization: token },
197
+ withCredentials: true,
191
198
  });
192
199
  confirmationRequest
193
200
  .then((response) => {
@@ -211,6 +218,7 @@ const getRoleTemplateUpdates = (id, token) => {
211
218
  `api/v1/roles/getroletemplateupdates/${id}`,
212
219
  {
213
220
  headers: { authorization: token },
221
+ withCredentials: true,
214
222
  }
215
223
  );
216
224
  confirmationRequest
@@ -239,6 +247,7 @@ const importRoleTemplates = (data, token) => {
239
247
  requestData,
240
248
  {
241
249
  headers: { authorization: token },
250
+ withCredentials: true,
242
251
  }
243
252
  );
244
253
  confirmationRequest
@@ -265,6 +274,7 @@ const publishRole = (id, comments, token) => {
265
274
  if (comments) data.comments = comments;
266
275
  let confirmationRequest = client.post(`api/v1/roles/publish/${id}`, data, {
267
276
  headers: { authorization: token },
277
+ withCredentials: true,
268
278
  });
269
279
  confirmationRequest
270
280
  .then((response) => {
@@ -291,6 +301,7 @@ const setRoleInformation = (id, data, token) => {
291
301
  };
292
302
  let confirmationRequest = client.post(`api/v1/roles/update`, requestData, {
293
303
  headers: { authorization: token },
304
+ withCredentials: true,
294
305
  });
295
306
  confirmationRequest
296
307
  .then((response) => {
@@ -320,6 +331,7 @@ const setRoleInformationFromTemplate = (id, data, token) => {
320
331
  requestData,
321
332
  {
322
333
  headers: { authorization: token },
334
+ withCredentials: true,
323
335
  }
324
336
  );
325
337
  confirmationRequest
@@ -349,6 +361,7 @@ const setUserRoles = (id, roles, jobDescription, token) => {
349
361
  if (id) requestData.userid = id;
350
362
  let request = client.post(`api/v1/roles/settouser/`, requestData, {
351
363
  headers: { authorization: token },
364
+ withCredentials: true,
352
365
  });
353
366
  request
354
367
  .then((response) => {
@@ -375,6 +388,7 @@ const watchRole = (id, watch, token) => {
375
388
  };
376
389
  let confirmationRequest = client.post(`api/v1/roles/watch`, requestData, {
377
390
  headers: { authorization: token },
391
+ withCredentials: true,
378
392
  });
379
393
  confirmationRequest
380
394
  .then((response) => {
@@ -12,6 +12,7 @@ const createRoleTemplate = (data, token) => {
12
12
  };
13
13
  let confirmationRequest = client.put("api/v1/roletemplates", requestData, {
14
14
  headers: { authorization: token },
15
+ withCredentials: true,
15
16
  });
16
17
  confirmationRequest
17
18
  .then((response) => {
@@ -37,6 +38,7 @@ const deleteRoleTemplate = (id, comments, token) => {
37
38
  if (comments) data.comments = comments;
38
39
  const request = client.delete(`api/v1/roletemplates/`, {
39
40
  headers: { authorization: token },
41
+ withCredentials: true,
40
42
  data: data,
41
43
  });
42
44
  request
@@ -59,6 +61,7 @@ const discardRoleTemplateChanges = (id, token) => {
59
61
  const data = {};
60
62
  const request = client.get(`api/v1/roletemplates/discard/${id}`, {
61
63
  headers: { authorization: token },
64
+ withCredentials: true,
62
65
  data: data,
63
66
  });
64
67
  request
@@ -82,6 +85,7 @@ const getRoleTemplateInformationById = (id, version, token) => {
82
85
  `api/v1/roletemplates/${id}/${version}`,
83
86
  {
84
87
  headers: { authorization: token },
88
+ withCredentials: true,
85
89
  }
86
90
  );
87
91
  confirmationRequest
@@ -118,6 +122,7 @@ const getRoleTemplateList = (
118
122
  if (filter) requestData.filter = filter;
119
123
  let confirmationRequest = client.post(`api/v1/roletemplates`, requestData, {
120
124
  headers: { authorization: token },
125
+ withCredentials: true,
121
126
  });
122
127
  confirmationRequest
123
128
  .then((response) => {
@@ -144,6 +149,7 @@ const publishTemplate = (id, comments, token) => {
144
149
  data,
145
150
  {
146
151
  headers: { authorization: token },
152
+ withCredentials: true,
147
153
  }
148
154
  );
149
155
  confirmationRequest
@@ -173,6 +179,7 @@ const setTemplateInformation = (id, data, token) => {
173
179
  requestData,
174
180
  {
175
181
  headers: { authorization: token },
182
+ withCredentials: true,
176
183
  }
177
184
  );
178
185
  confirmationRequest
@@ -202,6 +209,7 @@ const setTemplateTags = (id, tags, token) => {
202
209
  requestData,
203
210
  {
204
211
  headers: { authorization: token },
212
+ withCredentials: true,
205
213
  }
206
214
  );
207
215
  confirmationRequest
@@ -231,6 +239,7 @@ const watchRoleTemplate = (id, watch, token) => {
231
239
  requestData,
232
240
  {
233
241
  headers: { authorization: token },
242
+ withCredentials: true,
234
243
  }
235
244
  );
236
245
  confirmationRequest
package/lib/skill.js CHANGED
@@ -13,6 +13,7 @@ const createSkill = (data, token) => {
13
13
  { data: data },
14
14
  {
15
15
  headers: { authorization: token },
16
+ withCredentials: true,
16
17
  }
17
18
  );
18
19
  confirmationRequest
@@ -41,6 +42,7 @@ const createSkillsFromTemplates = (templateIds, token) => {
41
42
  requestData,
42
43
  {
43
44
  headers: { authorization: token },
45
+ withCredentials: true,
44
46
  }
45
47
  );
46
48
  confirmationRequest
@@ -68,6 +70,7 @@ const deleteSkill = (id, comments, token) => {
68
70
  if (comments) data.comments = comments;
69
71
  const request = client.delete(`api/v1/skills/`, {
70
72
  headers: { authorization: token },
73
+ withCredentials: true,
71
74
  data: data,
72
75
  });
73
76
  request
@@ -91,6 +94,7 @@ const discardSkillChanges = (id, token) => {
91
94
  const data = {};
92
95
  const request = client.get(`api/v1/skills/discard/${id}`, {
93
96
  headers: { authorization: token },
97
+ withCredentials: true,
94
98
  data: data,
95
99
  });
96
100
  request
@@ -112,6 +116,7 @@ const getImportedSkillTemplates = (token) => {
112
116
  return new Promise(function (resolve, reject) {
113
117
  const request = client.get(`api/v1/skills/getimportedskilltemplates`, {
114
118
  headers: { authorization: token },
119
+ withCredentials: true,
115
120
  });
116
121
  request
117
122
 
@@ -136,6 +141,7 @@ const getSkillRelatedRoles = (id, token) => {
136
141
  `api/v1/skills/getskillrelatedroles/${id}`,
137
142
  {
138
143
  headers: { authorization: token },
144
+ withCredentials: true,
139
145
  }
140
146
  );
141
147
  confirmationRequest
@@ -160,6 +166,7 @@ const getSkillRequiredAssessmentType = (id, token) => {
160
166
  `api/v1/skills/getrequiredassessmenttype/${id}`,
161
167
  {
162
168
  headers: { authorization: token },
169
+ withCredentials: true,
163
170
  }
164
171
  );
165
172
  confirmationRequest
@@ -191,6 +198,7 @@ const getSkillInformationById = (
191
198
  `api/v1/skills/skill/${id}/${version}/${returnNullIfVersionNotFound}`,
192
199
  {
193
200
  headers: { authorization: token },
201
+ withCredentials: true,
194
202
  }
195
203
  );
196
204
  confirmationRequest
@@ -231,6 +239,7 @@ const getSkillList = (
231
239
  if (filter) requestData.filter = filter;
232
240
  let confirmationRequest = client.post(`api/v1/skills`, requestData, {
233
241
  headers: { authorization: token },
242
+ withCredentials: true,
234
243
  });
235
244
  confirmationRequest
236
245
  .then((response) => {
@@ -261,6 +270,7 @@ const getTeamSkillsById = (
261
270
  `api/v1/skills/getteambyid/${teamId}/${maxDepth}/${returnNullIfVersionNotFound}`,
262
271
  {
263
272
  headers: { authorization: token },
273
+ withCredentials: true,
264
274
  }
265
275
  );
266
276
  confirmationRequest
@@ -285,6 +295,7 @@ const getCurrentUserTeamSkills = (maxDepth, token) => {
285
295
  `api/v1/skills/getcurrentuserteam/${maxDepth}`,
286
296
  {
287
297
  headers: { authorization: token },
298
+ withCredentials: true,
288
299
  }
289
300
  );
290
301
  confirmationRequest
@@ -309,6 +320,7 @@ const getSkillTemplateUpdates = (id, token) => {
309
320
  `api/v1/skills/getskilltemplateupdates/${id}`,
310
321
  {
311
322
  headers: { authorization: token },
323
+ withCredentials: true,
312
324
  }
313
325
  );
314
326
  confirmationRequest
@@ -339,6 +351,7 @@ const importSkillTemplates = (data, publish, token) => {
339
351
  requestData,
340
352
  {
341
353
  headers: { authorization: token },
354
+ withCredentials: true,
342
355
  }
343
356
  );
344
357
  confirmationRequest
@@ -365,6 +378,7 @@ const publishSkill = (id, comments, token) => {
365
378
  if (comments) data.comments = comments;
366
379
  let confirmationRequest = client.post(`api/v1/skills/publish/${id}`, data, {
367
380
  headers: { authorization: token },
381
+ withCredentials: true,
368
382
  });
369
383
  confirmationRequest
370
384
  .then((response) => {
@@ -394,6 +408,7 @@ const setSkillInformation = (id, data, token) => {
394
408
  requestData,
395
409
  {
396
410
  headers: { authorization: token },
411
+ withCredentials: true,
397
412
  }
398
413
  );
399
414
  confirmationRequest
@@ -424,6 +439,7 @@ const setSkillInformationFromTemplate = (id, data, token) => {
424
439
  requestData,
425
440
  {
426
441
  headers: { authorization: token },
442
+ withCredentials: true,
427
443
  }
428
444
  );
429
445
  confirmationRequest
@@ -452,6 +468,7 @@ const validateSkill = (id, token) => {
452
468
  requestData,
453
469
  {
454
470
  headers: { authorization: token },
471
+ withCredentials: true,
455
472
  }
456
473
  );
457
474
  confirmationRequest
@@ -479,6 +496,7 @@ const watchSkill = (id, watch, token) => {
479
496
  };
480
497
  let confirmationRequest = client.post(`api/v1/skills/watch`, requestData, {
481
498
  headers: { authorization: token },
499
+ withCredentials: true,
482
500
  });
483
501
  confirmationRequest
484
502
  .then((response) => {
@@ -12,6 +12,7 @@ const endSession = (testingSessionId, token) => {
12
12
  { id: testingSessionId },
13
13
  {
14
14
  headers: { authorization: token },
15
+ withCredentials: true,
15
16
  }
16
17
  );
17
18
  confirmationRequest
@@ -41,6 +42,7 @@ const getNextStep = (testingSessionId, selectedAnswers, token) => {
41
42
  data,
42
43
  {
43
44
  headers: { authorization: token },
45
+ withCredentials: true,
44
46
  }
45
47
  );
46
48
  confirmationRequest
@@ -70,6 +72,7 @@ const getSkillTestAssessment = (userId, skillId, token) => {
70
72
  },
71
73
  {
72
74
  headers: { authorization: token },
75
+ withCredentials: true,
73
76
  }
74
77
  );
75
78
  confirmationRequest
@@ -97,6 +100,7 @@ const pause = (testingSessionId, token) => {
97
100
  },
98
101
  {
99
102
  headers: { authorization: token },
103
+ withCredentials: true,
100
104
  }
101
105
  );
102
106
  confirmationRequest
@@ -125,6 +129,7 @@ const startSession = (skillId, saveSession, token) => {
125
129
  },
126
130
  {
127
131
  headers: { authorization: token },
132
+ withCredentials: true,
128
133
  }
129
134
  );
130
135
  confirmationRequest
@@ -19,6 +19,7 @@ const addEntry = (id, data, comments, token) => {
19
19
  requestData,
20
20
  {
21
21
  headers: { authorization: token },
22
+ withCredentials: true,
22
23
  }
23
24
  );
24
25
  confirmationRequest
@@ -50,6 +51,7 @@ const create = (data, comments, userId, token) => {
50
51
  requestData,
51
52
  {
52
53
  headers: { authorization: token },
54
+ withCredentials: true,
53
55
  }
54
56
  );
55
57
  confirmationRequest
@@ -76,6 +78,7 @@ const deleteSkillAssessment = (id, comments, token) => {
76
78
  if (comments) data.comments = comments;
77
79
  const request = client.delete(`api/v1/skillassessments`, {
78
80
  headers: { authorization: token },
81
+ withCredentials: true,
79
82
  data: data,
80
83
  });
81
84
  request
@@ -97,6 +100,7 @@ const getById = (id, token) => {
97
100
  return new Promise(function (resolve, reject) {
98
101
  let confirmationRequest = client.get(`api/v1/skillassessments/${id}`, {
99
102
  headers: { authorization: token },
103
+ withCredentials: true,
100
104
  });
101
105
  confirmationRequest
102
106
  .then((response) => {
@@ -122,6 +126,7 @@ const getList = (userId, token) => {
122
126
  requestData,
123
127
  {
124
128
  headers: { authorization: token },
129
+ withCredentials: true,
125
130
  }
126
131
  );
127
132
  confirmationRequest
@@ -12,6 +12,7 @@ const createSkillTemplate = (data, token) => {
12
12
  };
13
13
  let confirmationRequest = client.put("api/v1/skilltemplates", requestData, {
14
14
  headers: { authorization: token },
15
+ withCredentials: true,
15
16
  });
16
17
  confirmationRequest
17
18
  .then((response) => {
@@ -37,6 +38,7 @@ const deleteSkillTemplate = (id, comments, token) => {
37
38
  return new Promise(function (resolve, reject) {
38
39
  const request = client.delete(`api/v1/skilltemplates/`, {
39
40
  headers: { authorization: token },
41
+ withCredentials: true,
40
42
  data: data,
41
43
  });
42
44
  request
@@ -59,6 +61,7 @@ const discardSkillTemplateChanges = (id, token) => {
59
61
  const data = {};
60
62
  const request = client.get(`api/v1/skilltemplates/discard/${id}`, {
61
63
  headers: { authorization: token },
64
+ withCredentials: true,
62
65
  data: data,
63
66
  });
64
67
  request
@@ -89,6 +92,7 @@ const getSkillTemplateInformationById = (
89
92
  `api/v1/skilltemplates/${id}/${version}/${returnNullIfVersionNotFound}`,
90
93
  {
91
94
  headers: { authorization: token },
95
+ withCredentials: true,
92
96
  }
93
97
  );
94
98
  confirmationRequest
@@ -128,6 +132,7 @@ const getSkillTemplateList = (
128
132
  requestData,
129
133
  {
130
134
  headers: { authorization: token },
135
+ withCredentials: true,
131
136
  }
132
137
  );
133
138
  confirmationRequest
@@ -148,6 +153,7 @@ const getTechnologyStacks = (token) => {
148
153
  return new Promise(function (resolve, reject) {
149
154
  let confirmationRequest = client.get(`api/v1/skilltemplates/stacks`, {
150
155
  headers: { authorization: token },
156
+ withCredentials: true,
151
157
  });
152
158
  confirmationRequest
153
159
  .then((response) => {
@@ -174,6 +180,7 @@ const publishTemplate = (id, comments, token) => {
174
180
  data,
175
181
  {
176
182
  headers: { authorization: token },
183
+ withCredentials: true,
177
184
  }
178
185
  );
179
186
  confirmationRequest
@@ -203,6 +210,7 @@ const setTemplateInformation = (id, data, token) => {
203
210
  requestData,
204
211
  {
205
212
  headers: { authorization: token },
213
+ withCredentials: true,
206
214
  }
207
215
  );
208
216
  confirmationRequest
@@ -232,6 +240,7 @@ const setTemplateTags = (id, tags, token) => {
232
240
  requestData,
233
241
  {
234
242
  headers: { authorization: token },
243
+ withCredentials: true,
235
244
  }
236
245
  );
237
246
  confirmationRequest
@@ -260,6 +269,7 @@ const validateTemplate = (id, token) => {
260
269
  requestData,
261
270
  {
262
271
  headers: { authorization: token },
272
+ withCredentials: true,
263
273
  }
264
274
  );
265
275
  confirmationRequest
@@ -289,6 +299,7 @@ const watchSkillTemplate = (id, watch, token) => {
289
299
  requestData,
290
300
  {
291
301
  headers: { authorization: token },
302
+ withCredentials: true,
292
303
  }
293
304
  );
294
305
  confirmationRequest
@@ -12,8 +12,9 @@ const getTalentTransformationStepsForCurrentUser = (authToken) => {
12
12
  authToken
13
13
  ? {
14
14
  headers: { authorization: authToken },
15
+ withCredentials: true,
15
16
  }
16
- : {}
17
+ : { withCredentials: true }
17
18
  );
18
19
  request
19
20
  .then((response) => {
@@ -50,6 +51,7 @@ const setTalentTransformationStepData = (
50
51
  requestData,
51
52
  {
52
53
  headers: { authorization: token },
54
+ withCredentials: true,
53
55
  }
54
56
  );
55
57
  confirmationRequest
package/lib/teams.js CHANGED
@@ -14,7 +14,7 @@ const addUsersToTeam = (teamId, users, authToken) => {
14
14
  teamId: teamId,
15
15
  users: users,
16
16
  },
17
- { headers: { authorization: authToken } }
17
+ { headers: { authorization: authToken }, withCredentials: true }
18
18
  );
19
19
  request
20
20
  .then((response) => {
@@ -42,7 +42,7 @@ const createTeam = (name, managerId, description, authToken) => {
42
42
  managerId: managerId,
43
43
  description: description,
44
44
  },
45
- { headers: { authorization: authToken } }
45
+ { headers: { authorization: authToken }, withCredentials: true }
46
46
  );
47
47
  request
48
48
  .then((response) => {
@@ -64,6 +64,7 @@ const deleteTeam = (teamId, defaultTeamId, authToken) => {
64
64
  return new Promise(function (resolve, reject) {
65
65
  const request = client.delete(`api/v1/teams/delete`, {
66
66
  headers: { authorization: authToken },
67
+ withCredentials: true,
67
68
  data: {
68
69
  id: teamId,
69
70
  defaultTeamId: defaultTeamId,
@@ -92,7 +93,7 @@ const getTeamById = (teamId, includeUserSummaryInformation, authToken) => {
92
93
  {
93
94
  includeUserSummaryInformation: includeUserSummaryInformation,
94
95
  },
95
- { headers: { authorization: authToken } }
96
+ { headers: { authorization: authToken }, withCredentials: true }
96
97
  );
97
98
  request
98
99
  .then((response) => {
@@ -113,6 +114,7 @@ const getTeamByIdRoles = (teamId, authToken) => {
113
114
  return new Promise(function (resolve, reject) {
114
115
  const request = client.get(`api/v1/teams/getroles/${teamId}`, {
115
116
  headers: { authorization: authToken },
117
+ withCredentials: true,
116
118
  });
117
119
  request
118
120
  .then((response) => {
@@ -133,6 +135,7 @@ const getTeams = (authToken) => {
133
135
  return new Promise(function (resolve, reject) {
134
136
  const request = client.get(`api/v1/teams/`, {
135
137
  headers: { authorization: authToken },
138
+ withCredentials: true,
136
139
  });
137
140
  request
138
141
  .then((response) => {
@@ -157,7 +160,7 @@ const getTeamByUserId = (userId, includeUserSummaryInformation, authToken) => {
157
160
  {
158
161
  includeUserSummaryInformation: includeUserSummaryInformation,
159
162
  },
160
- { headers: { authorization: authToken } }
163
+ { headers: { authorization: authToken }, withCredentials: true }
161
164
  );
162
165
  request
163
166
  .then((response) => {
@@ -181,7 +184,7 @@ const getTopTeam = (includeUserSummaryInformation, authToken) => {
181
184
  {
182
185
  includeUserSummaryInformation: includeUserSummaryInformation,
183
186
  },
184
- { headers: { authorization: authToken } }
187
+ { headers: { authorization: authToken }, withCredentials: true }
185
188
  );
186
189
  request
187
190
  .then((response) => {
@@ -207,7 +210,7 @@ const removeUsersFromTeam = (teamId, users, authToken) => {
207
210
  teamId: teamId,
208
211
  users: users,
209
212
  },
210
- { headers: { authorization: authToken } }
213
+ { headers: { authorization: authToken }, withCredentials: true }
211
214
  );
212
215
  request
213
216
  .then((response) => {
@@ -231,7 +234,7 @@ const setDefault = (teamId, authToken) => {
231
234
  {
232
235
  id: teamId,
233
236
  },
234
- { headers: { authorization: authToken } }
237
+ { headers: { authorization: authToken }, withCredentials: true }
235
238
  );
236
239
  request
237
240
  .then((response) => {
@@ -257,7 +260,7 @@ const updateTeam = (teamId, data, authToken) => {
257
260
  id: teamId,
258
261
  data: data,
259
262
  },
260
- { headers: { authorization: authToken } }
263
+ { headers: { authorization: authToken }, withCredentials: true }
261
264
  );
262
265
  request
263
266
  .then((response) => {
package/lib/tenants.js CHANGED
@@ -12,6 +12,7 @@ const getTenantInformation = (categories, token) => {
12
12
  };
13
13
  let request = client.post("api/v1/tenants/tenant/get", requestData, {
14
14
  headers: { authorization: token },
15
+ withCredentials: true,
15
16
  });
16
17
  request
17
18
  .then((response) => {
@@ -40,6 +41,7 @@ const setTenantInformation = (category, data, token) => {
40
41
  requestData,
41
42
  {
42
43
  headers: { authorization: token },
44
+ withCredentials: true,
43
45
  }
44
46
  );
45
47
  confirmationRequest
@@ -9,6 +9,7 @@ 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,
12
13
  });
13
14
  request
14
15
  .then((response) => {
@@ -38,6 +39,7 @@ const createTrainingPlan = (data, type, saveAsDraft, token) => {
38
39
  };
39
40
  let confirmationRequest = client.put("api/v1/trainingplans", requestData, {
40
41
  headers: { authorization: token },
42
+ withCredentials: true,
41
43
  });
42
44
  confirmationRequest
43
45
  .then((response) => {
@@ -63,6 +65,7 @@ const deleteTrainingPlan = (id, comments, token) => {
63
65
  if (comments) data.comments = comments;
64
66
  const request = client.delete(`api/v1/trainingplans/`, {
65
67
  headers: { authorization: token },
68
+ withCredentials: true,
66
69
  data: data,
67
70
  });
68
71
  request
@@ -84,6 +87,7 @@ const discardTrainingPlanChanges = (id, token) => {
84
87
  return new Promise(function (resolve, reject) {
85
88
  const request = client.get(`api/v1/trainingplans/discard/${id}`, {
86
89
  headers: { authorization: token },
90
+ withCredentials: true,
87
91
  });
88
92
  request
89
93
  .then((response) => {
@@ -122,6 +126,7 @@ const generateNewBaseline = (
122
126
  requestData,
123
127
  {
124
128
  headers: { authorization: token },
129
+ withCredentials: true,
125
130
  }
126
131
  );
127
132
  confirmationRequest
@@ -145,6 +150,7 @@ const getTrainingPlanById = (id, version, token) => {
145
150
  `api/v1/trainingplans/${id}/${version}`,
146
151
  {
147
152
  headers: { authorization: token },
153
+ withCredentials: true,
148
154
  }
149
155
  );
150
156
  confirmationRequest
@@ -165,6 +171,7 @@ const getAllTrainingPlansTasksSummary = async (token = null) => {
165
171
  return new Promise(function (resolve, reject) {
166
172
  let confirmationRequest = client.get(`api/v1/trainingplans/taskssummary`, {
167
173
  headers: token ? { authorization: token } : {},
174
+ withCredentials: true,
168
175
  });
169
176
  confirmationRequest
170
177
  .then((response) => {
@@ -207,6 +214,7 @@ const getListOfTrainingPlans = (
207
214
  if (users) requestData.users = users;
208
215
  let confirmationRequest = client.post(`api/v1/trainingplans`, requestData, {
209
216
  headers: { authorization: token },
217
+ withCredentials: true,
210
218
  });
211
219
  confirmationRequest
212
220
  .then((response) => {
@@ -233,6 +241,7 @@ const publishTrainingPlan = (id, comments, token) => {
233
241
  data,
234
242
  {
235
243
  headers: { authorization: token },
244
+ withCredentials: true,
236
245
  }
237
246
  );
238
247
  confirmationRequest
@@ -263,6 +272,7 @@ const updateTrainingPlan = (planId, data, saveAsDraft, token) => {
263
272
  requestData,
264
273
  {
265
274
  headers: { authorization: token },
275
+ withCredentials: true,
266
276
  }
267
277
  );
268
278
  confirmationRequest
@@ -290,6 +300,7 @@ const updateTrainingPlanTaskStatus = (id, status, token) => {
290
300
  };
291
301
  let confirmationRequest = client.post(`api/v1/trainingplans/task`, data, {
292
302
  headers: { authorization: token },
303
+ withCredentials: true,
293
304
  });
294
305
  confirmationRequest
295
306
  .then(() => {
@@ -316,6 +327,7 @@ const updateActivities = (planId, data, token) => {
316
327
  data,
317
328
  {
318
329
  headers: { authorization: token },
330
+ withCredentials: true,
319
331
  }
320
332
  );
321
333
  confirmationRequest