@stackfactor/client-api 1.0.57 → 1.0.59

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.
@@ -73,8 +73,10 @@ export const processNotification = (id, action, comment, authToken) => {
73
73
  });
74
74
  };
75
75
 
76
- export default {
76
+ const actionNotifications = {
77
77
  getAllUserNotifications,
78
78
  markNotifications,
79
79
  processNotification,
80
80
  };
81
+
82
+ export default actionNotifications;
package/lib/address.js CHANGED
@@ -22,6 +22,6 @@ export const autoComplete = (input, authToken) => {
22
22
  });
23
23
  };
24
24
 
25
- export default {
26
- autoComplete: autoComplete,
27
- };
25
+ const address = { autoComplete };
26
+
27
+ export default address;
@@ -75,10 +75,10 @@ export const shouldReturnError = (returnAllExceptions, error) => {
75
75
  }
76
76
  };
77
77
 
78
- export default {
79
- client: client,
80
- errorToString: errorToString,
81
- getErrorType: getErrorType,
82
- getErrorInformation: getErrorInformation,
83
- shouldReturnError: shouldReturnError,
78
+ export {
79
+ client,
80
+ errorToString,
81
+ getErrorType,
82
+ getErrorInformation,
83
+ shouldReturnError,
84
84
  };
package/lib/config.js CHANGED
@@ -65,8 +65,10 @@ export const setConfigurationById = (id, data, authToken) => {
65
65
  });
66
66
  };
67
67
 
68
- export default {
69
- getConfigurationById: getConfigurationById,
70
- getConfigurationByType: getConfigurationByType,
71
- setConfigurationById: setConfigurationById,
68
+ const config = {
69
+ getConfigurationById,
70
+ getConfigurationByType,
71
+ setConfigurationById,
72
72
  };
73
+
74
+ export default config;
package/lib/constants.js CHANGED
@@ -93,8 +93,4 @@ const PERMISSIONS = {
93
93
  MANAGE_PLAN_TEMPLATES: "5dd61305a73c68b44c3f0827",
94
94
  };
95
95
 
96
- export default {
97
- DOCUMENT_VERSION: DOCUMENT_VERSION,
98
- PERMISSIONS: PERMISSIONS,
99
- RESPONSE_TYPE: RESPONSE_TYPE,
100
- };
96
+ export { DOCUMENT_VERSION, PERMISSIONS, RESPONSE_TYPE };
package/lib/dashboard.js CHANGED
@@ -70,8 +70,10 @@ export const removeCardFromDashboard = (id, authToken) => {
70
70
  });
71
71
  };
72
72
 
73
- export default {
74
- addCardToDashboard: addCardToDashboard,
75
- getDashboardCardsList: getDashboardCardsList,
76
- removeCardFromDashboard: removeCardFromDashboard,
73
+ const dashboard = {
74
+ addCardToDashboard,
75
+ getDashboardCardsList,
76
+ removeCardFromDashboard,
77
77
  };
78
+
79
+ export default dashboard;
@@ -168,12 +168,13 @@ export const setDepartmentTrainingPlanInformation = (id, data, token) => {
168
168
  });
169
169
  };
170
170
 
171
- export default {
172
- createDepartmentTrainingPlan: createDepartmentTrainingPlan,
173
- deleteDepartmentTrainingPlan: deleteDepartmentTrainingPlan,
174
- getDepartmentTrainingPlanInformationById:
175
- getDepartmentTrainingPlanInformationById,
176
- getDepartmentTrainingPlanList: getDepartmentTrainingPlanList,
177
- publishDepartmentTrainingPlan: publishDepartmentTrainingPlan,
178
- setDepartmentTrainingPlanInformation: setDepartmentTrainingPlanInformation,
171
+ const departmentTraingPlans = {
172
+ createDepartmentTrainingPlan,
173
+ deleteDepartmentTrainingPlan,
174
+ getDepartmentTrainingPlanInformationById,
175
+ getDepartmentTrainingPlanList,
176
+ publishDepartmentTrainingPlan,
177
+ setDepartmentTrainingPlanInformation,
179
178
  };
179
+
180
+ export default departmentTraingPlans;
package/lib/groups.js CHANGED
@@ -284,17 +284,19 @@ export const updateGroup = (groupId, name, description, authToken) => {
284
284
  });
285
285
  };
286
286
 
