@stackfactor/client-api 1.1.69 → 1.1.71

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.
@@ -9,11 +9,50 @@ const getTalentTransformationStepsForCurrentUser = (authToken) => {
9
9
  return new Promise(function (resolve, reject) {
10
10
  const request = client.get(
11
11
  `api/v1/talenttransformation/getforcurrentuser`,
12
+ authToken
13
+ ? {
14
+ headers: { authorization: authToken },
15
+ }
16
+ : {}
17
+ );
18
+ request
19
+ .then((response) => {
20
+ resolve(response.data);
21
+ })
22
+ .catch((error) => {
23
+ reject(error);
24
+ });
25
+ });
26
+ };
27
+
28
+ /**
29
+ * Set talent transformation step data
30
+ * @param {String} id The id of the skill to be updated
31
+ * @param {Object} data Data used to update the skill
32
+ * @param {Boolean} returnAllStepsStatuses If true, return all steps statuses
33
+ * @param {String} token Authorization token
34
+ * @returns {Promise}
35
+ */
36
+ const setTalentTransformationStepData = (
37
+ id,
38
+ data,
39
+ returnAllStepsStatuses,
40
+ token
41
+ ) => {
42
+ return new Promise(function (resolve, reject) {
43
+ const requestData = {
44
+ data: data,
45
+ id: id,
46
+ returnAllStepsStatuses: returnAllStepsStatuses,
47
+ };
48
+ let confirmationRequest = client.post(
49
+ `api/v1/talenttransformation/setstep/`,
50
+ requestData,
12
51
  {
13
- headers: { authorization: authToken },
52
+ headers: { authorization: token },
14
53
  }
15
54
  );
16
- request
55
+ confirmationRequest
17
56
  .then((response) => {
18
57
  resolve(response.data);
19
58
  })
@@ -25,4 +64,5 @@ const getTalentTransformationStepsForCurrentUser = (authToken) => {
25
64
 
26
65
  export default {
27
66
  getTalentTransformationStepsForCurrentUser,
67
+ setTalentTransformationStepData,
28
68
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stackfactor/client-api",
3
- "version": "1.1.69",
3
+ "version": "1.1.71",
4
4
  "description": "Node.js library for the StackFactor API",
5
5
  "main": "index.js",
6
6
  "exports": {