@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.
@@ -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
  /**
@@ -10,7 +10,7 @@ export default {
10
10
  * @param {Array<Object>} activities
11
11
  * @param {String} token Authorization token
12
12
  */
13
- createDepartmentTrainingPlan(name, summary, skill, activities, token) {
13
+ createDepartmentTrainingPlan: (name, summary, skill, activities, token) => {
14
14
  return new Promise(function (resolve, reject) {
15
15
  const requestData = {
16
16
  name: name ? name : "",
@@ -40,7 +40,7 @@ export default {
40
40
  * @param {String} id The id of the template to be deleted
41
41
  * @param {String} token Authorization token
42
42
  */
43
- deleteDepartmentTrainingPlan(id, token) {
43
+ deleteDepartmentTrainingPlan: (id, token) => {
44
44
  return new Promise(function (resolve, reject) {
45
45
  const request = axios.delete(`api/v1/departmenttrainingplans/`, {
46
46
  headers: { authorization: token },
@@ -60,10 +60,10 @@ export default {
60
60
 
61
61
  /**
62
62
  * Get department traing plan information
63
- * @param {number} id The id of the plan
63
+ * @param {Number} id The id of the plan
64
64
  * @param {String} token Authorization token
65
65
  */
66
- getDepartmentTrainingPlanInformationById(id, version, token) {
66
+ getDepartmentTrainingPlanInformationById: (id, version, token) => {
67
67
  return new Promise(function (resolve, reject) {
68
68
  let confirmationRequest = axios.get(
69
69
  `api/v1/departmenttrainingplans/${id}/${version}`,
@@ -86,7 +86,7 @@ export default {
86
86
  * @param {Object} filter The filter used to select the plan
87
87
  * @param {String} token Authorization token
88
88
  */
89
- getDepartmentTrainingPlanList(filter, version, token) {
89
+ getDepartmentTrainingPlanList: (filter, version, token) => {
90
90
  return new Promise(function (resolve, reject) {
91
91
  const requestData = {
92
92
  filter: filter ? filter : "",
@@ -114,7 +114,7 @@ export default {
114
114
  * @param {number} id The id of the plan to be published
115
115
  * @param {String} token Authorization token
116
116
  */
117
- publishDepartmentTrainingPlan(id, token) {
117
+ publishDepartmentTrainingPlan: (id, token) => {
118
118
  return new Promise(function (resolve, reject) {
119
119
  let confirmationRequest = axios.post(
120
120
  `api/v1/departmenttrainingplans/publish/${id}`,
@@ -139,7 +139,7 @@ export default {
139
139
  * @param {Object} data Data used to update the plan
140
140
  * @param {String} token Authorization token
141
141
  */
142
- setDepartmentTrainingPlanInformation(id, data, token) {
142
+ setDepartmentTrainingPlanInformation: (id, data, token) => {
143
143
  return new Promise(function (resolve, reject) {
144
144
  const requestData = {
145
145
  data: data,
package/lib/groups.js CHANGED
@@ -1,9 +1,6 @@
1
- //
2
- // Group sepcific 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>} permissions The permissions to be added
13
10
  * @param {String} authToken - Authentication token
14
11
  */
15
- addPermissionsToGroup(groupId, permissions, authToken) {
12
+ addPermissionsToGroup: (groupId, permissions, authToken) => {
16
13
  return new Promise(function (resolve, reject) {
17
14
  const request = axios.post(
18
15
  `api/v1/groups/permissions/add`,
@@ -38,7 +35,7 @@ export default {
38
35
  * @param {Array<String>} users The users to be added
39
36
  * @param {String} authToken - Authentication token
40
37
  */
41
- addUsersToGroup(groupId, users, authToken) {
38
+ addUsersToGroup: (groupId, users, authToken) => {
42
39
  return new Promise(function (resolve, reject) {
43
40
  const request = axios.post(
44
41
  `api/v1/groups/users/add`,
@@ -64,7 +61,7 @@ export default {
64
61
  * @param {String} description The description of the group
65
62
  * @param {String} authToken The authorization token
66
63
  */
67
- createGroup(name, description, authToken) {
64
+ createGroup: (name, description, authToken) => {
68
65
  return new Promise(function (resolve, reject) {
69
66
  const request = axios.post(
70
67
  `api/v1/groups/group`,
@@ -90,7 +87,7 @@ export default {
90
87
  * @param {String} defaultGroupId The default group all the users will be moved to
91
88
  * @param {String} authToken The authentication token
92
89
  */
93
- deleteGroup(groupId, defaultGroupId, authToken) {
90
+ deleteGroup: (groupId, defaultGroupId, authToken) => {
94
91
  return new Promise(function (resolve, reject) {
95
92
  const request = axios.delete(`api/v1/groups/delete`, {
96
93
  headers: { authorization: authToken },
@@ -111,10 +108,9 @@ export default {
111
108
 
112
109
  /**
113
110
  * Get all permissions
114
- *
115
111
  * @param {String} authToken The authentication token
116
112
  */
117
- getAllPermissions(authToken) {
113
+ getAllPermissions: (authToken) => {
118
114
  return new Promise(function (resolve, reject) {
119
115
  const request = axios.get(`api/v1/groups/permissions/getAllPermissions`, {
120
116
  headers: { authorization: authToken },
@@ -131,10 +127,10 @@ export default {
131
127
 
132
128
  /**
133
129
  * Get group by Id
134
- * @param {*} groupId The group Id
130
+ * @param {String} groupId The group Id
135
131
  * @param {String} authToken The authentication token
136
132
  */
137
- getGroupById(groupId, authToken) {
133
+ getGroupById: (groupId, authToken) => {
138
134
  return new Promise(function (resolve, reject) {
139
135
  const request = axios.get(`api/v1/groups/group/${groupId}`, {
140
136
  headers: { authorization: authToken },
@@ -151,9 +147,9 @@ export default {
151
147
 
152
148
  /**
153
149
  * Get groups for current tenant
154
- * @param {*} authToken The authentication token
150
+ * @param {String} authToken The authentication token
155
151
  */
156
- getGroups(authToken) {
152
+ getGroups: (authToken) => {
157
153
  return new Promise(function (resolve, reject) {
158
154
  const request = axios.get(`api/v1/groups/`, {
159
155
  headers: { authorization: authToken },
@@ -170,9 +166,9 @@ export default {
170
166
 
171
167
  /**
172
168
  * Get current user permissions
173
- * @param {*} authToken The authentication token
169
+ * @param {String} authToken The authentication token
174
170
  */
175
- getUserPermissions(authToken) {
171
+ getUserPermissions: (authToken) => {
176
172
  return new Promise(function (resolve, reject) {
177
173
  const request = axios.get(`api/v1/groups/users/getuserpermissions`, {
178
174
  headers: { authorization: authToken },
@@ -214,7 +210,7 @@ export default {
214
210
  * @param {Array<String>} permissions The permissions to be removed from the group
215
211
  * @param {String} authToken The authentication token
216
212
  */
217
- removePermissionsFromGroup(groupId, permissions, authToken) {
213
+ removePermissionsFromGroup: (groupId, permissions, authToken) => {
218
214
  return new Promise(function (resolve, reject) {
219
215
  const request = axios.post(
220
216
  `api/v1/groups/permissions/remove/`,
@@ -240,7 +236,7 @@ export default {
240
236
  * @param {Array<String>} users The users to be removed from the group
241
237
  * @param {String} authToken The authentication token
242
238
  */
243
- removeUsersFromGroup(groupId, users, authToken) {
239
+ removeUsersFromGroup: (groupId, users, authToken) => {
244
240
  return new Promise(function (resolve, reject) {
245
241
  const request = axios.post(
246
242
  `api/v1/groups/users/remove/`,
@@ -265,7 +261,7 @@ export default {
265
261
  * @param {String} groupId The group Id
266
262
  * @param {String} authToken The authentication token
267
263
  */
268
- setDefault(groupId, authToken) {
264
+ setDefault: (groupId, authToken) => {
269
265
  return new Promise(function (resolve, reject) {
270
266
  const request = axios.put(
271
267
  `api/v1/groups/setDefault/`,
@@ -287,11 +283,11 @@ export default {
287
283
  /**
288
284
  * Update group
289
285
  * @param {String} groupId The group Id
290
- * @param {string} name The updated name of the group
291
- * @param {string} description The updated description of the group
286
+ * @param {String} name The updated name of the group
287
+ * @param {String} description The updated description of the group
292
288
  * @param {String} authToken The authentication token
293
289
  */
294
- updateGroup(groupId, name, description, authToken) {
290
+ updateGroup: (groupId, name, description, authToken) => {
295
291
  return new Promise(function (resolve, reject) {
296
292
  const request = axios.patch(
297
293
  `api/v1/groups/group/`,
@@ -1,18 +1,18 @@
1
- /* eslint-disable no-undef */
2
- import axios, { errorToString } from "./axios";
3
- import axiosLib from "axios";
4
- import htmlParser from "node-html-parser";
5
- import htmlToText from "html2plaintext";
1
+ const axios = require("./axios");
2
+ const errorToString = axios.errorToString;
3
+ const axiosLib = require("axios");
4
+ const htmlParser = require("node-html-parser");
5
+ const htmlToText = require("html2plaintext");
6
6
 
7
- export default {
7
+ module.exports = {
8
8
  axios: axios,
9
9
 
10
10
  /**
11
11
  * Create integration and set information
12
- * @param {object} data The new integration information
12
+ * @param {Object} data The new integration information
13
13
  * @param {String} token Authorization token
14
14
  */
15
- createIntegration(data, token) {
15
+ createIntegration: (data, token) => {
16
16
  return new Promise(function (resolve, reject) {
17
17
  const requestData = {
18
18
  data: data,
@@ -35,7 +35,7 @@ export default {
35
35
  * @param {String} id The id of the integration to be deleted
36
36
  * @param {String} token Authorization token
37
37
  */
38
- deleteIntegration(id, token) {
38
+ deleteIntegration: (id, token) => {
39
39
  return new Promise(function (resolve, reject) {
40
40
  const request = axios.delete(`api/v1/integrations/`, {
41
41
  headers: { authorization: token },
@@ -58,7 +58,7 @@ export default {
58
58
  * @param {String} id The id of the role template to be deleted
59
59
  * @param {String} token Authorization token
60
60
  */
61
- discardIntegrationChanges(id, token) {
61
+ discardIntegrationChanges: (id, token) => {
62
62
  return new Promise(function (resolve, reject) {
63
63
  const data = {};
64
64
  const request = axios.get(`api/v1/integrations/discard/${id}`, {
@@ -81,7 +81,7 @@ export default {
81
81
  * @param {String} version The version of the integration to be received
82
82
  * @param {String} token Authorization token
83
83
  */
84
- getIntegrationInformationById(id, version, token) {
84
+ getIntegrationInformationById: (id, version, token) => {
85
85
  return new Promise(function (resolve, reject) {
86
86
  let confirmationRequest = axios.get(
87
87
  `api/v1/integrations/${id}/${version}`,
@@ -107,13 +107,13 @@ export default {
107
107
  * @param {Boolean} includeSupportedCapabilities If true, the supported capabilities will be included in the response
108
108
  * @param {String} token Authorization token
109
109
  */
110
- getIntegrationsList(
110
+ getIntegrationsList: (
111
111
  filter,
112
112
  type,
113
113
  version,
114
114
  includeSupportedCapabilities,
115
115
  token
116
- ) {
116
+ ) => {
117
117
  return new Promise(function (resolve, reject) {
118
118
  const requestData = {
119
119
  includeSupportedCapabilities: includeSupportedCapabilities,
@@ -140,7 +140,7 @@ export default {
140
140
  * @param {String} verb The verb
141
141
  * @param {String} token Authorization token
142
142
  */
143
- getContentInformationByUrl(url, verb, token) {
143
+ getContentInformationByUrl: (url, verb, token) => {
144
144
  return new Promise(function (resolve, reject) {
145
145
  const requestData = {
146
146
  url: url,
@@ -163,8 +163,12 @@ export default {
163
163
  });
164
164
  },
165
165
 
166
- //get content information by url from the browser instead of the backend
167
- getContentInformationByUrlFromBrowser(url) {
166
+ /**
167
+ * Get content information by url from the browser instead of the backend
168
+ * @param {String} url
169
+ * @returns {Object}
170
+ */
171
+ getContentInformationByUrlFromBrowser: (url) => {
168
172
  return new Promise(function (resolve, reject) {
169
173
  let domain = new URL(url);
170
174
  let instance = axiosLib.create({
@@ -241,7 +245,7 @@ export default {
241
245
  * @param {String} verb The verb
242
246
  * @param {String} token Authorization token
243
247
  */
244
- getEnabledContentProviders(userId, token) {
248
+ getEnabledContentProviders: (userId, token) => {
245
249
  return new Promise(function (resolve, reject) {
246
250
  let confirmationRequest = axios.get(
247
251
  `api/v1/contentproviders/getenabledcontentproviders/${userId}`,
@@ -264,7 +268,7 @@ export default {
264
268
  * @param {String} id The id of the integration to be published
265
269
  * @param {String} token Authorization token
266
270
  */
267
- publishIntegration(id, token) {
271
+ publishIntegration: (id, token) => {
268
272
  return new Promise(function (resolve, reject) {
269
273
  let confirmationRequest = axios.post(
270
274
  `api/v1/integrations/publish/${id}`,
@@ -289,7 +293,7 @@ export default {
289
293
  * @param {Object} data Data used to update the integration
290
294
  * @param {String} token Authorization token
291
295
  */
292
- setIntegrationInformation(id, data, token) {
296
+ setIntegrationInformation: (id, data, token) => {
293
297
  return new Promise(function (resolve, reject) {
294
298
  const requestData = {
295
299
  data: data,
@@ -316,7 +320,7 @@ export default {
316
320
  * @param {String} id The id of the integration to be set as default
317
321
  * @param {String} token Authorization token
318
322
  */
319
- setDefaultIntegration(id, token) {
323
+ setDefaultIntegration: (id, token) => {
320
324
  return new Promise(function (resolve, reject) {
321
325
  let confirmationRequest = axios.post(
322
326
  `api/v1/integrations/${id}/default`,
@@ -1,15 +1,15 @@
1
- import axios from "./axios";
1
+ const axios = require("./axios");
2
2
 
3
3
  export default {
4
4
  axios: axios,
5
5
 
6
6
  /**
7
7
  * Get the integration configuration
8
- * @param {[String]} ids
8
+ * @param {Array<String>} ids
9
9
  * @param {Number} type
10
10
  * @param {String} token Authorization token
11
11
  */
12
- getIntegrationsConfiguration(ids, type, token) {
12
+ getIntegrationsConfiguration: (ids, type, token) => {
13
13
  return new Promise(function (resolve, reject) {
14
14
  let requestData = { type: type };
15
15
  if (ids) requestData.ids = ids;
@@ -37,7 +37,7 @@ export default {
37
37
  * @param {Object} configuration Data used to update the integration configuration
38
38
  * @param {String} token Authorization token
39
39
  */
40
- saveIntegrationConfiguration(id, type, configuration, token) {
40
+ saveIntegrationConfiguration: (id, type, configuration, token) => {
41
41
  return new Promise(function (resolve, reject) {
42
42
  const requestData = {
43
43
  id: id,
@@ -68,7 +68,7 @@ export default {
68
68
  * @param {Object} configuration Configuration to be tested
69
69
  * @param {String} token Authorization token
70
70
  */
71
- testIntegrationConfiguration(id, type, configuration, token) {
71
+ testIntegrationConfiguration: (id, type, configuration, token) => {
72
72
  return new Promise(function (resolve, reject) {
73
73
  const requestData = {
74
74
  id: id,
@@ -1,5 +1,4 @@
1
- /* eslint-disable no-undef */
2
- import axios from "../axios";
1
+ const axios = require("../axios");
3
2
 
4
3
  export default {
5
4
  axios: axios,
@@ -11,7 +10,7 @@ export default {
11
10
  * @param {String} token
12
11
  * @returns {Object}
13
12
  */
14
- generateContent(data, contentType, integrationId, token) {
13
+ generateContent: (data, contentType, integrationId, token) => {
15
14
  return new Promise(function (resolve, reject) {
16
15
  let data_ = {
17
16
  data: data,
@@ -42,7 +41,7 @@ export default {
42
41
  * @param {String} token
43
42
  * @returns {Object}
44
43
  */
45
- generateContentAsync(
44
+ generateContentAsync: (
46
45
  id,
47
46
  data,
48
47
  contentType,
@@ -50,7 +49,7 @@ export default {
50
49
  integrationId,
51
50
  comments,
52
51
  token
53
- ) {
52
+ ) => {
54
53
  return new Promise(function (resolve, reject) {
55
54
  let data_ = {
56
55
  data: data,
package/lib/logger.js CHANGED
@@ -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
  /**
@@ -10,7 +10,7 @@ export default {
10
10
  * @param {Object} data
11
11
  * @param {String} token Authorization token
12
12
  */
13
- comment(elementId, elementType, data, token) {
13
+ comment: (elementId, elementType, data, token) => {
14
14
  return new Promise(function (resolve, reject) {
15
15
  let confirmationRequest = axios.post(
16
16
  "api/v1/logger/comment/",
@@ -36,12 +36,12 @@ export default {
36
36
  /**
37
37
  * Get the list of logger entries for selected element
38
38
  * @param {String} elementId
39
- * @param {number} page The results page
40
- * @param {number} elementsPerPage The number of elements per page
39
+ * @param {Number} page The results page
40
+ * @param {Number} elementsPerPage The number of elements per page
41
41
  * @param {String} token
42
42
  * @returns
43
43
  */
44
- getListByElementId(elementId, page, elementsPerPage, token) {
44
+ getListByElementId: (elementId, page, elementsPerPage, token) => {
45
45
  return new Promise(function (resolve, reject) {
46
46
  let data = {};
47
47
  if (elementsPerPage !== null) data.elementsPerPage = elementsPerPage;
package/lib/role.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
- createRole(data, token) {
11
+ createRole: (data, token) => {
13
12
  return new Promise(function (resolve, reject) {
14
13
  let confirmationRequest = axios.put(
15
14
  "api/v1/roles",
@@ -34,7 +33,7 @@ export default {
34
33
  * @param {Object} data
35
34
  * @param {String} token Authorization token
36
35
  */
37
- createRoleFromTemplate(templateId, data, token) {
36
+ createRoleFromTemplate: (templateId, data, token) => {
38
37
  return new Promise(function (resolve, reject) {
39
38
  const requestData = {
40
39
  templateId: templateId,
@@ -63,7 +62,7 @@ export default {
63
62
  * @param {String} comment The comment included with the deletion
64
63
  * @param {String} token Authorization token
65
64
  */
66
- deleteRole(id, comment, token) {
65
+ deleteRole: (id, comment, token) => {
67
66
  return new Promise(function (resolve, reject) {
68
67
  const data = {
69
68
  id: id,
@@ -88,7 +87,7 @@ export default {
88
87
  * @param {String} id The id of the role to be deleted
89
88
  * @param {String} token Authorization token
90
89
  */
91
- discardRoleChanges(id, token) {
90
+ discardRoleChanges: (id, token) => {
92
91
  return new Promise(function (resolve, reject) {
93
92
  const data = {};
94
93
  const request = axios.get(`api/v1/roles/discard/${id}`, {
@@ -110,7 +109,7 @@ export default {
110
109
  * @param {number} id The id of the role
111
110
  * @param {String} token Authorization token
112
111
  */
113
- getRoleInformationById(id, version, token) {
112
+ getRoleInformationById: (id, version, token) => {
114
113
  return new Promise(function (resolve, reject) {
115
114
  let confirmationRequest = axios.get(
116
115
  `api/v1/roles/role/${id}/${version}`,
@@ -137,14 +136,14 @@ export default {
137
136
  * @param {Boolean} returnDefaultIfVersionNotAvailable Return the default version if published not available
138
137
  * @param {String} token Authorization token
139
138
  */
140
- getRolesList(
139
+ getRolesList: (
141
140
  filter,
142
141
  version,
143
142
  includeDeleted,
144
143
  includeDetailedInformation,
145
144
  returnDefaultIfVersionNotAvailable,
146
145
  token
147
- ) {
146
+ ) => {
148
147
  return new Promise(function (resolve, reject) {
149
148
  const requestData = {
150
149
  version: version,
@@ -172,7 +171,7 @@ export default {
172
171
  * @param {String} comment The comment to be include with the request
173
172
  * @param {String} token Authorization token
174
173
  */
175
- publishRole(id, comment, token) {
174
+ publishRole: (id, comment, token) => {
176
175
  return new Promise(function (resolve, reject) {
177
176
  let data = {};
178
177
  if (comment) data.comment = comment;
@@ -195,7 +194,7 @@ export default {
195
194
  * @param {Object} data Data used to update the role
196
195
  * @param {String} token Authorization token
197
196
  */
198
- setRoleInformation(id, data, token) {
197
+ setRoleInformation: (id, data, token) => {
199
198
  return new Promise(function (resolve, reject) {
200
199
  const requestData = {
201
200
  data: data,
@@ -220,7 +219,7 @@ export default {
220
219
  * @param {Array<Object>} roles
221
220
  * @param {String} token
222
221
  */
223
- setUserRoles(id, roles, roleDescription, token) {
222
+ setUserRoles: (id, roles, roleDescription, token) => {
224
223
  return new Promise(function (resolve, reject) {
225
224
  const requestData = {
226
225
  roles: roles,
@@ -239,13 +238,14 @@ export default {
239
238
  });
240
239
  });
241
240
  },
241
+
242
242
  /**
243
243
  * Watch role
244
244
  * @param {String} id The id of the skill to be updated
245
245
  * @param {Boolean} watch Set to true or false
246
246
  * @param {String} token Authorization token
247
247
  */
248
- watchRole(id, watch, token) {
248
+ watchRole: (id, watch, token) => {
249
249
  return new Promise(function (resolve, reject) {
250
250
  const requestData = {
251
251
  id: id,
@@ -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
- createRoleTemplate(data, token) {
11
+ createRoleTemplate: (data, token) => {
12
12
  return new Promise(function (resolve, reject) {
13
13
  const requestData = {
14
14
  data: data,
@@ -32,7 +32,7 @@ export default {
32
32
  * @param {String} comment The comment included with the deletion
33
33
  * @param {String} token Authorization token
34
34
  */
35
- deleteRoleTemplate(id, comment, token) {
35
+ deleteRoleTemplate: (id, comment, token) => {
36
36
  return new Promise(function (resolve, reject) {
37
37
  const data = {
38
38
  id: id,
@@ -57,7 +57,7 @@ export default {
57
57
  * @param {String} id The id of the role template to be deleted
58
58
  * @param {String} token Authorization token
59
59
  */
60
- discardRoleTemplateChanges(id, token) {
60
+ discardRoleTemplateChanges: (id, token) => {
61
61
  return new Promise(function (resolve, reject) {
62
62
  const data = {};
63
63
  const request = axios.get(`api/v1/roletemplates/discard/${id}`, {
@@ -79,7 +79,7 @@ export default {
79
79
  * @param {String} id The id of the template
80
80
  * @param {String} token Authorization token
81
81
  */
82
- getRoleTemplateInformationById(id, version, token) {
82
+ getRoleTemplateInformationById: (id, version, token) => {
83
83
  return new Promise(function (resolve, reject) {
84
84
  let confirmationRequest = axios.get(
85
85
  `api/v1/roletemplates/${id}/${version}`,
@@ -103,7 +103,7 @@ export default {
103
103
  * @param {boolean} includeDeleted When true it will return the deleted records as well
104
104
  * @param {String} token Authorization token
105
105
  */
106
- getRoleTemplateList(filter, version, includeDeleted, token) {
106
+ getRoleTemplateList: (filter, version, includeDeleted, token) => {
107
107
  return new Promise(function (resolve, reject) {
108
108
  const requestData = {
109
109
  version: version,
@@ -133,7 +133,7 @@ export default {
133
133
  * @param {String} comment The comment to be include with the request
134
134
  * @param {String} token Authorization token
135
135
  */
136
- publishTemplate(id, comment, token) {
136
+ publishTemplate: (id, comment, token) => {
137
137
  return new Promise(function (resolve, reject) {
138
138
  let data = {};
139
139
  if (comment) data.comment = comment;
@@ -160,7 +160,7 @@ export default {
160
160
  * @param {Object} data Data used to update the template
161
161
  * @param {String} token Authorization token
162
162
  */
163
- setTemplateInformation(id, data, token) {
163
+ setTemplateInformation: (id, data, token) => {
164
164
  return new Promise(function (resolve, reject) {
165
165
  const requestData = {
166
166
  data: data,
@@ -189,7 +189,7 @@ export default {
189
189
  * @param {Object} tags Updated template tags
190
190
  * @param {String} token Authorization token
191
191
  */
192
- setTemplateTags(id, tags, token) {
192
+ setTemplateTags: (id, tags, token) => {
193
193
  return new Promise(function (resolve, reject) {
194
194
  const requestData = {
195
195
  tags: tags,
@@ -218,7 +218,7 @@ export default {
218
218
  * @param {Boolean} watch Set to true or false
219
219
  * @param {String} token Authorization token
220
220
  */
221
- watchRoleTemplate(id, watch, token) {
221
+ watchRoleTemplate: (id, watch, token) => {
222
222
  return new Promise(function (resolve, reject) {
223
223
  const requestData = {
224
224
  id: id,