287
- export default {
288
- addPermissionsToGroup: addPermissionsToGroup,
289
- addUsersToGroup: addUsersToGroup,
290
- createGroup: createGroup,
291
- deleteGroup: deleteGroup,
292
- getAllPermissions: getAllPermissions,
293
- getGroupById: getGroupById,
294
- getGroups: getGroups,
295
- getUserPermissions: getUserPermissions,
296
- removePermissionsFromGroup: removePermissionsFromGroup,
297
- removeUsersFromGroup: removeUsersFromGroup,
298
- setDefault: setDefault,
299
- updateGroup: updateGroup,
287
+ const groups = {
288
+ addPermissionsToGroup,
289
+ addUsersToGroup,
290
+ createGroup,
291
+ deleteGroup,
292
+ getAllPermissions,
293
+ getGroupById,
294
+ getGroups,
295
+ getUserPermissions,
296
+ removePermissionsFromGroup,
297
+ removeUsersFromGroup,
298
+ setDefault,
299
+ updateGroup,
300
300
  };
301
+
302
+ export default groups;
@@ -335,16 +335,18 @@ export const setDefaultIntegration = (id, token) => {
335
335
  });
336
336
  };
337
337
 
338
- export default {
339
- createIntegration: createIntegration,
340
- deleteIntegration: deleteIntegration,
341
- discardIntegrationChanges: discardIntegrationChanges,
342
- getContentInformationByUrl: getContentInformationByUrl,
343
- getContentInformationByUrlFromBrowser: getContentInformationByUrlFromBrowser,
344
- getEnabledContentProviders: getEnabledContentProviders,
345
- getIntegrationInformationById: getIntegrationInformationById,
346
- getIntegrationsList: getIntegrationsList,
347
- publishIntegration: publishIntegration,
348
- setDefaultIntegration: setDefaultIntegration,
349
- setIntegrationInformation: setIntegrationInformation,
338
+ const integration = {
339
+ createIntegration,
340
+ deleteIntegration,
341
+ discardIntegrationChanges,
342
+ getContentInformationByUrl,
343
+ getContentInformationByUrlFromBrowser,
344
+ getEnabledContentProviders,
345
+ getIntegrationInformationById,
346
+ getIntegrationsList,
347
+ publishIntegration,
348
+ setDefaultIntegration,
349
+ setIntegrationInformation,
350
350
  };
351
+
352
+ export default integration;
@@ -99,8 +99,10 @@ export const testIntegrationConfiguration = (
99
99
  });
100
100
  };
101
101
 
102
- export default {
103
- getIntegrationsConfiguration: getIntegrationsConfiguration,
104
- saveIntegrationConfiguration: saveIntegrationConfiguration,
105
- testIntegrationConfiguration: testIntegrationConfiguration,
102
+ const integrationConfiguration = {
103
+ getIntegrationsConfiguration,
104
+ saveIntegrationConfiguration,
105
+ testIntegrationConfiguration,
106
106
  };
107
+
108
+ export default integrationConfiguration;
@@ -74,7 +74,6 @@ export const generateContentAsync = (
74
74
  });
75
75
  };
76
76
 
77
- export default {
78
- generateContent: generateContent,
79
- generateContentAsync: generateContentAsync,
80
- };
77
+ const contentGenerator = { generateContent, generateContentAsync };
78
+
79
+ export default contentGenerator;
@@ -6,7 +6,7 @@ import { client } from "./axiosClient.js";
6
6
  * @param {String} token Authorization token
7
7
  * @returns {Promise<Object>} The created learning content
8
8
  */
9
- export const createLearningContent = (data, token) => {
9
+ const createLearningContent = (data, token) => {
10
10
  return new Promise(function (resolve, reject) {
11
11
  const requestData = {
12
12
  data: data,
@@ -257,14 +257,16 @@ export const watchLearningContent = (id, watch, token) => {
257
257
  });
258
258
  };
259
259
 
260
- export default {
261
- createLearningContent: createLearningContent,
262
- deleteLearningContent: deleteLearningContent,
263
- discardLearningContentChanges: discardLearningContentChanges,
264
- getLearningContentInformationById: getLearningContentInformationById,
265
- getLearningContentList: getLearningContentList,
266
- publishLearningContent: publishLearningContent,
267
- setLearningContentInformation: setLearningContentInformation,
268
- setLearningContentTags: setLearningContentTags,
269
- watchLearningContent: watchLearningContent,
260
+ const learningContent = {
261
+ createLearningContent,
262
+ deleteLearningContent,
263
+ discardLearningContentChanges,
264
+ getLearningContentInformationById,
265
+ getLearningContentList,
266
+ publishLearningContent,
267
+ setLearningContentInformation,
268
+ setLearningContentTags,
269
+ watchLearningContent,
270
270
  };
271
+
272
+ export default learningContent;
package/lib/logger.js CHANGED
@@ -55,7 +55,6 @@ export const getListByElementId = (elementId, page, elementsPerPage, token) => {
55
55
  });
56
56
  };
57
57
 
58
- export default {
59
- comment: comment,
60
- getListByElementId: getListByElementId,
61
- };
58
+ const logger = { comment, getListByElementId };
59
+
60
+ export default logger;
package/lib/role.js CHANGED
@@ -258,15 +258,17 @@ export const watchRole = (id, watch, token) => {
258
258
  });
259
259
  };
