@stackfactor/client-api 1.0.1 → 1.0.2

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/skill.js CHANGED
@@ -1,7 +1,6 @@
1
- import axios from "./axios";
1
+ const axios = require("./axios");
2
2
 
3
- // eslint-disable-next-line no-undef
4
- export default {
3
+ module.exports = {
5
4
  axios: axios,
6
5
 
7
6
  /**
@@ -9,7 +8,7 @@ export default {
9
8
  * @param {Object} data
10
9
  * @param {String} token Authorization token
11
10
  */
12
- createSkill(data, token) {
11
+ createSkill: (data, token) => {
13
12
  return new Promise(function (resolve, reject) {
14
13
  let confirmationRequest = axios.put(
15
14
  "api/v1/skills",
@@ -33,7 +32,7 @@ export default {
33
32
  * @param {Array<String>} templateIds,
34
33
  * @param {String} token Authorization token
35
34
  */
36
- createSkillsFromTemplates(templateIds, token) {
35
+ createSkillsFromTemplates: (templateIds, token) => {
37
36
  return new Promise(function (resolve, reject) {
38
37
  const requestData = {
39
38
  templateIds: templateIds,
@@ -61,7 +60,7 @@ export default {
61
60
  * @param {String} comment The comment included with the deletion
62
61
  * @param {String} token Authorization token
63
62
  */
64
- deleteSkill(id, comment, token) {
63
+ deleteSkill: (id, comment, token) => {
65
64
  return new Promise(function (resolve, reject) {
66
65
  const data = {
67
66
  id: id,
@@ -86,7 +85,7 @@ export default {
86
85
  * @param {String} id The id of the skill to be deleted
87
86
  * @param {String} token Authorization token
88
87
  */
89
- discardSkillChanges(id, token) {
88
+ discardSkillChanges: (id, token) => {
90
89
  return new Promise(function (resolve, reject) {
91
90
  const data = {};
92
91
  const request = axios.get(`api/v1/skills/discard/${id}`, {
@@ -109,7 +108,7 @@ export default {
109
108
  * @param {String} token
110
109
  * @returns
111
110
  */
112
- getSkillRelatedRoles(id, token) {
111
+ getSkillRelatedRoles: (id, token) => {
113
112
  return new Promise(function (resolve, reject) {
114
113
  let confirmationRequest = axios.get(
115
114
  `api/v1/skills/getskillrelatedroles/${id}`,
@@ -132,7 +131,7 @@ export default {
132
131
  * @param {String} id
133
132
  * @param {String} token
134
133
  */
135
- getSkillRequiredAssessmentType(id, token) {
134
+ getSkillRequiredAssessmentType: (id, token) => {
136
135
  return new Promise(function (resolve, reject) {
137
136
  let confirmationRequest = axios.get(
138
137
  `api/v1/skills/getrequiredassessmenttype/${id}`,
@@ -155,7 +154,7 @@ export default {
155
154
  * @param {String} id The id of the skill
156
155
  * @param {String} token Authorization token
157
156
  */
158
- getSkillInformationById(id, version, token) {
157
+ getSkillInformationById: (id, version, token) => {
159
158
  return new Promise(function (resolve, reject) {
160
159
  let confirmationRequest = axios.get(
161
160
  `api/v1/skills/skill/${id}/${version}`,
@@ -181,13 +180,13 @@ export default {
181
180
  * @param {Boolean} returnDefaultIfVersionNotAvailable Return the default version if published not available
182
181
  * @param {String} token Authorization token
183
182
  */
184
- getSkillList(
183
+ getSkillList: (
185
184
  filter,
186
185
  version,
187
186
  includeDeleted,
188
187
  returnDefaultIfVersionNotAvailable,
189
188
  token
190
- ) {
189
+ ) => {
191
190
  return new Promise(function (resolve, reject) {
192
191
  const requestData = {
193
192
  version: version,
@@ -214,7 +213,7 @@ export default {
214
213
  * @param {*} maxDepth How many levels down in the organization the skills will be loaded
215
214
  * @param {*} token Authorization token
216
215
  */
217
- getTeamSkillsById(teamId, maxDepth, token) {
216
+ getTeamSkillsById: (teamId, maxDepth, token) => {
218
217
  return new Promise(function (resolve, reject) {
219
218
  let confirmationRequest = axios.get(
220
219
  `api/v1/skills/getteambyid/${teamId}/${maxDepth}`,
@@ -237,7 +236,7 @@ export default {
237
236
  * @param {*} maxDepth How many levels down in the organization the skills will be loaded
238
237
  * @param {*} token Authorization token
239
238
  */
240
- getCurrentUserTeamSkills(maxDepth, token) {
239
+ getCurrentUserTeamSkills: (maxDepth, token) => {
241
240
  return new Promise(function (resolve, reject) {
242
241
  let confirmationRequest = axios.get(
243
242
  `api/v1/skills/getcurrentuserteam/${maxDepth}`,
@@ -261,7 +260,7 @@ export default {
261
260
  * @param {String} comment The comment to be include with the request
262
261
  * @param {String} token Authorization token
263
262
  */
264
- publishSkill(id, comment, token) {
263
+ publishSkill: (id, comment, token) => {
265
264
  return new Promise(function (resolve, reject) {
266
265
  let data = {};
267
266
  if (comment) data.comment = comment;
@@ -288,7 +287,7 @@ export default {
288
287
  * @param {Object} data Data used to update the skill
289
288
  * @param {String} token Authorization token
290
289
  */
291
- setSkillInformation(id, data, token) {
290
+ setSkillInformation: (id, data, token) => {
292
291
  return new Promise(function (resolve, reject) {
293
292
  const requestData = {
294
293
  data: data,
@@ -317,7 +316,7 @@ export default {
317
316
  * @param {Boolean} watch Set to true or false
318
317
  * @param {String} token Authorization token
319
318
  */
320
- watchSkill(id, watch, token) {
319
+ watchSkill: (id, watch, token) => {
321
320
  return new Promise(function (resolve, reject) {
322
321
  const requestData = {
323
322
  id: id,
@@ -1,7 +1,7 @@
1
- import axios from "./axios";
1
+ const axios = require("./axios");
2
2
 
3
3
  // eslint-disable-next-line no-undef
4
- export default {
4
+ module.exports = {
5
5
  axios: axios,
6
6
 
7
7
  /**
@@ -9,7 +9,7 @@ export default {
9
9
  * @param {String} testingSessionId
10
10
  * @param {String} token Authorization token
11
11
  */
12
- endSession(testingSessionId, token) {
12
+ endSession: (testingSessionId, token) => {
13
13
  return new Promise(function (resolve, reject) {
14
14
  let confirmationRequest = axios.put(
15
15
  "api/v1/skillassessmenttestingsession/endsession",
@@ -34,7 +34,7 @@ export default {
34
34
  * @param {Array<String>} selectedAnswers
35
35
  * @param {String} token Authorization token
36
36
  */
37
- getNextStep(testingSessionId, selectedAnswers, token) {
37
+ getNextStep: (testingSessionId, selectedAnswers, token) => {
38
38
  return new Promise(function (resolve, reject) {
39
39
  let data = {
40
40
  id: testingSessionId,
@@ -64,7 +64,7 @@ export default {
64
64
  * @param {String} token
65
65
  * @returns
66
66
  */
67
- getSkillTestAssessment(userId, skillId, token) {
67
+ getSkillTestAssessment: (userId, skillId, token) => {
68
68
  return new Promise(function (resolve, reject) {
69
69
  let confirmationRequest = axios.post(
70
70
  `api/v1/skillassessmenttestingsession/getbyuserandskill`,
@@ -92,7 +92,7 @@ export default {
92
92
  * @param {String} token
93
93
  * @returns
94
94
  */
95
- pause(testingSessionId, token) {
95
+ pause: (testingSessionId, token) => {
96
96
  return new Promise(function (resolve, reject) {
97
97
  let confirmationRequest = axios.post(
98
98
  `api/v1/skillassessmenttestingsession/pausesession`,
@@ -119,7 +119,7 @@ export default {
119
119
  * @param {Boolean} saveSession
120
120
  * @param {String} token
121
121
  */
122
- startSession(skillId, saveSession, token) {
122
+ startSession: (skillId, saveSession, token) => {
123
123
  return new Promise(function (resolve, reject) {
124
124
  let confirmationRequest = axios.post(
125
125
  "api/v1/skillassessmenttestingsession/startsession",
@@ -1,6 +1,6 @@
1
1
  import axios from "./axios";
2
2
 
3
- export default {
3
+ module.exports = {
4
4
  axios: axios,
5
5
 
6
6
  /**
@@ -10,7 +10,7 @@ export default {
10
10
  * @param {String} comments
11
11
  * @param {String} token Authorization token
12
12
  */
13
- addEntry(id, data, comments, token) {
13
+ addEntry: (id, data, comments, token) => {
14
14
  return new Promise(function (resolve, reject) {
15
15
  const requestData = {
16
16
  comments: comments,
@@ -41,7 +41,7 @@ export default {
41
41
  * @param {String} userId
42
42
  * @param {String} token Authorization token
43
43
  */
44
- create(data, comments, userId, token) {
44
+ create: (data, comments, userId, token) => {
45
45
  return new Promise(function (resolve, reject) {
46
46
  const requestData = {
47
47
  comments: comments,
@@ -71,7 +71,7 @@ export default {
71
71
  * @param {String} comments The comment included with the deletion
72
72
  * @param {String} token Authorization token
73
73
  */
74
- deleteSkillAssessment(id, comments, token) {
74
+ deleteSkillAssessment: (id, comments, token) => {
75
75
  return new Promise(function (resolve, reject) {
76
76
  const data = {
77
77
  id: id,
@@ -96,7 +96,7 @@ export default {
96
96
  * @param {String} id
97
97
  * @param {String} token
98
98
  */
99
- getById(id, token) {
99
+ getById: (id, token) => {
100
100
  return new Promise(function (resolve, reject) {
101
101
  let confirmationRequest = axios.get(`api/v1/skillassessments/${id}`, {
102
102
  headers: { authorization: token },
@@ -116,7 +116,7 @@ export default {
116
116
  * @param {Object} userId The user used to select the skill
117
117
  * @param {String} token Authorization token
118
118
  */
119
- getList(userId, token) {
119
+ getList: (userId, token) => {
120
120
  return new Promise(function (resolve, reject) {
121
121
  const requestData = {};
122
122
  if (userId) requestData.userId = userId;
@@ -1,6 +1,6 @@
1
- import axios from "./axios";
1
+ const axios = require("./axios");
2
2
 
3
- export default {
3
+ module.exports = {
4
4
  axios: axios,
5
5
 
6
6
  /**
@@ -8,7 +8,7 @@ export default {
8
8
  * @param {Object} data
9
9
  * @param {String} token Authorization token
10
10
  */
11
- createSkillTemplate(data, token) {
11
+ createSkillTemplate: (data, token) => {
12
12
  return new Promise(function (resolve, reject) {
13
13
  const requestData = {
14
14
  data: data,
@@ -34,7 +34,7 @@ export default {
34
34
  * @param {String} comment The comment included with the deletion
35
35
  * @param {String} token Authorization token
36
36
  */
37
- deleteSkillTemplate(id, comment, token) {
37
+ deleteSkillTemplate: (id, comment, token) => {
38
38
  const data = {
39
39
  id: id,
40
40
  };
@@ -59,7 +59,7 @@ export default {
59
59
  * @param {String} id The id of the skill template to be deleted
60
60
  * @param {String} token Authorization token
61
61
  */
62
- discardSkillTemplateChanges(id, token) {
62
+ discardSkillTemplateChanges: (id, token) => {
63
63
  return new Promise(function (resolve, reject) {
64
64
  const data = {};
65
65
  const request = axios.get(`api/v1/skilltemplates/discard/${id}`, {
@@ -82,7 +82,7 @@ export default {
82
82
  * @param {String} version The version of the template
83
83
  * @param {String} token Authorization token
84
84
  */
85
- getSkillTemplateInformationById(id, version, token) {
85
+ getSkillTemplateInformationById: (id, version, token) => {
86
86
  return new Promise(function (resolve, reject) {
87
87
  let confirmationRequest = axios.get(
88
88
  `api/v1/skilltemplates/${id}/${version}`,
@@ -107,7 +107,7 @@ export default {
107
107
  * @param {boolean} includeDeleted When true it will return the deleted records as well
108
108
  * @param {String} token Authorization token
109
109
  */
110
- getSkillTemplateList(filter, version, includeDeleted, token) {
110
+ getSkillTemplateList: (filter, version, includeDeleted, token) => {
111
111
  return new Promise(function (resolve, reject) {
112
112
  const requestData = {
113
113
  version: version,
@@ -137,7 +137,7 @@ export default {
137
137
  * @param {String} comment The comment to be include with the request
138
138
  * @param {String} token Authorization token
139
139
  */
140
- publishTemplate(id, comment, token) {
140
+ publishTemplate: (id, comment, token) => {
141
141
  return new Promise(function (resolve, reject) {
142
142
  let data = {};
143
143
  if (comment) data.comment = comment;
@@ -165,7 +165,7 @@ export default {
165
165
  * @param {Object} data Data used to update the template
166
166
  * @param {String} token Authorization token
167
167
  */
168
- setTemplateInformation(id, data, token) {
168
+ setTemplateInformation: (id, data, token) => {
169
169
  return new Promise(function (resolve, reject) {
170
170
  const requestData = {
171
171
  data: data,
@@ -194,7 +194,7 @@ export default {
194
194
  * @param {Object} tags Updated template tags
195
195
  * @param {String} token Authorization token
196
196
  */
197
- setTemplateTags(id, tags, token) {
197
+ setTemplateTags: (id, tags, token) => {
198
198
  return new Promise(function (resolve, reject) {
199
199
  const requestData = {
200
200
  tags: tags,
@@ -223,7 +223,7 @@ export default {
223
223
  * @param {Boolean} watch Set to true or false
224
224
  * @param {String} token Authorization token
225
225
  */
226
- watchSkillTemplate(id, watch, token) {
226
+ watchSkillTemplate: (id, watch, token) => {
227
227
  return new Promise(function (resolve, reject) {
228
228
  const requestData = {
229
229
  id: id,
package/lib/teams.js CHANGED
@@ -1,9 +1,6 @@
1
- //
2
- // Team specific requests
3
- //
4
- import axios from "./axios";
1
+ const axios = require("./axios");
5
2
 
6
- export default {
3
+ module.exports = {
7
4
  axios: axios,
8
5
 
9
6
  /**
@@ -12,7 +9,7 @@ export default {
12
9
  * @param {Array<String>} users The users to be added
13
10
  * @param {String} authToken - Authentication token
14
11
  */
15
- addUsersToTeam(teamId, users, authToken) {
12
+ addUsersToTeam: (teamId, users, authToken) => {
16
13
  return new Promise(function (resolve, reject) {
17
14
  const request = axios.post(
18
15
  `api/v1/teams/users/add`,
@@ -39,7 +36,7 @@ export default {
39
36
  * @param {String} description The description of the team
40
37
  * @param {String} authToken The authorization token
41
38
  */
42
- createTeam(name, managerId, description, authToken) {
39
+ createTeam: (name, managerId, description, authToken) => {
43
40
  return new Promise(function (resolve, reject) {
44
41
  const request = axios.post(
45
42
  `api/v1/teams/team`,
@@ -66,7 +63,7 @@ export default {
66
63
  * @param {String} defaultTeamId The default team all the users will be moved to
67
64
  * @param {String} authToken The authentication token
68
65
  */
69
- deleteTeam(teamId, defaultTeamId, authToken) {
66
+ deleteTeam: (teamId, defaultTeamId, authToken) => {
70
67
  return new Promise(function (resolve, reject) {
71
68
  const request = axios.delete(`api/v1/teams/delete`, {
72
69
  headers: { authorization: authToken },
@@ -91,7 +88,7 @@ export default {
91
88
  * @param {Boolean} includeUserSummaryInformation True if request to load user summary information
92
89
  * @param {String} authToken The authentication token
93
90
  */
94
- getTeamById(teamId, includeUserSummaryInformation, authToken) {
91
+ getTeamById: (teamId, includeUserSummaryInformation, authToken) => {
95
92
  return new Promise(function (resolve, reject) {
96
93
  const request = axios.post(
97
94
  `api/v1/teams/team/${teamId}`,
@@ -113,9 +110,9 @@ export default {
113
110
  /**
114
111
  * Get team roles
115
112
  * @param {String} teamId The team Id
116
- * @param {*} authToken The authentication token
113
+ * @param {String} authToken The authentication token
117
114
  */
118
- getTeamByIdRoles(teamId, authToken) {
115
+ getTeamByIdRoles: (teamId, authToken) => {
119
116
  return new Promise(function (resolve, reject) {
120
117
  const request = axios.get(`api/v1/teams/getroles/${teamId}`, {
121
118
  headers: { authorization: authToken },
@@ -133,9 +130,9 @@ export default {
133
130
  /**
134
131
  * Get teams for current tenant
135
132
  * @param {String} userId
136
- * @param {*} authToken The authentication token
133
+ * @param {String} authToken The authentication token
137
134
  */
138
- getTeams(authToken) {
135
+ getTeams: (authToken) => {
139
136
  return new Promise(function (resolve, reject) {
140
137
  const request = axios.get(`api/v1/teams/`, {
141
138
  headers: { authorization: authToken },
@@ -156,7 +153,7 @@ export default {
156
153
  * @param {Boolean} includeUserSummaryInformation True if request to load user summary information
157
154
  * @param {String} authToken The authentication token
158
155
  */
159
- getTeamByUserId(userId, includeUserSummaryInformation, authToken) {
156
+ getTeamByUserId: (userId, includeUserSummaryInformation, authToken) => {
160
157
  return new Promise(function (resolve, reject) {
161
158
  const request = axios.post(
162
159
  `/api/v1/teams/getuserteam/${userId ? userId : ""}`,
@@ -180,7 +177,7 @@ export default {
180
177
  * @param {Boolean} includeUserSummaryInformation True if request to load user summary information
181
178
  * @param {String} authToken The authentication token
182
179
  */
183
- getTopTeam(includeUserSummaryInformation, authToken) {
180
+ getTopTeam: (includeUserSummaryInformation, authToken) => {
184
181
  return new Promise(function (resolve, reject) {
185
182
  const request = axios.post(
186
183
  `api/v1/teams/gettopteam`,
@@ -205,7 +202,7 @@ export default {
205
202
  * @param {Array<String>} users The users to be removed from the team
206
203
  * @param {String} authToken The authentication token
207
204
  */
208
- removeUsersFromTeam(teamId, users, authToken) {
205
+ removeUsersFromTeam: (teamId, users, authToken) => {
209
206
  return new Promise(function (resolve, reject) {
210
207
  const request = axios.post(
211
208
  `api/v1/teams/users/remove/`,
@@ -230,7 +227,7 @@ export default {
230
227
  * @param {String} teamId The team Id
231
228
  * @param {String} authToken The authentication token
232
229
  */
233
- setDefault(teamId, authToken) {
230
+ setDefault: (teamId, authToken) => {
234
231
  return new Promise(function (resolve, reject) {
235
232
  const request = axios.put(
236
233
  `api/v1/teams/setDefault/`,
@@ -255,7 +252,7 @@ export default {
255
252
  * @param {String} data The updated name of the team
256
253
  * @param {String} authToken The authentication token
257
254
  */
258
- updateTeam(teamId, data, authToken) {
255
+ updateTeam: (teamId, data, authToken) => {
259
256
  return new Promise(function (resolve, reject) {
260
257
  const request = axios.patch(
261
258
  `api/v1/teams/team/`,
@@ -1,17 +1,15 @@
1
- import axios from "./axios";
1
+ const axios = require("./axios");
2
2
 
3
- export default {
3
+ module.exports = {
4
4
  /**
5
5
  * Create a new document to an existing template
6
- *
7
6
  * @param {String} templateId - the template id
8
7
  * @param {String} parentPhaseId - the parent of the new phase. If null, it will add the phase to the
9
8
  * root of the template
10
9
  * @param {Object} data - new phase data information
11
10
  * @param {String} token - authorization token
12
- *
13
11
  */
14
- create(templateId, parentPhaseId, data, token) {
12
+ create: (templateId, parentPhaseId, data, token) => {
15
13
  return new Promise(function (resolve, reject) {
16
14
  const requestData = {
17
15
  templateId: templateId,
@@ -37,13 +35,11 @@ export default {
37
35
 
38
36
  /**
39
37
  * Delete an existing document from a template
40
- *
41
38
  * @param {String} templateId - the template id
42
39
  * @param {String} documentId - the document id
43
40
  * @param {String} token - authorization token
44
- *
45
41
  */
46
- delete(templateId, documentId, token) {
42
+ delete: (templateId, documentId, token) => {
47
43
  return new Promise(function (resolve, reject) {
48
44
  const requestData = {
49
45
  templateId: templateId,
@@ -65,14 +61,12 @@ export default {
65
61
 
66
62
  /**
67
63
  * Move an existing document
68
- *
69
64
  * @param {String} templateId - the template id
70
65
  * @param {String} documentId - the id of the document to be moved
71
66
  * @param {String} newParentPhaseId - the new parent phase id
72
67
  * @param {String} token - authorization token
73
- *
74
68
  */
75
- move(templateId, documentId, newParentPhaseId, token) {
69
+ move: (templateId, documentId, newParentPhaseId, token) => {
76
70
  return new Promise(function (resolve, reject) {
77
71
  const requestData = {
78
72
  templateId: templateId,
@@ -98,14 +92,12 @@ export default {
98
92
 
99
93
  /**
100
94
  * Update an existing document phase
101
- *
102
95
  * @param {String} templateId - template id
103
96
  * @param {String} documentId - document id
104
97
  * @param {Object} data - data containing the updated document information
105
98
  * @param {String} token - authorization token
106
- *
107
99
  */
108
- update(templateId, documentId, data, token) {
100
+ update: (templateId, documentId, data, token) => {
109
101
  return new Promise(function (resolve, reject) {
110
102
  const requestData = {
111
103
  templateId: templateId,
@@ -1,17 +1,15 @@
1
- import axios from "./axios";
1
+ const axios = require("./axios");
2
2
 
3
3
  export default {
4
4
  /**
5
5
  * Add a new phase to an existing template
6
- *
7
6
  * @param {String} templateId - the template id
8
7
  * @param {String} parentPhaseId - the parent of the new phase. If null, it will add the phase to the root
9
8
  * of the template
10
9
  * @param {Object} data - new phase data information
11
10
  * @param {String} token - authorization token
12
- *
13
11
  */
14
- create(templateId, parentPhaseId, data, token) {
12
+ create: (templateId, parentPhaseId, data, token) => {
15
13
  return new Promise(function (resolve, reject) {
16
14
  const requestData = {
17
15
  templateId: templateId,
@@ -37,13 +35,11 @@ export default {
37
35
 
38
36
  /**
39
37
  * Delete an existing phase
40
- *
41
38
  * @param {String} templateId - the template id
42
39
  * @param {String} phaseId - the phase id
43
40
  * @param {String} token - authorization token
44
- *
45
41
  */
46
- delete(templateId, phaseId, token) {
42
+ delete: (templateId, phaseId, token) => {
47
43
  return new Promise(function (resolve, reject) {
48
44
  const requestData = {
49
45
  templateId: templateId,
@@ -68,14 +64,12 @@ export default {
68
64
 
69
65
  /**
70
66
  * Move an existing phase
71
- *
72
67
  * @param {String} templateId - the template id
73
68
  * @param {String} phaseId - the id of the phase to be moved
74
69
  * @param {String} newParentPhaseId - the new parent phase id
75
70
  * @param {String} token - authorization token
76
- *
77
71
  */
78
- move(templateId, phaseId, newParentPhaseId, token) {
72
+ move: (templateId, phaseId, newParentPhaseId, token) => {
79
73
  return new Promise(function (resolve, reject) {
80
74
  const requestData = {
81
75
  templateId: templateId,
@@ -101,14 +95,12 @@ export default {
101
95
 
102
96
  /**
103
97
  * Update an existing template phase
104
- *
105
98
  * @param {String} templateId - template id
106
99
  * @param {String} phaseId - phase id
107
100
  * @param {Object} data - data containing the new phase information
108
101
  * @param {String} token - authorization token
109
- *
110
102
  */
111
- update(templateId, phaseId, data, token) {
103
+ update: (templateId, phaseId, data, token) => {
112
104
  return new Promise(function (resolve, reject) {
113
105
  const requestData = {
114
106
  templateId: templateId,
@@ -1,15 +1,13 @@
1
- import axios from "./axios";
1
+ const axios = require("./axios");
2
2
 
3
3
  export default {
4
4
  /**
5
5
  * Create a new release to an existing template
6
- *
7
6
  * @param {string} templateId - the template id
8
7
  * @param {Object} data - new phase data information
9
8
  * @param {string} token - authorization token
10
- *
11
9
  */
12
- create(templateId, data, token) {
10
+ create: (templateId, data, token) => {
13
11
  return new Promise(function (resolve, reject) {
14
12
  const requestData = {
15
13
  templateId: templateId,
@@ -34,13 +32,11 @@ export default {
34
32
 
35
33
  /**
36
34
  * Delete an existing release from a template
37
- *
38
35
  * @param {string} templateId - the template id
39
36
  * @param {string} releaseId - the document id
40
37
  * @param {string} token - authorization token
41
- *
42
38
  */
43
- delete(templateId, releaseId, token) {
39
+ delete: (templateId, releaseId, token) => {
44
40
  return new Promise(function (resolve, reject) {
45
41
  const requestData = {
46
42
  templateId: templateId,
@@ -65,14 +61,12 @@ export default {
65
61
 
66
62
  /**
67
63
  * Update an existing release
68
- *
69
64
  * @param {string} templateId - template id
70
65
  * @param {string} releaseId - release id
71
66
  * @param {Object} data - data containing the updated document information
72
67
  * @param {string} token - authorization token
73
- *
74
68
  */
75
- update(templateId, releaseId, data, token) {
69
+ update: (templateId, releaseId, data, token) => {
76
70
  return new Promise(function (resolve, reject) {
77
71
  const requestData = {
78
72
  templateId: templateId,