260
260
 
261
- export default {
262
- createRole: createRole,
263
- createRoleFromTemplate: createRoleFromTemplate,
264
- deleteRole: deleteRole,
265
- discardRoleChanges: discardRoleChanges,
266
- getRoleInformationById: getRoleInformationById,
267
- getRolesList: getRolesList,
268
- publishRole: publishRole,
269
- setRoleInformation: setRoleInformation,
270
- setUserRoles: setUserRoles,
271
- watchRole: watchRole,
261
+ const role = {
262
+ createRole,
263
+ createRoleFromTemplate,
264
+ deleteRole,
265
+ discardRoleChanges,
266
+ getRoleInformationById,
267
+ getRolesList,
268
+ publishRole,
269
+ setRoleInformation,
270
+ setUserRoles,
271
+ watchRole,
272
272
  };
273
+
274
+ export default role;
@@ -263,15 +263,17 @@ export const watchRoleTemplate = (id, watch, token) => {
263
263
  });
264
264
  };
265
265
 
266
- export default {
267
- createRoleTemplate: createRoleTemplate,
268
- deleteRoleTemplate: deleteRoleTemplate,
269
- discardRoleTemplateChanges: discardRoleTemplateChanges,
270
- getRoleTemplateInformationById: getRoleTemplateInformationById,
271
- getRoleTemplateList: getRoleTemplateList,
272
- importRoleTemplates: importRoleTemplates,
273
- publishTemplate: publishTemplate,
274
- setTemplateInformation: setTemplateInformation,
275
- setTemplateTags: setTemplateTags,
276
- watchRoleTemplate: watchRoleTemplate,
266
+ const roleTemplate = {
267
+ createRoleTemplate,
268
+ deleteRoleTemplate,
269
+ discardRoleTemplateChanges,
270
+ getRoleTemplateInformationById,
271
+ getRoleTemplateList,
272
+ importRoleTemplates,
273
+ publishTemplate,
274
+ setTemplateInformation,
275
+ setTemplateTags,
276
+ watchRoleTemplate,
277
277
  };
278
+
279
+ export default roleTemplate;
package/lib/skill.js CHANGED
@@ -328,18 +328,20 @@ export const watchSkill = (id, watch, token) => {
328
328
  });
329
329
  };
330
330
 
331
- export default {
332
- createSkill: createSkill,
333
- createSkillsFromTemplates: createSkillsFromTemplates,
334
- deleteSkill: deleteSkill,
335
- discardSkillChanges: discardSkillChanges,
336
- getSkillRelatedRoles: getSkillRelatedRoles,
337
- getSkillRequiredAssessmentType: getSkillRequiredAssessmentType,
338
- getSkillInformationById: getSkillInformationById,
339
- getSkillList: getSkillList,
340
- getTeamSkillsById: getTeamSkillsById,
341
- getCurrentUserTeamSkills: getCurrentUserTeamSkills,
342
- publishSkill: publishSkill,
343
- setSkillInformation: setSkillInformation,
344
- watchSkill: watchSkill,
331
+ const skill = {
332
+ createSkill,
333
+ createSkillsFromTemplates,
334
+ deleteSkill,
335
+ discardSkillChanges,
336
+ getSkillRelatedRoles,
337
+ getSkillRequiredAssessmentType,
338
+ getSkillInformationById,
339
+ getSkillList,
340
+ getTeamSkillsById,
341
+ getCurrentUserTeamSkills,
342
+ publishSkill,
343
+ setSkillInformation,
344
+ watchSkill,
345
345
  };
346
+
347
+ export default skill;
@@ -137,10 +137,12 @@ export const startSession = (skillId, saveSession, token) => {
137
137
  });
138
138
  };
139
139
 
140
- export default {
141
- endSession: endSession,
142
- getNextStep: getNextStep,
143
- getSkillTestAssessment: getSkillTestAssessment,
144
- pause: pause,
145
- startSession: startSession,
140
+ const skillAessementTestingSession = {
141
+ endSession,
142
+ getNextStep,
143
+ getSkillTestAssessment,
144
+ pause,
145
+ startSession,
146
146
  };
147
+
148
+ export default skillAessementTestingSession;
@@ -134,10 +134,12 @@ export const getList = (userId, token) => {
134
134
  });
135
135
  };
136
136
 
137
- export default {
138
- addEntry: addEntry,
139
- create: create,
140
- deleteSkillAssessment: deleteSkillAssessment,
141
- getById: getById,
142
- getList: getList,
137
+ const skillAssessments = {
138
+ addEntry,
139
+ create,
140
+ deleteSkillAssessment,
141
+ getById,
142
+ getList,
143
143
  };
144
+
145
+ export default skillAssessments;
@@ -270,15 +270,17 @@ export const watchSkillTemplate = (id, watch, token) => {
270
270
  });
271
271
  };
272
272
 
273
- export default {
274
- createSkillTemplate: createSkillTemplate,
275
- deleteSkillTemplate: deleteSkillTemplate,
276
- discardSkillTemplateChanges: discardSkillTemplateChanges,
277
- getSkillTemplateInformationById: getSkillTemplateInformationById,
278
- getSkillTemplateList: getSkillTemplateList,
279
- getTechnologyStacks: getTechnologyStacks,
280
- publishTemplate: publishTemplate,
281
- setTemplateInformation: setTemplateInformation,
282
- setTemplateTags: setTemplateTags,
283
- watchSkillTemplate: watchSkillTemplate,
273
+ const skillTemplate = {
274
+ createSkillTemplate,
275
+ deleteSkillTemplate,
276
+ discardSkillTemplateChanges,
277
+ getSkillTemplateInformationById,
278
+ getSkillTemplateList,
279
+ getTechnologyStacks,
280
+ publishTemplate,
281
+ setTemplateInformation,
282
+ setTemplateTags,
283
+ watchSkillTemplate,
284
284
  };
285
+
286
+ export default skillTemplate;
package/lib/teams.js CHANGED
@@ -277,16 +277,18 @@ export const updateTeam = (teamId, data, authToken) => {
277
277
  });
278
278
  };
279
279
 
280
- export default {
281
- addUsersToTeam: addUsersToTeam,
282
- createTeam: createTeam,
283
- deleteTeam: deleteTeam,
284
- getTeamById: getTeamById,
285
- getTeamByIdRoles: getTeamByIdRoles,
286
- getTeams: getTeams,
287
- getTeamByUserId: getTeamByUserId,
288
- getTopTeam: getTopTeam,
289
- removeUsersFromTeam: removeUsersFromTeam,
290
- setDefault: setDefault,
291
- updateTeam: updateTeam,
280
+ const team = {
281
+ addUsersToTeam,
282
+ createTeam,
283
+ deleteTeam,
284
+ getTeamById,
285
+ getTeamByIdRoles,
286
+ getTeams,
287
+ getTeamByUserId,
288
+ getTopTeam,
289
+ removeUsersFromTeam,
290
+ setDefault,
291
+ updateTeam,
292
292
  };
293
+
294
+ export default team;
package/lib/tenants.js CHANGED
@@ -52,7 +52,6 @@ export const setTenantInformation = (category, data, token) => {
52
52
  });
53
53
  };
54
54
 
55
- export default {
56
- getTenantInformation: getTenantInformation,
57
- setTenantInformation: setTenantInformation,
58
- };
55
+ const tenant = { getTenantInformation, setTenantInformation };
56
+
57
+ export default tenant;
@@ -215,14 +215,15 @@ export const setTrainingPlanTemplateTags = (id, tags, token) => {
215
215
  });
216
216
  };
217
217
 
218
- export default {
219
- createTrainingPlanTemplate: createTrainingPlanTemplate,
220
- deleteTrainingPlanTemplate: deleteTrainingPlanTemplate,
221
- discardTrainingPlanChanges: discardTrainingPlanChanges,
222
- getTrainingPlanTemplateInformationById:
223
- getTrainingPlanTemplateInformationById,
224
- getTrainingPlanTemplatesList: getTrainingPlanTemplatesList,
225
- publishTrainingPlanTemplate: publishTrainingPlanTemplate,
226
- setTrainingPlanTemplateInformation: setTrainingPlanTemplateInformation,
227
- setTrainingPlanTemplateTags: setTrainingPlanTemplateTags,
218
+ const trainingPlanTemplate = {
219
+ createTrainingPlanTemplate,
220
+ deleteTrainingPlanTemplate,
221
+ discardTrainingPlanChanges,
222
+ getTrainingPlanTemplateInformationById,
223
+ getTrainingPlanTemplatesList,
224
+ publishTrainingPlanTemplate,
225
+ setTrainingPlanTemplateInformation,
226
+ setTrainingPlanTemplateTags,
228
227
  };
228
+
229
+ export default trainingPlanTemplate;
@@ -264,14 +264,16 @@ export const updateActivities = (planId, data, token) => {
264
264
  });
265
265
  };
266
266
 
267
- export default {
268
- createTrainingPlan: createTrainingPlan,
269
- deleteTrainingPlan: deleteTrainingPlan,
270
- discardTrainingPlanChanges: discardTrainingPlanChanges,
271
- generateNewBaseline: generateNewBaseline,
272
- getTrainingPlanById: getTrainingPlanById,
273
- getListOfTrainingPlans: getListOfTrainingPlans,
274
- publishTrainingPlan: publishTrainingPlan,
275
- updateTrainingPlan: updateTrainingPlan,
276
- updateActivities: updateActivities,
267
+ const trainingPlan = {
268
+ createTrainingPlan,
269
+ deleteTrainingPlan,
270
+ discardTrainingPlanChanges,
271
+ generateNewBaseline,
272
+ getTrainingPlanById,
273
+ getListOfTrainingPlans,
274
+ publishTrainingPlan,
275
+ updateTrainingPlan,
276
+ updateActivities,
277
277
  };
278
+
279
+ export default trainingPlan;
@@ -100,8 +100,10 @@ export const updateEntryfromArrayBusinessProperty = (
100
100
  });
101
101
  };
102
102
 
103
- export default {
104
- addEntryToArrayBusinessProperty: addEntryToArrayBusinessProperty,
105
- removeEntryFromArrayBusinessProperty: removeEntryFromArrayBusinessProperty,
106
- updateEntryfromArrayBusinessProperty: updateEntryfromArrayBusinessProperty,
103
+ export const userInformation = {
104
+ addEntryToArrayBusinessProperty,
105
+ removeEntryFromArrayBusinessProperty,
106
+ updateEntryfromArrayBusinessProperty,
107
107
  };
108
+
109
+ export default userInformation;
package/lib/users.js CHANGED
@@ -613,28 +613,30 @@ export const validateResetPasswordCode = (email, code) => {
613
613
  });
614
614
  };
615
615
 
616
- export default {
617
- addAPIToken: addAPIToken,
618
- confirmEmailAddress: confirmEmailAddress,
619
- createAccount: createAccount,
620
- createUserAccount: createUserAccount,
621
- deleteAPIToken: deleteAPIToken,
622
- deleteUsers: deleteUsers,
623
- getAPITokens: getAPITokens,
624
- getUserById: getUserById,
625
- getUserInformation: getUserInformation,
626
- getUsers: getUsers,
627
- inviteUsers: inviteUsers,
628
- login: login,
629
- logout: logout,
630
- refreshToken: refreshToken,
631
- removeAPIToken: removeAPIToken,
632
- resendInvitationEmails: resendInvitationEmails,
633
- resetPassword: resetPassword,
634
- sendPasswordResetNotification: sendPasswordResetNotification,
635
- setUserInformation: setUserInformation,
636
- updateUserEmail: updateUserEmail,
637
- updateUserGroups: updateUserGroups,
638
- updateUserPassword: updateUserPassword,
639
- validateResetPasswordCode: validateResetPasswordCode,
616
+ const users = {
617
+ addAPIToken,
618
+ confirmEmailAddress,
619
+ createAccount,
620
+ createUserAccount,
621
+ deleteAPIToken,
622
+ deleteUsers,
623
+ getAPITokens,
624
+ getUserById,
625
+ getUserInformation,
626
+ getUsers,
627
+ inviteUsers,
628
+ login,
629
+ logout,
630
+ refreshToken,
631
+ removeAPIToken,
632
+ resendInvitationEmails,
633
+ resetPassword,
634
+ sendPasswordResetNotification,
635
+ setUserInformation,
636
+ updateUserEmail,
637
+ updateUserGroups,
638
+ updateUserPassword,
639
+ validateResetPasswordCode,
640
640
  };
641
+
642
+ export default users;
package/lib/utils.js CHANGED
@@ -43,8 +43,6 @@ export const removeNullProperties = (object) => {
43
43
  return object;
44
44
  };
45
45
 
46
- export default {
47
- getBaseUrl: getBaseUrl,
48
- objectToArray: objectToArray,
49
- removeNullProperties: removeNullProperties,
50
- };
46
+ const utils = { getBaseUrl, objectToArray, removeNullProperties };
47
+
48
+ export default utils;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stackfactor/client-api",
3
- "version": "1.0.57",
3
+ "version": "1.0.59",
4
4
  "description": "Node.js library for the StackFactor API",
5
5
  "main": "index.js",
6
6
  "exports": {